Skip to main content

afd_custom_domains

Creates, updates, deletes, gets or lists an afd_custom_domains resource.

Overview

Nameafd_custom_domains
TypeResource
Idazure.cdn.afd_custom_domains

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
azureDnsZoneobjectResource reference to the Azure DNS zone.
deploymentStatusstringKnown values are: "NotStarted", "InProgress", "Succeeded", and "Failed". (NotStarted, InProgress, Succeeded, Failed)
domainValidationStatestringProvisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. Known values are: "Unknown", "Submitting", "Pending", "Rejected", "TimedOut", "PendingRevalidation", "Approved", "RefreshingValidationToken", and "InternalError". (Unknown, Submitting, Pending, Rejected, TimedOut, PendingRevalidation, Approved, RefreshingValidationToken, InternalError)
extendedPropertiesobjectKey-Value pair representing migration properties for domains.
hostNamestringThe host name of the domain. Must be a domain name. Required.
preValidatedCustomDomainResourceIdobjectResource reference to the Azure resource where custom domain ownership was prevalidated.
profileNamestringThe name of the profile which holds the domain.
provisioningStatestringProvisioning status. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". (Succeeded, Failed, Updating, Deleting, Creating)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tlsSettingsobjectThe configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
validationPropertiesobjectValues the customer needs to validate domain ownership.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, profile_name, custom_domain_name, subscription_idGets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.
list_by_profileselectresource_group_name, profile_name, subscription_idLists existing AzureFrontDoor domains.
createinsertresource_group_name, profile_name, custom_domain_name, subscription_idCreates a new domain within the specified profile.
updateupdateresource_group_name, profile_name, custom_domain_name, subscription_idUpdates an existing domain within a profile.
deletedeleteresource_group_name, profile_name, custom_domain_name, subscription_idDeletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.
refresh_validation_tokenexecresource_group_name, profile_name, custom_domain_name, subscription_idUpdates the domain validation token.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
custom_domain_namestringName of the domain under the profile which is unique globally. Required.
profile_namestringName of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.

SELECT
id,
name,
azureDnsZone,
deploymentStatus,
domainValidationState,
extendedProperties,
hostName,
preValidatedCustomDomainResourceId,
profileName,
provisioningState,
systemData,
tlsSettings,
type,
validationProperties
FROM azure.cdn.afd_custom_domains
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND profile_name = '{{ profile_name }}' -- required
AND custom_domain_name = '{{ custom_domain_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new domain within the specified profile.

INSERT INTO azure.cdn.afd_custom_domains (
properties,
resource_group_name,
profile_name,
custom_domain_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ profile_name }}',
'{{ custom_domain_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Updates an existing domain within a profile.

UPDATE azure.cdn.afd_custom_domains
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND profile_name = '{{ profile_name }}' --required
AND custom_domain_name = '{{ custom_domain_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.

DELETE FROM azure.cdn.afd_custom_domains
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND profile_name = '{{ profile_name }}' --required
AND custom_domain_name = '{{ custom_domain_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Updates the domain validation token.

EXEC azure.cdn.afd_custom_domains.refresh_validation_token 
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@custom_domain_name='{{ custom_domain_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;