Adds a domain name to accelerate in ApsaraVideo VOD.
Operation description
- This operation is available only in the China (Shanghai) region.
- Before you add a domain name to accelerate, you must activate ApsaraVideo VOD and apply for an Internet content provider (ICP) filing for the domain name. For more information about how to activate ApsaraVideo VOD, see Activate ApsaraVideo VOD.
- If the content on the origin server is not stored on Alibaba Cloud, the content must be reviewed by Alibaba Cloud. The review will be complete by the end of the next business day after you submit an application.
- You can add only one domain name to accelerate in a request. You can add a maximum of 20 accelerated domain names within an Alibaba Cloud account.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vod:AddVodDomain | *Domain acs:vod:*:{#accountId}:domain/{#domainId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DomainName | string | Yes | The domain name that you want to accelerate. Wildcard domain names that start with periods (.) are supported. Example: .example.com. | example.com |
Sources | string | Yes | The information about the addresses of origin servers. For more information, see the Sources table in this topic. | [{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}] |
CheckUrl | string | No | The URL that is used for health checks. | www.example.com/test.html |
Scope | string | No | This parameter is applicable to users of level 3 or higher in the Chinese mainland and users outside the Chinese mainland. Default value: domestic. Valid values:
| domestic |
TopLevelDomain | string | No | The top-level domain. | example.com |
Sources
Parameter | Type | Required | Description |
---|---|---|---|
type | String | Yes | The type of the origin server. Valid values: ipaddr: an IP address. domain: a domain name. oss: the domain of an Object Storage Service (OSS) bucket. |
content | String | Yes | The address of the origin server. You can specify an IP address or a domain name. |
port | Integer | No | The port number. Valid values: 443 and 80. Default value: 80. If you specify 443, requests are redirected to the origin server over HTTPS. You can also specify a custom port. |
priority | String | No | The priority of the origin server if multiple origin servers are specified. Valid values: 20 and 30. Default value: 20. 20 indicates that the origin server is the primary origin server. 30 indicates that the origin server is a secondary origin server. |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "15C66C7B-671A-4297-****-2C4477247A74"
}
Error codes
For a list of error codes, visit the Service error codes.
Common errors
The following table describes the error codes that this operation can return.
Error code | Error message | HTTP status code | Description |
---|---|---|---|
InvalidDomainName.Malformed | Specified DomainName is malformed. | 400 | The error message returned because the value of the DomainName parameter is invalid. |
InvalidCdnType.Malformed | Specified CdnType is malformed. | 400 | The error message returned because the value of the CdnType parameter is invalid. |
InvalidSourceType.Malformed | Specified SourceType is malformed. | 400 | The error message returned because the value of the SourceType parameter is invalid. |
InvalidSources.Malformed | Specified Sources is malformed. | 400 | The error message returned because the origin address does not match the origin type. |
InvalidScope.Malformed | Specified Scope is malformed. | 400 | The error message returned because the value of the Scope parameter is invalid. |
InvaildParameter | The Certificate you provided is malformed! | 400 | The error message returned because the total length of the HTTPS certificate and private key exceeds the upper limit. |
BusinessExist | Business exist do not repeated submission | 400 | The error message returned because the domain name is being added. You cannot add duplicate domain names. |
DomainAlreadyExist | This domain name is exist already | 400 | The error message returned because the domain name is already added. |
DomainOverLimit | The Number of Domain is over the limit | 403 | The error message returned because the number of accelerated domain names exceeds the upper limit. |
DomainNotRegistration | The Domain name is not registered | 404 | The error message returned because the domain name does not have an ICP filing. |
IllegalOperation | Illegal domain operate is not permitted. | 403 | The error message returned because you are not authorized to perform this operation. |
ServiceBusy | The specified Domain is configuring, please retry later. | 403 | The error message returned because the domain name is being configured. Try again later. |
InvalidDomain.NotFound | The domain provided does not belong to you. | 404 | The error message returned because the specified domain name does not exist or does not belong to the current account. |
InnerAddDomainDenied | Your account haven't bind aoneId, can not add domain. | 400 | The error message returned because an internal account is not bound to an Aone ID. You cannot add a domain name by using the internal account. |
ExtensiveAndAllBothExist | Extensive domain and the domain begins with 'all.' can not exist at the same time. | 400 | The error message returned because a wildcard domain name and a domain name that starts with all. exist. They cannot exist at the same time. |
CdnTypeNotSupportExtensiveDomain | Extensive domain not supported for this cdn type. | 400 | The error message returned because wildcard domain names are not supported for the specified business type. |
ExtensiveAndSpecificDomainConflict | Extensive domain and corresponding specific domain are mutually exclusive. | 400 | The error message returned because the specified domain name is an exact match of an existing wildcard domain name at the same level. |
InvalidParameter | Add live region parameters have error. | 400 | The error message returned because the system failed to specify the region for live streaming. |
InvalidRegion.Malformed | Specified Region is malformed. | 400 | The error message returned because the value of the region parameter is invalid. |
InvalidResourceGroupId.Malformed | Specified ResourceGroupId is malformed. | 400 | The error message returned because the value of the ResourceGroupId parameter is invalid. |
EntityNotExists.ResourceGroup | The resource group does not exist. | 400 | The error message returned because the specified resource group 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 because the resource group is in an invalid state. |
InvalidPriorities.Malformed | The length of priorities is not the same with source. | 400 | The error message returned because the number of priorities does not match the number of origin servers. |
NotInternationRealIdentity | You need to do real name authentication when you use Chinese mainland resources. | 400 | The error message returned because you have not completed real-name verification that is required to use resources in the Chinese mainland. |