All Products
Search
Document Center

AddDcdnDomain

Last Updated: Mar 01, 2019

Description

You can call this operation to add a DCDN domain name. You can specify only one DCDN domain name in each request.

Note:

  • Before adding a DCDN domain name, you must activate the DCDN service.
  • The domain name must have an Internet Content Provider (ICP) license.
  • If the origin content is not saved on the Alibaba Cloud platform, the content must be reviewed. The review will be completed by the end of the next working day after you submit the application.

Request parameters

Name Type Required Description
Action String Yes The operation that you want to perform. Set the value to AddDcdnDomain.
DomainName String Yes The domain name. Wildcard domain names that start with a period (.) are supported. For example, .a.com.
Sources Json Yes The list of origin URLs.
Scope String No Valid values: domestic, overseas, and global. Default value: domestic. The setting is supported for users outside mainland China and users in mainland China of level 3 or above.
ResourceGroupId String No The ID of the resource group. If this is left blank, the system automatically fills in the ID of the default resource group.
TopLevelDomain String No The top-level domain, which can only be configured by users on the whitelist.

Sources format

  1. [{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}]

Sources fields

Field Type Required Description
type String Yes The type of the origin. Valid values: ipaddr, domain, and oss. ipaddr: The origin is configured using an IP address. domain: The origin is configured using a domain name. oss: The origin is configured using the Internet domain name of an Alibaba Cloud OSS bucket.
content String Yes The URL of the origin, which can be an IP address or a domain name.
port Integer No Valid values: 443 and 80. Default value: 80. Port 443 is used for HTTPS requests. Customized ports are supported.
priority String No The priority of the origin. Default value: 20.

Response parameters

Name Type Description
RequestId String The ID of the request.

Examples

Sample requests

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

Sample responses

JSON format

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

Error codes

Error code Error message HTTP status code Description
InvalidDomainName.Malformed Specified DomainName is malformed. 400 The error message returned when the specified DomainName value is invalid.
InvalidSource.Content.Malformed Specified source content is malformed. 400 The error message returned when the value specified for the content field is invalid.
InvalidSource.Type.Malformed Specified source type is malformed. 400 The error message returned when the value specified for the type field is invalid.
InvalidTypeContent.Mismatch Specified source type does not math the specified source content. 400 The error message returned when the specified origin URL does not match the origin type.
InvalidSource.Priority.Malformed Specified source priority is malformed. 400 The error message returned when the specified Priority value is invalid.
InvalidScope.Malformed Specified Scope is malformed. 400 The error message returned when the specified Scope value is invalid.
BusinessExist Business exist do not repeated submission. 400 The error message returned when the domain name is already being added. Do not repeat the action.
DomainAlreadyExist This domain name is exist already. 400 The error message returned when the domain name has already been added.
DomainOverLimit The Number of Domain is over the limit. 403 The error message returned when the number of domain names has reached the upper limit.
DomainNotRegistration The Domain name is not registered. 404 The error message returned when the domain name does not have an ICP license.
IllegalOperation Illegal domain operate is not permitted. 403 The error message returned because you do not have permission to perform the operation.
ServiceBusy The specified Domain is configuring, please retry later. 403 The error message returned when the domain name is being configured. Please try again later.
ExtensiveAndAllBothExist Extensive domain and the domain begins with ‘all.’ can not exist at the same time. 400 The error message returned when both a wildcard domain name and a domain name that starts with all. are specified.
CdnTypeNotSupportExtensiveDomain Extensive domain not supported for this cdn type. 400 The error message returned because wildcard domain names are not supported for this business type.
ExtensiveAndSpecificDomainConflict Extensive domain and corresponding specific domain are mutually exclusive. 400 The error message returned when the wildcard domain name matches an exact domain name at the corresponding level.
InvalidResourceGroupId.Malformed Specified ResourceGroupId is malformed. 400 The error message returned when the resource group ID is invalid.
EntityNotExists.ResourceGroup The resource group does not exist. 400 The error message returned when the resource group ID does not exist.
InvalidStatus.ResourceGroup It’s now allowed to do this operation because of the current status of resource-group. 400 The error message returned when the resource group is in an incorrect status.
NotInternationRealIdentity You need to do real name authentication when you use Chinese mainland resources. 400 The error message returned because you must complete real-name authentication before using mainland China resources.