Uploads a certificate for a specific 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

ParameterTypeRequiredExampleDescription
ActionStringYesCreateCertificateByCertificateId

The operation that you want to perform. Set the value to CreateCertificateByCertificateId.

DomainStringYeswww.example.com
The domain name that is added to WAF.
Note You can call the DescribeDomainList operation to query the domain that have been connected to WAF.
InstanceIdStringYeswaf_elasticity-cn-0xldbqt****

The ID of the WAF instance.

Note You can call the DescribeInstanceInfo operation to query the ID of the WAF instance.
CertificateIdLongYes3384669
The ID of the certificate.
Note You can call the DescribeCertificates operation to query the ID of all SSL certificates associated with the domain.

Response parameters

ParameterTypeExampleDescription
CertificateIdLong3384669

The ID of the certificate.

RequestIdStringD7861F61-5B61-46CE-A47C-6B19160D5EB0

The ID of the request.

Examples

Sample requests

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

Sample success responses

XML format

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

JSON format

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

Error codes

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