GetQuotaUsage
Queries quota resource consumption information.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:GetQuotaUsage |
get |
*Quota
|
None | None |
Request syntax
GET /api/v1/quotas/{nickname}/usage HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| nickname |
string |
Yes |
The alias of the level-1 quota. |
os_quota_p |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| 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 |
integer |
Yes |
The time when the query starts. The value is the log time that is specified when log data is written.
|
1669081045 |
| to |
integer |
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. |
|
|
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. |
|
|
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 elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| requestId |
string |
The request ID. |
0b87b7a416652014358483492eea0b |
| httpCode |
integer |
The HTTP status code.
|
200 |
| errorCode |
string |
The error code. |
OBJECT_NOT_EXIST |
| errorMsg |
string |
The error message. |
This object does not exist. |
| data |
object |
The data returned. |
|
| metrics |
object |
The metric results. |
|
| plot |
array<object> |
The information about the chart. |
|
|
object |
The information about the chart. |
||
| title |
string |
The title of the chart. |
request |
| type |
string |
The type of the chart. |
request |
| yAxis |
array |
The data metric field. |
|
|
string |
The data metric field. If the productId parameter is set to ODPS: CPU metric type or memory metric type If the productId parameter is set to TUNNEL and a project name is entered: project#operation#type |
project1#download#request |
Examples
Success response
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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.