Skip to main content

administrators

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

Overview

Nameadministrators
TypeResource
Idazure.postgresql.administrators

Fields

NameDatatypeDescription
objectIdtextfield from the properties object
object_idtextfield from the properties object
principal_nametextfield from the properties object
principal_typetextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
subscriptionIdtextfield from the properties object
tenant_idtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTobjectId, resourceGroupName, serverName, subscriptionIdGets information about a server.
list_by_serverSELECTresourceGroupName, serverName, subscriptionIdList all the AAD administrators for a given server.
createINSERTobjectId, resourceGroupName, serverName, subscriptionIdCreates a new server.
deleteDELETEobjectId, resourceGroupName, serverName, subscriptionIdDeletes an Active Directory Administrator associated with the server.

SELECT examples

List all the AAD administrators for a given server.

SELECT
objectId,
object_id,
principal_name,
principal_type,
resourceGroupName,
serverName,
subscriptionId,
tenant_id
FROM azure.postgresql.vw_administrators
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.postgresql.administrators (
objectId,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ objectId }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified administrators resource.

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