All Products
Search
Document Center

Web Application Firewall:CreateSM2Cert

Last Updated:Oct 14, 2025

Uploads an SM certificate for CNAME record access to Web Application Firewall (WAF).

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

CertName

string

No

The certificate name.

test-sm2

EncryptCertificate

string

No

The content of the SM certificate.

-----BEGIN CERTIFICATE----- *** -----END CERTIFICATE-----

EncryptPrivateKey

string

No

The private key of the SM certificate.

-----BEGIN PRIVATE KEY----- *** -----END PRIVATE KEY-----

SignCertificate

string

No

The content of the signing certificate for the SM certificate.

-----BEGIN CERTIFICATE----- *** -----END CERTIFICATE-----

SignPrivateKey

string

No

The private key of the signing certificate for the SM certificate.

-----BEGIN PRIVATE KEY----- *** -----END PRIVATE KEY-----

InstanceId

string

Yes

The ID of the WAF instance.

Note

Call the DescribeInstance operation to view the ID of the current WAF instance.

waf_v2_public_cn-***

RegionId

string

No

The region of the WAF instance. Valid values:

  • cn-hangzhou: The Chinese mainland.

  • ap-southeast-1: Outside the Chinese mainland.

cn-hangzhou

ResourceManagerResourceGroupId

string

No

The ID of the Alibaba Cloud resource group.

rg-acfm***q

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

D7861F61-5B61-46CE-A47C-***

CertIdentifier

string

The certificate ID.

***-cn-hangzhou

Examples

Success response

JSON format

{
  "RequestId": "D7861F61-5B61-46CE-A47C-***",
  "CertIdentifier": "***-cn-hangzhou"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.