本篇文章给大家带来的内容是关于如何查询最近一周的指定实例历史系统事件信息,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。
DescribeInstanceHistoryEvents
请求参数
返回参数
数据类型 InstanceSystemEventType
示例
请求示例
https://ecs.aliyuncs.com/?Action=DescribeInstanceHistoryEvents &RegionId=cn-hangzhou &InstanceId=i-2ze3tphuqvc93cixxxx3 &
正常返回示例
XML 格式
<describeinstancehistoryeventsresponse> <instancesystemeventset> <instancesystemeventtype> <instanceid>i-2ze3tphuqvc93cixxxx3</instanceid> <eventid>e-2ze9yxxxxwtqcvai68rl</eventid> <eventtype> <code>1</code> <name>SystemMaintenance.Reboot</name> </eventtype> <eventcyclestatus> <code>0</code> <name>Executed</name> </eventcyclestatus> <eventpublishtime>2017-11-30T06:32:31Z</eventpublishtime> <notbefore>2017-12-01T06:32:31Z</notbefore> <eventfinishtime>2017-12-01T06:35:31Z</eventfinishtime> </instancesystemeventtype> <instancesystemeventtype> <instanceid>i-2ze3tphuqvc93cixxxx3</instanceid> <eventid>e-2ze9yxxxxwtqcvai68r3</eventid> <eventtype> <code>34</code> <name>InstanceExpiration.Stop</name> </eventtype> <eventcyclestatus> <code>8</code> <name>Avoided</name> </eventcyclestatus> <eventpublishtime>2017-11-29T06:32:31Z</eventpublishtime> <notbefore>2017-12-06T00:00:00Z</notbefore> <eventfinishtime>2017-12-05T12:35:31Z</eventfinishtime> </instancesystemeventtype> </instancesystemeventset> <pagesize>10</pagesize> <pagenumber>1</pagenumber> <totalcount>2</totalcount> <requestid>02EA76D3-5A2A-44EB-XXXX-8901881D8707</requestid></describeinstancehistoryeventsresponse>
JSON 格式
{ "InstanceSystemEventSet": { "InstanceSystemEventType": [ { "InstanceId": "i-2ze3tphuqvc93cixxxx3", "EventId": "e-2ze9yxxxxwtqcvai68rl", "EventType": { "Code": 1, "Name": "SystemMaintenance.Reboot" }, "EventCycleStatus": { "Code": 0, "Name": "Executed" }, "EventPublishTime": "2017-11-30T06:32:31Z", "NotBefore": "2017-12-01T06:32:31Z", "EventFinishTime": "2017-12-01T06:35:31Z" }, { "InstanceId": "i-2ze3tphuqvc93cixxxx3", "EventId": "e-2ze9yxxxxwtqcvai68r3", "EventType": { "Code": 34, "Name": "InstanceExpiration.Stop" }, "EventCycleStatus": { "Code": 8, "Name": "Avoided" }, "EventPublishTime": "2017-11-29T06:32:31Z", "NotBefore": "2017-12-06T00:00:00Z", "EventFinishTime": "2017-12-05T12:35:31Z" } ] }, "PageSize": 10, "PageNumber": 1, "TotalCount": 2, "RequestId": "02EA76D3-5A2A-44EB-XXXX-8901881D8707" }
异常返回示例
XML 格式
<error> <requestid>C38E0D94-C18B-44F3-8C05-6E35BE334087</requestid> <hostid>ecs.aliyuncs.com</hostid> <code>InvalidParameter</code> <message>The Parameter "EventCycleStatus" provided is not valid.</message></error>
JSON 格式
{ "RequestId": "1A8B4B27-8B2D-XXXX-XXXX-0F64DBE4C212", "HostId": "ecs.aliyuncs.com" "Code": "InvalidParameter" "Message": "The Parameter "EventCycleStatus" provided is not valid." }
错误码
以下为本接口特有的错误码。更多错误码,请访问API错误中心。
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END