调用DescribeSecurityGroupReferences查询一个安全组和其他哪些安全组有安全组级别的授权行为。
接口说明
调用该接口时,您需要注意:
- 授权行为包括入方向授权和出方向授权。
- 该接口单次最多返回100条记录。
- 当您无法删除某一安全组(DeleteSecurityGroup)时,可以调用该接口查看指定的安全组是否已被其他安全组授权。如果指定的安全组已被授权,您需要在删除该安全组之前解除授权行为。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeSecurityGroupReferences |
系统规定参数。取值:DescribeSecurityGroupReferences。 |
RegionId | String | 是 | cn-hangzhou |
安全组所属地域。 |
SecurityGroupId.N | String | 是 | sg-bp14vtedjtobkvi**** |
要查询的第N个SecurityGroupId。N的取值范围:1~10。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
请求ID。 |
SecurityGroupReferences | Array of SecurityGroupReference |
所有用户指定的安全组被授权的完整信息。 |
|
SecurityGroupReference | |||
SecurityGroupId | String | sg-bp67acfmxazb4p**** |
对应用户要查询的一个安全组。 |
ReferencingSecurityGroups | Array of ReferencingSecurityGroup |
正在授权给这个安全组的其他安全组信息。 |
|
ReferencingSecurityGroup | |||
SecurityGroupId | String | sg-bp67acfmxazb4j**** |
安全组ID。 |
AliUid | String | 123456**** |
这个安全组所属用户ID。 |
示例
请求示例
http(s)://ecs.aliyuncs.com/?Action=DescribeSecurityGroupReferences
&RegionId=cn-hangzhou
&SecurityGroupId.1=sg-bp14vtedjtobkvi****
&
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
CEF72CEB-54B6-4AE8-B225-F876FF7B****
sg-bp67acfmxazb4ph****
123456****
sg-bp67acfmxazb4pi****
1234567890
sg-bp67acfmxazb4pj****
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "CEF72CEB-54B6-4AE8-B225-F876FF7B****",
"SecurityGroupReferences" : [ {
"SecurityGroupId" : "sg-bp67acfmxazb4ph****",
"SecurityReferencingGroups" : [ {
"AliUid" : "123456****",
"SecurityGroupId" : "sg-bp67acfmxazb4pi****"
}, {
"AliUid" : "1234567890",
"SecurityGroupId" : "sg-bp67acfmxazb4pj****"
} ]
} ]
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidSecurityGroupId.Malformed | The specified parameter SecurityGroupId is essential and size should less than 10 | 参数 SecurityGroupId 不能为空,且要查询的个数不能大于 10 个。 |
404 | InvalidSecurityGroupId.NotFound | The SecurityGroupId provided does not exist in our records. | 指定的安全组在该用户账号下不存在,请您检查安全组 ID 是否正确。 |
访问错误中心查看更多错误码。
腾讯云1折,限时活动,即将结束: 马上收藏
同尘科技为腾讯云授权服务中心。
购买腾讯云产品享受折上折,更有现金返利。同意关联立享优惠
转转请注明出处:https://www.yunxiaoer.com/153282.html