AWS Resource Groups

2018/08/02 - AWS Resource Groups - 1 updated api methods

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

ListGroupResources (updated) Link ΒΆ
Changes (request)
{'Filters': [{'Name': 'resource-type', 'Values': ['string']}]}

Returns a list of ARNs of resources that are members of a specified resource group.

See also: AWS API Documentation

Request Syntax

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

string

param GroupName

[REQUIRED]

The name of the resource group.

type Filters

list

param Filters

Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources operation.

  • resource-type - Filter resources by their type. Specify up to five resource 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 resources.

    • 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 resource filter name, and are case-sensitive.

      • (string) --

type MaxResults

integer

param MaxResults

The maximum number of group member ARNs that are returned in a single call by ListGroupResources, in paginated output. By default, this number is 50.

type NextToken

string

param NextToken

The NextToken value that is returned in a paginated ListGroupResources 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

{
    'ResourceIdentifiers': [
        {
            'ResourceArn': 'string',
            'ResourceType': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ResourceIdentifiers (list) --

      The ARNs and resource types of resources that are members of the group that you specified.

      • (dict) --

        The ARN of a resource, and its resource type.

        • ResourceArn (string) --

          The ARN of a resource.

        • ResourceType (string) --

          The resource type of a resource, such as AWS::EC2::Instance .

    • NextToken (string) --

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