AddCdnDomain

Last Updated: Sep 30, 2017

Description

Add domain names to be accelerated. At one time, you can only submit one domain name. A single user can add up to 20 domain names.

Restrictions:

  • Before creating a CDN domain name, you must first subscribe to the CDN service.
  • The CDN domain name must already have been filed.
  • If the origin site content is not on the Alibaba Cloud platform, it must be reviewed. The review will be completed before the next business day.

Request parameter

Parameter Type Required? Description
Action String Yes Operation interface name, required parameter
Value: AddCdnDomain
DomainName String Yes The domain name that requests access to CDN
SslFlag String No Whether or not to use https domain name, not activated by default
Values:
- 0: Not activated
- 1: Activated
CdnType String Yes The CDN domain business type;
Values:
- web: distribution of images and small files
- download: acceleration of large file downloads
- video: acceleration of streaming media
SourceType String Yes Origin site type
Values:
- ipaddr: IP origin site
- domain: domain name origin site
- oss: use OSS Bucket as origin site
Sources String Yes Source addresses returned which can be IP addresses or domain names
Up to 10 IPs separated by commas or only one domain name supported
IPs and domain names cannot be entered at the same time

Return parameter

Name Type Description
RequestID String The ID that requests the task

Error code

ErrorCode Message HTTP Status
BusinessExist Business exist do not repeated submission 400
InvaildParameter The specified Domain is not vaild. 400
InvaildParameter The specified parameter DomainName format is error. 400
DomainAlreadyExist This domain name is exist already 400
DomainOverLimit The Number of Domain is over the limit 403
DomainNotRegistration The Domain name is not registered 404
IllegalOperation illegal domain operate is not permitted. 403
InvaildParameter Source name can not equal to domain name 400
InvaildParameter The specified Source is not vaild. 400
InvaildParameter The specified parameter IP format is error. 400
InvalidParameter The specified value of parameter is not valid. 400
InternalError The request processing has failed due to backend service exception. 400

Use case

Request example:

  1. http://cdn.aliyuncs.com
  2. ?Action=AddCdnDomain
  3. &CdnType=web
  4. &SourceType=domain
  5. &DomainName=test.com
  6. &Sources=test.com
  7. &<Public Request Parameter>

Return example

JSON format:

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

XML format:

  1. <AddCdnDomainResponse>
  2. <RequestId>A22F5DDD-E6B8-4DB4-A210-FF3CA5A82644</RequestId>
  3. </AddCdnDomainResponse>
Thank you! We've received your feedback.