DescribeSecurityGroups
The DescribeSecurityGroups
operation returns
information about security groups that you own.
If you specify security group names, information about those security group is returned. Otherwise, information for all security group is returned. If you specify a group that does not exist, a fault is returned.
Request Parameters
The following table describes the request parameters for
DescribeSecurityGroups
. Parameter names are case
sensitive.
Name | Description | Required |
---|---|---|
|
List of security groups to describe. Type: xsd:string[] |
Yes |
Response Elements
The following table describes the default response tags included
in DescribeSecurityGroups
responses.
Name | Description |
---|---|
|
Information about security groups. Type: SecurityGroupItemType[] |
Sample Request
<DescribeSecurityGroups xmlns="http://ec2.amazonaws.com/doc/2008-12-01"> <securityGroupSet> <item> <groupName>WebServers</groupName> </item> <item> <groupName>RangedPortsBySource</groupName> </item> </securityGroupSet> </DescribeSecurityGroups>
Sample Response
<DescribeSecurityGroupsResponse xmlns="http://ec2.amazonaws.com/doc/2008-12-01"> <securityGroupInfo> <item> <ownerId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</ownerId> <groupName>WebServers</groupName> <groupDescription>Web</groupDescription> <ipPermissions> <item> <ipProtocol>tcp</ipProtocol> <fromPort>80</fromPort> <toPort>80</toPort> <groups/> <ipRanges> <item> <cidrIp>0.0.0.0/0</cidrIp> </item> </ipRanges> </item> </ipPermissions> </item> <item> <ownerId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</ownerId> <groupName>RangedPortsBySource</groupName> <groupDescription>A</groupDescription> <ipPermissions> <item> <ipProtocol>tcp</ipProtocol> <fromPort>6000</fromPort> <toPort>7000</toPort> <groups/> <ipRanges/> </item> </ipPermissions> </item> </securityGroupInfo> </DescribeSecurityGroupsResponse>