ResourceGroups / Client / list_groups
list_groups#
- ResourceGroups.Client.list_groups(**kwargs)#
- Returns a list of existing Resource Groups in your account. - Minimum permissions- To run this command, you must have the following permissions: - resource-groups:ListGroups
 - See also: AWS API Documentation - Request Syntax- response = client.list_groups( Filters=[ { 'Name': 'resource-type'|'configuration-type', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' ) - Parameters:
- Filters (list) – - Filters, formatted as GroupFilter objects, that you want to apply to a - ListGroupsoperation.- resource-type- Filter the results to include only those resource groups that have the specified resource type in their- ResourceTypeFilter. For example,- AWS::EC2::Instancewould return any resource group with a- ResourceTypeFilterthat includes- AWS::EC2::Instance.
- configuration-type- Filter the results to include only those groups that have the specified configuration types attached. The current supported values are:- AWS::AppRegistry::Application
- AWS::AppRegistry::ApplicationResourceGroups
- AWS::CloudFormation::Stack
- AWS::EC2::CapacityReservationPool
- AWS::EC2::HostManagement
- AWS::NetworkFirewall::RuleGroup
 
 - (dict) – - A filter collection that you can use to restrict the results from a - Listoperation to only those you want to include.- Name (string) – [REQUIRED] - The name of the filter. Filter names are case-sensitive. 
- Values (list) – [REQUIRED] - One or more filter values. Allowed filter values vary by group filter name, and are case-sensitive. - (string) – 
 
 
 
- MaxResults (integer) – The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the - NextTokenresponse element is present and has a value (is not null). Include that value as the- NextTokenrequest parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check- NextTokenafter every operation to ensure that you receive all of the results.
- NextToken (string) – The parameter for receiving additional results if you receive a - NextTokenresponse in a previous request. A- NextTokenresponse indicates that more output is available. Set this parameter to the value provided by a previous call’s- NextTokenresponse to indicate where the output should continue from.
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'GroupIdentifiers': [ { 'GroupName': 'string', 'GroupArn': 'string' }, ], 'Groups': [ { 'GroupArn': 'string', 'Name': 'string', 'Description': 'string' }, ], 'NextToken': 'string' } - Response Structure- (dict) – - GroupIdentifiers (list) – - A list of GroupIdentifier objects. Each identifier is an object that contains both the - Nameand the- GroupArn.- (dict) – - The unique identifiers for a resource group. - GroupName (string) – - The name of the resource group. 
- GroupArn (string) – - The ARN of the resource group. 
 
 
- Groups (list) – - Warning- Deprecated - don’t use this field. Use the - GroupIdentifiersresponse field instead.- (dict) – - A resource group that contains Amazon Web Services resources. You can assign resources to the group by associating either of the following elements with the group: - ResourceQuery - Use a resource query to specify a set of tag keys and values. All resources in the same Amazon Web Services Region and Amazon Web Services account that have those keys with the same values are included in the group. You can add a resource query when you create the group, or later by using the PutGroupConfiguration operation. 
- GroupConfiguration - Use a service configuration to associate the group with an Amazon Web Services service. The configuration specifies which resource types can be included in the group. 
 - GroupArn (string) – - The ARN of the resource group. 
- Name (string) – - The name of the resource group. 
- Description (string) – - The description of the resource group. 
 
 
- NextToken (string) – - If present, indicates that more output is available than is included in the current response. Use this value in the - NextTokenrequest parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the- NextTokenresponse element comes back as- null.
 
 
 - Exceptions- ResourceGroups.Client.exceptions.BadRequestException
- ResourceGroups.Client.exceptions.ForbiddenException
- ResourceGroups.Client.exceptions.MethodNotAllowedException
- ResourceGroups.Client.exceptions.TooManyRequestsException
- ResourceGroups.Client.exceptions.InternalServerErrorException