Issues a single client certificate based on a custom certificate signing request (CSR).
Operation description
Before you call this operation, you must have called CreateRootCACertificate to create a root CA certificate and called CreateSubCACertificate to create a sub-CA certificate. Only sub-CA certificates can issue client certificates.
QPS limit
The single-user QPS limit for this operation is 10 calls per second. If the number of calls per second exceeds the limit, throttling is triggered. This may affect your business. Call this operation as appropriate.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-cert:CreateClientCertificateWithCsr |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Csr |
string |
No |
The CSR content. You can use OpenSSL or Keytool to generate a CSR. For more information, see How do I create a CSR file. |
-----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST----- |
| SanType |
integer |
No |
The type of the Subject Alternative Name (SAN) extension of the client certificate. Valid values:
|
2 |
| SanValue |
string |
No |
The specific SAN extension information of the client certificate. You can enter multiple values separated by commas (,).
|
somebody@example.com |
| Organization |
string |
No |
The organization name. Default value: Alibaba Inc. |
Alibaba Inc |
| OrganizationUnit |
string |
No |
The organizational unit name. Default value: Aliyun CDN. |
Security |
| Country |
string |
No |
The country code. Example: CN or US. |
CN |
| CommonName |
string |
No |
The common name of the certificate. Chinese characters, English characters, and other characters are supported. Note
If you set the CsrPemString parameter, the value of the CommonName parameter is determined by the corresponding information in the CsrPemString parameter. |
aliyundoc.com |
| State |
string |
No |
The name of the province or state where the certificate organization is located. Chinese characters, English characters, and other characters are supported. The default value is the name of the province or state where the sub-CA certificate organization that issues this certificate is located. |
Zhejiang |
| Locality |
string |
No |
The name of the city where the certificate organization is located. Chinese characters, English characters, and other characters are supported. The default value is the name of the city where the sub-CA certificate organization that issues this certificate is located. |
Hangzhou |
| Algorithm |
string |
No |
The key algorithm of the client certificate. The key algorithm is in the
The encryption algorithm of the client certificate must be the same as that of the sub-CA certificate, but the key length can be different. For example, if the key algorithm of the sub-CA certificate is RSA_2048, the key algorithm of the client certificate must be one of RSA_1024, RSA_2048, or RSA_4096. Note
You can call DescribeCACertificate to query the key algorithm of the sub-CA certificate. |
RSA_2048 |
| ParentIdentifier |
string |
No |
The unique identifier of the sub-CA certificate that issues this certificate. Note
You can call DescribeCACertificateList to query the unique identifier of the sub-CA certificate. |
270ae6bb538d538c70c01f81fg3**** |
| Years |
integer |
No |
The certificate validity period. Unit: years. |
1 |
| Months |
integer |
No |
The certificate validity period. Unit: months. |
12 |
| Days |
integer |
No |
The validity period of the client certificate. Unit: days. The Days, BeforeTime, and AfterTime parameters cannot all be empty. The BeforeTime and AfterTime parameters must both be empty or both be specified. The following rules apply:
Note
|
365 |
| BeforeTime |
integer |
No |
The issuance time of the client certificate in UNIX timestamp format. The default value is the time when you call this operation. Unit: seconds. Note
The BeforeTime and AfterTime parameters must both be empty or both be specified. |
1634283958 |
| AfterTime |
integer |
No |
The expiration time of the client certificate in UNIX timestamp format. Unit: seconds. Note
The BeforeTime and AfterTime parameters must both be empty or both be specified. |
1665819958 |
| Immediately |
integer |
No |
Specifies whether to immediately return the digital certificate. Valid values:
|
1 |
| EnableCrl |
integer |
No |
Specifies whether to include the Certificate Revocation List (CRL) address. Valid values:
|
1 |
| Tags |
array<object> |
No |
The tag list. |
|
|
object |
No |
The tag list. |
||
| Key |
string |
No |
The tag key. |
database |
| Value |
string |
No |
The tag value. |
1 |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the certificate belongs. |
rg-ae******4wia |
| CustomIdentifier |
string |
No |
The custom identifier, which serves as a unique key. |
***e6bb538d538c70c01f81fg3**** |
| AsynchronousFlag |
boolean |
No |
The asynchronous processing flag. If the value is "true", the backend service issues the certificate asynchronously. After the request is submitted, you can call the ListClientCertificate operation to obtain the latest certificate. |
false |
When you call this operation, you must include common request parameters of Alibaba Cloud APIs in addition to the request parameters described in this topic.
For the request format, see the request examples in the Examples section of this topic.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
CreateCertificateResponse |
||
| X509Certificate |
string |
The content of the client certificate. |
-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE----- |
| CertificateChain |
string |
The CA certificate chain. |
-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----\n |
| Identifier |
string |
The unique identifier of the client certificate. |
200ae6bb538d538c70c01f81dcf2**** |
| SerialNumber |
string |
The certificate serial number. |
084bde9cd233f0ddae33adc438cfbbbd**** |
| RequestId |
string |
The request ID. Alibaba Cloud generates a unique identifier for each API request. You can use this ID to troubleshoot issues. |
31C66C7B-671A-4297-9187-2C4477247A74 |
| CertSignBufKmc |
string |
The encrypted certificate content. |
MIIDYDCCAwWgAwIBAgIU *** TmTk0CS3WNweqsjMEETyxd2pzU6DA |
| CertKmcRep1 |
string |
The encrypted certificate ciphertext. |
userSeal=MHkCIEu94PQAahFWuFk% *** EtFw%2FkMMBjw8i5bFfSkV%2FIUrcOJD |
Examples
Success response
JSON format
{
"X509Certificate": "-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----",
"CertificateChain": "-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----\\n-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----\\n",
"Identifier": "200ae6bb538d538c70c01f81dcf2****",
"SerialNumber": "084bde9cd233f0ddae33adc438cfbbbd****",
"RequestId": "31C66C7B-671A-4297-9187-2C4477247A74",
"CertSignBufKmc": "MIIDYDCCAwWgAwIBAgIU\n***\nTmTk0CS3WNweqsjMEETyxd2pzU6DA",
"CertKmcRep1": "userSeal=MHkCIEu94PQAahFWuFk%\n***\nEtFw%2FkMMBjw8i5bFfSkV%2FIUrcOJD"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.