Issues a client certificate by using the ESA certificate authority (CA).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:CreateClientCertificate |
create |
*Site
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SiteId |
integer |
Yes |
The site ID. |
1234567890123 |
| CSR |
string |
No |
The certificate signing request (CSR) content. |
-----BEGIN CERTIFICATE REQUEST----- |
| PkeyType |
string |
No |
The private key algorithm type. This parameter is required if CSR is not provided. Valid values:
|
RSA |
| ValidityDays |
integer |
Yes |
The validity period of the certificate. Unit: days. |
365 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
C370DAF1-C838-4288-A1A0-9A87633D248E |
| Id |
string |
The certificate ID. |
babaded901474b9693acf530e0fb1d95 |
| Status |
string |
The certificate status. |
active |
| Certificate |
string |
The certificate content. |
-----BEGIN CERTIFICATE----- |
| PrivateKey |
string |
The private key of the certificate. |
-----BEGIN PRIVATE KEY----- |
| CommonName |
string |
The common name of the certificate. |
www.example.com |
| NotBefore |
string |
The start time of the certificate validity period. |
2023-12-01T02:12:49Z |
| NotAfter |
string |
The end time of the certificate validity period. |
2024-12-01T02:12:49Z |
| Issuer |
string |
The certification authority that issued the certificate. |
ESA CA |
| SerialNumber |
string |
The certificate serial number. |
babaded901474b9693acf530e0fb1daa |
| FingerprintSha256 |
string |
The SHA-256 fingerprint of the certificate. |
1dc5fc9af4eead2570c70d94b416130baeb6d4429b51fd3557379588456aca66 |
| SignatureAlgorithm |
string |
The signature algorithm of the certificate. |
SHA256-RSA |
| ValidityDays |
string |
The validity period of the certificate. |
365 |
| CACertificateId |
string |
The CA certificate ID. |
babaded901474b9693acf530e0fb1dbb |
Examples
Success response
JSON format
{
"RequestId": "C370DAF1-C838-4288-A1A0-9A87633D248E",
"Id": "babaded901474b9693acf530e0fb1d95",
"Status": "active",
"Certificate": "-----BEGIN CERTIFICATE-----",
"PrivateKey": "-----BEGIN PRIVATE KEY-----",
"CommonName": "www.example.com ",
"NotBefore": "2023-12-01T02:12:49Z",
"NotAfter": "2024-12-01T02:12:49Z",
"Issuer": "ESA CA",
"SerialNumber": "babaded901474b9693acf530e0fb1daa",
"FingerprintSha256": "1dc5fc9af4eead2570c70d94b416130baeb6d4429b51fd3557379588456aca66",
"SignatureAlgorithm": "SHA256-RSA",
"ValidityDays": "365",
"CACertificateId": "babaded901474b9693acf530e0fb1dbb"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.SiteId | Failed to query the website based on the SiteID you specified. Check parameter SiteId and try again. | Failed to query the website based on the SiteID you specified. Check parameter SiteId and try again. |
| 400 | MissingSiteId | Required parameter SiteId missing. Specify SiteId and try again. | Required parameter SiteId missing. Specify SiteId and try again. |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | Failed to call the service. Try again later or contact technical support. |
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | QuotaCheckFailed.Function | The feature is unavailable in your plan. Upgrade the plan or contact your account manager to request the feature. | The feature is unavailable in your plan. Upgrade the plan or contact your account manager to request the feature. |
| 400 | LockFailed | The system is handling requests you previously submitted. Try again later. | The system is handling requests you previously submitted. Try again later. |
| 403 | Unauthorized.InvalidTime | The specified authentication time is invalid. | The authentication time parameter you entered is invalid. Check the parameter value and try again. |
| 403 | Unauthorized.InvalidToken | Token authentication failed. | The token you entered is invalid. Please check and enter the correct token and try again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.