managed_server_dns_aliases
Creates, updates, deletes, gets or lists a managed_server_dns_aliases
resource.
Overview
Name | managed_server_dns_aliases |
Type | Resource |
Id | azure.sql.managed_server_dns_aliases |
Fields
- vw_managed_server_dns_aliases
- managed_server_dns_aliases
Name | Datatype | Description |
---|---|---|
azure_dns_record | text | field from the properties object |
dnsAliasName | text | field from the properties object |
managedInstanceName | text | field from the properties object |
public_azure_dns_record | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of a managed server DNS alias. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | dnsAliasName, managedInstanceName, resourceGroupName, subscriptionId | Gets a server DNS alias. |
create_or_update | INSERT | dnsAliasName, managedInstanceName, resourceGroupName, subscriptionId | Creates a managed server DNS alias. |
delete | DELETE | dnsAliasName, managedInstanceName, resourceGroupName, subscriptionId | Deletes the managed server DNS alias with the given name. |
acquire | EXEC | dnsAliasName, managedInstanceName, resourceGroupName, subscriptionId, data__oldManagedServerDnsAliasResourceId | Acquires managed server DNS alias from another managed server. |
SELECT
examples
Gets a server DNS alias.
- vw_managed_server_dns_aliases
- managed_server_dns_aliases
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 }}';
SELECT
properties
FROM azure.sql.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.managed_server_dns_aliases (
dnsAliasName,
managedInstanceName,
resourceGroupName,
subscriptionId,
createDnsRecord
)
SELECT
'{{ dnsAliasName }}',
'{{ managedInstanceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
{{ createDnsRecord }}
;
- name: your_resource_model_name
props:
- name: createDnsRecord
value: boolean
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 }}';