Skip to main content

administrators

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

Overview

Nameadministrators
TypeResource
Idazure.postgresql.administrators

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
propertiesobjectProperties of the active directory administrator.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, serverName, objectIdGets information about a server.
list_by_serverselectsubscriptionId, resourceGroupName, serverNameList all the AAD administrators for a given server.
createinsertsubscriptionId, resourceGroupName, serverName, objectIdCreates a new server.
deletedeletesubscriptionId, resourceGroupName, serverName, objectIdDeletes an Active Directory Administrator associated with the server.

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.

NameDatatypeDescription
objectIdstringGuid of the objectId for the administrator.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serverNamestringThe name of the server.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Gets information about a server.

SELECT
properties
FROM azure.postgresql.administrators
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
AND objectId = '{{ objectId }}' -- required
;

INSERT examples

Creates a new server.

INSERT INTO azure.postgresql.administrators (
data__properties,
subscriptionId,
resourceGroupName,
serverName,
objectId
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ objectId }}'
RETURNING
properties
;

DELETE examples

Deletes an Active Directory Administrator associated with the server.

DELETE FROM azure.postgresql.administrators
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND serverName = '{{ serverName }}' --required
AND objectId = '{{ objectId }}' --required
;