All Products
Search
Document Center

Edge Security Acceleration:CreateSite

Última atualização: Jun 25, 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 completed 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.

Coverage

string

Yes

The acceleration region. Valid values:

  • domestic: the Chinese mainland only.

  • global: global.

  • overseas: global (excluding the Chinese mainland).

Valid values:

  • domestic :

    Apenas a China continental.

  • global :

    Global.

  • overseas :

    Global (exceto a China continental).

AccessType

string

Yes

The access type of the site. Valid values:

  • NS: access by using managed NS.

  • CNAME: access by configuring a CNAME record.

Valid values:

  • NS :

    NS gerenciado.

  • CNAME :

    Configuração de CNAME.

InstanceId

string

Yes

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

ResourceGroupId

string

No

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

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

SiteId

integer

The site ID.

NameServerList

string

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

VerifyCode

string

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

Examples

Success response

JSON format

{
  "RequestId": "",
  "SiteId": 0,
  "NameServerList": "",
  "VerifyCode": ""
}

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. Subdomains are allowed only in Enterprise plans. Upgrade your plan to add a subdomain to ESA.
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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.