Skip to main content

server_dns_aliases

Creates, updates, deletes, gets or lists a server_dns_aliases resource.

Overview

Nameserver_dns_aliases
TypeResource
Idazure.sql.server_dns_aliases

Fields

NameDatatypeDescription
azure_dns_recordtextfield from the properties object
dnsAliasNametextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdnsAliasName, resourceGroupName, serverName, subscriptionIdGets a server DNS alias.
list_by_serverSELECTresourceGroupName, serverName, subscriptionIdGets a list of server DNS aliases for a server.
create_or_updateINSERTdnsAliasName, resourceGroupName, serverName, subscriptionIdCreates a server DNS alias.
deleteDELETEdnsAliasName, resourceGroupName, serverName, subscriptionIdDeletes the server DNS alias with the given name.
acquireEXECdnsAliasName, resourceGroupName, serverName, subscriptionId, data__oldServerDnsAliasIdAcquires server DNS alias from another server.

SELECT examples

Gets a list of server DNS aliases for a server.

SELECT
azure_dns_record,
dnsAliasName,
resourceGroupName,
serverName,
subscriptionId
FROM azure.sql.vw_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.

/*+ create */
INSERT INTO azure.sql.server_dns_aliases (
dnsAliasName,
resourceGroupName,
serverName,
subscriptionId
)
SELECT
'{{ dnsAliasName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}'
;

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 }}';