Queries quota resource consumption information.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
odps:GetQuotaUsage | get | *Quota acs:odps:{#regionId}:{#accountId}:quotas/{#nickName} |
| none |
Request syntax
GET /api/v1/quotas/{nickname}/usage HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
nickname | string | Yes | The alias of the level-1 quota. | os_quota_p |
tenantId | string | No | The ID of the tenant. You can log on to the MaxCompute console, and choose Tenants > Tenant Property from the left-side navigation pane to view the tenant ID. | 478403690625249 |
region | string | No | The region ID. | cn-chengdu |
from | long | Yes | The time when the query starts. The value is the log time that is specified when log data is written.
| 1669081045 |
to | long | Yes | The time when the query ends. The value is the log time that is specified when log data is written.
| 1669360870 |
subQuotaNickname | string | No | The alias of the level-2 quota. | ot_tunnel_quota |
aggMethod | string | No | The aggregation algorithm. For a better page experience, up to 60 points can be displayed for each metric. If you select a time range longer than 1 hour, the chart uses the average value within the range (minutes of the selected time range/60) to aggregate data by default. You can change the aggregation algorithm based on your business requirements. | max |
productId | string | No | The quota type. Default value: ODPS.
| ODPS |
plotTypes | array | No | The types of the charts. | |
item | string | No | The type of the chart. When productId is set to ODPS, this parameter is optional and has the following valid values:
When productId is set to TUNNEL, this parameter is required and has the following valid values:
| cpu |
yAxisTypes | array | No | The data metric fields. | |
item | string | No | The data metric field. You do not need to specify this parameter if the productId parameter is set to ODPS. You can enter a project name when productId is set to TUNNEL. In this case, the returned result is the information of the project dimension. | your_project_name |
Response parameters
Examples
Sample success responses
JSON
format
{
"requestId": "0b87b7a416652014358483492eea0b",
"httpCode": 200,
"errorCode": "OBJECT_NOT_EXIST",
"errorMsg": "This object does not exist.",
"data": {
"metrics": {
"test": "test",
"test2": 1
},
"plot": [
{
"title": "request",
"type": "request",
"yAxis": [
"project1#download#request"
]
}
]
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2022-08-18 | Add Operation | View Change Details |