ALIYUN::DCDN::Domain类型用于添加全站加速域名。
语法
{
  "Type": "ALIYUN::DCDN::Domain",
  "Properties": {
    "CheckUrl": String,
    "Scope": String,
    "ResourceGroupId": String,
    "DomainName": String,
    "TopLevelDomain": String,
    "Sources": List,
    "Tags": List
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| CheckUrl | String | 否 | 是 | 健康检测URL。 | 无 | 
| Scope | String | 否 | 否 | 加速区域。 | 取值: 
 | 
| ResourceGroupId | String | 否 | 是 | 资源组ID。 | 不传该参数时,系统自动补全默认资源组ID。 | 
| DomainName | String | 是 | 否 | 待添加的加速域名。 | 仅支持添加单个域名。 支持添加泛域名,以点号(.)开头,例如: | 
| TopLevelDomain | String | 否 | 是 | 顶级接入域。 | 无 | 
| Sources | List | 是 | 否 | 回源地址列表。 | 示例值:  | 
| Tags | List | 否 | 是 | 实例的标签。最多支持添加20个标签。 | 更多信息,请参见Tags属性。 | 
Tags语法
"Tags": [
  {
    "Key": String,
    "Value": String
  }
]Tags属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Key | String | 是 | 否 | 标签键。 | 长度不超过128个字符,不能以 | 
| Value | String | 否 | 否 | 标签值。 | 长度不超过128个字符,不能以 | 
Sources语法
"Sources": [
  {
    "Type": String,
    "Content": String,
    "Priority": String,
    "Port": Integer,
    "Weight": String
  }
]Sources属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Type | String | 是 | 否 | 源站类型。 | 取值: 
 | 
| Content | String | 是 | 否 | 回源地址。 | 可指定IP地址或域名。 | 
| Priority | String | 否 | 否 | 源站地址对应的优先级。 | 如果指定了多个源,则需要指定源的优先级。 取值范围:20~30。 默认值:20。 说明  当值为20时,表示该源为主源。当值为30时,表示该源为次源。 | 
| Port | Integer | 否 | 否 | 端口。 | 端口参数可设置为443或80,也可以自定义端口号。 默认值:80。 说明  如果指定443端口,DCDN将使用 | 
| Weight | String | 否 | 否 | 回源权重。 | 取值范围:100以内。 默认值:10。 | 
返回值
Fn::GetAtt
- Cname:加速域的规范名称。 
- DomainName:CDN域名。 
- Arn:阿里云资源名称。 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  CheckUrl:
    Description: ''
    Type: String
  DomainName:
    Description: 'The name of the accelerated domain. You can specify only one domain
      name.  Wildcard domain names are supported. Wildcard domain names must start
      with a period (.). Example: .a.com.'
    Type: String
  ResourceGroupId:
    Description: The ID of the resource group. If you do not specify this parameter,
      the system automatically uses the ID of the default resource group.
    Type: String
  SSLPub:
    Description: Indicates the public key of the certificate if the HTTPS protocol
      is enabled.
    Type: String
  Scope:
    Description: 'The region where your accelerated service is deployed. Valid values:  domestic
      (default): mainland China. overseas: outside mainland China. global: all countries
      in the world.'
    Type: String
  Sources:
    Description: The origin information.
    Type: Json
  TopLevelDomain:
    Description: ''
    Type: String
Resources:
  DCDNDomain:
    Properties:
      CheckUrl:
        Ref: CheckUrl
      DomainName:
        Ref: DomainName
      ResourceGroupId:
        Ref: ResourceGroupId
      Scope:
        Ref: Scope
      Sources:
        Ref: Sources
      TopLevelDomain:
        Ref: TopLevelDomain
    Type: ALIYUN::DCDN::Domain
Outputs:
  CertName:
    Description: The name of the certificate.
    Value:
      Fn::GetAtt:
      - DCDNDomain
      - CertName
  Cname:
    Description: The canonical name (CNAME) of the accelerated domain.
    Value:
      Fn::GetAtt:
      - DCDNDomain
      - Cname
  Description:
    Description: The reason that causes the review failure.
    Value:
      Fn::GetAtt:
      - DCDNDomain
      - Description
  DomainName:
    Description: 'The name of the accelerated domain. You can specify only one domain
      name.  Wildcard domain names are supported. Wildcard domain names must start
      with a period (.). Example: .a.com.'
    Value:
      Fn::GetAtt:
      - DCDNDomain
      - DomainName
  ResourceGroupId:
    Description: The ID of the resource group. If you do not specify this parameter,
      the system automatically uses the ID of the default resource group.
    Value:
      Fn::GetAtt:
      - DCDNDomain
      - ResourceGroupId
  SSLProtocol:
    Description: 'Indicates whether the SSL certificate is enabled. Valid values:  on:
      enabled off: disabled'
    Value:
      Fn::GetAtt:
      - DCDNDomain
      - SSLProtocol
  SSLPub:
    Description: Indicates the public key of the certificate if the HTTPS protocol
      is enabled.
    Value:
      Fn::GetAtt:
      - DCDNDomain
      - SSLPub
  Scope:
    Description: 'The region where your accelerated service is deployed. Valid values:  domestic
      (default): mainland China. overseas: outside mainland China. global: all countries
      in the world.'
    Value:
      Fn::GetAtt:
      - DCDNDomain
      - Scope
  Sources:
    Description: The origin information.
    Value:
      Fn::GetAtt:
      - DCDNDomain
      - Sources{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Status": {
      "Type": "String",
      "Description": "The status of the accelerated domain.  online: The domain is enabled. offline: The domain is disabled. configuring: The domain is being configured. configure_failed: The domain configuration failed. checking: The domain is under review. check_failed: The domain failed the review."
    },
    "SecurityToken": {
      "Type": "String",
      "Description": ""
    },
    "CheckUrl": {
      "Type": "String",
      "Description": ""
    },
    "ResourceGroupId": {
      "Type": "String",
      "Description": "The ID of the resource group. If you do not specify this parameter, the system automatically uses the ID of the default resource group."
    },
    "Scope": {
      "Type": "String",
      "Description": "The region where your accelerated service is deployed. Valid values:  domestic (default): mainland China. overseas: outside mainland China. global: all countries in the world."
    },
    "DomainName": {
      "Type": "String",
      "Description": "The name of the accelerated domain. You can specify only one domain name.  Wildcard domain names are supported. Wildcard domain names must start with a period (.). Example: .a.com."
    },
    "TopLevelDomain": {
      "Type": "String",
      "Description": ""
    },
    "Sources": {
      "Type": "Json",
      "Description": "The origin information."
    }
  },
  "Resources": {
    "DCDNDomain": {
      "Type": "ALIYUN::DCDN::Domain",
      "Properties": {
        "SecurityToken": {
          "Ref": "SecurityToken"
        },
        "CheckUrl": {
          "Ref": "CheckUrl"
        },
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "Scope": {
          "Ref": "Scope"
        },
        "DomainName": {
          "Ref": "DomainName"
        },
        "SSLPub": {
          "Ref": "SSLPub"
        },
        "CertName": {
          "Ref": "CertName"
        },
        "TopLevelDomain": {
          "Ref": "TopLevelDomain"
        },
        "Sources": {
          "Ref": "Sources"
        }
      }
    }
  },
  "Outputs": {
    "Description": {
      "Description": "The reason that causes the review failure.",
      "Value": {
        "Fn::GetAtt": [
          "DCDNDomain",
          "Description"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group. If you do not specify this parameter, the system automatically uses the ID of the default resource group.",
      "Value": {
        "Fn::GetAtt": [
          "DCDNDomain",
          "ResourceGroupId"
        ]
      }
    },
    "Scope": {
      "Description": "The region where your accelerated service is deployed. Valid values:  domestic (default): mainland China. overseas: outside mainland China. global: all countries in the world.",
      "Value": {
        "Fn::GetAtt": [
          "DCDNDomain",
          "Scope"
        ]
      }
    },
    "DomainName": {
      "Description": "The name of the accelerated domain. You can specify only one domain name.  Wildcard domain names are supported. Wildcard domain names must start with a period (.). Example: .a.com.",
      "Value": {
        "Fn::GetAtt": [
          "DCDNDomain",
          "DomainName"
        ]
      }
    },
    "SSLPub": {
      "Description": "Indicates the public key of the certificate if the HTTPS protocol is enabled.",
      "Value": {
        "Fn::GetAtt": [
          "DCDNDomain",
          "SSLPub"
        ]
      }
    },
    "CertName": {
      "Description": "The name of the certificate.",
      "Value": {
        "Fn::GetAtt": [
          "DCDNDomain",
          "CertName"
        ]
      }
    },
    "Cname": {
      "Description": "The canonical name (CNAME) of the accelerated domain.",
      "Value": {
        "Fn::GetAtt": [
          "DCDNDomain",
          "Cname"
        ]
      }
    },
    "Sources": {
      "Description": "The origin information.",
      "Value": {
        "Fn::GetAtt": [
          "DCDNDomain",
          "Sources"
        ]
      }
    },
    "SSLProtocol": {
      "Description": "Indicates whether the SSL certificate is enabled. Valid values:  on: enabled off: disabled",
      "Value": {
        "Fn::GetAtt": [
          "DCDNDomain",
          "SSLProtocol"
        ]
      }
    }
  }
}