Updated on 2022-08-09 GMT+08:00

Querying the Private Certificate Quota

Function

This API is used to query the private certificate quota.

URI

GET /v1/private-certificates/quotas

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. For details, see Obtaining a User Token.

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

quotas

Quotas object

Certificate quota. For details, see data structure for the Quotas field.

Table 3 Quotas

Parameter

Type

Description

resources

Array of Resources objects

Resource quota list. For details, see data structure for the Resources field.

Table 4 Resources

Parameter

Type

Description

type

String

Certificate type

  • CERTIFICATE_AUTHORITY: CA certificate.

  • CERTIFICATE: private certificate.

used

Integer

Used quota

quota

Integer

Total quota

  • CERTIFICATE_AUTHORITY: 100

  • CERTIFICATE: 100,000

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code

Minimum: 3

Maximum: 36

error_msg

String

Error message

Minimum: 0

Maximum: 1024

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code

Minimum: 3

Maximum: 36

error_msg

String

Error message

Minimum: 0

Maximum: 1024

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code

Minimum: 3

Maximum: 36

error_msg

String

Error message

Minimum: 0

Maximum: 1024

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code

Minimum: 3

Maximum: 36

error_msg

String

Error message

Minimum: 0

Maximum: 1024

Status code: 500

Table 9 Response body parameters

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 use this API to query the private CA quota, a token is required in the X-Auth-Token field in the request header. The token must have the permission to access the API.

GET https://ccm.ap-southeast-3.myhuaweicloud.com/v1/private-certificates/quotas

Example Responses

Status code: 200

Request succeeded.

{
  "quotas" : {
    "resources" : [ {
      "type" : "CERTIFICATE",
      "used" : 25,
      "quota" : 100000
    } ]
  }
}

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.