amazonka-ec2-1.3.2: Amazon Elastic Compute Cloud SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.EC2.DescribeSecurityGroups

Contents

Description

Describes one or more of your security groups.

A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide.

See: AWS API Reference for DescribeSecurityGroups.

Synopsis

Creating a Request

describeSecurityGroups :: DescribeSecurityGroups Source

Creates a value of DescribeSecurityGroups with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

dsgsFilters :: Lens' DescribeSecurityGroups [Filter] Source

One or more filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.

  • description - The description of the security group.
  • 'egress.ip-permission.prefix-list-id' - The ID (prefix) of the AWS service to which the security group allows access.
  • 'group-id' - The ID of the security group.
  • 'group-name' - The name of the security group.
  • 'ip-permission.cidr' - A CIDR range that has been granted permission.
  • 'ip-permission.from-port' - The start of port range for the TCP and UDP protocols, or an ICMP type number.
  • 'ip-permission.group-id' - The ID of a security group that has been granted permission.
  • 'ip-permission.group-name' - The name of a security group that has been granted permission.
  • 'ip-permission.protocol' - The IP protocol for the permission (tcp | udp | icmp or a protocol number).
  • 'ip-permission.to-port' - The end of port range for the TCP and UDP protocols, or an ICMP code.
  • 'ip-permission.user-id' - The ID of an AWS account that has been granted permission.
  • 'owner-id' - The AWS account ID of the owner of the security group.
  • 'tag-key' - The key of a tag assigned to the security group.
  • 'tag-value' - The value of a tag assigned to the security group.
  • 'vpc-id' - The ID of the VPC specified when the security group was created.

dsgsGroupNames :: Lens' DescribeSecurityGroups [Text] Source

EC2-Classic and default VPC only
One or more security group names. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, use the 'group-name' filter to describe security groups by name.

Default: Describes all your security groups.

dsgsGroupIds :: Lens' DescribeSecurityGroups [Text] Source

One or more security group IDs. Required for security groups in a nondefault VPC.

Default: Describes all your security groups.

dsgsDryRun :: Lens' DescribeSecurityGroups (Maybe Bool) Source

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Destructuring the Response

describeSecurityGroupsResponse Source

Creates a value of DescribeSecurityGroupsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Response Lenses

dsgrsSecurityGroups :: Lens' DescribeSecurityGroupsResponse [SecurityGroup] Source

Information about one or more security groups.