本接口用于查询一个或多个指定安全组已经被授权的其他安全组列表信息。
接口说明
当您无法删除某一安全组( 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 |
其他安全组所属用户 ID。 |
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 是否正确。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。