clusters
Creates, updates, deletes, gets or lists a clusters
resource.
Overview
Name | clusters |
Type | Resource |
Id | azure.postgresql_hsc.clusters |
Fields
- vw_clusters
- clusters
Name | Datatype | Description |
---|---|---|
aad_auth_enabled | text | field from the properties object |
administrator_login | text | field from the properties object |
administrator_login_password | text | field from the properties object |
auth_config | text | field from the properties object |
citus_version | text | field from the properties object |
clusterName | text | field from the properties object |
coordinator_enable_public_ip_access | text | field from the properties object |
coordinator_server_edition | text | field from the properties object |
coordinator_storage_quota_in_mb | text | field from the properties object |
coordinator_vcores | text | field from the properties object |
data_encryption | text | field from the properties object |
database_name | text | field from the properties object |
earliest_restore_time | text | field from the properties object |
enable_geo_backup | text | field from the properties object |
enable_ha | text | field from the properties object |
enable_shards_on_coordinator | text | field from the properties object |
identity | text | Describes the identity of the cluster. |
location | text | The geo-location where the resource lives |
maintenance_window | text | field from the properties object |
node_count | text | field from the properties object |
node_enable_public_ip_access | text | field from the properties object |
node_server_edition | text | field from the properties object |
node_storage_quota_in_mb | text | field from the properties object |
node_vcores | text | field from the properties object |
password_enabled | text | field from the properties object |
point_in_time_utc | text | field from the properties object |
postgresql_version | text | field from the properties object |
preferred_primary_zone | text | field from the properties object |
private_endpoint_connections | text | field from the properties object |
provisioning_state | text | field from the properties object |
read_replicas | text | field from the properties object |
resourceGroupName | text | field from the properties object |
server_names | text | field from the properties object |
source_location | text | field from the properties object |
source_resource_id | text | field from the properties object |
state | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
Name | Datatype | Description |
---|---|---|
identity | object | Describes the identity of the cluster. |
location | string | The geo-location where the resource lives |
properties | object | Properties of the cluster. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | clusterName, resourceGroupName, subscriptionId | Gets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as cluster creation date and time. |
list | SELECT | subscriptionId | Lists all clusters in a subscription. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Lists all clusters in a resource group. |
create | INSERT | clusterName, resourceGroupName, subscriptionId | Creates a new cluster with servers. |
delete | DELETE | clusterName, resourceGroupName, subscriptionId | Deletes a cluster together with servers in it. |
update | UPDATE | clusterName, resourceGroupName, subscriptionId | Updates an existing cluster. The request body can contain one or several properties from the cluster definition. |
check_name_availability | EXEC | subscriptionId, data__name, data__type | Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end with a hyphen. |
promote_read_replica | EXEC | clusterName, resourceGroupName, subscriptionId | Promotes read replica cluster to an independent read-write cluster. |
restart | EXEC | clusterName, resourceGroupName, subscriptionId | Restarts all nodes in the cluster. |
start | EXEC | clusterName, resourceGroupName, subscriptionId | Starts stopped compute on all cluster nodes. |
stop | EXEC | clusterName, resourceGroupName, subscriptionId | Stops compute on all cluster nodes. |
SELECT
examples
Lists all clusters in a subscription.
- vw_clusters
- clusters
SELECT
aad_auth_enabled,
administrator_login,
administrator_login_password,
auth_config,
citus_version,
clusterName,
coordinator_enable_public_ip_access,
coordinator_server_edition,
coordinator_storage_quota_in_mb,
coordinator_vcores,
data_encryption,
database_name,
earliest_restore_time,
enable_geo_backup,
enable_ha,
enable_shards_on_coordinator,
identity,
location,
maintenance_window,
node_count,
node_enable_public_ip_access,
node_server_edition,
node_storage_quota_in_mb,
node_vcores,
password_enabled,
point_in_time_utc,
postgresql_version,
preferred_primary_zone,
private_endpoint_connections,
provisioning_state,
read_replicas,
resourceGroupName,
server_names,
source_location,
source_resource_id,
state,
subscriptionId,
tags
FROM azure.postgresql_hsc.vw_clusters
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
identity,
location,
properties,
tags
FROM azure.postgresql_hsc.clusters
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new clusters
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.postgresql_hsc.clusters (
clusterName,
resourceGroupName,
subscriptionId,
properties,
identity,
tags,
location
)
SELECT
'{{ clusterName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ identity }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: aadAuthEnabled
value: string
- name: administratorLogin
value: string
- name: administratorLoginPassword
value: string
- name: dataEncryption
value:
- name: primaryKeyUri
value: string
- name: primaryUserAssignedIdentityId
value: string
- name: type
value: string
- name: provisioningState
value: string
- name: state
value: string
- name: postgresqlVersion
value: string
- name: citusVersion
value: string
- name: maintenanceWindow
value:
- name: customWindow
value: string
- name: startHour
value: integer
- name: startMinute
value: integer
- name: dayOfWeek
value: integer
- name: preferredPrimaryZone
value: string
- name: enableShardsOnCoordinator
value: boolean
- name: enableHa
value: boolean
- name: coordinatorServerEdition
value: string
- name: coordinatorStorageQuotaInMb
value: integer
- name: coordinatorVCores
value: integer
- name: coordinatorEnablePublicIpAccess
value: boolean
- name: nodeServerEdition
value: string
- name: nodeCount
value: integer
- name: nodeStorageQuotaInMb
value: integer
- name: nodeVCores
value: integer
- name: nodeEnablePublicIpAccess
value: boolean
- name: serverNames
value:
- - name: name
value: string
- name: fullyQualifiedDomainName
value: string
- name: sourceResourceId
value: string
- name: sourceLocation
value: string
- name: passwordEnabled
value: string
- name: pointInTimeUTC
value: string
- name: readReplicas
value:
- string
- name: earliestRestoreTime
value: string
- name: privateEndpointConnections
value:
- - name: properties
value:
- name: privateEndpoint
value:
- name: id
value: string
- name: groupIds
value:
- string
- name: privateLinkServiceConnectionState
value:
- name: status
value: []
- name: description
value: string
- name: actionsRequired
value: string
- name: databaseName
value: string
- name: enableGeoBackup
value: boolean
- name: authConfig
value:
- name: activeDirectoryAuth
value: string
- name: passwordAuth
value: string
- name: identity
value:
- name: type
value: string
- name: userAssignedIdentities
value: []
- name: tags
value: object
- name: location
value: string
UPDATE
example
Updates a clusters
resource.
/*+ update */
UPDATE azure.postgresql_hsc.clusters
SET
properties = '{{ properties }}',
identity = '{{ identity }}',
tags = '{{ tags }}'
WHERE
clusterName = '{{ clusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified clusters
resource.
/*+ delete */
DELETE FROM azure.postgresql_hsc.clusters
WHERE clusterName = '{{ clusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';