All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::DCDN::Domain

Last Updated:Dec 08, 2023

ALIYUN::DCDN::Domain is used to add a Dynamic Route for CDN (DCDN) domain name.

Syntax

{
  "Type": "ALIYUN::DCDN::Domain",
  "Properties": {
    "CheckUrl": String,
    "Scope": String,
    "ResourceGroupId": String,
    "DomainName": String,
    "TopLevelDomain": String,
    "Sources": List,
    "Tags": List
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

CheckUrl

String

No

Yes

The URL that is used to check the accessibility of the origin server.

None.

Scope

String

No

No

The accelerated region.

Valid values:

  • domestic (default): inside the Chinese mainland

  • overseas: outside the Chinese mainland

  • global: global

ResourceGroupId

String

No

Yes

The ID of the resource group.

If you do not specify this property, the system automatically assigns the ID of the default resource group.

DomainName

String

Yes

No

The domain name that you want to add.

You can add only one domain name.

You can add a wildcard domain name that starts with a period (.), such as .example.com.

TopLevelDomain

String

No

Yes

The top-level domain.

None.

Sources

List

Yes

No

The addresses of the origin servers.

Example:

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

Tags

List

No

Yes

The tags. You can specify up to 20 tags.

For more information, see Tags properties.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The tag key.

The tag key can be up to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

Value

String

No

No

The tag value.

The tag value can be up to 128 characters in length and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.

Sources syntax

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

Sources properties

Property

Type

Required

Editable

Description

Constraint

Type

String

Yes

No

The type of the origin server.

Valid values:

  • ipaddr: The origin server is configured by using an IP address.  

  • domain: The origin server is configured by using a domain name.

  • oss: The origin server is configured by using the public domain name of an Object Storage Service (OSS) bucket.  

Content

String

Yes

No

The address of the origin server.

You can specify an IP address or a domain name.  

Priority

String

No

No

The priority of the origin server if multiple origin servers are specified.

If multiple origin servers are specified, you must specify this property.  

Valid values: 20 to 30.  

Default value: 20.  

Note

A value of 20 specifies that the origin is a primary origin. A value of 30 specifies that the origin is a secondary origin.

Port

Integer

No

No

The port.

You can specify port 443, port 80, or a custom port.  

Default value: 80.  

Note

If you set the port to 443, DCDN uses the HTTPS protocol to communicate with the origin server.

Weight

String

No

No

The weight of the origin server if multiple origin servers are specified.

Valid values: a numeric value that is less than 100.

Default value: 10.

Return values

Fn::GetAtt

  • Cname: the canonical name (CNAME) of the domain name.

  • DomainName: the CDN domain name.

Examples

YAML format

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 format

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