endpoints
Creates, updates, deletes, gets or lists an endpoints resource.
Overview
| Name | endpoints |
| Type | Resource |
| Id | azure.cdn.endpoints |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_profile
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
contentTypesToCompress | array | List of content types on which compression applies. The value should be a valid MIME type. |
customDomains | array | The custom domains under the endpoint. |
defaultOriginGroup | object | Reference to another resource. |
deliveryPolicy | object | A policy that specifies the delivery rules to be used for an endpoint. |
geoFilters | array | List 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/. |
hostName | string | The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net. |
isCompressionEnabled | boolean | Indicates 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. |
isHttpAllowed | boolean | Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. |
isHttpsAllowed | boolean | Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. |
location | string | The geo-location where the resource lives. Required. |
optimizationType | string | Specifies 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) |
originGroups | array | The origin groups comprising of origins that are used for load balancing the traffic based on availability. |
originHostHeader | string | The 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. |
originPath | string | A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. |
origins | array | The source of the content being delivered via CDN. Required. |
probePath | string | Path 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. |
provisioningState | string | Provisioning status of the endpoint. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". (Succeeded, Failed, Updating, Deleting, Creating) |
queryStringCachingBehavior | string | Defines 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) |
resourceState | string | Resource status of the endpoint. Known values are: "Creating", "Deleting", "Running", "Starting", "Stopped", and "Stopping". (Creating, Deleting, Running, Starting, Stopped, Stopping) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
urlSigningKeys | array | List of keys used to validate the signed URL hashes. |
webApplicationFirewallPolicyLink | object | Defines the Web Application Firewall policy for the endpoint (if applicable). |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
contentTypesToCompress | array | List of content types on which compression applies. The value should be a valid MIME type. |
customDomains | array | The custom domains under the endpoint. |
defaultOriginGroup | object | Reference to another resource. |
deliveryPolicy | object | A policy that specifies the delivery rules to be used for an endpoint. |
geoFilters | array | List 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/. |
hostName | string | The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net. |
isCompressionEnabled | boolean | Indicates 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. |
isHttpAllowed | boolean | Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. |
isHttpsAllowed | boolean | Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. |
location | string | The geo-location where the resource lives. Required. |
optimizationType | string | Specifies 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) |
originGroups | array | The origin groups comprising of origins that are used for load balancing the traffic based on availability. |
originHostHeader | string | The 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. |
originPath | string | A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. |
origins | array | The source of the content being delivered via CDN. Required. |
probePath | string | Path 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. |
provisioningState | string | Provisioning status of the endpoint. Known values are: "Succeeded", "Failed", "Updating", "Deleting", and "Creating". (Succeeded, Failed, Updating, Deleting, Creating) |
queryStringCachingBehavior | string | Defines 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) |
resourceState | string | Resource status of the endpoint. Known values are: "Creating", "Deleting", "Running", "Starting", "Stopped", and "Stopping". (Creating, Deleting, Running, Starting, Stopped, Stopping) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
urlSigningKeys | array | List of keys used to validate the signed URL hashes. |
webApplicationFirewallPolicyLink | object | Defines the Web Application Firewall policy for the endpoint (if applicable). |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, profile_name, endpoint_name, subscription_id | Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. | |
list_by_profile | select | resource_group_name, profile_name, subscription_id | Lists existing CDN endpoints. | |
create | insert | resource_group_name, profile_name, endpoint_name, subscription_id, location | Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. | |
update | update | resource_group_name, profile_name, endpoint_name, subscription_id | 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. | |
delete | delete | resource_group_name, profile_name, endpoint_name, subscription_id | Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. | |
list_resource_usage | exec | resource_group_name, profile_name, endpoint_name, subscription_id | Checks the quota and usage of geo filters and custom domains under the given endpoint. | |
start | exec | resource_group_name, profile_name, endpoint_name, subscription_id | Starts an existing CDN endpoint that is on a stopped state. | |
stop | exec | resource_group_name, profile_name, endpoint_name, subscription_id | Stops an existing running CDN endpoint. | |
purge_content | exec | resource_group_name, profile_name, endpoint_name, subscription_id, contentPaths | Removes a content from CDN. | |
load_content | exec | resource_group_name, profile_name, endpoint_name, subscription_id, contentPaths | Pre-loads a content to CDN. Available for Verizon Profiles. | |
validate_custom_domain | exec | resource_group_name, profile_name, endpoint_name, subscription_id, hostName | Validates 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.
| Name | Datatype | Description |
|---|---|---|
endpoint_name | string | Name of the endpoint under the profile which is unique globally. Required. |
profile_name | string | Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_profile
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
;
Lists existing CDN endpoints.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: endpoints
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the endpoints resource.
- name: profile_name
value: "{{ profile_name }}"
description: Required parameter for the endpoints resource.
- name: endpoint_name
value: "{{ endpoint_name }}"
description: Required parameter for the endpoints resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the endpoints resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
The JSON object that contains the properties required to create an endpoint.
value:
originPath: "{{ originPath }}"
contentTypesToCompress:
- "{{ contentTypesToCompress }}"
originHostHeader: "{{ originHostHeader }}"
isCompressionEnabled: {{ isCompressionEnabled }}
isHttpAllowed: {{ isHttpAllowed }}
isHttpsAllowed: {{ isHttpsAllowed }}
queryStringCachingBehavior: "{{ queryStringCachingBehavior }}"
optimizationType: "{{ optimizationType }}"
probePath: "{{ probePath }}"
geoFilters:
- relativePath: "{{ relativePath }}"
action: "{{ action }}"
countryCodes: "{{ countryCodes }}"
defaultOriginGroup:
id: "{{ id }}"
urlSigningKeys:
- keyId: "{{ keyId }}"
keySourceParameters:
typeName: "{{ typeName }}"
subscriptionId: "{{ subscriptionId }}"
resourceGroupName: "{{ resourceGroupName }}"
vaultName: "{{ vaultName }}"
secretName: "{{ secretName }}"
secretVersion: "{{ secretVersion }}"
deliveryPolicy:
description: "{{ description }}"
rules:
- name: "{{ name }}"
order: {{ order }}
conditions: "{{ conditions }}"
actions: "{{ actions }}"
webApplicationFirewallPolicyLink:
id: "{{ id }}"
hostName: "{{ hostName }}"
origins:
- name: "{{ name }}"
properties:
hostName: "{{ hostName }}"
httpPort: {{ httpPort }}
httpsPort: {{ httpsPort }}
originHostHeader: "{{ originHostHeader }}"
priority: {{ priority }}
weight: {{ weight }}
enabled: {{ enabled }}
privateLinkAlias: "{{ privateLinkAlias }}"
privateLinkResourceId: "{{ privateLinkResourceId }}"
privateLinkLocation: "{{ privateLinkLocation }}"
privateLinkApprovalMessage: "{{ privateLinkApprovalMessage }}"
privateEndpointStatus: "{{ privateEndpointStatus }}"
originGroups:
- name: "{{ name }}"
properties:
healthProbeSettings:
probePath: "{{ probePath }}"
probeRequestType: "{{ probeRequestType }}"
probeProtocol: "{{ probeProtocol }}"
probeIntervalInSeconds: {{ probeIntervalInSeconds }}
origins:
- id: "{{ id }}"
trafficRestorationTimeToHealedOrNewEndpointsInMinutes: {{ trafficRestorationTimeToHealedOrNewEndpointsInMinutes }}
responseBasedOriginErrorDetectionSettings:
responseBasedDetectedErrorTypes: "{{ responseBasedDetectedErrorTypes }}"
responseBasedFailoverThresholdPercentage: {{ responseBasedFailoverThresholdPercentage }}
httpErrorRanges:
- begin: {{ begin }}
end: {{ end }}
customDomains:
- name: "{{ name }}"
properties:
hostName: "{{ hostName }}"
validationData: "{{ validationData }}"
resourceState: "{{ resourceState }}"
provisioningState: "{{ provisioningState }}"
UPDATE examples
- update
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
- delete
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
- list_resource_usage
- start
- stop
- purge_content
- load_content
- validate_custom_domain
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
;
Starts an existing CDN endpoint that is on a stopped state.
EXEC azure.cdn.endpoints.start
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@endpoint_name='{{ endpoint_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Stops an existing running CDN endpoint.
EXEC azure.cdn.endpoints.stop
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@endpoint_name='{{ endpoint_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Removes a content from CDN.
EXEC azure.cdn.endpoints.purge_content
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@endpoint_name='{{ endpoint_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"contentPaths": "{{ contentPaths }}"
}'
;
Pre-loads a content to CDN. Available for Verizon Profiles.
EXEC azure.cdn.endpoints.load_content
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@endpoint_name='{{ endpoint_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"contentPaths": "{{ contentPaths }}"
}'
;
Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.
EXEC azure.cdn.endpoints.validate_custom_domain
@resource_group_name='{{ resource_group_name }}' --required,
@profile_name='{{ profile_name }}' --required,
@endpoint_name='{{ endpoint_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"hostName": "{{ hostName }}"
}'
;