All Products
Search
Document Center

ApsaraVideo VOD:AddVodDomain

Last Updated:Nov 09, 2022

Adds a domain name for CDN to ApsaraVideo VOD. You can add only one domain name for CDN to ApsaraVideo VOD each time. You can add a maximum of 20 domain names for CDN within an Alibaba Cloud account.

Operation Description

  • This operation is available only in the China (Shanghai) region.
  • Before you add a domain name for CDN, you must activate ApsaraVideo VOD and apply for an Internet content provider (ICP) filing for domain name.
  • 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.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • 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 keyword: refers to the condition keyword defined by the cloud product itself.
  • 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.
Operateaccess levelResource typeconditional keywordAssociation operation
vod:AddVodDomainWrite
  • VOD
    acs:vod:*:{#accountId}:domain/{#domainId}
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringYes

The domain name for CDN that you want to add to ApsaraVideo VOD. Wildcard domain names are supported. Start the domain name with a period (.). Example: .example.com.

example.com
SourcesstringYes

The information about the address of the origin server. For more information about the Sources parameter, see the Sources section.

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

The URL that is used for health checks.

www.example.com/test.html
ScopestringNo

This parameter is applicable to users of level 3 or higher in mainland China and users outside mainland China. Valid values:

  • domestic: mainland China. This is the default value.
  • overseas: outside mainland China.
  • global: regions in and outside mainland China.
domestic
TopLevelDomainstringNo

The top-level domain name.

example.com

Sources

ParameterTypeRequiredDescription
typeStringYesThe type of the origin server. Valid values:
ipaddr: a server that you can access by using an IP address.
domain: a server that you can access by using a domain name.
oss: an Object Storage Service (OSS) bucket.
contentStringYesThe address of the origin server. You can specify an IP address or a domain name.
portIntegerNoThe port number. You can specify port 443 or 80. Default value: 80. If you specify port 443, Alibaba Cloud CDN communicates with the origin server over HTTPS. You can also customize a port.
priorityStringNoThe priority of the origin server if multiple origin servers are specified. Valid values: 20 and 30. Default value: 20. A value of 20 indicates that the origin server is the primary origin server. A value of 30 indicates that the origin server is a secondary origin server.

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

15C66C7B-671A-4297-****-2C4477247A74

Example

Normal return example

JSONFormat

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

Error codes

For a list of error codes, visit the API error center.

Common errors

The following table describes the common errors that this operation can return.

Error codeError messageHTTP status codeDescription
InvalidDomainName.MalformedSpecified DomainName is malformed.400The error message returned because the value of the DomainName parameter is invalid.
InvalidCdnType.MalformedSpecified CdnType is malformed.400The error message returned because the value of the CdnType parameter is invalid.
InvalidSourceType.MalformedSpecified SourceType is malformed.400The error message returned because the value of the SourceType parameter is invalid.
InvalidSources.MalformedSpecified Sources is malformed.400The error message returned because the origin address does not match the origin type.
InvalidScope.MalformedSpecified Scope is malformed.400The error message returned because the value of the Scope parameter is invalid.
InvaildParameterThe Certificate you provided is malformed!400The error message returned because the total length of the HTTPS certificate and private key exceeds the upper limit.
BusinessExistBusiness exist do not repeated submission400The error message returned because the domain name is being added. Do not repeat the operation.
DomainAlreadyExistThis domain name is exist already400The error message returned because the domain name has been added.
DomainOverLimitThe Number of Domain is over the limit403The error message returned because the number of domain names that can be added exceeds the upper limit.
DomainNotRegistrationThe Domain name is not registered404The error message returned because the domain name does not have an ICP filing.
IllegalOperationIllegal domain operate is not permitted.403The error message returned because you are not authorized to perform this operation.
ServiceBusyThe specified Domain is configuring, please retry later.403The error message returned because the domain name is being configured. Try again later.
InvalidDomain.NotFoundThe domain provided does not belong to you.404The error message returned because the domain name does not exist or does not belong to you.
InnerAddDomainDeniedYour account haven't bind aoneId, can not add domain.400The error message returned because you cannot add a domain name by using an internal account that is not bound to an Aone ID.
ExtensiveAndAllBothExistExtensive domain and the domain begins with 'all.' can not exist at the same time.400The error message returned because wildcard domain names and domain names that start with all. exist at the same time.
CdnTypeNotSupportExtensiveDomainExtensive domain not supported for this cdn type.400The error message returned because wildcard domain names are not supported for the specified business type.
ExtensiveAndSpecificDomainConflictExtensive domain and corresponding specific domain are mutually exclusive.400The error message returned because the wildcard domain name matches an exact domain name. Wildcard domain names are mutually exclusive with the matching exact domain names.
InvalidParameterAdd live region parameters have error.400The error message returned because the system failed to specify the region parameter for the ApsaraVideo Live service.
InvalidRegion.MalformedSpecified Region is malformed.400The error message returned because the value of the region parameter is invalid.
InvalidResourceGroupId.MalformedSpecified ResourceGroupId is malformed.400The error message returned because the value of the ResourceGroupId parameter is invalid.
EntityNotExists.ResourceGroupThe resource group does not exist.400The error message returned because the resource group does not exist.
InvalidStatus.ResourceGroupIt’s now allowed to do this operation because of the current status of resource-group.400The error message returned because the resource group is in an invalid state.
InvalidPriorities.MalformedThe length of priorities is not the same with source.400The error message returned because the number of priorities does not match the number of origin servers.
NotInternationRealIdentityYou need to do real name authentication when you use Chinese mainland resources.400The error message returned because you have not completed the real-name verification that is required to use resources in mainland China.