ALIYUN:: CDN:: Domain is used to add a CDN Domain name.

Note The restrictions include:
  • Before creating a CDN domain name, you must activate the CDN service.
  • Your CDN domain name must be filed.
  • If your origin site content is not on the Alibaba Cloud platform, you must review it. The review will be completed before the next working day.
  • You can submit only one CDN domain name at a time.
  • Each user can add up to 20 domain names.

Syntax

{
  "Type": "ALIYUN::CDN::Domain",
  "Properties": {
    "CdnType": String,
    "Sources": String,
    "CheckUrl": String,
    "DomainName": String,
    "ResourceGroupId": String,
    "Scope": String,
    "TopLevelDomain": String
  }
}

Properties

Property Name Type Required Update allowed Description Constraints
CdnType String Yes No The business type of the CDN domain name. Valid values: web, download, and video.
Sources String No Yes The list of back-to-origin addresses. Example value:[{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80,"weight":"15"}]. None.
CheckUrl String No No The detection URL. Example value:Www.yourdomain.com/test.html. None.
DomainName String Yes No The domain name to access CDN. Example value:A.com. Wildcard domain names are supported. Symbol. Start with.
ResourceGroupId String No Yes The ID of the resource group. None.
Scope String No No Scope. This parameter is valid only for international users or users of level 3 or above in mainland China. Valid values: domestic, overseas, and global. Default value: domestic.
TopLevelDomain String No Yes The top-level access domain. Example: www. yourTopLevelDomain.

Return value

Fn::GetAtt

  • DomainName: the domain name to access CDN.
  • Cname: the alias of the CDN domain name. Provide the DNS with the CNAME to map the CDN domain name to the CNAME.

Example

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "Domain": {
      "Type": "ALIYUN::CDN::Domain",
      "Properties": {
        "CdnType": {
          "Ref": "CdnType"
        },
        "Sources": {
          "Ref": "Sources"
        },
        "CheckUrl": {
          "Ref": "CheckUrl"
        },
        "DomainName": {
          "Ref": "DomainName"
        },
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "Scope": {
          "Ref": "Scope"
        },
        "TopLevelDomain": {
          "Ref": "TopLevelDomain"
        }
      }
    }
  },
  "Parameters": {
    "CdnType": {
      "Type": "String",
      "Description": "The business type. Valid values: web, download, video, livestream, and httpsdelivery. web: acceleration of images and small files download. download: acceleration of large file downloads. video: live streaming acceleration. httpsdelivery: SSL acceleration for HTTPS.",
      "AllowedValues": [
        "video",
        "download",
        "web",
        "liveStream"
      ]
    },
    "Sources": {
      "Type": "String",
      "Description": "The list of origin URLs."
    },
    "CheckUrl": {
      "Type": "String",
      "Description": "The validation of the origin."
    },
    "DomainName": {
      "Type": "String",
      "Description": "The CDN domain name. Wildcard domain names that start with periods (.) are supported. For example,. A.com."
    },
    "ResourceGroupId": {
      "Type": "String",
      "Description": "The ID of the resource group. If this is left blank, the system automatically fills in the ID of the default resource group."
    },
    "Scope": {
      "Type": "String",
      "Description": "Valid values: domestic, overseas, and global. Default value: domestic. The setting is supported for users outside mainland China, users in mainland China of level 3 or above."
    },
    "TopLevelDomain": {
      "Type": "String",
      "Description": "The top-level domain, which can only be configured by users on the whitelist."
    }
  },
  "Outputs": {
    "DomainName": {
      "Description": "The CDN domain name. Wildcard domain names that start with periods (.) are supported. For example,. A.com. ",
      "Value": {
        "Fn::GetAtt": [
          "Domain",
          "DomainName"
        ]
      }
    }
  }
}