使用ESA CA签发客户端证书。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
esa:CreateClientCertificate |
create |
*Site
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| SiteId |
integer |
是 |
站点 ID。 |
1234567890123 |
| CSR |
string |
否 |
证书签名请求内容。 |
-----BEGIN CERTIFICATE REQUEST----- |
| PkeyType |
string |
否 |
私钥算法类型,当不提供 CSR 时为必填项。 枚举值:
|
RSA |
| ValidityDays |
integer |
是 |
证书有效期,单位:天。 |
365 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
C370DAF1-C838-4288-A1A0-9A87633D248E |
| Id |
string |
证书 Id。 |
babaded901474b9693acf530e0fb1d95 |
| Status |
string |
证书状态。 |
active |
| Certificate |
string |
证书内容。 |
-----BEGIN CERTIFICATE----- |
| PrivateKey |
string |
证书私钥。 |
-----BEGIN PRIVATE KEY----- |
| CommonName |
string |
证书通用名称。 |
www.example.com |
| NotBefore |
string |
证书有效期的开始时间。 |
2023-12-01T02:12:49Z |
| NotAfter |
string |
证书有效期的截止时间。 |
2024-12-01T02:12:49Z |
| Issuer |
string |
证书颁发机构。 |
ESA CA |
| SerialNumber |
string |
证书序列号。 |
babaded901474b9693acf530e0fb1daa |
| FingerprintSha256 |
string |
证书 sha256 指纹。 |
1dc5fc9af4eead2570c70d94b416130baeb6d4429b51fd3557379588456aca66 |
| SignatureAlgorithm |
string |
证书签名算法。 |
SHA256-RSA |
| ValidityDays |
string |
证书有效期。 |
365 |
| CACertificateId |
string |
CA 证书 ID。 |
babaded901474b9693acf530e0fb1dbb |
示例
正常返回示例
JSON格式
{
"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"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.SiteId | Failed to query the website based on the SiteID you specified. Check parameter SiteId and try again. | SiteId参数无效,无法通过指定的SiteId获取对应的站点名称,请确认SiteId后重试。 |
| 400 | MissingSiteId | Required parameter SiteId missing. Specify SiteId and try again. | 缺少必填参数SiteId,请指定SiteId参数后重试。 |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | 调用服务失败,请稍后重试或联系客服咨询详情。 |
| 400 | InvalidParameter | 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. | 您的套餐不含该功能,请升级套餐或联系商务添加。 |
| 403 | Unauthorized.InvalidTime | The specified authentication time is invalid. | 您输入的鉴权时间参数无效,请检查参数值后重试。 |
| 403 | Unauthorized.InvalidToken | Token authentication failed. | 您输入的token无效,请检查并输入正确的token后进行重试。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。