Creates an accelerated domain. You can create only one accelerated domain for each request.

Before you call this operation, pay attention to the following notes:
  • You must activate the Dynamic Route for CDN (DCDN) service before you create an accelerated domain.
  • Make sure that you have completed Internet content provider (ICP) filling for the accelerated domain.
  • If the origin content is not saved on Alibaba Cloud, the content must be reviewed by Alibaba Cloud. The review will be completed by the next business day after you submit the application.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddDcdnDomain

The operation that you want to perform. Set the value to AddDcdnDomain.

DomainName String Yes example.com

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 (.), such as .a.com.

Sources String Yes [{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}]

The information about the origin address.

ResourceGroupId String No 123

The ID of the resource group. If you do not specify this parameter, the system automatically uses the ID of the default resource group.

CheckUrl String No xxx.com

The URL that is used to test the accessibility of the origin.

Scope String No domestic

The region where your acceleration service is deployed. Valid values:

  • domestic: mainland China only. The default value is domestic.
  • overseas: outside mainland China.
  • global: all the countries around the world.
TopLevelDomain String No yourTopLevelDomain

The top-level domain name.

Fields in Sources

Parameter

Type

Required

Description

type

String

Yes

The type of the origin. A value of ipaddr indicates that the origin is configured by using an IP address. A value of domain indicates that the origin is configured by using a domain name. A value of oss indicates that the origin is configured by using the domain name of an Object Storage Service (OSS) bucket.

content

String

Yes

The origin address. You can specify an IP address or a domain name.

port

Integer

No

The port number. You can set the port parameter to 443 or 80. You can also customize the port number. The default value is 80. If you specify port 443, DCDN communicates with the origin over HTTPS.

priority

String

No

The priority of the origin. Valid values: 20 and 30. Default value: 20. A value of 20 indicates that the origin is a primary origin. A value of 30 indicates that the origin is a secondary origin.

weight

String

No

The weight of the origin. You must specify a value that is less than 100. The default value is 10.

Response parameters

Parameter Type Example Description
RequestId String 15C66C7B-671A-4297-9187-2C4477247A74

The ID of the request.

Examples

Sample requests

http://dcdn.aliyuncs.com?Action=AddDcdnDomain
&DomainName=example.com
&Sources=[{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}]
&<Common request parameters>

Sample success responses

XML format

<AddDcdnDomainResponse>
	  <RequestId>15C66C7B-671A-4297-9187-2C4477247A74</RequestId>
</AddDcdnDomainResponse>

JSON format

{
  "RequestId": "15C66C7B-671A-4297-9187-2C4477247A74"
}

Error codes

HttpCode Error code Error message Description
400 InvalidDomainName.Malformed The specified DomainName is invalid. The error message returned because the domain name format is invalid.
400 InvalidSource.Content.Malformed The specified Source Content is invalid. The error message returned because the specified value of the Sources parameter is invalid. Specify another value.
400 MissingSource.Content The Source Content must be specified. The error message returned because the content field in the Sources parameter is not specified. Specify the field and try again later.
400 MissingSource.Type The Source Type must be specified. The error message returned because the type field in the Sources parameter is not specified. Specify the field and try again later.
400 InvalidSource.Type.Malformed The specified Source Type is invalid. The error message returned because the specified value of the type field in the Sources parameter is invalid. Specify a value that is in the required format.
400 InvalidSource.Priority.Malformed The specified Source Priority is invalid. The error message returned because the specified value of the priority field in the Sources parameter is invalid. Specify a value that is in the required format.
400 InvalidScope.Malformed The specified Scope is invalid. The error message returned because the specified value of the Scope parameter is invalid. Specify a valid value and try again.
400 SourceIp.Exceed The maximum number of back-to-origin IP addresses is exceeded. The error message returned because the maximum number of origin IP addresses has been reached.
400 InvalidCertificate The specified certificate format is invalid. The error message returned because the format of the specified certificate is invalid. Specify a valid certificate and try again.
400 InvalidCertificate.TooLong The maximum length of the certificate is exceeded. The error message returned because the maximum length of the specified certificate content has been reached.
400 CheckSourceHealthFailed Error checking the security. Provide the valid origin site information. The error message returned because the specified origin information has failed the security check. Specify valid origin information and try again.
400 ExtensiveAndAllBothExist A wildcard domain name and a domain name with an all. prefix cannot be both specified. The error message returned because wildcard domain names and a domain name that starts with all. exist at the same time.
400 CdnTypeNotSupportExtensiveDomain Wildcard domain names are not supported. The error message returned because wildcard domains are not supported.
400 ExtensiveAndSpecificDomainConflict The wildcard domain name overlaps a domain name at the same level. The error message returned because the specified domain name is an exact match of an existing wildcard domain name at the same level. Specify another domain name.
400 InvalidResourceGroupId.Malformed The specified ResourceGroupId is invalid. The error message returned because the specified value of the ResourceGroupId parameter is invalid. Specify a valid value.
400 DomainReserved The root domain of your domain is reserved by another account. Submit a ticket to contact customer support. The error message returned because the root domain of the specified domain is used by another account. If you need to add the domain, submit a ticket.
400 InvalidDomainNameLevel The alicdn.com domain supports a maximum of three levels of domain. The error message returned because the specified accelerated domain is not supported. Alibaba Cloud DCDN supports up to three levels in an accelerated domain name.
400 EntityNotExists.ResourceGroup The resource group does not exist. The error message returned because the specified resource group does not exist.
400 InvalidStatus.ResourceGroup The current status of the resource group does not support this operation. The error message returned because the operation is not supported while the resource group is in the current state.
400 NotInternationRealIdentity Real-name registration is required for services offered in Mainland China. The error message returned because you have not completed real-name verification that is required to use resources in mainland China. Based on the laws of People's Republic of China (PRC), you must complete real-name verification before you purchase information services in mainland China.
400 TopLevelDomain.NotFound The specified TopLevelDomain does not exist. The error message returned because the specified top-level domain does not exist.
400 RecordCheckNotAvailable The ICP filing interface is unavailable. Please try again later. The error message returned because the interface for Internet content provider (ICP) filing is unavailable. Try again later.
400 IcpBlack The domain is on the ICP blacklist. The error message returned because the domain name is included in the ICP filing blacklist that is provided by the Ministry of Industry and Information Technology of the People's Republic of China.
400 IspBlack The domain is on the ISP blacklist. The error message returned because the domain name is included in the blacklist that is provided by Alibaba Cloud.

For a list of error codes, visit the API Error Center.