You can call this operation to upload CreateCertAndKey and private key information for a specified domain configuration record.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | Boolean | No | CreateCertAndKey |
The operation that you want to perform. Valid values: CreateCertAndKey. |
Cert | String | No | ----- BEGIN CERTIFICATE----------END CERTIFICATE ----- |
The content of the certificate. |
Domain | String | No | rstest.cdn.com |
The domain that you want to add to WAF. |
HttpsCertName | String | No | www.aliyun.com |
The name of the certificate. |
InstanceId | String | No | waf_elasticity-cn-0xldbqtm005 |
The ID of the WAF instance. Note You can callDescribePayInfo to view your WAF instance ID.
|
Key | String | No | ----- BEGIN RSA PRIVATE KEY----------END RSA PRIVATE KEY ----- |
Private key |
Region | String | Yes | cn |
The ID of the region to which the WAF instance belongs. Set the value to:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | D7861F61-5B61-46CE-A47C-6B19160D5EB0 |
The ID of the request. |
Result |
The returned result. |
||
Status | Integer | env |
Request execution status:
|
WafTaskId | String | aliyun.waf.20180712214032277.qmxI9a |
The ID of the WAF request. |
Samples
Sample request
https://wafopenapi.cn-hangzhou.aliyuncs.com/? Action=DeleteDomainConfig
&Domain=www.aliyun.com
&Cert="-----BEGIN CERTIFICATE----------END CERTIFICATE-----"
&Key="-----BEGIN RSA PRIVATE KEY----------END RSA PRIVATE KEY-----"
&HttpsCertName=www.aliyun.com
&Common request parameters
Sample success responses
XML
format
<CreateCertAndKeyResponse>
<RequestId>D7861F61-5B61-46CE-A47C-6B19160D5EB0</RequestId>
<Result>
<Status>2</Status>
<WafTaskId>aliyun.waf.20180712214032277.qmxI9a</WafTaskId>
</Result>
</CreateCertAndKeyResponse>
JSON
format
{
"Result":{
"Status":2,
"WafTaskId":"aliyun.waf.20180712214032277.qmxI9a"
},
"RequestId":"D7861F61-5B61-46CE-A47C-6B19160D5EB0"
}
Errors
For a list of error codes, visit the API Error Center.