Queries the resource information of a specified cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetAccountingReport |
The operation that you want to perform. Set the value to GetAccountingReport |
ClusterId | String | Yes | ehpc-hz-FYUr32**** |
The ID of the cluster. |
EndTime | Integer | Yes | 1577441873 |
The end time of the time range that is specified in the request. The time is a timestamp. This value is a UNIX timestamp representing the number of seconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. |
ReportType | String | Yes | job_report |
The query type. Valid values:
|
StartTime | Integer | Yes | 1576922873 |
The start time of the time range that is specified in the request. This value is a UNIX timestamp representing the number of seconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC. |
FilterValue | String | No | userNo1 |
The actual name of the dimension to be queried. Valid values:
|
Dim | String | No | user |
The query dimension. Valid values:
|
JobId | String | No | [{Id: 1.scheduler}] |
The ID of the job. |
PageSize | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
PageNumber | Integer | No | 10 |
The number of entries to return on each page. Valid values: 1 to 50. Default: 10. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Data | List | [[\"userNo1\",49856,7062192],[\"userNo2\",29904,4317280]] |
The list serialized in the JSON format. The list contains multiple records. |
Metrics | String | [\"user\",\"coreTime\",\"usedMem\"] |
The list serialized in the JSON format. The list contains the column names of each record in the Data. |
PageNumber | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | B1DCB399-9333-4B38-A35A-0BDFABC71881 |
The ID of the request. |
TotalCoreTime | Integer | 261300 |
The total number of CPU cores in the cluster queried. |
TotalCount | Integer | 10 |
Displays the total number of entries. |
Examples
Sample requests
https://ehpc.cn-hangzhou.aliyuncs.com/?Action=GetAccountingReport
&ClusterId=ehpc-hz-FYUr32****
&EndTime=1577441873
&ReportType=job_report
&StartTime=1576922873
&<Common request parameters>
Sample success responses
XML
format
<GetAccountingReportResponse>
<Metrics>["user","coreTime","usedMem"]</Metrics>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<RequestId>B1DCB399-9333-4B38-A35A-0BDFABC71881</RequestId>
<Data>[["userNo1",49856,7062192],["userNo2",29904,4317280]]</Data>
<TotalCoreTime>261300</TotalCoreTime>
<TotalCount>10</TotalCount>
</GetAccountingReportResponse>
JSON
format
{
"Metrics":"[\"user\",\"coreTime\",\"usedMem\"]",
"PageNumber":"1",
"PageSize":"10",
"RequestId":"B1DCB399-9333-4B38-A35A-0BDFABC71881",
"Data":"[[\"userNo1\",49856,7062192],[\"userNo2\",29904,4317280]]",
"TotalCoreTime":"261300",
"TotalCount":"10"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The error message returned because the request has failed. The server is temporarily unavailable. |
For a list of error codes, visit the API Error Center.