All Products
Search
Document Center

Edge Security Acceleration:CreateSite

Last Updated:Sep 18, 2026

Creates a site.

Operation description

  • Before creating a site, you must have an active plan instance.

  • If the acceleration area is set to the Chinese mainland only or global, the site domain name must have a valid Chinese Internet Content Provider (ICP) filing.

  • Each user can invoke this operation up to 100 times per hour.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

esa:CreateSite

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

SiteName

string

Yes

The site name.

example.com

Coverage

string

Yes

The acceleration region. Valid values:

  • domestic: Chinese mainland only.

  • global: global.

  • overseas: global (excluding the Chinese mainland).

domestic

AccessType

string

Yes

The access type of the site. Valid values:

  • NS: access by using managed NS records.

  • CNAME: access by configuring a CNAME record.

NS

InstanceId

string

Yes

The instance ID. You can obtain the instance ID by calling the ListUserRatePlanInstances operation. You must specify at least one of InstanceId and SiteId. If both are specified, InstanceId takes precedence.

dbaudit-cn-nwy349jdb03

ResourceGroupId

string

No

The resource group ID. If you do not specify this parameter, the system automatically uses the default resource group ID.

rg-acfmw4znnok****

ResourceOwner

integer

No

Response elements

Element

Type

Description

Example

object

NameServerList

string

The list of NS records assigned to the site, separated by commas (,). This field has a value when the access type of the site is NS. You must change the DNS servers of the site to these NS records. Then you can verify the site ownership and activate the site.

ns1.example.com,ns2.example.com

RequestId

string

The request ID.

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

SiteId

integer

The site ID.

1234567890123

VerifyCode

string

The verification code of the site. When the access type of the site is CNAME, you must add a TXT record to the DNS server of the site with the record name _esaauth.[site name] and the record value set to the verification code. Then you can verify the site ownership and activate the site.

verify_aah9dioasmov****

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 ServiceInvokeFailed The 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.
400 InternalException Failed to call the service. Try again later or contact technical support. Failed to call the service. Try again later or contact technical support.
400 InvalidParameter The specified parameter is invalid. The specified parameter is invalid.
400 Instance.NotOnline Your 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.
400 InvalidParameter.SiteName Invalid 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.
400 QuotaExceed.SiteCount The maximum number of websites associated with your plan has been reached. The maximum number of websites associated with your plan has been reached.
400 Site.Conflict Duplicate 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.
400 Site.AlreadyExist The website name you specified already exists. Try with another name. The website name you specified already exists. Try with another name.
400 SubSiteUnavailable Subdomains are allowed only in Enterprise plans. Upgrade your plan to add a subdomain to ESA. Your plan does not support creating sites with subdomains, please upgrade your plan.
400 Site.InvalidCoverage The 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.
400 InvalidSiteICP The 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.
400 InvalidSiteName Invalid website name. Check and try again. Invalid website name. Check and try again.
400 Site.InBlacklist The site name is in the blacklist. The site name is in the blacklist.
400 NoPermission You do not have permissions to access or operate on the resource.Contact your account administrator to attach the AliyunESAFullAccess policy to the current user. You do not have permissions to access or operate on the resource.Contact your account administrator to attach the AliyunESAFullAccess policy to the current user.
400 NotInternationalRealIdentity Real-name registration is required for services offered in Mainland China. You have not passed real-name verification. According to the regulations issued by MIIT, you must pass real-name verification if you want to purchase information services in the Chinese mainland.
400 ICPCheckFailed The ICP filing verification service is temporarily unavailable. Please try again later. The filing query service is abnormal. Please try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.