servers
Creates, updates, deletes, gets or lists a servers resource.
Overview
| Name | servers |
| Type | Resource |
| Id | azure_extras.rdbms.servers |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list
| 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. |
administratorLogin | string | The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). |
byokEnforcement | string | Status showing whether the server data encryption is enabled with customer-managed keys. |
earliestRestoreDate | string (date-time) | Earliest restore point creation time (ISO8601 format). |
fullyQualifiedDomainName | string | The fully qualified domain name of a server. |
identity | object | The Azure Active Directory identity of the server. |
infrastructureEncryption | string | Status showing whether the server enabled infrastructure encryption. Known values are: "Enabled" and "Disabled". |
location | string | The geo-location where the resource lives. Required. |
masterServerId | string | The master server id of a replica server. |
minimalTlsVersion | string | Enforce a minimal Tls version for the server. Known values are: "TLS1_0", "TLS1_1", "TLS1_2", and "TLSEnforcementDisabled". |
privateEndpointConnections | array | List of private endpoint connections on a server. |
publicNetworkAccess | string | Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". |
replicaCapacity | integer | The maximum number of replicas that a master server can have. |
replicationRole | string | The replication role of the server. |
sku | object | The SKU (pricing tier) of the server. |
sslEnforcement | string | Enable ssl enforcement or not when connect to server. Known values are: "Enabled" and "Disabled". |
storageProfile | object | Storage profile of a server. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userVisibleState | string | A state of a server that is visible to user. Known values are: "Ready", "Dropping", "Disabled", and "Inaccessible". |
version | string | Server version. Known values are: "9.5", "9.6", "10", "10.0", "10.2", and "11". |
| 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. |
administratorLogin | string | The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). |
byokEnforcement | string | Status showing whether the server data encryption is enabled with customer-managed keys. |
earliestRestoreDate | string (date-time) | Earliest restore point creation time (ISO8601 format). |
fullyQualifiedDomainName | string | The fully qualified domain name of a server. |
identity | object | The Azure Active Directory identity of the server. |
infrastructureEncryption | string | Status showing whether the server enabled infrastructure encryption. Known values are: "Enabled" and "Disabled". |
location | string | The geo-location where the resource lives. Required. |
masterServerId | string | The master server id of a replica server. |
minimalTlsVersion | string | Enforce a minimal Tls version for the server. Known values are: "TLS1_0", "TLS1_1", "TLS1_2", and "TLSEnforcementDisabled". |
privateEndpointConnections | array | List of private endpoint connections on a server. |
publicNetworkAccess | string | Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". |
replicaCapacity | integer | The maximum number of replicas that a master server can have. |
replicationRole | string | The replication role of the server. |
sku | object | The SKU (pricing tier) of the server. |
sslEnforcement | string | Enable ssl enforcement or not when connect to server. Known values are: "Enabled" and "Disabled". |
storageProfile | object | Storage profile of a server. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userVisibleState | string | A state of a server that is visible to user. Known values are: "Ready", "Dropping", "Disabled", and "Inaccessible". |
version | string | Server version. Known values are: "9.5", "9.6", "10", "10.0", "10.2", and "11". |
| 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. |
administratorLogin | string | The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). |
byokEnforcement | string | Status showing whether the server data encryption is enabled with customer-managed keys. |
earliestRestoreDate | string (date-time) | Earliest restore point creation time (ISO8601 format). |
fullyQualifiedDomainName | string | The fully qualified domain name of a server. |
identity | object | The Azure Active Directory identity of the server. |
infrastructureEncryption | string | Status showing whether the server enabled infrastructure encryption. Known values are: "Enabled" and "Disabled". |
location | string | The geo-location where the resource lives. Required. |
masterServerId | string | The master server id of a replica server. |
minimalTlsVersion | string | Enforce a minimal Tls version for the server. Known values are: "TLS1_0", "TLS1_1", "TLS1_2", and "TLSEnforcementDisabled". |
privateEndpointConnections | array | List of private endpoint connections on a server. |
publicNetworkAccess | string | Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Known values are: "Enabled" and "Disabled". |
replicaCapacity | integer | The maximum number of replicas that a master server can have. |
replicationRole | string | The replication role of the server. |
sku | object | The SKU (pricing tier) of the server. |
sslEnforcement | string | Enable ssl enforcement or not when connect to server. Known values are: "Enabled" and "Disabled". |
storageProfile | object | Storage profile of a server. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userVisibleState | string | A state of a server that is visible to user. Known values are: "Ready", "Dropping", "Disabled", and "Inaccessible". |
version | string | Server version. Known values are: "9.5", "9.6", "10", "10.0", "10.2", and "11". |
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 server. | |
list_by_resource_group | select | resource_group_name, subscription_id | List all the servers in a given resource group. | |
list | select | subscription_id | List all the servers in a given subscription. | |
create | insert | resource_group_name, server_name, subscription_id, properties, location | Creates a new server or updates an existing server. The update action will overwrite the existing server. | |
update | update | resource_group_name, server_name, subscription_id | Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. | |
delete | delete | resource_group_name, server_name, subscription_id | Deletes a server. | |
restart | exec | resource_group_name, server_name, subscription_id | Restarts a server. | |
start | exec | resource_group_name, server_name, subscription_id | Starts a stopped server. | |
stop | exec | resource_group_name, server_name, subscription_id | Stops a running server. | |
upgrade | exec | resource_group_name, server_name, subscription_id | Upgrade server version. |
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
- list_by_resource_group
- list
Gets information about a server.
SELECT
id,
name,
administratorLogin,
byokEnforcement,
earliestRestoreDate,
fullyQualifiedDomainName,
identity,
infrastructureEncryption,
location,
masterServerId,
minimalTlsVersion,
privateEndpointConnections,
publicNetworkAccess,
replicaCapacity,
replicationRole,
sku,
sslEnforcement,
storageProfile,
tags,
type,
userVisibleState,
version
FROM azure_extras.rdbms.servers
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List all the servers in a given resource group.
SELECT
id,
name,
administratorLogin,
byokEnforcement,
earliestRestoreDate,
fullyQualifiedDomainName,
identity,
infrastructureEncryption,
location,
masterServerId,
minimalTlsVersion,
privateEndpointConnections,
publicNetworkAccess,
replicaCapacity,
replicationRole,
sku,
sslEnforcement,
storageProfile,
tags,
type,
userVisibleState,
version
FROM azure_extras.rdbms.servers
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List all the servers in a given subscription.
SELECT
id,
name,
administratorLogin,
byokEnforcement,
earliestRestoreDate,
fullyQualifiedDomainName,
identity,
infrastructureEncryption,
location,
masterServerId,
minimalTlsVersion,
privateEndpointConnections,
publicNetworkAccess,
replicaCapacity,
replicationRole,
sku,
sslEnforcement,
storageProfile,
tags,
type,
userVisibleState,
version
FROM azure_extras.rdbms.servers
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Creates a new server or updates an existing server. The update action will overwrite the existing server.
INSERT INTO azure_extras.rdbms.servers (
identity,
sku,
properties,
location,
tags,
resource_group_name,
server_name,
subscription_id
)
SELECT
'{{ identity }}',
'{{ sku }}',
'{{ properties }}' /* required */,
'{{ location }}' /* required */,
'{{ tags }}',
'{{ resource_group_name }}',
'{{ server_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
tags,
type
;
# Description fields are for documentation purposes
- name: servers
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the servers resource.
- name: server_name
value: "{{ server_name }}"
description: Required parameter for the servers resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the servers resource.
- name: identity
description: |
The Azure Active Directory identity of the server.
value:
principalId: "{{ principalId }}"
type: "{{ type }}"
tenantId: "{{ tenantId }}"
- name: sku
description: |
The SKU (pricing tier) of the server.
value:
name: "{{ name }}"
tier: "{{ tier }}"
capacity: {{ capacity }}
size: "{{ size }}"
family: "{{ family }}"
- name: properties
description: |
Properties of the server. Required.
value:
version: "{{ version }}"
sslEnforcement: "{{ sslEnforcement }}"
minimalTlsVersion: "{{ minimalTlsVersion }}"
infrastructureEncryption: "{{ infrastructureEncryption }}"
publicNetworkAccess: "{{ publicNetworkAccess }}"
storageProfile:
backupRetentionDays: {{ backupRetentionDays }}
geoRedundantBackup: "{{ geoRedundantBackup }}"
storageMB: {{ storageMB }}
storageAutogrow: "{{ storageAutogrow }}"
createMode: "{{ createMode }}"
- name: location
value: "{{ location }}"
description: |
The location the resource resides in. Required.
- name: tags
value: "{{ tags }}"
description: |
Application-specific metadata in the form of key-value pairs.
UPDATE examples
- update
Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
UPDATE azure_extras.rdbms.servers
SET
identity = '{{ identity }}',
sku = '{{ sku }}',
tags = '{{ tags }}',
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,
identity,
location,
properties,
sku,
tags,
type;
DELETE examples
- delete
Deletes a server.
DELETE FROM azure_extras.rdbms.servers
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- restart
- start
- stop
- upgrade
Restarts a server.
EXEC azure_extras.rdbms.servers.restart
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Starts a stopped server.
EXEC azure_extras.rdbms.servers.start
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Stops a running server.
EXEC azure_extras.rdbms.servers.stop
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Upgrade server version.
EXEC azure_extras.rdbms.servers.upgrade
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;