Skip to main content

custom_domains

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

Overview

Namecustom_domains
TypeResource
Idazure.cdn.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.
customHttpsParametersobjectCertificate parameters for securing custom HTTPS.
customHttpsProvisioningStatestringProvisioning status of the custom domain. Known values are: "Enabling", "Enabled", "Disabling", "Disabled", and "Failed". (Enabling, Enabled, Disabling, Disabled, Failed)
customHttpsProvisioningSubstatestringProvisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. Known values are: "SubmittingDomainControlValidationRequest", "PendingDomainControlValidationREquestApproval", "DomainControlValidationRequestApproved", "DomainControlValidationRequestRejected", "DomainControlValidationRequestTimedOut", "IssuingCertificate", "DeployingCertificate", "CertificateDeployed", "DeletingCertificate", and "CertificateDeleted". (SubmittingDomainControlValidationRequest, PendingDomainControlValidationREquestApproval, DomainControlValidationRequestApproved, DomainControlValidationRequestRejected, DomainControlValidationRequestTimedOut, IssuingCertificate, DeployingCertificate, CertificateDeployed, DeletingCertificate, CertificateDeleted)
hostNamestringThe host name of the custom domain. Must be a domain name. Required.
provisioningStatestringProvisioning status of Custom Https of the custom domain. Known values are: "Enabling", "Enabled", "Disabling", "Disabled", and "Failed". (Enabling, Enabled, Disabling, Disabled, Failed)
resourceStatestringResource status of the custom domain. Known values are: "Creating", "Active", and "Deleting". (Creating, Active, Deleting)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
validationDatastringSpecial validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, profile_name, endpoint_name, custom_domain_name, subscription_idGets an existing custom domain within an endpoint.
list_by_endpointselectresource_group_name, profile_name, endpoint_name, subscription_idLists all of the existing custom domains within an endpoint.
createinsertresource_group_name, profile_name, endpoint_name, custom_domain_name, subscription_idCreates a new custom domain within an endpoint.
deletedeleteresource_group_name, profile_name, endpoint_name, custom_domain_name, subscription_idDeletes an existing custom domain within an endpoint.
disable_custom_httpsexecresource_group_name, profile_name, endpoint_name, custom_domain_name, subscription_idDisable https delivery of the custom domain.
enable_custom_httpsexecresource_group_name, profile_name, endpoint_name, custom_domain_name, subscription_id, certificateSource, protocolTypeEnable https delivery of the custom domain.

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 custom domain within an endpoint. Required.
endpoint_namestringName of the endpoint 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 custom domain within an endpoint.

SELECT
id,
name,
customHttpsParameters,
customHttpsProvisioningState,
customHttpsProvisioningSubstate,
hostName,
provisioningState,
resourceState,
systemData,
type,
validationData
FROM azure.cdn.custom_domains
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND profile_name = '{{ profile_name }}' -- required
AND endpoint_name = '{{ endpoint_name }}' -- required
AND custom_domain_name = '{{ custom_domain_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates a new custom domain within an endpoint.

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

DELETE examples

Deletes an existing custom domain within an endpoint.

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

Lifecycle Methods

Disable https delivery of the custom domain.

EXEC azure.cdn.custom_domains.disable_custom_https 
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@endpoint_name='{{ endpoint_name }}' --required,
@custom_domain_name='{{ custom_domain_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;