本介面用於查詢一個或多個指定安全性群組已經被授權的其他安全性群組列表資訊。
介面說明
當您無法刪除某一安全性群組( DeleteSecurityGroup )時,可以調用該介面查看指定的安全性群組是否已被其他安全性群組授權。如果指定的安全性群組已被授權,您可以通過 RevokeSecurityGroup 和 RevokeSecurityGroupEgress 刪除對應的安全性群組規則來解除授權行為。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:DescribeSecurityGroupReferences |
get |
*SecurityGroup
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
安全性群組所屬地區 ID。您可以調用 DescribeRegions 查看最新的阿里雲地區列表。 |
cn-hangzhou |
| SecurityGroupId |
array |
是 |
安全性群組 ID 數組。數組長度:0~10。 |
sg-bp14vtedjtobkvi**** |
|
string |
否 |
安全性群組 ID。 |
sg-bp14vtedjtobkvi**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| SecurityGroupReferences |
object |
||
| SecurityGroupReference |
array<object> |
安全性群組和被授權的安全性群組資訊集合。 |
|
|
array<object> |
安全性群組和被授權的安全性群組資訊。 |
||
| SecurityGroupId |
string |
安全性群組 ID。 |
sg-bp67acfmxazb4p**** |
| ReferencingSecurityGroups |
object |
||
| ReferencingSecurityGroup |
array<object> |
正在授權給這個安全性群組的其他安全性群組資訊集合。 |
|
|
object |
正在授權給這個安全性群組的其他安全性群組資訊。 |
||
| SecurityGroupId |
string |
其他安全性群組 ID。 |
sg-bp67acfmxazb4j**** |
| AliUid |
string |
其他安全性群組所屬使用者識別碼。 |
123456**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"SecurityGroupReferences": {
"SecurityGroupReference": [
{
"SecurityGroupId": "sg-bp67acfmxazb4p****",
"ReferencingSecurityGroups": {
"ReferencingSecurityGroup": [
{
"SecurityGroupId": "sg-bp67acfmxazb4j****",
"AliUid": "123456****"
}
]
}
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidSecurityGroupId.Malformed | The specified parameter SecurityGroupId is essential and size should less than 10 | 參數 SecurityGroupId 不可為空,且要查詢的個數不能大於 10 個。 |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | 地區資訊錯誤 |
| 404 | InvalidSecurityGroupId.NotFound | The SecurityGroupId provided does not exist in our records. | 指定的安全性群組在該使用者帳號下不存在,請您檢查安全性群組 ID 是否正確。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。