这篇文章将为大家详细讲解有关查询最近一周指定实例历史系统事件信息的方法,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
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错误中心。
关于查询最近一周指定实例历史系统事件信息的方法就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。