Skip to main content

endpoints

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

Overview

Nameendpoints
TypeResource
Idazure.cdn.endpoints

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.
contentTypesToCompressarrayList of content types on which compression applies. The value should be a valid MIME type.
customDomainsarrayThe custom domains under the endpoint.
defaultOriginGroupobjectReference to another resource.
deliveryPolicyobjectA policy that specifies the delivery rules to be used for an endpoint.
geoFiltersarrayList of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/.
hostNamestringThe host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net.
isCompressionEnabledbooleanIndicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.
isHttpAllowedbooleanIndicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
isHttpsAllowedbooleanIndicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
locationstringThe geo-location where the resource lives. Required.
optimizationTypestringSpecifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. Known values are: "GeneralWebDelivery", "GeneralMediaStreaming", "VideoOnDemandMediaStreaming", "LargeFileDownload", and "DynamicSiteAcceleration". (GeneralWebDelivery, GeneralMediaStreaming, VideoOnDemandMediaStreaming, LargeFileDownload, DynamicSiteAcceleration)
originGroupsarrayThe origin groups comprising of origins that are used for load balancing the traffic based on availability.
originHostHeaderstringThe host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.
originPathstringA directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
originsarrayThe source of the content being delivered via CDN. Required.
probePathstringPath to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.
provisioningStatestringProvisioning status of the endpoint. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". (Succeeded, Failed, Updating, Deleting, Creating)
queryStringCachingBehaviorstringDefines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. Known values are: "IgnoreQueryString", "BypassCaching", "UseQueryString", and "NotSet". (IgnoreQueryString, BypassCaching, UseQueryString, NotSet)
resourceStatestringResource status of the endpoint. Known values are: "Creating", "Deleting", "Running", "Starting", "Stopped", and "Stopping". (Creating, Deleting, Running, Starting, Stopped, Stopping)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
urlSigningKeysarrayList of keys used to validate the signed URL hashes.
webApplicationFirewallPolicyLinkobjectDefines the Web Application Firewall policy for the endpoint (if applicable).

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, profile_name, endpoint_name, subscription_idGets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.
list_by_profileselectresource_group_name, profile_name, subscription_idLists existing CDN endpoints.
createinsertresource_group_name, profile_name, endpoint_name, subscription_id, locationCreates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.
updateupdateresource_group_name, profile_name, endpoint_name, subscription_idUpdates an existing CDN 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 custom domains, use the Update Custom Domain operation.
deletedeleteresource_group_name, profile_name, endpoint_name, subscription_idDeletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.
list_resource_usageexecresource_group_name, profile_name, endpoint_name, subscription_idChecks the quota and usage of geo filters and custom domains under the given endpoint.
startexecresource_group_name, profile_name, endpoint_name, subscription_idStarts an existing CDN endpoint that is on a stopped state.
stopexecresource_group_name, profile_name, endpoint_name, subscription_idStops an existing running CDN endpoint.
purge_contentexecresource_group_name, profile_name, endpoint_name, subscription_id, contentPathsRemoves a content from CDN.
load_contentexecresource_group_name, profile_name, endpoint_name, subscription_id, contentPathsPre-loads a content to CDN. Available for Verizon Profiles.
validate_custom_domainexecresource_group_name, profile_name, endpoint_name, subscription_id, hostNameValidates the custom domain mapping to ensure it maps to the correct CDN 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
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 CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.

SELECT
id,
name,
contentTypesToCompress,
customDomains,
defaultOriginGroup,
deliveryPolicy,
geoFilters,
hostName,
isCompressionEnabled,
isHttpAllowed,
isHttpsAllowed,
location,
optimizationType,
originGroups,
originHostHeader,
originPath,
origins,
probePath,
provisioningState,
queryStringCachingBehavior,
resourceState,
systemData,
tags,
type,
urlSigningKeys,
webApplicationFirewallPolicyLink
FROM azure.cdn.endpoints
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND profile_name = '{{ profile_name }}' -- required
AND endpoint_name = '{{ endpoint_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

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

INSERT INTO azure.cdn.endpoints (
tags,
location,
properties,
resource_group_name,
profile_name,
endpoint_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ profile_name }}',
'{{ endpoint_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates an existing CDN 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 custom domains, use the Update Custom Domain operation.

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

DELETE examples

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

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

Lifecycle Methods

Checks the quota and usage of geo filters and custom domains under the given endpoint.

EXEC azure.cdn.endpoints.list_resource_usage 
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@endpoint_name='{{ endpoint_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;