You can call this operation to create a certificate for a specified domain name based on the certificate ID.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description 
Action Boolean No CreateCertificateByCertificateId

The operation that you want to perform. Valid values: CreateCertificateByCertificateId.

Domain String No www.example.com

The domain name that has been added to WAF.

InstanceId String No waf_elasticity-cn-0xldbqtm005

The ID of the WAF instance.

Note You can call the DescribeInstanceInfo operation to query the ID of the WAF instance.
CertificateId Long No 3384669

The ID of the certificate.

Response parameters

Parameter Type Example Description
CertificateId Long 3384669

The ID of the certificate.

RequestId String D7861F61-5B61-46CE-A47C-6B19160D5EB0

The ID of the request.

Samples

Sample request

http(s)://[Endpoint]/? Action=CreateCertificateByCertificateId
&Domain=www.example.com
&InstanceId=waf_elasticity-cn-0xldbqtm005
&CertificatedId=3384669
&<Common request parameters>

Sample success responses

XML format

<CertificateId>3384669</CertificateId>
<RequestId>D7861F61-5B61-46CE-A47C-6B19160D5EB0</RequestId>

JSON format

{
    "CertificateId":"3384669",
    "RequestId":"D7861F61-5B61-46CE-A47C-6B19160D5EB0"
}

Error codes.

For a list of error codes, visit the API Error Center.