All Products
Search
Document Center

Edge Security Acceleration:CreateSite

Last Updated:Mar 20, 2025

Adds a website.

Operation description

  • Make sure that you have an available plan before you add a website.
  • Make sure that your website domain name has an ICP filing if the location you want to specify covers the Chinese mainland.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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.
OperationAccess levelResource typeCondition keyAssociated operation
esa:CreateSitecreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SiteNamestringYes

The website name.

CreateSite
CoveragestringYes

The service location. Valid values:

  • domestic: the Chinese mainland
  • global: global
  • overseas: outside the Chinese mainland
domestic
AccessTypestringYes

The DNS setup. Valid values:

  • NS
  • CNAME
NS
InstanceIdstringYes

The instance ID, which can be obtained by calling the ListUserRatePlanInstances operation. Specify at least one of the instance ID and website ID. If you specify both of them, the instance ID is used.

dbaudit-cn-nwy349jdb03
ResourceGroupIdstringNo

The ID of the resource group. If you leave this parameter empty, the system uses the default resource group ID.

rg-acfmw4znnok****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

CB1A380B-09F0-41BB-3C82-72F8FD6DA2FE
SiteIdlong

The website ID.

1234567890123
NameServerListstring

The nameservers assigned by ESA. The values are separated by commas (,). This parameter is returned if you set AccessType to NS. In this case, you must change the nameservers of your domain to the assigned ones. Then, you can verify the domain ownership and activate your website.

ns1.example.com,ns2.example.com
VerifyCodestring

The verification code for the website. If you set AccessType to CNAME, you need to add a TXT record whose hostname is _esaauth.[websiteDomainName] and record value is the value of VerifyCode to the DNS records of your domain. ****Then, you can verify the domain ownership and activate your website.

verify_aah9dioasmov****

Examples

Sample success responses

JSONformat

{
  "RequestId": "CB1A380B-09F0-41BB-3C82-72F8FD6DA2FE",
  "SiteId": 1234567890123,
  "NameServerList": "ns1.example.com,ns2.example.com",
  "VerifyCode": "verify_aah9dioasmov****"
}

Error codes

HTTP status codeError codeError messageDescription
400ServiceInvokeFailedThe call to the internal service failed. The engineer is resolving the problem. Please wait a moment before trying, or contact customer service for details.Failed to call the service. Please try again later or contact customer service for details.
400InternalExceptionFailed to call the service. Try again later or contact technical support.Failed to call the service. Try again later or contact technical support.
400InvalidParameterThe specified parameter is invalid.The specified parameter is invalid.
400Instance.NotOnlineYour plan is unavailable due to an overdue payment. Complete the payment first.Your plan is unavailable due to an overdue payment. Complete the payment first.
400InvalidParameter.SiteNameInvalid website name. Specify a valid name that contains letters and digits and does not contain special characters.Invalid website name. Specify a valid name that contains letters and digits and does not contain special characters.
400QuotaExceed.SiteCountThe maximum number of websites associated with your plan has been reached.The maximum number of websites associated with your plan has been reached.
400Site.ConflictDuplicate website names exist across multiple accounts. Rename or delete one and try again.Duplicate website names exist across multiple accounts. Rename or delete one and try again.
400Site.AlreadyExistThe website name you specified already exists. Try with another name.The website name you specified already exists. Try with another name.
400SubSiteUnavailableSubdomains are allowed only in Enterprise plans. Upgrade your plan to add a subdomain to ESA.Subdomains are allowed only in Enterprise plans. Upgrade your plan to add a subdomain to ESA.
400Site.InvalidCoverageThe selected location is unavailable in your plan. Change the location to one that is covered by the plan and try again.The selected location is unavailable in your plan. Change the location to one that is covered by the plan and try again.
400InvalidSiteICPThe specified website does not have an ICP filing or the filing information is invalid. Make sure your website is filed and try again.The specified website does not have an ICP filing or the filing information is invalid. Make sure your website is filed and try again.
400InvalidSiteNameInvalid website name. Check and try again.Invalid website name. Check and try again.
400Site.InBlacklistThe site name is in the blacklist.The site name is in the blacklist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-10-10The Error code has changedView Change Details
2024-10-08The Error code has changedView Change Details