Issues a server certificate based on a custom certificate signing request (CSR).
Usage notes
Before you call this operation, make sure that you have created a root certificate authority (CA) certificate by calling the CreateRootCACertificate operation and an intermediate CA certificate by calling the CreateSubCACertificate operation. Only intermediate CA certificates can be used to issue server certificates.
Limits
You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateServerCertificateWithCsr |
The operation that you want to perform. Set the value to CreateServerCertificateWithCsr. |
Csr | String | Yes | -----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST----- |
The content of the CSR. You can generate a CSR by using the OpenSSL tool or the Keytool tool. For more information, see How do I create a CSR file? |
Domain | String | No | example.com |
The additional domain names or additional IP addresses of the server certificate. After you add additional domain names and additional IP addresses to a certificate, you can apply the certificate to the domain names and IP addresses. You can specify multiple domain names and IP addresses. If you specify multiple domain names and IP addresses, separate them with commas (,). |
Days | Integer | No | 365 |
The validity period of the server certificate. Unit: days. You must specify at least one of the Days, BeforeTime, and AfterTime parameters. The BeforeTime and AfterTime parameters must be both empty or both specified. The following list describes how to specify these parameters:
Note
|
ParentIdentifier | String | Yes | 270oe6bb538d538c70c01f81hfd3**** |
The unique identifier of the intermediate CA certificate from which the server certificate is issued. Note You can call the DescribeCACertificateList operation to query the unique identifier of an intermediate CA certificate.
|
BeforeTime | Long | No | 1634283958 |
The issuance time of the server certificate. This value is a UNIX timestamp. The default value is the time when you call this operation. Unit: seconds. Note The BeforeTime and AfterTime parameters must be both empty or both specified.
|
AfterTime | Long | No | 1665819958 |
The expiration time of the server certificate. This value is a UNIX timestamp. Unit: seconds. Note The BeforeTime and AfterTime parameters must be both empty or both specified.
|
All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.
For more information about sample requests, see the "Examples" section of this topic.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Identifier | String | 180ae6bb538d538c70c01f81dcf2**** |
The unique identifier of the server certificate. |
RootX509Certificate | String | -----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE----- |
The content of the root CA certificate. |
ParentX509Certificate | String | -----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE----- |
The content of the intermediate CA certificate. |
RequestId | String | 55C66C7B-671A-4297-9187-2C4477247A74 |
The ID of the request, which is used to locate and troubleshoot issues. |
X509Certificate | String | -----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE----- |
The content of the server certificate. |
CertificateChain | String | -----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----\n |
The certificate chain of the server certificate. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateServerCertificateWithCsr
&Csr=-----BEGIN CERTIFICATE REQUEST----- ...... -----END CERTIFICATE REQUEST-----
&Domain=aliyundoc.com
&Days=365
&ParentIdentifier=270oe6bb538d538c70c01f81hfd3****
&BeforeTime=1634283958
&AfterTime=1665819958
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateServerCertificateWithCsrResponse>
<Identifier>180ae6bb538d538c70c01f81dcf2****</Identifier>
<RootX509Certificate>-----BEGIN CERTIFICATE-----
......
-----END CERTIFICATE-----
</RootX509Certificate>
<ParentX509Certificate>-----BEGIN CERTIFICATE-----
......
-----END CERTIFICATE-----
</ParentX509Certificate>
<RequestId>55C66C7B-671A-4297-9187-2C4477247A74</RequestId>
<X509Certificate>-----BEGIN CERTIFICATE-----
......
-----END CERTIFICATE-----
</X509Certificate>
<CertificateChain>-----BEGIN CERTIFICATE-----
......
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
......
-----END CERTIFICATE-----
</CertificateChain>
</CreateServerCertificateWithCsrResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Identifier" : "180ae6bb538d538c70c01f81dcf2****",
"RootX509Certificate" : "-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----",
"ParentX509Certificate" : "-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----",
"RequestId" : "55C66C7B-671A-4297-9187-2C4477247A74",
"X509Certificate" : "-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----",
"CertificateChain" : "-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----\n"
}
Error codes
For a list of error codes, visit the API Error Center.