Home > Article > Operation and Maintenance > How to query a security group and which other security groups have security group-level authorization behaviors
The content of this article is about how to query a security group and which other security groups have security group-level authorization behaviors. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. helped.
DescribeSecurityGroupReferences
Query a security group and which other security groups have security group-level authorization behaviors.
Description
When calling this interface, you need to pay attention to:
Authorization behavior includes inbound authorization and outbound authorization .
This interface can return up to 100 records at a time.
When you cannot delete a security group (DeleteSecurityGroup), you can call this interface to check whether the specified security group has been authorized by other security groups. If the specified security group has been authorized, you need to deauthorize it before deleting the security group.
Request parameters
##Return parameters
Example
Request Example
https://ecs.aliyuncs.com/?Action=DescribeSecurityGroupReferences &RegionId=cn-hangzhou &SecurityGroupId.1=sg-1133aa &<公共请求参数>
Return example
XML format
<DescribeSecurityGroupReferencesResponse> <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId> <SecurityGroupReferences> <SecurityGroupReference> <SecurityGroupId>sg-1133aa</SecurityGroupId> <ReferencingSecurityGroups> <ReferencingSecurityGroup> <SecurityGroupId>sg-2255cc</SecurityGroupId> <AliUid>123</AliUid> </ReferencingSecurityGroup> <ReferencingSecurityGroup> <SecurityGroupId>sg-2255dd</SecurityGroupId> <AliUid>123</AliUid> </ReferencingSecurityGroup> </ReferencingSecurityGroups> </SecurityGroupReference> </SecurityGroupReferences> </DescribeSecurityGroupReferencesResponse>
JSON format
{ "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984" "SecurityGroupReferences":[ { "SecurityGroupId":"sg-1133aa", "SecurityReferencingGroups":[ { "AliUid":123, "SecurityGroupId":"sg-2255cc" }, { "AliUid":123, "SecurityGroupId":"sg-2255dd" } ] } ] }
Error code
The following are error codes unique to this interface. For more error codes, please visit the API Error Center.The above is the detailed content of How to query a security group and which other security groups have security group-level authorization behaviors. For more information, please follow other related articles on the PHP Chinese website!