Share via


Microsoft.Cdn profiles/endpoints 2017-04-02

Bicep resource definition

The profiles/endpoints resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Cdn/profiles/endpoints resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Cdn/profiles/endpoints@2017-04-02' = {
  parent: resourceSymbolicName
  location: 'string'
  name: 'string'
  properties: {
    contentTypesToCompress: [
      'string'
    ]
    geoFilters: [
      {
        action: 'string'
        countryCodes: [
          'string'
        ]
        relativePath: 'string'
      }
    ]
    isCompressionEnabled: bool
    isHttpAllowed: bool
    isHttpsAllowed: bool
    optimizationType: 'string'
    originHostHeader: 'string'
    originPath: 'string'
    origins: [
      {
        name: 'string'
        properties: {
          hostName: 'string'
          httpPort: int
          httpsPort: int
        }
      }
    ]
    probePath: 'string'
    queryStringCachingBehavior: 'string'
  }
  tags: {
    {customized property}: 'string'
  }
}

Property Values

Microsoft.Cdn/profiles/endpoints

Name Description Value
location Resource location. string (required)
name The resource name string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: profiles
properties The JSON object that contains the properties required to create an endpoint. EndpointProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates

DeepCreatedOrigin

Name Description Value
name Origin name string (required)
properties Properties of the origin created on the CDN endpoint. DeepCreatedOriginProperties

DeepCreatedOriginProperties

Name Description Value
hostName The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. string (required)
httpPort The value of the HTTP port. Must be between 1 and 65535 int

Constraints:
Min value = 1
Max value = 65535
httpsPort The value of the HTTPS port. Must be between 1 and 65535 int

Constraints:
Min value = 1
Max value = 65535

EndpointProperties

Name Description Value
contentTypesToCompress List of content types on which compression applies. The value should be a valid MIME type. string[]
geoFilters 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[]
isCompressionEnabled 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. bool
isHttpAllowed Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. bool
isHttpsAllowed Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. bool
optimizationType 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. 'DynamicSiteAcceleration'
'GeneralMediaStreaming'
'GeneralWebDelivery'
'LargeFileDownload'
'VideoOnDemandMediaStreaming'
originHostHeader 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. string
originPath A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. string
origins The source of the content being delivered via CDN. DeepCreatedOrigin[] (required)
probePath 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. string
queryStringCachingBehavior 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. 'BypassCaching'
'IgnoreQueryString'
'NotSet'
'UseQueryString'

GeoFilter

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

TrackedResourceTags

Name Description Value

Usage Examples

Azure Quickstart Samples

The following Azure Quickstart templates contain Bicep samples for deploying this resource type.

Bicep File Description
Create a CDN Endpoint with cache override through Rules 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 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 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 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 and a CDN Endpoint with custom origin 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 This template creates a CDN Profile and a CDN Endpoint with parameterized configuration settings
Create a CDN Profile, a CDN Endpoint and a Web App This template creates a CDN Profile and a CDN Endpoint with a Web App as the origin
Create a CDN Profile, Endpoint and a Storage Account 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.

ARM template resource definition

The profiles/endpoints resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

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

