Skip to main content

managed_server_dns_aliases

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

Overview

Namemanaged_server_dns_aliases
TypeResource
Idazure.sql.managed_server_dns_aliases

Fields

NameDatatypeDescription
azure_dns_recordtextfield from the properties object
dnsAliasNametextfield from the properties object
managedInstanceNametextfield from the properties object
public_azure_dns_recordtextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdnsAliasName, managedInstanceName, resourceGroupName, subscriptionIdGets a server DNS alias.
create_or_updateINSERTdnsAliasName, managedInstanceName, resourceGroupName, subscriptionIdCreates a managed server DNS alias.
deleteDELETEdnsAliasName, managedInstanceName, resourceGroupName, subscriptionIdDeletes the managed server DNS alias with the given name.
acquireEXECdnsAliasName, managedInstanceName, resourceGroupName, subscriptionId, data__oldManagedServerDnsAliasResourceIdAcquires managed server DNS alias from another managed server.

SELECT examples

Gets a server DNS alias.

SELECT
azure_dns_record,
dnsAliasName,
managedInstanceName,
public_azure_dns_record,
resourceGroupName,
subscriptionId
FROM azure.sql.vw_managed_server_dns_aliases
WHERE dnsAliasName = '{{ dnsAliasName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new managed_server_dns_aliases resource.

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

DELETE example

Deletes the specified managed_server_dns_aliases resource.

/*+ delete */
DELETE FROM azure.sql.managed_server_dns_aliases
WHERE dnsAliasName = '{{ dnsAliasName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';