servers
Creates, updates, deletes, gets or lists a servers
resource.
Overview
Name | servers |
Type | Resource |
Id | azure.maria_db.servers |
Fields
- vw_servers
- servers
Name | Datatype | Description |
---|---|---|
administrator_login | text | field from the properties object |
earliest_restore_date | text | field from the properties object |
fully_qualified_domain_name | text | field from the properties object |
location | text | The geo-location where the resource lives |
master_server_id | text | field from the properties object |
minimal_tls_version | text | field from the properties object |
private_endpoint_connections | text | field from the properties object |
public_network_access | text | field from the properties object |
replica_capacity | text | field from the properties object |
replication_role | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
sku | text | The resource model definition representing SKU |
ssl_enforcement | text | field from the properties object |
storage_profile | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
user_visible_state | text | field from the properties object |
version | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | The properties of a server. |
sku | object | The resource model definition representing SKU |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, serverName, subscriptionId | Gets information about a server. |
list | SELECT | subscriptionId | List all the servers in a given subscription. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | List all the servers in a given resource group. |
create | INSERT | resourceGroupName, serverName, subscriptionId, data__location, data__properties | Creates a new server or updates an existing server. The update action will overwrite the existing server. |
delete | DELETE | resourceGroupName, serverName, subscriptionId | Deletes a server. |
update | UPDATE | resourceGroupName, serverName, subscriptionId | Updates an existing server. The request body can contain one to many of the properties present in the normal server definition. |
restart | EXEC | resourceGroupName, serverName, subscriptionId | Restarts a server. |
start | EXEC | resourceGroupName, serverName, subscriptionId | Starts a stopped server. |
stop | EXEC | resourceGroupName, serverName, subscriptionId | Stops a running server. |
SELECT
examples
List all the servers in a given subscription.
- vw_servers
- servers
SELECT
administrator_login,
earliest_restore_date,
fully_qualified_domain_name,
location,
master_server_id,
minimal_tls_version,
private_endpoint_connections,
public_network_access,
replica_capacity,
replication_role,
resourceGroupName,
serverName,
sku,
ssl_enforcement,
storage_profile,
subscriptionId,
tags,
user_visible_state,
version
FROM azure.maria_db.vw_servers
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
location,
properties,
sku,
tags
FROM azure.maria_db.servers
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new servers
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.maria_db.servers (
resourceGroupName,
serverName,
subscriptionId,
data__location,
data__properties,
sku,
properties,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ data__properties }}',
'{{ sku }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: size
value: string
- name: family
value: string
- name: capacity
value: integer
- name: properties
value:
- name: version
value: []
- name: sslEnforcement
value: []
- name: minimalTlsVersion
value: []
- name: publicNetworkAccess
value: []
- name: storageProfile
value:
- name: backupRetentionDays
value: integer
- name: geoRedundantBackup
value: string
- name: storageMB
value: integer
- name: storageAutogrow
value: string
- name: createMode
value: string
- name: location
value: string
- name: tags
value: object
UPDATE
example
Updates a servers
resource.
/*+ update */
UPDATE azure.maria_db.servers
SET
sku = '{{ sku }}',
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified servers
resource.
/*+ delete */
DELETE FROM azure.maria_db.servers
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';