Adds a domain to IP Application Accelerator (IPA). The added domain serves as an accelerated domain. You can add only one domain at a time.

Before you call this operation, pay attention to the following considerations:
  • Make sure that the IPA service is activated.
  • Make sure that the Internet content provider (ICP) filing for the domain is completed.
  • If the origin content is not saved on Alibaba Cloud, the content must be reviewed. The review is completed by the end of the next business day after you submit the request.

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 AddDcdnIpaDomain

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

DomainName String Yes example.com

The name of the domain that you want to add to IPA. Wildcard domain names are supported. A wildcard domain name must start with a period (.), such as .example.com.

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

The origin information.

ResourceGroupId String No 123

The ID of the resource group.

CheckUrl String No exanmple.com/123.jpeg

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
  • overseas: outside mainland China
  • global: all the countries in the world
TopLevelDomain String No xxx.com

The top-level domain name.

Fields in Sources

Field

Type

Required

Description

type

String

Yes

The type of the origin. Valid values: ipaddr and domain. A value of ipaddr specifies the IP address of the origin server. A value of domain specifies the domain name of the origin server. A value of oss is not supported.

content

String

Yes

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

port

Integer

Yes

The port number. Valid values: 0 to 65535.

priority

String

No

The priority of the origin if multiple origins are specified. Valid values: 20 and 30. Default value: 20. A value of 20 specifies that the origin is a primary origin. A value of 30 specifies that the origin is a secondary origin.

weight

String

No

The weight of the origin if multiple origins are specified. You must specify a value less than 100. Default value: 10.

Response parameters

Parameter Type Example Description
RequestId String 0AEDAF20-4DDF-4165-8750-47FF9C1929C9

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

<AddDcdnIpaDomainResponse>
	  <RequestId>0AEDAF20-4DDF-4165-8750-47FF9C1929C9</RequestId>
</AddDcdnIpaDomainResponse>

JSON format

{
  "RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
}

Error codes

HttpCode Error code Error message Description
400 InvalidDomainName.Malformed The specified DomainName is invalid. The error message returned because the specified DomainName parameter is invalid.
400 InvalidSource.Content.Malformed The specified Source Content is invalid. The error message returned because the specified Sources parameter is invalid.
400 MissingSource.Content The Source Content must be specified. The error message returned because the content field in the Sources parameter must be specified.
400 MissingSource.Type The Source Type must be specified. The error message returned because the type field in the Sources parameter must be specified.
400 InvalidSource.Type.Malformed The specified Source Type is invalid. The error message returned because the type field specified in the Sources parameter is invalid.
400 InvalidSource.Priority.Malformed The specified Source Priority is invalid. The error message returned because the priority field specified in the Sources parameter is invalid.
400 InvalidScope.Malformed The specified Scope is invalid. The error message returned because the specified Scope parameter is invalid.
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 is exceeded.
400 InvalidCertificate The specified certificate format is invalid. The error message returned because the specified certificate is invalid.
400 InvalidCertificate.TooLong The maximum length of the certificate is exceeded. The error message returned because the length of the specified certificate exceeds the upper limit.
400 CheckSourceHealthFailed Error checking the security. Provide the valid origin site information. The error message returned because the specified origin information failed the security check.
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 domain names that start with the string "all." cannot 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 wildcard domain name matches an existing exact domain name at the corresponding level. Wildcard domain names and the matching exact domain names are mutually exclusive.
400 InvalidResourceGroupId.Malformed The specified ResourceGroupId is invalid. The error message returned because the specified ResourceGroupId parameter is invalid.
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. The DCDN service supports up to three levels in an accelerated domain name.
400 TopLevelDomain.NotFound The specified TopLevelDomain does not exist. The error message returned because the specified top-level domain name does not exist.
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 allowed when 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 the real-name verification that is required to use resources in mainland China.
400 InvalidSource.Port.Malformed The source port is empty, or it is outside the range 0-65535. The error message returned because the port number of the origin is not specified or the specified port number of the origin is invalid. Valid port numbers are from 0 to 65535.
403 DcdnIpaServiceNotFound The DCDN IPA service has not been activated. The error message returned because the IPA service is not activated.
400 RecordCheckNotAvailable The ICP filing interface is unavailable. Please try again later. The error message returned because no ICP filing is available.
400 IcpBlack The domain is on the ICP blacklist. The error message returned because your domain is on the ICP blacklist of the Ministry of Industry and Information Technology (MIIT) of China.
400 IspBlack The domain is on the ISP blacklist. The error message returned because your domain is on the Internet service provider (ISP) blacklist of Alibaba Cloud.

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