AWS Resource Groups
API Reference (API Version 2017-11-27)


Returns a list of existing resource groups in your account.

Request Syntax

POST /groups-list?maxResults=MaxResults&nextToken=NextToken HTTP/1.1 Content-type: application/json { "Filters": [ { "Name": "string", "Values": [ "string" ] } ] }

URI Request Parameters

The request requires the following URI parameters.


The maximum number of resource group results that are returned by ListGroups in paginated output. By default, this number is 50.

Valid Range: Minimum value of 1. Maximum value of 50.


The NextToken value that is returned in a paginated ListGroups request. To get the next page of results, run the call again, add the NextToken parameter, and specify the NextToken value.

Request Body

The request accepts the following data in JSON format.


Filters, formatted as GroupFilter objects, that you want to apply to a ListGroups operation.

  • resource-type - Filter groups by resource type. Specify up to five resource types in the format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.

Type: Array of GroupFilter objects

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "GroupIdentifiers": [ { "GroupArn": "string", "GroupName": "string" } ], "Groups": [ { "Description": "string", "GroupArn": "string", "Name": "string" } ], "NextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


A list of GroupIdentifier objects. Each identifier is an object that contains both the GroupName and the GroupArn.

Type: Array of GroupIdentifier objects


This parameter has been deprecated.

A list of resource groups.

Type: Array of Group objects


The NextToken value to include in a subsequent ListGroups request, to get more results.

Type: String


For information about the errors that are common to all actions, see Common Errors.


The request does not comply with validation rules that are defined for the request parameters.

HTTP Status Code: 400


The caller is not authorized to make the request.

HTTP Status Code: 403


An internal error occurred while processing the request.

HTTP Status Code: 500


The request uses an HTTP method which is not allowed for the specified resource.

HTTP Status Code: 405


The caller has exceeded throttling limits.

HTTP Status Code: 429


Sample Request

POST /groups-list?maxResults=25&nextToken=NeyJNYXJrZXIiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAxfQ== HTTP/1.1

Sample Response

HTTP/1.1 200 Content-type: application/json { "Groups": [ { "Description": "Resources used in testing and production stage of development", "GroupArn": "arn:aws:resource-groups:us-west-2:123456789012:group/TestGroup", "Name": "TestGroup" } ], "NextToken": "eyJNYXJrZXIiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAxfQ==" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: