AWS Resource Groups

2018/10/16 - AWS Resource Groups - 1 updated api methods

Changes  AWS Resource Groups service added a new feature to filter resource groups by resource-type when using the ListGroups operation.

ListGroups (updated) Link ΒΆ
Changes (request, response)
Request
{'Filters': [{'Name': 'resource-type', 'Values': ['string']}]}
Response
{'GroupIdentifiers': [{'GroupArn': 'string', 'GroupName': 'string'}]}

Returns a list of existing resource groups in your account.

See also: AWS API Documentation

Request Syntax

client.list_groups(
    Filters=[
        {
            'Name': 'resource-type',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
type Filters

list

param Filters

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

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

  • (dict) --

    A filter name and value pair that is used to obtain more specific results from a list of groups.

    • 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) --

type MaxResults

integer

param MaxResults

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

type NextToken

string

param NextToken

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.

rtype

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 GroupName and the GroupArn.

      • (dict) --

        The ARN and group name of a group.

        • GroupName (string) --

          The name of a resource group.

        • GroupArn (string) --

          The ARN of a resource group.

    • Groups (list) --

      A list of resource groups.

      • (dict) --

        A resource group.

        • GroupArn (string) --

          The ARN of a resource group.

        • Name (string) --

          The name of a resource group.

        • Description (string) --

          The description of the resource group.

    • NextToken (string) --

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