Querying CA Details
Function
This API is used to query details about a CA.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
pca:ca:get
Read
ca *
g:ResourceTag/<tag-key>
-
-
-
g:EnterpriseProjectId
URI
GET /v1/private-certificate-authorities/{ca_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
ca_id |
Yes |
String |
ID of the CA certificate Minimum: 36 Maximum: 36 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. For details, see [Obtaining a User Token] (https://support.huaweicloud.com/intl/en-us/api-iam/iam_30_0001.html). |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
ca_id |
String |
ID of the CA certificate Minimum: 36 Maximum: 36 |
|
type |
String |
The CA type can be: |
|
status |
String |
CA certificate status:
|
|
path_length |
Integer |
CA path length.
NOTE:
Note: The path length of the generated root CA certificate is not limited, but this field is set to 7 in the database. The path length of a subordinate CA is specified by you when you create subordinate CA. The default value is 0. Minimum: 0 Maximum: 6 |
|
issuer_id |
String |
The ID of the CA certificate that issues the certificate. For a root CA, the value of this parameter is null. Minimum: 36 Maximum: 36 |
|
issuer_name |
String |
The name of the parent CA certificate. For a root CA, the value of this parameter is null. Minimum: 1 Maximum: 64 |
|
key_algorithm |
String |
Key algorithm |
|
signature_algorithm |
String |
Signature hash algorithm. |
|
freeze_flag |
Integer |
Freezing tag: |
|
gen_mode |
String |
Certificate generation method. |
|
serial_number |
String |
Serial number of the certificate. Minimum: 1 Maximum: 64 |
|
create_time |
Long |
Time the certificate was created. The value is a timestamp in milliseconds. |
|
delete_time |
Long |
Time the certificate was deleted. The value is a timestamp in milliseconds. |
|
not_before |
Long |
Time the certificate was created. The value is a timestamp in milliseconds. |
|
not_after |
Long |
Time the certificate expires. The value is a timestamp in milliseconds. |
|
distinguished_name |
DistinguishedName object |
Certificate name. For details, see data structure for the DistinguishedName field. |
|
crl_configuration |
ListCrlConfiguration object |
Certificate CRL. For details, see data structure for the ListCrlConfiguration field. |
|
enterprise_project_id |
String |
Enterprise project ID. The default value is 0. For users who have enabled the enterprise project function, this value indicates that resources are in the default enterprise project. For users who have not enabled the enterprise project function, this value indicates that resources are not in the default enterprise project. |
|
free_quota |
Integer |
Free certificate quota. |
|
charging_mode |
Integer |
Billing mode. The value can be: |
|
cluster_id |
String |
DHSM cluster ID. Minimum: 1 Maximum: 64 |
|
domain_id |
String |
Account ID. Minimum: 0 Maximum: 100 |
|
Parameter |
Type |
Description |
|---|---|---|
|
common_name |
String |
Common name (CN) of a certificate. The value can contain a maximum of 64 characters, including only letters, digits, spaces, Chinese characters, hyphens (-), underscores (_), periods (.), commas (,), and asterisks (*). Minimum: 1 Maximum: 64 |
|
country |
String |
Country code. The value is a string of two characters and can contain only letters. Minimum: 2 Maximum: 2 |
|
state |
String |
Name of a province or city. The value can contain a maximum of 128 characters, including only letters, digits, Chinese characters, spaces, hyphens (-), underscores (_), periods (.), and commas (,). Minimum: 1 Maximum: 128 |
|
locality |
String |
Region name. The value can contain a maximum of 128 characters, including only letters, digits, Chinese characters, spaces, hyphens (-), underscores (_), periods (.), and commas (,). Minimum: 1 Maximum: 128 |
|
organization |
String |
Organization name. The value can contain a maximum of 64 characters, including only letters, digits, Chinese characters, spaces, hyphens (-), underscores (_), periods (.), and commas (,). Minimum: 1 Maximum: 64 |
|
organizational_unit |
String |
Organization unit name. The value can contain a maximum of 64 characters, including only letters, digits, Chinese characters, spaces, hyphens (-), underscores (_), periods (.), and commas (,). Minimum: 1 Maximum: 64 |
|
Parameter |
Type |
Description |
|---|---|---|
|
enabled |
Boolean |
Whether to enable the gray release function of CRL. |
|
crl_name |
String |
Name of the certificate revocation list.
NOTE:
If you do not specify this parameter, the system uses the ID of the parent CA that issues the current certificate by default. |
|
obs_bucket_name |
String |
OBS bucket name. |
|
valid_days |
Integer |
CRL update interval, in days. This parameter is mandatory when the CRL release function is enabled. Minimum: 7 Maximum: 30 |
|
crl_dis_point |
String |
The address of the CRL file in the OBS bucket.
NOTE:
This parameter is composed of crl_name, ** obs_bucket_name**, and OBS address. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code Minimum: 3 Maximum: 36 |
|
error_msg |
String |
Error message Minimum: 0 Maximum: 1024 |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code Minimum: 3 Maximum: 36 |
|
error_msg |
String |
Error message Minimum: 0 Maximum: 1024 |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code Minimum: 3 Maximum: 36 |
|
error_msg |
String |
Error message Minimum: 0 Maximum: 1024 |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code Minimum: 3 Maximum: 36 |
|
error_msg |
String |
Error message Minimum: 0 Maximum: 1024 |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code Minimum: 3 Maximum: 36 |
|
error_msg |
String |
Error message Minimum: 0 Maximum: 1024 |
Example Requests
When you call this API, a token with the permission to use this API is mandatory for the X-Auth-Token field.
GET https://ccm.cn-north-4.myhuaweicloud.com/v1/private-certificate-authorities/4c0e772e-a30c-4029-b929-b7acb04143f7
Example Responses
Status code: 200
Request succeeded.
{
"signature_algorithm" : "SHA384",
"issuer_id" : "928bd666-e879-448a-ab54-82f6ae3d81e0",
"issuer_name" : "Huawei IT Root CA",
"not_after" : 1647567892000,
"not_before" : 1645148632000,
"status" : "ACTIVED",
"freeze_flag" : 0,
"gen_mode" : "CSR",
"serial_number" : "202202180143522338893611",
"distinguished_name" : {
"country" : "CN",
"state" : "guangdong",
"locality" : "shenzhen",
"organization" : "Huawei",
"organizational_unit" : "IT",
"common_name" : "Huawei IT Root CA"
},
"key_algorithm" : "RSA",
"create_time" : 1645148633000,
"delete_time" : null,
"ca_id" : "4c0e772e-a30c-4029-b929-b7acb04143f7",
"type" : "SUBORDINATE",
"path_length" : 0,
"crl_configuration" : {
"enabled" : false,
"obs_bucket_name" : null,
"valid_days" : null,
"crl_name" : null,
"crl_dis_point" : null
},
"cluster_id" : "54d8301b-b859-4c55-a628-21fcf90e609e"
}
Status code: 400
Invalid request parameters.
{
"error_code" : "PCA.XXX",
"error_msg" : "XXX"
}
Status code: 401
Token required for the requested page.
{
"error_code" : "PCA.XXX",
"error_msg" : "XXX"
}
Status code: 403
Authentication failed.
{
"error_code" : "PCA.XXX",
"error_msg" : "XXX"
}
Status code: 404
No resources available or found.
{
"error_code" : "PCA.XXX",
"error_msg" : "XXX"
}
Status code: 500
Internal service error.
{
"error_code" : "PCA.XXX",
"error_msg" : "XXX"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
|
400 |
Invalid request parameters. |
|
401 |
Token required for the requested page. |
|
403 |
Authentication failed. |
|
404 |
No resources available or found. |
|
500 |
Internal service error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.