Issues a server-side certificate based on a custom Certificate Signing Request (CSR).
Operation description
Before you call this operation, you must call CreateRootCACertificate to create a root CA certificate and CreateSubCACertificate to create a subordinate CA certificate. Server-side certificates can be issued only by subordinate CA certificates.
Limits
This operation has a queries per second (QPS) limit of 10 requests per user. If you exceed this limit, rate limiting is triggered, which may affect your business. Call this operation only as needed.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-cert:CreateServerCertificateWithCsr |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Csr |
string |
Yes |
You can generate a CSR using OpenSSL or Keytool. For more information, see How to create a CSR file. |
-----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST----- |
| Domain |
string |
No |
Additional domain names or IP addresses for the server-side certificate. Adding this information lets you apply the certificate to multiple domains or IP addresses. You can enter multiple domain names and IP addresses. Separate them with commas (,). |
example.com |
| Organization |
string |
No |
Organization name. Default: Alibaba Inc. |
阿里云 |
| OrganizationUnit |
string |
No |
Department name. Default: Aliyun CDN. |
IT |
| Country |
string |
No |
Country code, such as CN. |
CN |
| CommonName |
string |
No |
Set the common name for the certificate. Supports Chinese, English, and other characters. Note
If you set the Csr parameter, the value of CommonName comes from the corresponding field in the Csr parameter. |
mtcsq.com |
| State |
string |
No |
Set the name of the state or province where the organization is located. Supports Chinese, English, and other characters. Defaults to the state or province of the issuing sub-CA certificate's organization. |
Zhejiang |
| Locality |
string |
No |
The city where the organization for the certificate is located. The name can contain both Chinese and English characters. By default, this parameter is set to the city of the organization for the issuing subordinate Certificate Authority (CA). |
Hangzhou |
| Algorithm |
string |
No |
Key algorithm for the server-side certificate. Use the format
The encryption algorithm of the server-side certificate must match that of the sub-CA certificate. The key length can differ. For example, if the sub-CA certificate uses RSA_2048, the server-side certificate must use RSA_1024, RSA_2048, or RSA_4096. Note
Call DescribeCACertificate to check the key algorithm of the sub-CA certificate. |
RSA_2048 |
| ParentIdentifier |
string |
Yes |
Unique identifier of the sub-CA certificate that issues this certificate. Note
Call DescribeCACertificateList to query the unique identifier of the sub-CA certificate. |
270oe6bb538d538c70c01f81hfd3**** |
| Years |
integer |
No |
Certificate validity period. Unit: years. |
1 |
| Months |
integer |
No |
Certificate validity period. Unit: months. |
12 |
| Days |
integer |
No |
The Days, BeforeTime, and AfterTime parameters cannot all be empty. The BeforeTime and AfterTime parameters must both be empty or both set. Follow these rules:
Note
|
365 |
| BeforeTime |
integer |
No |
Issue time of the server-side certificate, in UNIX timestamp format. Default: current time when you call this API. Unit: seconds. Note
The BeforeTime and AfterTime parameters must both be empty or both configured. |
1634283958 |
| AfterTime |
integer |
No |
Expiration time of the server-side certificate, in UNIX timestamp format. Unit: seconds. Note
The BeforeTime and AfterTime parameters must both be empty or both configured. |
1665819958 |
| Immediately |
integer |
No |
Return the digital certificate immediately.
|
1 |
| EnableCrl |
integer |
No |
Include CRL address. 0 - No 1 - Yes |
1 |
| Tags |
array<object> |
No |
List of tags. |
|
|
object |
No |
List of tags. |
||
| Key |
string |
No |
Tag key. |
account |
| Value |
string |
No |
Tag value. |
test |
| ResourceGroupId |
string |
No |
Resource group ID. |
rg-aek****wia |
| CustomIdentifier |
string |
No |
Custom identifier. Unique key. |
***e6bb538d538c70c01f81hfd3**** |
When you call this operation, you must include the common request parameters for Alibaba Cloud APIs in addition to the parameters that are described in this topic.
For information about the request format, see the Examples section.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
CreateCertificateResponse |
||
| X509Certificate |
string |
Content of the server-side certificate. |
-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE----- |
| CertificateChain |
string |
CA certificate chain. |
-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----\n |
| Identifier |
string |
Unique identifier of the server-side certificate. |
180ae6bb538d538c70c01f81dcf2**** |
| SerialNumber |
string |
Certificate serial number. |
084bde9cd233f0ddae33adc438cfbbbd**** |
| RequestId |
string |
Request ID generated by Alibaba Cloud for this call. Use it to troubleshoot issues. |
55C66C7B-671A-4297-9187-2C4477247A74 |
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": "180ae6bb538d538c70c01f81dcf2****",
"SerialNumber": "084bde9cd233f0ddae33adc438cfbbbd****",
"RequestId": "55C66C7B-671A-4297-9187-2C4477247A74"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.