如何查询最近一周的指定实例历史系统事件信息


本文摘自PHP中文网,作者坏嘻嘻,侵删。

本篇文章给大家带来的内容是关于如何查询最近一周的指定实例历史系统事件信息,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。

DescribeInstanceHistoryEvents

请求参数

微信截图_20180926152847.png

微信截图_20180926152858.png

返回参数

微信截图_20180926152907.png

数据类型 InstanceSystemEventType

微信截图_20180926152915.png

示例

请求示例

1

2

3

4

https://ecs.aliyuncs.com/?Action=DescribeInstanceHistoryEvents

&RegionId=cn-hangzhou

&InstanceId=i-2ze3tphuqvc93cixxxx3

&<公共请求参数>

正常返回示例

XML 格式

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

<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 格式

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

{

  "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 格式

1

2

3

4

5

6

<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 格式

1

2

3

4

5

6

{

    "RequestId": "1A8B4B27-8B2D-XXXX-XXXX-0F64DBE4C212",

    "HostId": "ecs.aliyuncs.com"

    "Code": "InvalidParameter"

    "Message": "The Parameter "EventCycleStatus" provided is not valid."

}

错误码

以下为本接口特有的错误码。更多错误码,请访问API错误中心。

微信截图_20180926152924.png

以上就是如何查询最近一周的指定实例历史系统事件信息的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

Linux下执行php命令提示错误

Linux不能ping通主机名怎么办

Linux下如何隐藏文件

Linux安装mysql 8.0的详细方法介绍(代码示例)

Linux下启动ssh失败的解决方法

Linux nfs服务安全加固实例分享

Linux如何查看tomcat的安装路径

如何使用更换系统盘和磁盘扩容进行磁盘扩容功能

Linux怎么查看文件

Linux中systemctl命令详细介绍

更多相关阅读请进入《Linux》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...