Queries the metric data of a resource group.
Operation description
-
DataWorks Basic Edition or a more advanced edition is required to use this feature.
-
Make sure that the service-linked role AliyunServiceRoleForDataWorks has been created before you call this operation.
-
This operation applies only to serverless resource groups.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:ListResourceGroupMetricData |
get |
*DwResourceGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceGroupId |
string |
Yes |
The unique identifier for the general-purpose resource group. |
Serverless_res_group_524257424564736_6831777003XXXXX |
| MetricName |
string |
Yes |
The metric name. Valid values:
|
CUSpec |
| Period |
string |
No |
The statistical period for monitoring data. Value: A multiple of 60. Unit: Seconds. Default: 60. |
60 |
| BeginTime |
integer |
No |
The start time. Supported format: Unix timestamp in milliseconds (the number of milliseconds that have elapsed since January 1, 1970). The interval between BeginTime and EndTime must be less than or equal to 31 days. Default: The current time minus 2 hours, expressed as a millisecond Unix timestamp. |
1593950832000 |
| EndTime |
integer |
No |
The end time. Supported format: Unix timestamp in milliseconds (the number of milliseconds that have elapsed since January 1, 1970). The interval between BeginTime and EndTime must be less than or equal to 31 days. Default: The current time, expressed as a millisecond Unix timestamp. |
1750176000000 |
| NextToken |
string |
No |
The pagination cursor. Note
If this parameter is not set, the first page of data is retrieved. If a value is returned for this parameter, it indicates that there is a next page. You can use the returned NextToken as a parameter to request the next page of data until it returns Null, which means all data has been retrieved. |
FFqBJBxE8I0PE0IUO6K69k7m2FfyWNNc2qQ9ReUkazhz9VA7dWZKlxBcjUwOV0imSM |
| Length |
integer |
No |
The number of records to display on each page for paginated queries. Note
The maximum value of Length for a single request is 1440. |
100 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned result. |
||
| Success |
boolean |
Indicates whether the request was successful. |
true |
| MetricData |
object |
Monitoring metric data. |
|
| Id |
string |
The unique identifier for the resource group. |
Serverless_res_group_524257424564736_6831777003XXXXX |
| MetricName |
string |
The metric name. Valid values:
|
CUSpec |
| NextToken |
string |
The pagination cursor. |
tSBOXZcAmk+akxRkwRuXnGQEsIDODyd5ulPqgytNTbLp4bhb7fuvz13FXtm87Kfl |
| Metrics |
array<object> |
The list of metric data. |
|
|
object |
The metric data. |
||
| Value |
number |
The value of the metric data. |
1.0 |
| Timestamp |
integer |
The timestamp. |
1761184929633 |
| RequestId |
string |
The request ID, used for locating logs and troubleshooting. |
6A6CBE87-9F91-1323-B680-E7A7065XXXXX |
Examples
Success response
JSON format
{
"Success": true,
"MetricData": {
"Id": "Serverless_res_group_524257424564736_6831777003XXXXX\n",
"MetricName": "CUSpec",
"NextToken": "tSBOXZcAmk+akxRkwRuXnGQEsIDODyd5ulPqgytNTbLp4bhb7fuvz13FXtm87Kfl",
"Metrics": [
{
"Value": 1,
"Timestamp": 1761184929633
}
]
},
"RequestId": "6A6CBE87-9F91-1323-B680-E7A7065XXXXX\n"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.