CreateDomain
1. API Description
This API (CreateDomain) is used to create an accelerated domain.
Preparation
Query the business types for accelerated domains: Call
DescribeBusinessTypes
.Query the acceleration regions for accelerated domains: Call
DescribeAccelerationRegions
.
Notes
The
domain
must be globally unique and cannot be duplicated.The
domainName
must not be the same as the origin, as this will create a loop and prevent acceleration from working.This is an asynchronous API. After a successful request, the creation of the accelerated domain is not immediately complete. During this period, the status of the accelerated domain will be
Deploying
. You can check the status of the accelerated domain by calling theDescribeCdnDomains
API. If the domain status changes fromDeploying
toDeployed
, the deployment is successful; if it changes toFailed
, the configuration failed.
2. Request Parameters
The following table lists the required request parameters for this API.
Parameter Name | Required | Type | Description |
---|---|---|---|
domainName | Yes | String | The accelerated domain The domain must be globally unique and cannot be duplicated. The domain must not be the same as the origin to avoid looping |
businessTypeId | Yes | String | The business type ID |
resourceGroupId | No | String | The resource group ID. If not provided, the default resource group will be used. |
accelerationRegionId | Yes | String | The acceleration region ID |
origin | Yes | Source information |
3. Output Parameters
Parameter Name | Type | Description |
---|---|---|
requestId | String | Unique request ID returned for each request. Provide this when locating issues. |
domainId | String | The ID of the accelerated domain. |
4. Code Example
Create an Accelerated Domain
5. Error Codes
The following includes error codes encountered in business logic. For other error codes, see Common Error Codes.
HTTP Status Code | Error Code | Description |
---|---|---|
404 | INVALID_ACCELERATION_REGION_NOT_FOUND | The specified acceleration region was not found |
404 | INVALID_BUSINESS_TYPE_NOT_FOUND | The specified business type was not found |
404 | INVALID_RESOURCE_GROUP_NOT_FOUND | The specified resource group was not found |
400 | INVALID_ORIGIN_MASTER_SOURCE | The master source format is incorrect |
400 | INVALID_ORIGIN_SLAVER_SOURCE | The backup source format is incorrect |
400 | INVALID_ORIGIN_SOURCE_SAME_AS_DOMAIN | The origin cannot be the same as the accelerated domain |
Last updated