'Get all security groups associated with your account in a region.
:type groupnames: list
:param groupnames: A list of the names of security groups to retrieve.
If not provided, all security groups will be
returned.
:type group_ids: list
:param group_ids: A list of IDs of security groups to retrieve for
security groups within a VPC.
:type filters: dict
:param filters: Optional filters that can be used to limit
the results returned.  Filters are provided
in the form of a dictionary consisting of
filter names as the key and filter values
as the value.  The set of allowable filter
names/values is dependent on the request
being performed.  Check the EC2 API guide
for details.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: list
:return: A list of :class:`boto.ec2.securitygroup.SecurityGroup`'

def get_all_security_groups(self, groupnames=None, group_ids=None, filters=None, dry_run=False):

    params = {}
    if (groupnames is not None):
        self.build_list_params(params, groupnames, 'GroupName')
    if (group_ids is not None):
        self.build_list_params(params, group_ids, 'GroupId')
    if (filters is not None):
        self.build_filter_params(params, filters)
    if dry_run:
        params['DryRun'] = 'true'
    return self.get_list('DescribeSecurityGroups', params, [('item', SecurityGroup)], verb='POST')
