branches
Creates, updates, deletes, gets or lists a branches resource.
Overview
| Name | branches |
| Type | Resource |
| Id | azure_isv.neonpostgres.branches |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
attributes | array | Additional attributes for the entity. |
createdAt | string | Timestamp indicating when the entity was created. |
databaseName | string | Database name associated with the branch. |
databases | array | Neon Databases associated with the branch. |
endpoints | array | Endpoints associated with the branch. |
entityId | string | Unique identifier for the entity. |
entityName | string | Name of the resource. |
parentId | string | The ID of the parent branch. |
projectId | string | The ID of the project this branch belongs to. |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled) |
roleName | string | Role name associated with the branch. |
roles | array | Roles associated with the branch. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
attributes | array | Additional attributes for the entity. |
createdAt | string | Timestamp indicating when the entity was created. |
databaseName | string | Database name associated with the branch. |
databases | array | Neon Databases associated with the branch. |
endpoints | array | Endpoints associated with the branch. |
entityId | string | Unique identifier for the entity. |
entityName | string | Name of the resource. |
parentId | string | The ID of the parent branch. |
projectId | string | The ID of the project this branch belongs to. |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled) |
roleName | string | Role name associated with the branch. |
roles | array | Roles associated with the branch. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, organization_name, project_name, branch_name, subscription_id | Get a Branch. | |
list | select | resource_group_name, organization_name, project_name, subscription_id | List Branch resources by Project. | |
create_or_update | insert | resource_group_name, organization_name, project_name, branch_name, subscription_id | Create a Branch. | |
update | update | resource_group_name, organization_name, project_name, branch_name, subscription_id | Update a Branch. | |
create_or_update | replace | resource_group_name, organization_name, project_name, branch_name, subscription_id | Create a Branch. | |
delete | delete | resource_group_name, organization_name, project_name, branch_name, subscription_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
branch_name | string | The name of the Branch. Required. |
organization_name | string | Name of the Neon Organizations resource. Required. |
project_name | string | The name of the Project. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list
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
;
List Branch resources by Project.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: branches
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the branches resource.
- name: organization_name
value: "{{ organization_name }}"
description: Required parameter for the branches resource.
- name: project_name
value: "{{ project_name }}"
description: Required parameter for the branches resource.
- name: branch_name
value: "{{ branch_name }}"
description: Required parameter for the branches resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the branches resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
entityId: "{{ entityId }}"
entityName: "{{ entityName }}"
createdAt: "{{ createdAt }}"
provisioningState: "{{ provisioningState }}"
attributes:
- name: "{{ name }}"
value: "{{ value }}"
projectId: "{{ projectId }}"
parentId: "{{ parentId }}"
roleName: "{{ roleName }}"
databaseName: "{{ databaseName }}"
roles:
- entityId: "{{ entityId }}"
entityName: "{{ entityName }}"
createdAt: "{{ createdAt }}"
provisioningState: "{{ provisioningState }}"
attributes: "{{ attributes }}"
branchId: "{{ branchId }}"
permissions: "{{ permissions }}"
isSuperUser: {{ isSuperUser }}
databases:
- entityId: "{{ entityId }}"
entityName: "{{ entityName }}"
createdAt: "{{ createdAt }}"
provisioningState: "{{ provisioningState }}"
attributes: "{{ attributes }}"
branchId: "{{ branchId }}"
ownerName: "{{ ownerName }}"
endpoints:
- entityId: "{{ entityId }}"
entityName: "{{ entityName }}"
createdAt: "{{ createdAt }}"
provisioningState: "{{ provisioningState }}"
attributes: "{{ attributes }}"
projectId: "{{ projectId }}"
branchId: "{{ branchId }}"
endpointType: "{{ endpointType }}"
UPDATE examples
- update
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_or_update
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
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
;