調用DescribeSecurityGroups查詢已建立的安全性群組的基本資料。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ens:DescribeSecurityGroups |
list |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| SecurityGroupId |
string |
否 |
安全性群組 ID。 |
sg-bp67acfmxazb4ph*** |
| SecurityGroupName |
string |
否 |
安全性群組名稱。 |
DocTest |
| PageSize |
integer |
否 |
分頁查詢時設定的每頁行數。
|
10 |
| PageNumber |
integer |
否 |
安全性群組列表的頁碼。
|
1 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| PageSize |
integer |
分頁查詢時設定的每頁行數。 |
10 |
| PageNumber |
integer |
安全性群組列表的頁碼。 |
1 |
| TotalCount |
integer |
分頁查詢時分頁總頁數。 |
49 |
| SecurityGroups |
object |
||
| SecurityGroup |
array<object> |
安全性群組。 |
|
|
array<object> |
|||
| CreationTime |
string |
建立時間。按照 ISO8601 標準表示,並需要使用 UTC 時間。格式為 yyyy-MM-ddTHH:mm:ssZ。 |
2019-11-01T06:08:46Z |
| InstanceCount |
integer |
關聯執行個體數量。 |
5 |
| Description |
string |
安全性群組描述資訊。 |
TestDescription |
| SecurityGroupId |
string |
安全性群組 ID。 |
sg-bp67acfmxazb4ph*** |
| SecurityGroupName |
string |
安全性群組名稱。 |
DocTest |
| InstanceIds |
object |
||
| InstanceId |
array |
安全性群組綁定的執行個體 ID 列表。 |
|
|
string |
執行個體 ID。 |
i-5**** |
|
| NetworkInterfaceIds |
object |
||
| NetworkInterfaceId |
array |
安全性群組綁定的彈性網卡 ID 列表。 |
|
|
string |
彈性網卡 ID。 |
eni-5**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PageSize": 10,
"PageNumber": 1,
"TotalCount": 49,
"SecurityGroups": {
"SecurityGroup": [
{
"CreationTime": "2019-11-01T06:08:46Z",
"InstanceCount": 5,
"Description": "TestDescription",
"SecurityGroupId": "sg-bp67acfmxazb4ph***",
"SecurityGroupName": "DocTest",
"InstanceIds": {
"InstanceId": [
"i-5****"
]
},
"NetworkInterfaceIds": {
"NetworkInterfaceId": [
"eni-5****"
]
}
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | NoPermission | Permission denied. | |
| 400 | CallInterface | Call Interface Happen Error. | 介面調用出錯。 |
| 400 | ens.interface.error | Failed to call API. | 介面調用發生異常。 |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。