How to query the historical system event information of a specified instance in the past week

坏嘻嘻
Release: 2018-09-26 15:36:23
Original
2477 people have browsed it

The content of this article is about how to query the historical system event information of a specified instance in the past week. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

DescribeInstanceHistoryEvents

Request Parameters

How to query the historical system event information of a specified instance in the past week

How to query the historical system event information of a specified instance in the past week

##Return parameters

How to query the historical system event information of a specified instance in the past week

Data typeInstanceSystemEventType

How to query the historical system event information of a specified instance in the past week

Example

Request example

https://ecs.aliyuncs.com/?Action=DescribeInstanceHistoryEvents
&RegionId=cn-hangzhou
&InstanceId=i-2ze3tphuqvc93cixxxx3
&<公共请求参数>
Copy after login

Normal return example

XML format

<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>
Copy after login

JSON format

{
  "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"
}
Copy after login

Exception return example

XML format

<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>
Copy after login

JSON format

{
    "RequestId": "1A8B4B27-8B2D-XXXX-XXXX-0F64DBE4C212",
    "HostId": "ecs.aliyuncs.com"
    "Code": "InvalidParameter"
    "Message": "The Parameter "EventCycleStatus" provided is not valid."
}
Copy after login

Error code

The following are error codes unique to this interface. For more error codes, please visit the API Error Center.

How to query the historical system event information of a specified instance in the past week

The above is the detailed content of How to query the historical system event information of a specified instance in the past week. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!