Queries the monitoring data of an elastic IP address (EIP). You can query monitoring data within the last 30 days, and obtain up to 400 data points in each request.
Operation description
To improve user experience in querying monitoring data, we recommend that you call the DescribeMetricList API operation provided by CloudMonitor to query EIP monitoring data. For more information, see DescribeMetricList and EIP monitoring data.
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 |
---|---|---|---|---|
vpc:DescribeEipMonitorData | get | *Address acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The ID of the region to which the EIP belongs. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
AllocationId | string | Yes | The ID of the EIP. | eip-2zeerraiwb7uj6idcfv**** |
StartTime | string | Yes | The beginning of the time range to query. The time must be in UTC. Specify the time in the ISO 8601 standard in If the value of seconds (ss) is not 00, the start time is automatically rounded up to the next minute. | 2020-01-05T01:05:05Z |
EndTime | string | Yes | The end of the time range to query. The time must be in UTC. Specify the time in the ISO 8601 standard in the If the value of seconds (ss) is not 00, the end time is automatically rounded up to the next minute. | 2020-01-05T03:05:10Z |
Period | integer | No | The duration of each monitoring data entry. Unit: seconds. Valid values: 60 (default), 300, 900, and 3600.
| 60 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "C8B26B44-0189-443E-9816-D951F59623A9",
"EipMonitorDatas": {
"EipMonitorData": [
{
"EipTX": 343,
"EipPackets": 3434,
"EipBandwidth": 10,
"TimeStamp": "2020-01-21T09:50:23Z",
"EipFlow": 465,
"EipRX": 122
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter.TooMany | monitor parameter too many data required. | There are multiple invalid input parameters. |
400 | InvalidStartTime.Malformed | The specified parameter "StartTime" is not valid. | The start time is invalid. |
400 | InvalidEndTime.Malformed | The specified parameter "EndTime" is not valid. | EndTime is set to an invalid value. |
400 | InvalidPeriod.ValueNotSupported | The specified parameter "Period" is not valid. | Period is set to an invalid value. |
400 | InvalidStartTime.TooEarly | The specified parameter "StartTime" is too early. | The start time is invalid. |
400 | InvalidAllocationId.NotFound | Specified allocation id is not found. | The error message returned because the specified EIP does not exist. Check whether the value of the parameter is valid. |
400 | OperationDenied.TooManyDataQueried | Specified operation is denied as too many data to return. | The number of data entries to be returned has reached the upper limit. |
404 | InvalidIpInstanceId.NotFound | The specified Eip InstanceId does not exist in our records. | The specified EIP does not exist. |
404 | InvalidInstanceId.NotFound | The InstanceId provided does not exist in our records. | The ECS instance does not exist in the VPC. |
404 | Forbidden.RegionNotFound | Specified region is not found during access authentication. | The specified region does not exist. Check whether the specified region ID is valid. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2022-12-02 | The Error code has changed. The response structure of the API has changed | View Change Details |