DescribeSecurityGroups
Description
Returns information about security groups that you own.
Request Parameters
| Name | Description | Required |
|---|---|---|
|
Type: |
Ancestor: None
Children: securityGroupSet
securityGroupSet
Set of security groups.
Type: DescribeSecurityGroupsSetType
Ancestor: DescribeSecurityGroupsType
Children: item
item
Information for a security group.
Type: DescribeSecurityGroupsSetItemType
Ancestor: securityGroupSet
Children: groupName
groupName
Name of the security group.
Type: xsd:string
Default: Describes all groups within the account.
Ancestor: item
Children: None
No
Response Elements
| Name | Description |
|---|---|
|
|
Type: DescribeSecurityGroupsResponseType Ancestor: None Children: |
|
The ID of the request. Type: xsd:string Ancestor: Children: None |
|
Security group set. Type: SecurityGroupSetType Ancestor: Children: |
|
Information for a security group. Type: SecurityGroupItemType Ancestor: Children: |
|
AWS Access Key ID of the owner of the security group. Type: xsd:string Ancestor: Children: None |
|
Name of the security group. Type: xsd:string Ancestor: Children: None |
|
Description of the security group. Type: xsd:string Ancestor: Children: None |
|
Set of IP permissions associated with the security group. Type: IpPermissionSetType Ancestor: Children: |
|
Set of IP permissions. Type: IpPermissionType Ancestor: Children: |
|
IP protocol. Type: xsd:string Valid Values: Ancestor: Children: None |
|
Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number). Type: xsd:int Ancestor: Children: None |
|
End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code). Type: xsd:int Ancestor: Children: None |
|
List of security group and user ID pairs. Type: UserIdGroupPairSetType Ancestor: Children: |
|
Information for one security group. Type: UserIdGroupPairType Ancestor: Children: |
|
AWS User ID of an account. Cannot be used when specifying a CIDR IP address. Type: xsd:string Ancestor: Children: None |
|
Name of the security group. Cannot be used when specifying a CIDR IP address. Type: xsd:string Ancestor: Children: None |
|
IP ranges. Type: IpRangeSetType Ancestor: Children: |
|
Information for one IP range. Type: IpRangeItemType Ancestor: Children: |
|
CIDR range. Type: xsd:string Ancestor: Children: None |
Examples
Example Request
This example returns information about two security groups that are configured for the account.
<DescribeSecurityGroups xmlns="http://ec2.amazonaws.com/doc/2009-10-31/">
<securityGroupSet>
<item>
<groupName>WebServers</groupName>
</item>
<item>
<groupName>RangedPortsBySource</groupName>
</item>
</securityGroupSet>
</DescribeSecurityGroups>
Example Response
<DescribeSecurityGroupsResponse xmlns="http://ec2.amazonaws.com/doc/2009-10-31/">
<securityGroupInfo>
<item>
<ownerId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</ownerId>
<groupName>WebServers</groupName>
<groupDescription>Web Servers</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>Group A</groupDescription>
<ipPermissions>
<item>
<ipProtocol>tcp</ipProtocol>
<fromPort>6000</fromPort>
<toPort>7000</toPort>
<groups/>
<ipRanges/>
</item>
</ipPermissions>
</item>
</securityGroupInfo>
</DescribeSecurityGroupsResponse>