Skip to main content

servers

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

Overview

Nameservers
TypeResource
Idazure.postgresql.servers

Fields

NameDatatypeDescription
administrator_logintextfield from the properties object
administrator_login_passwordtextfield from the properties object
auth_configtextfield from the properties object
availability_zonetextfield from the properties object
backuptextfield from the properties object
create_modetextfield from the properties object
data_encryptiontextfield from the properties object
fully_qualified_domain_nametextfield from the properties object
high_availabilitytextfield from the properties object
identitytextInformation describing the identities associated with this application.
locationtextThe geo-location where the resource lives
maintenance_windowtextfield from the properties object
minor_versiontextfield from the properties object
networktextfield from the properties object
point_in_time_utctextfield from the properties object
private_endpoint_connectionstextfield from the properties object
replicatextfield from the properties object
replica_capacitytextfield from the properties object
replication_roletextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
skutextSku information related properties of a server.
source_server_resource_idtextfield from the properties object
statetextfield from the properties object
storagetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
versiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serverName, subscriptionIdGets information about a server.
listSELECTsubscriptionIdList all the servers in a given subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList all the servers in a given resource group.
createINSERTresourceGroupName, serverName, subscriptionIdCreates a new server.
deleteDELETEresourceGroupName, serverName, subscriptionIdDeletes a server.
updateUPDATEresourceGroupName, serverName, subscriptionIdUpdates an existing server. The request body can contain one to many of the properties present in the normal server definition.
restartEXECresourceGroupName, serverName, subscriptionIdRestarts a server.
startEXECresourceGroupName, serverName, subscriptionIdStarts a server.
stopEXECresourceGroupName, serverName, subscriptionIdStops a server.

SELECT examples

List all the servers in a given subscription.

SELECT
administrator_login,
administrator_login_password,
auth_config,
availability_zone,
backup,
create_mode,
data_encryption,
fully_qualified_domain_name,
high_availability,
identity,
location,
maintenance_window,
minor_version,
network,
point_in_time_utc,
private_endpoint_connections,
replica,
replica_capacity,
replication_role,
resourceGroupName,
serverName,
sku,
source_server_resource_id,
state,
storage,
subscriptionId,
tags,
version
FROM azure.postgresql.vw_servers
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.postgresql.servers (
resourceGroupName,
serverName,
subscriptionId,
sku,
identity,
properties,
tags,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ sku }}',
'{{ identity }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a servers resource.

/*+ update */
UPDATE azure.postgresql.servers
SET
sku = '{{ sku }}',
identity = '{{ identity }}',
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified servers resource.

/*+ delete */
DELETE FROM azure.postgresql.servers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';