Lists the compute usage for jobs per instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:ListComputeMetricsByInstance |
list |
*All Resource
|
None | None |
Request syntax
POST /api/v1/computeMetrics/listByInstance HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| projectNames |
array |
No |
The names of the projects. |
|
|
string |
No |
The name of a project. |
odps_porject |
|
| startDate |
integer |
No |
The start of the query time range, specified as a UNIX timestamp in milliseconds. |
1715393576201 |
| endDate |
integer |
No |
The end of the query time range, specified as a UNIX timestamp in milliseconds. |
1718590596556 |
| instanceId |
string |
No |
The instance ID. |
20240730****ddlr |
| jobOwner |
string |
No |
The job owner. |
ALIYUN$7632***@aliyun.com |
| signature |
string |
No |
The SQL job signature. |
ghijkl789012 |
| pageNumber |
integer |
No |
The page number. |
1 |
| pageSize |
integer |
No |
The number of entries per page. The default value is 10. |
10 |
| types |
array |
No |
The metering types. |
|
|
string |
No |
The metering type. Valid values:
|
SQL |
|
| specCodes |
array |
No |
The specification types. |
|
|
string |
No |
The specification type. Valid values:
|
OdpsStandard |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned. Example: { "data":{ "instanceComputeMetrics":[ { "unit":"GBCplx", "instanceId":"20260415082755g4af3vobxio", "submitTime":1776241680, "specCode":"OdpsStandard", "signature":"4c504210645f7850cf847c17886bf", "usage":0.8054948877543211, "jobOwner":"RAM$1393348188455728:role/aliyunservicerolefomputemms", "endTime":1776241682, "type":"ComputationSql", "projectName":"dbs_mc" }, { "unit":"GBCplx", "instanceId":"202604150828258gv9abz7unq14", "submitTime":1776241707, "specCode":"OdpsStandard", "signature":"cacb1e31deb**c19e515b59634a", "usage":0.1720797186717391, "jobOwner":"ALIYUN$mc_ma_testcloud_com", "endTime":1776241707, "type":"ComputationSql", "projectName":"webui_139728_hangzhou" } ], "pageNumber":1, "pageSize":10, "totalCount":2808 }, "requestId":"0adb99df17763408113761151d0001" } |
||
| requestId |
string |
The request ID. |
0bc059b717363029839908920ea631 |
| httpCode |
integer |
The HTTP status code.
|
200 |
| data |
object |
The data returned. |
|
| instanceComputeMetrics |
array<object> |
Usage metrics for pay-as-you-go jobs. |
|
|
object |
|||
| instanceId |
string |
The instance ID. |
20240730****ddlr |
| type |
string |
The metering type.
|
ComputationSql |
| specCode |
string |
The specification type.
|
OdpsStandard |
| jobOwner |
string |
The owner of the job. |
ALIYUN$7632***@aliyun.com |
| projectName |
string |
The name of the project. |
odps_porject |
| submitTime |
integer |
The job submission time, as a UNIX timestamp in milliseconds. |
1610432000000 |
| endTime |
integer |
The job completion time, as a UNIX timestamp in milliseconds. |
1710432000000 |
| signature |
string |
The signature of the SQL job. |
pqrs12345tuv |
| usage |
number |
The compute usage.
|
1024 |
| unit |
string |
The unit of compute usage. |
GB |
| totalCount |
integer |
The total number of entries returned. |
64 |
| pageNumber |
integer |
The returned page number. |
1 |
| pageSize |
integer |
The number of entries per page. |
10 |
Examples
Success response
JSON format
{
"requestId": "0bc059b717363029839908920ea631",
"httpCode": 200,
"data": {
"instanceComputeMetrics": [
{
"instanceId": "20240730****ddlr",
"type": "ComputationSql",
"specCode": "OdpsStandard",
"jobOwner": "ALIYUN$7632***@aliyun.com",
"projectName": "odps_porject",
"submitTime": 1610432000000,
"endTime": 1710432000000,
"signature": "pqrs12345tuv",
"usage": 1024,
"unit": "GB"
}
],
"totalCount": 64,
"pageNumber": 1,
"pageSize": 10
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.