导入ca子证书 - ImportCert
功能介绍
导入ca子证书。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,当前API调用无需身份策略权限。
URI
POST /v2/{project_id}/certmanager/private-certificate-authorities/import
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID。 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
distinguished_name | 是 | DistinguishedName object | 证书DN。 |
key_algorithm | 是 | String | 密钥对生成算法 RSA-2048 RSA-3072。 |
transaction_id | 是 | String | 事务id。 |
crl_configuration | 是 | CrlConfigurationData object | 证书crl配置。 |
pem_code | 是 | String | 证书pem。 |
响应参数
状态码:200
success
状态码:400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:401
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:404
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
状态码:500
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
error_detail | String | 错误详情。 |
encoded_authorization_message | String | 加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
请求示例
{
"distinguished_name" : {
"common_name" : "api_test",
"country" : "CN",
"state" : "GuangDong",
"locality" : "DongGuan",
"organization" : "Huawei",
"organizational_unit" : "Workspace"
},
"key_algorithm" : "RSA-3072",
"signature_algorithm" : "SHA-256",
"transaction_id" : "string",
"crl_configuration" : {
"enable" : true,
"type" : "SYSTEM",
"crl_url" : "ldap:///CN=hcfactory-AD01-HCFACTORY-CA,CN=AD01-hcfactory,CN=CDP,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=hcfactory,DC=huawei,DC=com?certificateRevocationList?base?objectClass=cRLDistributionPoint",
"valid_day" : 3650
},
"pem_code" : "string"
} 响应示例
无
状态码
状态码 | 描述 |
|---|---|
200 | success |
400 | 由于包含语法错误,当前请求无法被服务器理解。 |
401 | 鉴权失败。 |
403 | 没有操作权限。 |
404 | 找不到资源。 |
500 | 服务内部错误,具体返回错误码请参见错误码说明。 |
错误码
请参见错误码。

