administrators
Creates, updates, deletes, gets or lists a administrators
resource.
Overview
Name | administrators |
Type | Resource |
Id | azure.postgresql.administrators |
Fields
- vw_administrators
- administrators
Name | Datatype | Description |
---|---|---|
objectId | text | field from the properties object |
object_id | text | field from the properties object |
principal_name | text | field from the properties object |
principal_type | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tenant_id | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The properties of an Active Directory administrator. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | objectId, resourceGroupName, serverName, subscriptionId | Gets information about a server. |
list_by_server | SELECT | resourceGroupName, serverName, subscriptionId | List all the AAD administrators for a given server. |
create | INSERT | objectId, resourceGroupName, serverName, subscriptionId | Creates a new server. |
delete | DELETE | objectId, resourceGroupName, serverName, subscriptionId | Deletes an Active Directory Administrator associated with the server. |
SELECT
examples
List all the AAD administrators for a given server.
- vw_administrators
- administrators
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 }}';
SELECT
properties
FROM azure.postgresql.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.postgresql.administrators (
objectId,
resourceGroupName,
serverName,
subscriptionId,
properties
)
SELECT
'{{ objectId }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: principalType
value: string
- name: principalName
value: string
- name: tenantId
value: string
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 }}';