All Products
Search
Document Center

Edge Security Acceleration:UpdateCustomHostname

Last Updated:Jan 30, 2026

Updates the parameters of a Software as a Service (SaaS) domain name, such as the attached record ID and the certificate type.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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 attach. You can obtain the ID by calling the ListRecords operation.

1234567890123

SslFlag

string

No

The SSL switch.

  • on: Enables SSL.

  • off: Disables SSL.

on

CertType

string

No

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

  • free: Free certificate.

  • upload: Uploaded certificate.

  • cas: Alibaba Cloud Security certificate.

cas

Certificate

string

No

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

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

PrivateKey

string

No

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

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

CasId

integer

No

The ID of the Alibaba Cloud Security certificate. This parameter is required when CertType is set to cas.

30000478

CasRegion

string

No

The region of the Alibaba Cloud Security certificate. This parameter is required when CertType is set to cas.

  • cn-hangzhou: The value for accounts on the Alibaba Cloud China Website (www.aliyun.com).

  • ap-southeast-1: The value for accounts on the Alibaba Cloud International Website (www.alibabacloud.com).

cn-hangzhou

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

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.
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.