Microsoft.Cdn profiles/endpoints 2017-10-12

Template format

To create a Microsoft.Cdn/profiles/endpoints resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Cdn/profiles/endpoints",
  "apiVersion": "2017-10-12",
  "location": "string",
  "tags": {},
  "properties": {
    "originHostHeader": "string",
    "originPath": "string",
    "contentTypesToCompress": [
      "string"
    ],
    "isCompressionEnabled": "boolean",
    "isHttpAllowed": "boolean",
    "isHttpsAllowed": "boolean",
    "queryStringCachingBehavior": "string",
    "optimizationType": "string",
    "probePath": "string",
    "geoFilters": [
      {
        "relativePath": "string",
        "action": "string",
        "countryCodes": [
          "string"
        ]
      }
    ],
    "deliveryPolicy": {
      "description": "string",
      "rules": [
        {
          "order": "integer",
          "actions": [
            {
              "name": "string"
            }
          ],
          "conditions": [
            {
              "name": "string"
            }
          ]
        }
      ]
    },
    "origins": [
      {
        "name": "string",
        "properties": {
          "hostName": "string",
          "httpPort": "integer",
          "httpsPort": "integer"
        }
      }
    ]
  },
  "resources": []
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Cdn/profiles/endpoints object

Name Type Required Value
name string Yes Name of the endpoint within the CDN profile.
type enum Yes endpoints
-or-
Microsoft.Cdn/profiles/endpoints

See Set name and type for child resources.
apiVersion enum Yes 2017-10-12
location string Yes Resource location.
tags object No Resource tags.
properties object Yes EndpointProperties object
resources array No customDomains

EndpointProperties object

Name Type Required Value
originHostHeader string No The host header value sent to the origin with each request. 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 No A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
contentTypesToCompress array No List of content types on which compression applies. The value should be a valid MIME type. - string
isCompressionEnabled boolean No 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 No 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 No Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.
queryStringCachingBehavior enum No 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. - IgnoreQueryString, BypassCaching, UseQueryString, NotSet
optimizationType enum No 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. - GeneralWebDelivery, GeneralMediaStreaming, VideoOnDemandMediaStreaming, LargeFileDownload, DynamicSiteAcceleration
probePath string No 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.
geoFilters array No 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/ - GeoFilter object
deliveryPolicy object No A policy that specifies the delivery rules to be used for an endpoint. - EndpointPropertiesUpdateParametersDeliveryPolicy object
origins array Yes The source of the content being delivered via CDN. - DeepCreatedOrigin object

GeoFilter object

Name Type Required Value
relativePath string Yes Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.)
action enum Yes Action of the geo filter, i.e. allow or block access. - Block or Allow
countryCodes array Yes Two letter country codes defining user country access in a geo filter, e.g. AU, MX, US. - string

EndpointPropertiesUpdateParametersDeliveryPolicy object

Name Type Required Value
description string No User-friendly description of the policy.
rules array Yes A list of the delivery rules. - DeliveryRule object

DeepCreatedOrigin object

Name Type Required Value
name string Yes Origin name
properties object No DeepCreatedOriginProperties object

DeliveryRule object

Name Type Required Value
order integer Yes The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.
actions array Yes A list of actions that are executed when all the conditions of a rule are satisfied. - DeliveryRuleAction object
conditions array No A list of conditions that must be matched for the actions to be executed - DeliveryRuleCondition object

DeepCreatedOriginProperties object

Name Type Required Value
hostName string Yes The address of the origin. It can be a domain name, IPv4 address, or IPv6 address.
httpPort integer No The value of the HTTP port. Must be between 1 and 65535
httpsPort integer No The value of the HTTPS port. Must be between 1 and 65535

DeliveryRuleAction object

Name Type Required Value
name string Yes

DeliveryRuleCondition object

Name Type Required Value
name string Yes

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create a CDN Profile and a CDN Endpoint with custom origin

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with a user specified origin and all of our most commonly used settings on CDN.
Create a CDN Profile and a CDN Endpoint with parameters

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with parameterized configuration settings
Create a CDN Endpoint with cache override through Rules

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with a user specified origin and all of our most commonly used settings on CDN. This template also configures rules engine with a path based rule and overrides cache expiration.
Create a CDN Endpoint with response header addition

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with a user specified origin and all of our most commonly used settings on CDN. This template also configures rules engine with Remote address based match and adds corresponding response headers.
Create a CDN Endpoint with rewrite and redirect rules

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with a user specified origin and all of our most commonly used settings on CDN. This template also configures rules engine device based path rewrite and request scheme based redirect.
Create a CDN Endpoint with UrlSigning action

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with a user specified origin and all of our most commonly used settings on CDN. This template also configures rules engine UrlSigning action for default and override parameters.
Create a CDN Profile, Endpoint and a Storage Account

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with origin as a Storage Account. Note that user needs to create a public container in the Storage Account in order for CDN Endpoint to serve content from the Storage Account.
Apply a WAF Policy with custom rules to a CDN Endpoint

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with a user specified origin and all of our most commonly used settings on CDN. This template also links a CDN WAF Policy to the Endpoint which applies example custom rules for blocking and redirecting requests based on geo-location, ip address, and SESSIONID header.
Apply a WAF Policy for the OWASP top 10 to a CDN Endpoint

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with a user specified origin and all of our most commonly used settings on CDN. This template also links a CDN WAF Policy to the Endpoint which applies the managed rule set DefaultRuleSet_1.0.
Apply a WAF Policy with rate limit rules to a CDN Endpoint

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with a user specified origin and all of our most commonly used settings on CDN. This template also links a CDN WAF Policy to the Endpoint which applies example rate limit rules for blocking and redirecting rate-limited requests.
Create a CDN Profile, a CDN Endpoint and a Web App

Deploy to Azure
This template creates a CDN Profile and a CDN Endpoint with a Web App as the origin
eShop Website with ILB ASE

Deploy to Azure
An App Service Environment is a Premium service plan option of Azure App Service that provides a fully isolated and dedicated environment for securely running Azure App Service apps at high scale, including Web Apps, Mobile Apps, and API Apps.