All Products
Search
Document Center

Edge Security Acceleration:UpdateCustomHostname

Last Updated:Jun 25, 2026

Updates a SaaS domain name. You can modify the bound record ID, certificate type, and other settings.

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:UpdateCustomHostname

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

HostnameId

integer

Yes

The ID of the SaaS domain name. You can obtain the ID by calling the ListCustomHostnames operation.

1234567890123

RecordId

integer

No

The ID of the record to bind. You can obtain the ID by calling the ListRecords operation.

1234567890123

SslFlag

string

No

The SSL switch. Valid values:

  • on: Enables SSL.

  • off: Disables SSL.

Valid values:

  • off :

    Disables SSL.

  • on :

    Enables SSL.

on

CertType

string

No

The certificate type. This parameter is required when SslFlag is set to on. Valid values:

  • free: free certificate.

  • upload: uploaded certificate.

  • cas: SSL Certificates Service certificate.

Valid values:

  • cas :

    SSL Certificates Service certificate.

  • upload :

    Uploaded certificate.

  • free :

    Free certificate.

cas

Certificate

string

No

The certificate content. This parameter is required when CertType is set to upload.

-----BEGIN CERTIFICATE-----

PrivateKey

string

No

The certificate private key. This parameter is required when CertType is set to upload.

-----BEGIN PRIVATE KEY-----

CasId

integer

No

The ID of the SSL Certificates Service certificate. This parameter is required when CertType is set to cas.

30000478

CasRegion

string

No

The region of the SSL Certificates Service certificate. This parameter is required when CertType is set to cas. Valid values:

  • Chinese mainland accounts: cn-hangzhou.

  • International accounts: ap-southeast-1.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

0AEDAF20-4DDF-4165-8750-47FF9C1929C9

Examples

Success response

JSON format

{
  "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 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 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 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 Record.ServiceBusy The record is being configured. Try again later. The record is being configured. Try again later.
400 CustomHostname.QueryCasCertFailed Fail to query CAS certificate details. Please try again later.
400 CustomHostname.CheckQuotaFailed Fail to check quota for custom hostname. Please try again later.
400 QuotaExceed.CustomHostname The number of custom hostnames exceeds the plan quota. Contact the sales team to increase your quota. The number of custom hostnames exceeds the plan quota. Contact the sales team to increase your quota.
400 CustomHostname.OfflineForMultiReason Unable to activate the custom hostname because it is offline due to multiple reasons.
404 CustomHostname.NotFound The custom hostname does not exist. Modify it and try again. The custom hostname does not exist. Modify it and try again.
404 CustomHostname.ApplyCertFailed Fail to apply a free cert for custom hostname. Please try again later.
404 CustomHostname.SetCertFailed Fail to deploy a cert for custom hostname. Please try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.