Associates an SSL certificate with the forwarding rule of a 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:
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
yundun-ddoscoo:AssociateWebCert | update |
|
| none |
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----- 62EcYPWd2Oy1vs6MTXcJSfN9Z7rZ9fmxWr2BFN2XbahgnsSXM48ixZJ4krc+1M+j2kcubVpsE2cgHdj4v8H6jUz9Ji4mr7vMNS6dXv8PUkl/qoDeNGCNdyTS5NIL5ir+g92cL8IGOkjgvhlqt9vc65Cgb4mL+n5+DV9uOyTZTW/MojmlgfUekC2xiXa54nxJf17Y1TADGSbyJbsC0Q9nIrHsPl8YKkvRWvIAqYxXZ7wRwWWmv4TMxFhWRiNY7yZIo2ZUhl02SIDNggIEeg== -----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----- DADTPZoOHd9WtZ3UKHJTRgNQmioPQn2bqdKHop+B/dn/4VZL7Jt8zSDGM9sTMThLyvsmLQKBgQCr+ujntC1kN6pGBj2Fw2l/EA/W3rYEce2tyhjgmG7rZ+A/jVE9fld5sQra6ZdwBcQJaiygoIYoaMF2EjRwc0qwHaluq0C15f6ujSoHh2e+D5zdmkTg/3NKNjqNv6xA2gYpinVDzFdZ9Zujxvuh9o4Vqf0YF8bv5UK5G04RtKadOw== -----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 parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "40F11005-A75C-4644-95F2-52A4E7D43E91"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-08-30 | The request parameters of the API has changed | View Change Details |
2024-05-29 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-05-14 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-07-18 | The request parameters of the API has changed | View Change Details |