All Products
Search
Document Center

Anti-DDoS:AssociateWebCert

Last Updated:Oct 23, 2024

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

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-ddoscoo:AssociateWebCertupdate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainstringYes

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
CertIdintegerNo

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
CertNamestringNo

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
CertstringNo

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----- 62EcYPWd2Oy1vs6MTXcJSfN9Z7rZ9fmxWr2BFN2XbahgnsSXM48ixZJ4krc+1M+j2kcubVpsE2cgHdj4v8H6jUz9Ji4mr7vMNS6dXv8PUkl/qoDeNGCNdyTS5NIL5ir+g92cL8IGOkjgvhlqt9vc65Cgb4mL+n5+DV9uOyTZTW/MojmlgfUekC2xiXa54nxJf17Y1TADGSbyJbsC0Q9nIrHsPl8YKkvRWvIAqYxXZ7wRwWWmv4TMxFhWRiNY7yZIo2ZUhl02SIDNggIEeg== -----END CERTIFICATE-----
KeystringNo

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----- DADTPZoOHd9WtZ3UKHJTRgNQmioPQn2bqdKHop+B/dn/4VZL7Jt8zSDGM9sTMThLyvsmLQKBgQCr+ujntC1kN6pGBj2Fw2l/EA/W3rYEce2tyhjgmG7rZ+A/jVE9fld5sQra6ZdwBcQJaiygoIYoaMF2EjRwc0qwHaluq0C15f6ujSoHh2e+D5zdmkTg/3NKNjqNv6xA2gYpinVDzFdZ9Zujxvuh9o4Vqf0YF8bv5UK5G04RtKadOw== -----END RSA PRIVATE KEY-----
CertIdentifierstringNo

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
CertRegionstringNo

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

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-30The request parameters of the API has changedView Change Details
2024-05-29The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-05-14The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-07-18The request parameters of the API has changedView Change Details