Skip to main content

branches

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

Overview

Namebranches
TypeResource
Idazure_isv.neonpostgres.branches

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.
createdAtstringTimestamp indicating when the entity was created.
databaseNamestringDatabase name associated with the branch.
databasesarrayNeon Databases associated with the branch.
endpointsarrayEndpoints associated with the branch.
entityIdstringUnique identifier for the entity.
entityNamestringName of the resource.
parentIdstringThe ID of the parent branch.
projectIdstringThe ID of the project this branch belongs to.
provisioningStatestringProvisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled)
roleNamestringRole name associated with the branch.
rolesarrayRoles associated with the branch.
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, branch_name, subscription_idGet a Branch.
listselectresource_group_name, organization_name, project_name, subscription_idList Branch resources by Project.
create_or_updateinsertresource_group_name, organization_name, project_name, branch_name, subscription_idCreate a Branch.
updateupdateresource_group_name, organization_name, project_name, branch_name, subscription_idUpdate a Branch.
create_or_updatereplaceresource_group_name, organization_name, project_name, branch_name, subscription_idCreate a Branch.
deletedeleteresource_group_name, organization_name, project_name, branch_name, subscription_idDelete a Branch.

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
branch_namestringThe name of the Branch. Required.
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 Branch.

SELECT
id,
name,
attributes,
createdAt,
databaseName,
databases,
endpoints,
entityId,
entityName,
parentId,
projectId,
provisioningState,
roleName,
roles,
systemData,
type
FROM azure_isv.neonpostgres.branches
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND project_name = '{{ project_name }}' -- required
AND branch_name = '{{ branch_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a Branch.

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

UPDATE examples

Update a Branch.

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

REPLACE examples

Create a Branch.

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

DELETE examples

Delete a Branch.

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