本文在介绍如何查询一块或多块磁盘的全部状态信息的基础上,重点探讨了其具体步骤,本文内容紧凑,希望大家可以有所收获。
DescribeDisksFullStatus
描述
磁盘的全部状态信息包含磁盘生命周期(Status),磁盘健康状态(HealthStatus)和磁盘事件类型(EventType)。
由于磁盘相关事件的发布时间、事件的计划执行时间以及事件的实际执行时间相同,如果指定一段时间[EventTime.Start, EventTime.End],则可以查询这段时间中发生过的所有历史事件。目前,您最多可以查询最近一周的历史事件。
请求参数
返回参数
数据类型 DiskFullStatusType
数据类型 DiskEventType
示例
请求示例
https://ecs.aliyuncs.com/?Action=DescribeDisksFullStatus &RegionId=cn-hangzhou &<公共请求参数>
正常返回示例
XML格式
<DescribeDisksFullStatusResponse> <DiskFullStatusSet> <DiskFullStatusType> <DiskEventSet> <DiskEventType> <EventId>e-event1</EventId> <EventType> <Code>7</Code> <Name>Stalled</Name> </EventType> <EventTime>2018-05-08T02:43:10Z</EventTime> </DiskEventType> </DiskEventSet> <DiskId>d-disk1</DiskId> <InstanceId>i-instance1</InstanceId> <HealthStatus> <Code>128</Code> <Name>Impaired</Name> </HealthStatus> <Status> <Code>129</Code> <Name>Available</Name> </Status> </DiskFullStatusType> <DiskFullStatusType> <DiskEventSet> <DiskEventType> <EventId>e-event2</EventId> <EventType> <Code>1</Code> <Name>Degraded</Name> </EventType> <EventTime>2018-05-06T02:43:10Z</EventTime> <EventEndTime>2018-05-06T02:48:52Z</EventEndTime> </DiskEventType> </DiskEventSet> <DiskId>d-disk2</DiskId> <InstanceId>i-instance2</InstanceId> <HealthStatus> <Code>64</Code> <Name>Warning</Name> </HealthStatus> <Status> <Code>0</Code> <Name>Ok</Name> </Status> </DiskFullStatusType> </DiskFullStatusSet> <PageNumber>1</PageNumber> <PageSize>10</PageSize> <RequestId>1A8B4B27-8B2D-XXXX-XXXX-0F64DBE4C211</RequestId> <TotalCount>2</TotalCount> </DescribeDisksFullStatusResponse>
JSON格式
{ "DiskFullStatusSet": { "DiskFullStatusType": [ { "DiskEventSet": { "DiskEventType": [ { "EventId": "e-event1", "EventType": { "Code": "7", "Name": "Stalled" }, "EventTime": "2018-05-08T02:43:10Z" } ] }, "DiskId": "d-disk1", "InstanceId": "i-instance1", "HealthStatus": { "Code": 128, "Name": "Impaired" }, "Status": { "Code": 129, "Name": "Available" } }, { "DiskEventSet": { "DiskEventType": [ { "EventId": "e-event2", "EventType": { "Code": "1", "Name": "Degraded" }, "EventTime": "2018-05-06T02:43:10Z", "EventEndTime": "2018-05-06T02:48:52Z" } ] }, "DiskId": "d-disk2", "InstanceId": "i-instance2", "HealthStatus": { "Code": 0, "Name": "Ok" }, "Status": { "Code": 129, "Name": "Available" } } ] }, "PageNumber": 1, "PageSize": 10, "RequestId": "1A8B4B27-8B2D-XXXX-XXXX-0F64DBE4C211", "TotalCount": 2 }
异常返回示例
XML格式
<Error> <RequestId>C38E0D94-C18B-44F3-8C05-6E35BE334086</RequestId> <HostId>ecs.aliyuncs.com</HostId> <Code>MissingParameter</Code> <Message>The input parameter that is mandatory for processing this request is not supplied.</Message> </Error>
JSON格式
{ "RequestId": "1A8B4B27-8B2D-XXXX-XXXX-0F64DBE4C211", "HostId": "ecs.aliyuncs.com" "Code": "MissingParameter" "Message": "The input parameter that is mandatory for processing this request is not supplied." }
错误码
以下为本接口特有的错误码。更多错误码,请访问API错误中心。
以上是如何查询一块或多块磁盘的全部状态信息的详细内容。更多信息请关注PHP中文网其他相关文章!