All Products
Search
Document Center

Anti-DDoS:AssociateWebCert

Last Updated:Feb 25, 2026

Associates an SSL certificate with the forwarding rule of a website.

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

Domain

string

Yes

The domain name of the website.

Note

A forwarding rule must be configured for the domain name. You can call the DescribeDomains operation to query all domain names.

www.aliyun.com

CertId

integer

No

The ID of the certificate.

Note

If you specify a certificate ID, you do not need to specify a value for the CertName, Cert, and Key parameters. You can specify only one of this parameter and the CertIdentifier parameter.

2404693

CertName

string

No

The name of the certificate.

Note

You can specify the name of the certificate that you want to associate. This parameter must be used together with the Cert and Key parameters.

example-cert

Cert

string

No

The public key of the certificate that you want to associate. This parameter must be used together with the CertName and Key parameters.

Note

If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

-----BEGIN CERTIFICATE----- 62EcYPWd2Oy1vs6MTXcJSf*************************************************************************************************************************************************************************ZIo2ZUhl02SIDNggIEeg== -----END CERTIFICATE-----

Key

string

No

The private key of the certificate that you want to associate. This parameter must be used together with the CertName and Cert parameters.

Note

If you specify a value for the CertName, Cert, and Key parameters, you do not need to specify a value for the CertId parameter.

-----BEGIN RSA PRIVATE KEY----- DADTPZoOHd9WtZ3UKHJT**************************************************************************************************************************************************************************qf0YF8bv5UK5G04RtKadOw== -----END RSA PRIVATE KEY-----

CertIdentifier

string

No

The globally unique ID of the certificate. The value is in the "Certificate ID-cn-hangzhou" format. For example, if the ID of the certificate is 123, the value of the CertIdentifier parameter is 123-cn-hangzhou.

Note

You can specify only one of this parameter and the CertId parameter.

9430680-cn-hangzhou

CertRegion

string

No

The region of the certificate. Valid values: cn-hangzhou and ap-southeast-1. Default value: cn-hangzhou.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

40F11005-A75C-4644-95F2-52A4E7D43E91

Examples

Success response

JSON format

{
  "RequestId": "40F11005-A75C-4644-95F2-52A4E7D43E91"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.