Skip to main content

afd_endpoints

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

Overview

Nameafd_endpoints
TypeResource
Idazure.cdn.afd_endpoints

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
locationstringResource location.
propertiesobjectThe JSON object that contains the properties required to create an endpoint.
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, profileName, endpointName, subscriptionIdGets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.
list_by_profileselectresourceGroupName, profileName, subscriptionIdLists existing AzureFrontDoor endpoints.
createinsertresourceGroupName, profileName, endpointName, subscriptionIdCreates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.
updateupdateresourceGroupName, profileName, endpointName, subscriptionIdUpdates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation.
deletedeleteresourceGroupName, profileName, endpointName, subscriptionIdDeletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.
purge_contentexecresourceGroupName, profileName, endpointName, subscriptionId, contentPathsRemoves a content from AzureFrontDoor.
validate_custom_domainexecresourceGroupName, profileName, endpointName, subscriptionId, hostNameValidates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS.

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
endpointNamestringName of the endpoint under the profile which is unique globally.
profileNamestringName of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.
resourceGroupNamestringName of the Resource group within the Azure subscription.
subscriptionIdstringAzure Subscription ID.

SELECT examples

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

SELECT
location,
properties,
tags
FROM azure.cdn.afd_endpoints
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND profileName = '{{ profileName }}' -- required
AND endpointName = '{{ endpointName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.

INSERT INTO azure.cdn.afd_endpoints (
data__location,
data__tags,
data__properties,
resourceGroupName,
profileName,
endpointName,
subscriptionId
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ profileName }}',
'{{ endpointName }}',
'{{ subscriptionId }}'
RETURNING
location,
properties,
tags
;

UPDATE examples

Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation.

UPDATE azure.cdn.afd_endpoints
SET
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND profileName = '{{ profileName }}' --required
AND endpointName = '{{ endpointName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
location,
properties,
tags;

DELETE examples

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

DELETE FROM azure.cdn.afd_endpoints
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND profileName = '{{ profileName }}' --required
AND endpointName = '{{ endpointName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Removes a content from AzureFrontDoor.

EXEC azure.cdn.afd_endpoints.purge_content 
@resourceGroupName='{{ resourceGroupName }}' --required,
@profileName='{{ profileName }}' --required,
@endpointName='{{ endpointName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"contentPaths": "{{ contentPaths }}",
"domains": "{{ domains }}"
}'
;