QueryParentTunnelMetric
Queries the level-1 Tunnel slot usage or limit for the current tenant in the requested region and returns a time-sampled metric series. The request body must contain at least an empty object.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:QueryParentTunnelMetric |
list |
*All Resource
|
None | None |
Request syntax
POST /api/v1/observations/tunnel/{metric}/forParent HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| metric |
string |
Yes |
The name of the metric. A value of slot_usage indicates the slot usage, and a value of slot_max indicates the slot limit. |
slot_usage |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| startTime |
integer |
Yes |
The start time of the query, represented as a UNIX timestamp in seconds. The maximum query span is 7 days. |
1767225600 |
| endTime |
integer |
Yes |
The end time of the query, represented as a UNIX timestamp in seconds. The value must be greater than startTime. |
1767229200 |
| strategy |
string |
No |
The aggregation method within the sampling window. Valid values:
|
max |
| body |
object |
No |
The quota, grouping, and sampling options for the level-1 Tunnel metric query. |
|
| parentQuotaNickname |
string |
No |
The level-1 Tunnel quota selection. Set this parameter to default to query the default Tunnel. If this parameter is omitted, the summary of exclusive Tunnels is queried. |
default |
| groupList |
array |
No |
The list of grouping dimensions. Supported values are quota and project. The project dimension is only applicable to the slot usage of the default Tunnel. |
|
|
string |
No |
The grouping dimension. A value of quota indicates grouping by quota, and a value of project indicates grouping by project. |
quota |
|
| interval |
integer |
No |
The sampling interval in seconds. Valid values: 60, 300, and 900. If this parameter is explicitly specified, the maximum query span is 3 days. If this parameter is omitted, the interval is automatically selected based on the duration. |
60 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
PopResult |
||
| requestId |
string |
The unique identifier of the API request. You can provide this identifier when troubleshooting call issues. |
0be3e0aa16667684362147582e038f |
| httpCode |
integer |
The HTTP status code of the request. |
200 |
| errorCode |
string |
The error code returned when the request fails. |
InvalidArgument |
| errorMsg |
string |
The error message returned when the request fails. |
The specified parameter is invalid. |
| data |
object |
The level-1 Tunnel slot metrics and their time series data. |
|
| category |
string |
[Deprecated] Do not rely on this field. This field is not populated by this operation. |
null |
| name |
string |
The name of the requested metric. |
slot_usage |
| period |
integer |
The actual sampling interval used, in seconds. |
60 |
| metrics |
array<object> |
The metric time series grouped by dimension. An empty array is returned if no data is found. |
|
|
array<object> |
|||
| metric |
object |
The dimension label of the time series. The actual key name varies based on the grouping method. |
{"quota":"default"} |
|
string |
The value of the dimension label, such as the value of quota when grouped by the default quota. |
default |
|
| values |
array |
The list of time series data points. Each point contains a timestamp and a slot metric value in sequence. |
|
|
array |
A data point. The first item is a UNIX timestamp in seconds, and the second item is the slot metric value. |
||
|
number |
The numeric elements of the data point. The first element is a UNIX timestamp in seconds, and the second element is the slot metric value. |
1767225600 |
Examples
Success response
JSON format
{
"requestId": "0be3e0aa16667684362147582e038f",
"httpCode": 200,
"errorCode": "InvalidArgument",
"errorMsg": "The specified parameter is invalid.",
"data": {
"category": "null",
"name": "slot_usage",
"period": 60,
"metrics": [
{
"metric": {
"key": "default"
},
"values": [
[
1767225600
]
]
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.