Skip to main content

projects

Creates, updates, deletes, gets or lists a projects resource.

Overview

Nameprojects
TypeResource
Idazure_isv.neonpostgres.projects

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
attributesarrayAdditional attributes for the entity.
branchobjectThe Branch properties of the project. This is optional.
createdAtstringTimestamp indicating when the entity was created.
databasesarrayNeon Databases associated with the project.
defaultEndpointSettingsobjectDefault endpoint settings for the project.
endpointsarrayEndpoints associated with the project.
entityIdstringUnique identifier for the entity.
entityNamestringName of the resource.
historyRetentionintegerThe retention period for project history in seconds.
pgVersionintegerPostgres version for the project.
provisioningStatestringProvisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled)
regionIdstringRegion where the project is created.
rolesarrayRoles associated with the project.
storageintegerData Storage bytes per hour for the project.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, organization_name, project_name, subscription_idGet a Project.
listselectresource_group_name, organization_name, subscription_idList Project resources by OrganizationResource.
create_or_updateinsertresource_group_name, organization_name, project_name, subscription_idCreate a Project.
updateupdateresource_group_name, organization_name, project_name, subscription_idUpdate a Project.
create_or_updatereplaceresource_group_name, organization_name, project_name, subscription_idCreate a Project.
deletedeleteresource_group_name, organization_name, project_name, subscription_idDelete a Project.
get_connection_uriexecresource_group_name, organization_name, project_name, subscription_idAction to retrieve the connection URI for the Neon Database.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
organization_namestringName of the Neon Organizations resource. Required.
project_namestringThe name of the Project. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Get a Project.

SELECT
id,
name,
attributes,
branch,
createdAt,
databases,
defaultEndpointSettings,
endpoints,
entityId,
entityName,
historyRetention,
pgVersion,
provisioningState,
regionId,
roles,
storage,
systemData,
type
FROM azure_isv.neonpostgres.projects
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND project_name = '{{ project_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a Project.

INSERT INTO azure_isv.neonpostgres.projects (
properties,
resource_group_name,
organization_name,
project_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ organization_name }}',
'{{ project_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Update a Project.

UPDATE azure_isv.neonpostgres.projects
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND organization_name = '{{ organization_name }}' --required
AND project_name = '{{ project_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

REPLACE examples

Create a Project.

REPLACE azure_isv.neonpostgres.projects
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND organization_name = '{{ organization_name }}' --required
AND project_name = '{{ project_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Delete a Project.

DELETE FROM azure_isv.neonpostgres.projects
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND organization_name = '{{ organization_name }}' --required
AND project_name = '{{ project_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Action to retrieve the connection URI for the Neon Database.

EXEC azure_isv.neonpostgres.projects.get_connection_uri 
@resource_group_name='{{ resource_group_name }}' --required,
@organization_name='{{ organization_name }}' --required,
@project_name='{{ project_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"projectId": "{{ projectId }}",
"branchId": "{{ branchId }}",
"databaseName": "{{ databaseName }}",
"roleName": "{{ roleName }}",
"endpointId": "{{ endpointId }}",
"isPooled": {{ isPooled }}
}'
;