Skip to main content

clusters

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

Overview

Nameclusters
TypeResource
Idazure.postgresql_hsc.clusters

Fields

NameDatatypeDescription
aad_auth_enabledtextfield from the properties object
administrator_logintextfield from the properties object
administrator_login_passwordtextfield from the properties object
auth_configtextfield from the properties object
citus_versiontextfield from the properties object
clusterNametextfield from the properties object
coordinator_enable_public_ip_accesstextfield from the properties object
coordinator_server_editiontextfield from the properties object
coordinator_storage_quota_in_mbtextfield from the properties object
coordinator_vcorestextfield from the properties object
data_encryptiontextfield from the properties object
database_nametextfield from the properties object
earliest_restore_timetextfield from the properties object
enable_geo_backuptextfield from the properties object
enable_hatextfield from the properties object
enable_shards_on_coordinatortextfield from the properties object
identitytextDescribes the identity of the cluster.
locationtextThe geo-location where the resource lives
maintenance_windowtextfield from the properties object
node_counttextfield from the properties object
node_enable_public_ip_accesstextfield from the properties object
node_server_editiontextfield from the properties object
node_storage_quota_in_mbtextfield from the properties object
node_vcorestextfield from the properties object
password_enabledtextfield from the properties object
point_in_time_utctextfield from the properties object
postgresql_versiontextfield from the properties object
preferred_primary_zonetextfield from the properties object
private_endpoint_connectionstextfield from the properties object
provisioning_statetextfield from the properties object
read_replicastextfield from the properties object
resourceGroupNametextfield from the properties object
server_namestextfield from the properties object
source_locationtextfield from the properties object
source_resource_idtextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTclusterName, resourceGroupName, subscriptionIdGets information about a cluster such as compute and storage configuration and cluster lifecycle metadata such as cluster creation date and time.
listSELECTsubscriptionIdLists all clusters in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists all clusters in a resource group.
createINSERTclusterName, resourceGroupName, subscriptionIdCreates a new cluster with servers.
deleteDELETEclusterName, resourceGroupName, subscriptionIdDeletes a cluster together with servers in it.
updateUPDATEclusterName, resourceGroupName, subscriptionIdUpdates an existing cluster. The request body can contain one or several properties from the cluster definition.
check_name_availabilityEXECsubscriptionId, data__name, data__typeChecks 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_replicaEXECclusterName, resourceGroupName, subscriptionIdPromotes read replica cluster to an independent read-write cluster.
restartEXECclusterName, resourceGroupName, subscriptionIdRestarts all nodes in the cluster.
startEXECclusterName, resourceGroupName, subscriptionIdStarts stopped compute on all cluster nodes.
stopEXECclusterName, resourceGroupName, subscriptionIdStops compute on all cluster nodes.

SELECT examples

Lists all clusters in a subscription.

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new clusters resource.

/*+ create */
INSERT INTO azure.postgresql_hsc.clusters (
clusterName,
resourceGroupName,
subscriptionId,
properties,
identity,
tags,
location
)
SELECT
'{{ clusterName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ identity }}',
'{{ tags }}',
'{{ location }}'
;

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 }}';