Queries the real-time SNAT performance ranking of a NAT gateway.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
nis:GetNatTopN | list |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The ID of the region in which the NAT gateway is deployed. | cn-shanghai |
NatGatewayId | string | Yes | The ID of the NAT gateway. | ngw-sample*** |
BeginTime | long | Yes | The beginning of the time range to query in milliseconds. If you do not specify EndTime, the point in time specified by BeginTime is queried. | 1638239092000 |
EndTime | long | No | The end of the time range to query in milliseconds. The time range specified by BeginTime and EndTime cannot exceed 86400000 milliseconds (24 hours). | 1638239093000 |
OrderBy | string | No | The metric that is used for real-time SNAT performance ranking. Valid values:
| InBps |
TopN | integer | No | The number of entries to return for real-time SNAT performance ranking. Valid values: 1 to 100. Default value: 10. | 10 |
Ip | string | No | Query ranking statistics for a specific IP address. If you specify this parameter, you do not need to specify TopN or OrderBy. | 192.168.156.101 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "77C512B5-12f3-f892-BD94-88A98271C1A0",
"NatGatewayTopN": [
{
"Ip": "192.168.156.101",
"InBps": 100,
"OutBps": 200,
"InPps": 10,
"OutPps": 20,
"InFlowPerMinute": 10,
"OutFlowPerMinute": 10,
"NewSessionPerSecond": 2,
"ActiveSessionCount": 8
}
],
"IsTopNOpen": true
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParam.TopN | The TopN(%s) should not greater than 100. | Only top 100 are supported. Actual input: (%s). |
400 | IllegalParam.BeginTimeAndEndTime | It only supports querying data for up to 7 days: %s. | You can query data within the last seven days: %s. |
400 | IllegalParam.ResourceId | The specified resourceId (%s) may be not exist. | The specified instance (%s) may not exist. Check the spelling. |
400 | IllegalParam.OrderBy | The specified param of orderBy (%s) is invalid. | The specified sort field (%s) is invalid. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-07-10 | The API operation is deprecated. The Error code has changed | View Change Details |
2023-04-27 | The Error code has changed | View Change Details |