{
  "type": "Microsoft.Cdn/profiles/endpoints",
  "apiVersion": "2017-04-02",
  "name": "string",
  "location": "string",
  "properties": {
    "contentTypesToCompress": [ "string" ],
    "geoFilters": [
      {
        "action": "string",
        "countryCodes": [ "string" ],
        "relativePath": "string"
      }
    ],
    "isCompressionEnabled": "bool",
    "isHttpAllowed": "bool",
    "isHttpsAllowed": "bool",
    "optimizationType": "string",
    "originHostHeader": "string",
    "originPath": "string",
    "origins": [
      {
        "name": "string",
        "properties": {
          "hostName": "string",
          "httpPort": "int",
          "httpsPort": "int"
        }
      }
    ],
    "probePath": "string",
    "queryStringCachingBehavior": "string"
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property Values

Microsoft.Cdn/profiles/endpoints

Name Description Value
apiVersion The api version '2017-04-02'
location Resource location. string (required)
name The resource name string (required)
properties The JSON object that contains the properties required to create an endpoint. EndpointProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.Cdn/profiles/endpoints'

DeepCreatedOrigin

Name Description Value
name Origin name string (required)
properties Properties of the origin created on the CDN endpoint. DeepCreatedOriginProperties

DeepCreatedOriginProperties

Name Description Value
hostName The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. string (required)
httpPort The value of the HTTP port. Must be between 1 and 65535 int

Constraints:
Min value = 1
Max value = 65535
httpsPort The value of the HTTPS port. Must be between 1 and 65535 int

Constraints:
Min value = 1
Max value = 65535

EndpointProperties

Name Description Value
contentTypesToCompress List of content types on which compression applies. The value should be a valid MIME type. string[]
geoFilters 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[]
isCompressionEnabled 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. bool
isHttpAllowed Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. bool
isHttpsAllowed Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. bool
optimizationType 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. 'DynamicSiteAcceleration'
'GeneralMediaStreaming'
'GeneralWebDelivery'
'LargeFileDownload'
'VideoOnDemandMediaStreaming'
originHostHeader 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. string
originPath A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. string
origins The source of the content being delivered via CDN. DeepCreatedOrigin[] (required)
probePath 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. string
queryStringCachingBehavior 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. 'BypassCaching'
'IgnoreQueryString'
'NotSet'
'UseQueryString'

GeoFilter

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

TrackedResourceTags

Name Description Value

Usage Examples

Azure Quickstart Templates

The following Azure Quickstart templates deploy this resource type.

Template Description
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 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 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
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.

Terraform (AzAPI provider) resource definition

The profiles/endpoints resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Cdn/profiles/endpoints resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Cdn/profiles/endpoints@2017-04-02"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      contentTypesToCompress = [
        "string"
      ]
      geoFilters = [
        {
          action = "string"
          countryCodes = [
            "string"
          ]
          relativePath = "string"
        }
      ]
      isCompressionEnabled = bool
      isHttpAllowed = bool
      isHttpsAllowed = bool
      optimizationType = "string"
      originHostHeader = "string"
      originPath = "string"
      origins = [
        {
          name = "string"
          properties = {
            hostName = "string"
            httpPort = int
            httpsPort = int
          }
        }
      ]
      probePath = "string"
      queryStringCachingBehavior = "string"
    }
  }
}

Property Values

Microsoft.Cdn/profiles/endpoints

Name Description Value
location Resource location. string (required)
name The resource name string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: profiles
properties The JSON object that contains the properties required to create an endpoint. EndpointProperties
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.Cdn/profiles/endpoints@2017-04-02"

DeepCreatedOrigin

Name Description Value
name Origin name string (required)
properties Properties of the origin created on the CDN endpoint. DeepCreatedOriginProperties

DeepCreatedOriginProperties

Name Description Value
hostName The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. string (required)
httpPort The value of the HTTP port. Must be between 1 and 65535 int

Constraints:
Min value = 1
Max value = 65535
httpsPort The value of the HTTPS port. Must be between 1 and 65535 int

Constraints:
Min value = 1
Max value = 65535

EndpointProperties

Name Description Value
contentTypesToCompress List of content types on which compression applies. The value should be a valid MIME type. string[]
geoFilters 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[]
isCompressionEnabled 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. bool
isHttpAllowed Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. bool
isHttpsAllowed Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. bool
optimizationType 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. 'DynamicSiteAcceleration'
'GeneralMediaStreaming'
'GeneralWebDelivery'
'LargeFileDownload'
'VideoOnDemandMediaStreaming'
originHostHeader 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. string
originPath A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. string
origins The source of the content being delivered via CDN. DeepCreatedOrigin[] (required)
probePath 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. string
queryStringCachingBehavior 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. 'BypassCaching'
'IgnoreQueryString'
'NotSet'
'UseQueryString'

GeoFilter

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

TrackedResourceTags

Name Description Value