全部產品
Search
文件中心

:ALIYUN::DCDN::Domain

更新時間:Jun 19, 2024

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

加速地區。

取值:

  • domestic(預設值):僅中國內地。

  • overseas:全球(不包含中國內地)。

  • global:全球。

ResourceGroupId

String

資源群組ID。

不傳該參數時,系統自動補全預設資源群組ID。

DomainName

String

待添加的加速網域名稱。

僅支援添加單個網域名稱。

支援添加泛網域名稱,以點號(.)開頭,例如:.example.com

TopLevelDomain

String

頂級接入域。

Sources

List

回源地址清單。

樣本值:

[{"content":"10.10.10.10","type":"ipaddr","priority":"20","port":80,"weight":"15"}]

Tags

List

執行個體的標籤。最多支援添加20個標籤。

更多資訊,請參見Tags屬性

Tags文法

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]

Tags屬性

屬性名稱

類型

必須

允許更新

描述

約束

Key

String

標籤鍵。

長度不超過128個字元,不能以aliyunacs:開頭,不能包含http://或者https://

Value

String

標籤值。

長度不超過128個字元,不能以aliyunacs:開頭,不能包含http://或者https://

Sources文法

"Sources": [
  {
    "Type": String,
    "Content": String,
    "Priority": String,
    "Port": Integer,
    "Weight": String
  }
]

Sources屬性

屬性名稱

類型

必須

允許更新

描述

約束

Type

String

來源站點類型。

取值:

  • ipaddr:通過IP地址進行配置。 

  • domain:以網域名稱方式配置。

  • oss:使用阿里雲OSS Bucket(Cloud Object Storage Service)的Internet網域名稱配置。 

Content

String

回源地址。

可指定IP地址或網域名稱。 

Priority

String

來源站點地址對應的優先順序。

如果指定了多個源,則需要指定源的優先順序。 

取值範圍:20~30。 

預設值:20。 

說明

當值為20時,表示該源為主源。當值為30時,表示該源為次源。

Port

Integer

連接埠。

連接埠參數可設定為443或80,也可以自訂連接埠號碼。 

預設值:80。 

說明

如果指定443連接埠,DCDN將使用HTTPS與原始伺服器通訊。

Weight

String

回源權重。

取值範圍:100以內。

預設值:10。

傳回值

Fn::GetAtt

  • Cname:加速域的正式名稱

  • DomainName:CDN網域名稱。

樣本

YAML格式

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

JSON格式

{
  "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"
        ]
      }
    }
  }
}