调用DescribeEipMonitorData接口查看弹性公网IP(Elastic IP Address,简称EIP)的监控信息,最多查询30天内的数据,单次最多查询400个流量点的数据。
使用说明
为了提供更好的获取监控数据接口体验,建议您使用云监控(CloudMonitor)提供的统一接口DescribeMetricList查询EIP相关数据。更多信息,请参见DescribeMetricList和弹性公网IP相关数据。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeEipMonitorData |
系统规定参数。取值:DescribeEipMonitorData。 |
RegionId | String | 否 | cn-hangzhou |
EIP所属地域ID。 您可以通过调用DescribeRegions接口获取地域ID。 |
AllocationId | String | 是 | eip-2zeerraiwb7uj6idcfv**** |
EIP的实例ID。 |
StartTime | String | 是 | 2020-01-05T01:05:05Z |
获取数据的起始时间。使用UTC时间。按照ISO8601标准,格式为 如果不是整分,则自动取下一分钟为起始时间点。 |
EndTime | String | 是 | 2020-01-05T03:05:10Z |
获取数据的结束时间。使用UTC时间。按照ISO8601标准,格式为 如果不是整分,则自动取下一分钟为结束时间点。 |
Period | Integer | 否 | 60 |
每条监控数据的时间长度。单位:秒。取值:60(默认值) 、300 、 900 或 3600。
|
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | C8B26B44-0189-443E-9816-D951F59623A9 |
请求ID。 |
EipMonitorDatas | Array of EipMonitorData |
EIP监控数据的详细信息。 |
|
EipMonitorData | |||
EipTX | Long | 343 |
流出的带宽。单位:Byte。 |
EipPackets | Integer | 3434 |
包数量。 |
EipBandwidth | Integer | 10 |
平均带宽值,该值等于EipFlow/Period。单位为Byte/s。其中Period默认值为60,单位为秒。 |
TimeStamp | String | 2020-01-21T09:50:23Z |
查询监控信息的时间戳。ISO8601格式,如 |
EipFlow | Long | 465 |
流入和流出的流量总和。 |
EipRX | Long | 122 |
流入的流量。单位:Byte。 |
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeEipMonitorData
&RegionId=cn-hangzhou
&AllocationId=eip-2zeerraiwb7uj6idcfv****
&StartTime=2020-01-05T01:05:05Z
&EndTime=2020-01-05T03:05:10Z
&Period=60
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeEipMonitorDataResponse>
<RequestId>C8B26B44-0189-443E-9816-D951F59623A9</RequestId>
<EipMonitorDatas>
<EipTX>343</EipTX>
<EipPackets>3434</EipPackets>
<EipBandwidth>10</EipBandwidth>
<TimeStamp>2020-01-21T09:50:23Z</TimeStamp>
<EipFlow>465</EipFlow>
<EipRX>122</EipRX>
</EipMonitorDatas>
</DescribeEipMonitorDataResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "C8B26B44-0189-443E-9816-D951F59623A9",
"EipMonitorDatas" : [ {
"EipTX" : 343,
"EipPackets" : 3434,
"EipBandwidth" : 10,
"TimeStamp" : "2020-01-21T09:50:23Z",
"EipFlow" : 465,
"EipRX" : 122
} ]
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidStartTime.Malformed | The specified parameter "StartTime" is not valid. | 开始时间不合法。 |
400 | InvalidEndTime.Malformed | The specified parameter "EndTime" is not valid. | 该结束时间不合法。 |
400 | InvalidPeriod.ValueNotSupported | The specified parameter "Period" is not valid. | 参数Period的值不合法。 |
400 | InvalidStartTime.TooEarly | The specified parameter "StartTime" is too early. | 开始时间不合法。 |
400 | InvalidAllocationId.NotFound | Specified allocation id is not found. | 指定的公网 IP 不存在,请您检查填写的公网 IP 是否正确。 |
400 | OperationDenied.TooManyDataQueried | Specified operation is denied as too many data to return. | 一次查询返回的数据量过多。 |
404 | InvalidIpInstanceId.NotFound | The specified Eip InstanceId does not exist in our records. | 指定的eip实例不存在。 |
404 | InvalidInstanceId.NotFound | The InstanceId provided does not exist in our records. | 该 ECS 实例不存在(实例不在该 VPC 下)。 |
404 | Forbidden.RegionNotFound | Specified region is not found during access authentication. | 指定 Region 不存在,请您检查该 Region 是否正确。 |
访问错误中心查看更多错误码。