Updates the custom nameserver names for a single website.
Debugging
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 Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| esa:UpdateSiteVanityNS | none | *Site acs:esa:{#regionId}:{#accountId}:site/{#SiteId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| SiteId | long | Yes | The website ID. You can call the ListSites operation to obtain the ID. | 1234567890123 |
| VanityNSList | string | No | The custom nameserver names. You can specify two to five custom nameserver names. Separate multiple names with commas (,). | ns1.example.com,ns2.example.com |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | ApplyVanityNSError | Failed to apply for vanity NS resources. Please contact customer service. | Failed to apply for vanity NS resources. Please contact customer service. |
| 400 | OperationDenied.VanityNSUnavailable | Only sites in NS access type can use vanity nameservers. Convert your site to NS access type and try again. | Sites that are accessed only by NS mode can use custom NS. Please adjust your site access mode and try again. |
| 400 | InvalidParameter.InvalidVanityNSNum | Enter 2 to 5 vanity nameservers. Correct them and try again. | Custom NS requires 2~5 names, please adjust and resubmit. |
| 400 | InvalidParameter.InvalidVanityNSName | A vanity nameserver must be an absolute domain name. Correct it and try again. | You need to enter the full domain name to customize the NS name. Please adjust and submit it again. |
| 400 | InvalidParameter.VanityNSNameDuplicate | The vanity nameservers are duplicated. Please delete it and try again. | Duplicate custom NS name exists, please delete and resubmit. |
| 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 | 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 | QuotaCheckFailed.CustomNS | Custom nameservers are not allowed in your plan. Check the plan description and upgrade the plan. | Custom nameservers are not allowed in your plan. Check the plan description and upgrade the plan. |
| 400 | Site.ServiceBusy | This website is being configured. Try again later. | This website is being configured. Try again later. |
| 400 | Record.Conflict | The specified record content conflicts with existing records. Adjust your configurations based on the related product documentation. | The specified record content conflicts with existing records. Adjust your configurations based on the related product documentation. |
| 400 | InvalidParameter.RecordsExceedLimit | The number of incoming records exceeds the maximum limit. | The number of incoming records exceeds the maximum limit. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-12-01 | The Error code has changed | View Change Details |
| 2024-11-05 | The Error code has changed | View Change Details |
| 2024-09-18 | The Error code has changed | View Change Details |
