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.
The quota does not include Default Master Keys.
Responses
Table 2 Response parametersParameter
|
Mandatory
|
Type
|
Description
|
quotas
|
Yes
|
Object
|
Quota list. For details, see Table 3.
|
Table 3 quotas field descriptionParameter
|
Mandatory
|
Type
|
Description
|
resources
|
Yes
|
Array of objects
|
Resource quota list. For details, see Table 4.
|
Table 4 resources field descriptionParameter
|
Mandatory
|
Type
|
Description
|
type
|
Yes
|
String
|
Quota type.
Enumerated values:
- CMK indicates a Customer Master Key.
- grant_per_CMK indicates the number of grants that can be created on a CMK.
|
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.
Table 5 Status codesStatus Code
|
Status
|
Description
|
200
|
OK
|
Request processed successfully.
|
Exception status code. For details, see Status Codes.