Skip to main content

afd_profiles

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

Overview

Nameafd_profiles
TypeResource
Idazure.cdn.afd_profiles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
availableHostnamestringReturns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty string.
messagestringThe detailed error message describing why the name is not available.
nameAvailablebooleanIndicates whether the name is available.
reasonstringThe reason why the name is not available.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
check_endpoint_name_availabilityselectresource_group_name, profile_name, subscription_idCheck the availability of an afdx endpoint name, and return the globally unique endpoint host name.
check_host_name_availabilityselectresource_group_name, profile_name, subscription_idValidates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS.
list_resource_usageselectresource_group_name, profile_name, subscription_idChecks the quota and actual usage of endpoints under the given Azure Front Door profile.
validate_secretexecresource_group_name, profile_name, subscription_id, secretType, secretSourceValidate a Secret in the profile.
upgradeexecresource_group_name, profile_name, subscription_id, wafMappingListUpgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor.

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
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

Check the availability of an afdx endpoint name, and return the globally unique endpoint host name.

SELECT
availableHostname,
message,
nameAvailable,
reason
FROM azure.cdn.afd_profiles
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND profile_name = '{{ profile_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

Validate a Secret in the profile.

EXEC azure.cdn.afd_profiles.validate_secret 
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"secretType": "{{ secretType }}",
"secretSource": "{{ secretSource }}",
"secretVersion": "{{ secretVersion }}"
}'
;