server_administrators
Creates, updates, deletes, gets or lists a server_administrators resource.
Overview
| Name | server_administrators |
| Type | Resource |
| Id | azure_extras.rdbms.server_administrators |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long |
name | string | The name of the resource. |
administratorType | string | The type of administrator. Default value is "ActiveDirectory". |
login | string | The server administrator login account name. |
sid | string | The server administrator Sid (Secure ID). |
tenantId | string | The server Active Directory Administrator tenant id. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, server_name, subscription_id | Gets information about a AAD server administrator. | |
create_or_update | insert | resource_group_name, server_name, subscription_id | Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator. | |
create_or_update | replace | resource_group_name, server_name, subscription_id | Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator. | |
delete | delete | resource_group_name, server_name, subscription_id | Deletes server active directory administrator. | |
list_raw | exec | resource_group_name, server_name, subscription_id | Returns a list of server Administrators. |
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.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
server_name | string | The name of the server. Required. |
subscription_id | string |
SELECT examples
- get
Gets information about a AAD server administrator.
SELECT
id,
name,
administratorType,
login,
sid,
tenantId,
type
FROM azure_extras.rdbms.server_administrators
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
INSERT INTO azure_extras.rdbms.server_administrators (
properties,
resource_group_name,
server_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ server_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
type
;
# Description fields are for documentation purposes
- name: server_administrators
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the server_administrators resource.
- name: server_name
value: "{{ server_name }}"
description: Required parameter for the server_administrators resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the server_administrators resource.
- name: properties
value:
administratorType: "{{ administratorType }}"
login: "{{ login }}"
sid: "{{ sid }}"
tenantId: "{{ tenantId }}"
REPLACE examples
- create_or_update
Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
REPLACE azure_extras.rdbms.server_administrators
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
type;
DELETE examples
- delete
Deletes server active directory administrator.
DELETE FROM azure_extras.rdbms.server_administrators
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- list_raw
Returns a list of server Administrators.
EXEC azure_extras.rdbms.server_administrators.list_raw
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;