本文在介紹如何查詢一塊或多塊磁碟的全部狀態資訊的基礎上,重點探討了其具體步驟,本文內容緊湊,希望大家可以有所收穫。
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>
{
"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中文網其他相關文章!