server_dns_aliases
Creates, updates, deletes, gets or lists a server_dns_aliases
resource.
Overview
Name | server_dns_aliases |
Type | Resource |
Id | azure.sql.server_dns_aliases |
Fields
- vw_server_dns_aliases
- server_dns_aliases
Name | Datatype | Description |
---|---|---|
azure_dns_record | text | field from the properties object |
dnsAliasName | 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 |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of a server DNS alias. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | dnsAliasName, resourceGroupName, serverName, subscriptionId | Gets a server DNS alias. |
list_by_server | SELECT | resourceGroupName, serverName, subscriptionId | Gets a list of server DNS aliases for a server. |
create_or_update | INSERT | dnsAliasName, resourceGroupName, serverName, subscriptionId | Creates a server DNS alias. |
delete | DELETE | dnsAliasName, resourceGroupName, serverName, subscriptionId | Deletes the server DNS alias with the given name. |
acquire | EXEC | dnsAliasName, resourceGroupName, serverName, subscriptionId, data__oldServerDnsAliasId | Acquires server DNS alias from another server. |
SELECT
examples
Gets a list of server DNS aliases for a server.
- vw_server_dns_aliases
- server_dns_aliases
SELECT
azure_dns_record,
dnsAliasName,
resourceGroupName,
serverName,
subscriptionId
FROM azure.sql.vw_server_dns_aliases
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.sql.server_dns_aliases
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new server_dns_aliases
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.server_dns_aliases (
dnsAliasName,
resourceGroupName,
serverName,
subscriptionId
)
SELECT
'{{ dnsAliasName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}'
;
- name: your_resource_model_name
props: []
DELETE
example
Deletes the specified server_dns_aliases
resource.
/*+ delete */
DELETE FROM azure.sql.server_dns_aliases
WHERE dnsAliasName = '{{ dnsAliasName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';