Querying the Quota of a User¶
Function¶
This API is used to query the quota of a user, that is, the allocated total number of CMKs that can be created by a user and the number of CMKs that has been created by the user.
Note
The quota does not include Default Master Keys.
URI¶
URI format
GET /v1.0/{project_id}/kms/user-quotas
Parameter description
¶ Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID
Requests¶
None
Responses¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
resources | Yes | Array of objects | Resource quota list. For details, see Table 4. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
type | Yes | String | Quota type. Enumerated values:
|
used | Yes | Integer | Used quota |
quota | Yes | Integer | Total quota |
Examples¶
Example request
None
Example response
{ "quotas": { "resources": [ { "type": "CMK", "used": 15, "quota": 20 }, { "type": "grant_per_CMK", "used": 15, "quota": 100 } ] } }
or
{ "error": { "error_code": "KMS.XXXX", "error_msg": "XXX" } }
Status Codes¶
Table 5 lists the normal status code returned by the response.
Status Code | Status | Description |
---|---|---|
200 | OK | Request processed successfully. |
Exception status code. For details, see Status Codes.