AWS Resource Groups

2024/10/01 - AWS Resource Groups - 5 new 5 updated api methods

Changes  This update includes new APIs to support application groups and to allow users to manage resource tag-sync tasks in applications.

StartTagSyncTask (new) Link ¶

Creates a new tag-sync task to onboard and sync resources tagged with a specific tag key-value pair to an application.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:StartTagSyncTask on the application group

  • resource-groups:CreateGroup

  • iam:PassRole on the role provided in the request

See also: AWS API Documentation

Request Syntax

client.start_tag_sync_task(
    Group='string',
    TagKey='string',
    TagValue='string',
    RoleArn='string'
)
type Group

string

param Group

[REQUIRED]

The Amazon resource name (ARN) or name of the application group for which you want to create a tag-sync task.

type TagKey

string

param TagKey

[REQUIRED]

The tag key. Resources tagged with this tag key-value pair will be added to the application. If a resource with this tag is later untagged, the tag-sync task removes the resource from the application.

type TagValue

string

param TagValue

[REQUIRED]

The tag value. Resources tagged with this tag key-value pair will be added to the application. If a resource with this tag is later untagged, the tag-sync task removes the resource from the application.

type RoleArn

string

param RoleArn

[REQUIRED]

The Amazon resource name (ARN) of the role assumed by the service to tag and untag resources on your behalf.

rtype

dict

returns

Response Syntax

{
    'GroupArn': 'string',
    'GroupName': 'string',
    'TaskArn': 'string',
    'TagKey': 'string',
    'TagValue': 'string',
    'RoleArn': 'string'
}

Response Structure

  • (dict) --

    • GroupArn (string) --

      The Amazon resource name (ARN) of the application group for which you want to add or remove resources.

    • GroupName (string) --

      The name of the application group to onboard and sync resources.

    • TaskArn (string) --

      The Amazon resource name (ARN) of the new tag-sync task.

    • TagKey (string) --

      The tag key of the tag-sync task.

    • TagValue (string) --

      The tag value of the tag-sync task.

    • RoleArn (string) --

      The Amazon resource name (ARN) of the role assumed by the service to tag and untag resources on your behalf.

GetTagSyncTask (new) Link ¶

Returns information about a specified tag-sync task.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:GetTagSyncTask on the application group

See also: AWS API Documentation

Request Syntax

client.get_tag_sync_task(
    TaskArn='string'
)
type TaskArn

string

param TaskArn

[REQUIRED]

The Amazon resource name (ARN) of the tag-sync task.

rtype

dict

returns

Response Syntax

{
    'GroupArn': 'string',
    'GroupName': 'string',
    'TaskArn': 'string',
    'TagKey': 'string',
    'TagValue': 'string',
    'RoleArn': 'string',
    'Status': 'ACTIVE'|'ERROR',
    'ErrorMessage': 'string',
    'CreatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • GroupArn (string) --

      The Amazon resource name (ARN) of the application group.

    • GroupName (string) --

      The name of the application group.

    • TaskArn (string) --

      The Amazon resource name (ARN) of the tag-sync task.

    • TagKey (string) --

      The tag key.

    • TagValue (string) --

      The tag value.

    • RoleArn (string) --

      The Amazon resource name (ARN) of the role assumed by Resource Groups to tag and untag resources on your behalf.

      For more information about this role, review Tag-sync required permissions.

    • Status (string) --

      The status of the tag-sync task.

      Valid values include:

      • ACTIVE - The tag-sync task is actively managing resources in the application by adding or removing the awsApplication tag from resources when they are tagged or untagged with the specified tag key-value pair.

      • ERROR - The tag-sync task is not actively managing resources in the application. Review the ErrorMessage for more information about resolving the error.

    • ErrorMessage (string) --

      The specific error message in cases where the tag-sync task status is ERROR .

    • CreatedAt (datetime) --

      The timestamp of when the tag-sync task was created.

ListTagSyncTasks (new) Link ¶

Returns a list of tag-sync tasks.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:ListTagSyncTasks with the group passed in the filters as the resource or * if using no filters

See also: AWS API Documentation

Request Syntax

client.list_tag_sync_tasks(
    Filters=[
        {
            'GroupArn': 'string',
            'GroupName': 'string'
        },
    ],
    MaxResults=123,
    NextToken='string'
)
type Filters

list

param Filters

The Amazon resource name (ARN) or name of the application group for which you want to return a list of tag-sync tasks.

  • (dict) --

    Returns tag-sync tasks filtered by the Amazon resource name (ARN) or name of a specified application group.

    • GroupArn (string) --

      The Amazon resource name (ARN) of the application group.

    • GroupName (string) --

      The name of the application group.

type MaxResults

integer

param MaxResults

The maximum number of results to be included in the response.

type NextToken

string

param NextToken

The parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value provided by a previous call's NextToken response to indicate where the output should continue from.

rtype

dict

returns

Response Syntax

{
    'TagSyncTasks': [
        {
            'GroupArn': 'string',
            'GroupName': 'string',
            'TaskArn': 'string',
            'TagKey': 'string',
            'TagValue': 'string',
            'RoleArn': 'string',
            'Status': 'ACTIVE'|'ERROR',
            'ErrorMessage': 'string',
            'CreatedAt': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TagSyncTasks (list) --

      A list of tag-sync tasks and information about each task.

      • (dict) --

        The Amazon resource name (ARN) of the tag-sync task.

        • GroupArn (string) --

          The Amazon resource name (ARN) of the application group.

        • GroupName (string) --

          The name of the application group.

        • TaskArn (string) --

          The Amazon resource name (ARN) of the tag-sync task.

        • TagKey (string) --

          The tag key.

        • TagValue (string) --

          The tag value.

        • RoleArn (string) --

          The Amazon resource name (ARN) of the role assumed by the service to tag and untag resources on your behalf.

        • Status (string) --

          The status of the tag-sync task.

          Valid values include:

          • ACTIVE - The tag-sync task is actively managing resources in the application by adding or removing the awsApplication tag from resources when they are tagged or untagged with the specified tag key-value pair.

          • ERROR - The tag-sync task is not actively managing resources in the application. Review the ErrorMessage for more information about resolving the error.

        • ErrorMessage (string) --

          The specific error message in cases where the tag-sync task status is Error .

        • CreatedAt (datetime) --

          The timestamp of when the tag-sync task was created.

    • NextToken (string) --

      If present, indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null .

ListGroupingStatuses (new) Link ¶

Returns the status of the last grouping or ungrouping action for each resource in the specified application group.

See also: AWS API Documentation

Request Syntax

client.list_grouping_statuses(
    Group='string',
    MaxResults=123,
    Filters=[
        {
            'Name': 'status'|'resource-arn',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string'
)
type Group

string

param Group

[REQUIRED]

The application group identifier, expressed as an Amazon resource name (ARN) or the application group name.

type MaxResults

integer

param MaxResults

The maximum number of resources and their statuses returned in the response.

type Filters

list

param Filters

The filter name and value pair that is used to return more specific results from a list of resources.

  • (dict) --

    A filter name and value pair that is used to obtain more specific results from the list of grouping statuses.

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

string

param NextToken

The parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value provided by a previous call's NextToken response to indicate where the output should continue from.

rtype

dict

returns

Response Syntax

{
    'Group': 'string',
    'GroupingStatuses': [
        {
            'ResourceArn': 'string',
            'Action': 'GROUP'|'UNGROUP',
            'Status': 'SUCCESS'|'FAILED'|'IN_PROGRESS'|'SKIPPED',
            'ErrorMessage': 'string',
            'ErrorCode': 'string',
            'UpdatedAt': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Group (string) --

      The application group identifier, expressed as an Amazon resource name (ARN) or the application group name.

    • GroupingStatuses (list) --

      Returns details about the grouping or ungrouping status of the resources in the specified application group.

      • (dict) --

        The information about a grouping or ungrouping resource action.

        • ResourceArn (string) --

          The Amazon resource name (ARN) of a resource.

        • Action (string) --

          Describes the resource grouping action with values of GROUP or UNGROUP .

        • Status (string) --

          Describes the resource grouping status with values of SUCCESS , FAILED , IN_PROGRESS , or SKIPPED .

        • ErrorMessage (string) --

          A message that explains the ErrorCode .

        • ErrorCode (string) --

          Specifies the error code that was raised.

        • UpdatedAt (datetime) --

          A timestamp of when the status was last updated.

    • NextToken (string) --

      If present, indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null .

CancelTagSyncTask (new) Link ¶

Cancels the specified tag-sync task.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:CancelTagSyncTask on the application group

  • resource-groups:DeleteGroup

See also: AWS API Documentation

Request Syntax

client.cancel_tag_sync_task(
    TaskArn='string'
)
type TaskArn

string

param TaskArn

[REQUIRED]

The Amazon resource name (ARN) of the tag-sync task.

returns

None

CreateGroup (updated) Link ¶
Changes (request, response)
Request
{'Criticality': 'integer', 'DisplayName': 'string', 'Owner': 'string'}
Response
{'Group': {'ApplicationTag': {'string': 'string'},
           'Criticality': 'integer',
           'DisplayName': 'string',
           'Owner': 'string'}}

Creates a resource group with the specified name and description. You can optionally include either a resource query or a service configuration. For more information about constructing a resource query, see Build queries and groups in Resource Groups in the Resource Groups User Guide . For more information about service-linked groups and service configurations, see Service configurations for Resource Groups.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:CreateGroup

See also: AWS API Documentation

Request Syntax

client.create_group(
    Name='string',
    Description='string',
    ResourceQuery={
        'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0',
        'Query': 'string'
    },
    Tags={
        'string': 'string'
    },
    Configuration=[
        {
            'Type': 'string',
            'Parameters': [
                {
                    'Name': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ]
        },
    ],
    Criticality=123,
    Owner='string',
    DisplayName='string'
)
type Name

string

param Name

[REQUIRED]

The name of the group, which is the identifier of the group in other operations. You can't change the name of a resource group after you create it. A resource group name can consist of letters, numbers, hyphens, periods, and underscores. The name cannot start with AWS , aws , or any other possible capitalization; these are reserved. A resource group name must be unique within each Amazon Web Services Region in your Amazon Web Services account.

type Description

string

param Description

The description of the resource group. Descriptions can consist of letters, numbers, hyphens, underscores, periods, and spaces.

type ResourceQuery

dict

param ResourceQuery

The resource query that determines which Amazon Web Services resources are members of this group. For more information about resource queries, see Create a tag-based group in Resource Groups.

Note

A resource group can contain either a ResourceQuery or a Configuration , but not both.

  • Type (string) -- [REQUIRED]

    The type of the query to perform. This can have one of two values:

    • CLOUDFORMATION_STACK_1_0: Specifies that you want the group to contain the members of an CloudFormation stack. The Query contains a StackIdentifier element with an Amazon resource name (ARN) for a CloudFormation stack.

    • TAG_FILTERS_1_0: Specifies that you want the group to include resource that have tags that match the query.

  • Query (string) -- [REQUIRED]

    The query that defines a group or a search. The contents depends on the value of the Type element.

    • ResourceTypeFilters – Applies to all ResourceQuery objects of either Type . This element contains one of the following two items:

      • The value AWS::AllSupported . This causes the ResourceQuery to match resources of any resource type that also match the query.

      • A list (a JSON array) of resource type identifiers that limit the query to only resources of the specified types. For the complete list of resource types that you can use in the array value for ResourceTypeFilters , see Resources you can use with Resource Groups and Tag Editor in the Resource Groups User Guide .

    Example: "ResourceTypeFilters": ["AWS::AllSupported"] or "ResourceTypeFilters": ["AWS::EC2::Instance", "AWS::S3::Bucket"]

    • TagFilters – applicable only if Type = TAG_FILTERS_1_0 . The Query contains a JSON string that represents a collection of simple tag filters. The JSON string uses a syntax similar to the GetResources operation, but uses only the ResourceTypeFilters and TagFilters fields. If you specify more than one tag key, only resources that match all tag keys, and at least one value of each specified tag key, are returned in your query. If you specify more than one value for a tag key, a resource matches the filter if it has a tag key value that matches any of the specified values. For example, consider the following sample query for resources that have two tags, Stage and Version , with two values each: [{"Stage":["Test","Deploy"]},{"Version":["1","2"]}] The results of this resource query could include the following.

      • An Amazon EC2 instance that has the following two tags: {"Stage":"Deploy"} , and {"Version":"2"}

      • An S3 bucket that has the following two tags: {"Stage":"Test"} , and {"Version":"1"}

    The resource query results would not include the following items in the results, however.

    • An Amazon EC2 instance that has only the following tag: {"Stage":"Deploy"} . The instance does not have all of the tag keys specified in the filter, so it is excluded from the results.

    • An RDS database that has the following two tags: {"Stage":"Archived"} and {"Version":"4"} The database has all of the tag keys, but none of those keys has an associated value that matches at least one of the specified values in the filter.

    Example: "TagFilters": [ { "Key": "Stage", "Values": [ "Gamma", "Beta" ] }

    • StackIdentifier – applicable only if Type = CLOUDFORMATION_STACK_1_0 . The value of this parameter is the Amazon Resource Name (ARN) of the CloudFormation stack whose resources you want included in the group.

type Tags

dict

param Tags

The tags to add to the group. A tag is key-value pair string.

  • (string) --

    • (string) --

type Configuration

list

param Configuration

A configuration associates the resource group with an Amazon Web Services service and specifies how the service can interact with the resources in the group. A configuration is an array of GroupConfigurationItem elements. For details about the syntax of service configurations, see Service configurations for Resource Groups.

Note

A resource group can contain either a Configuration or a ResourceQuery , but not both.

type Criticality

integer

param Criticality

The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.

type Owner

string

param Owner

A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.

type DisplayName

string

param DisplayName

The name of the application group, which you can change at any time.

rtype

dict

returns

Response Syntax

{
    'Group': {
        'GroupArn': 'string',
        'Name': 'string',
        'Description': 'string',
        'Criticality': 123,
        'Owner': 'string',
        'DisplayName': 'string',
        'ApplicationTag': {
            'string': 'string'
        }
    },
    'ResourceQuery': {
        'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0',
        'Query': 'string'
    },
    'Tags': {
        'string': 'string'
    },
    'GroupConfiguration': {
        'Configuration': [
            {
                'Type': 'string',
                'Parameters': [
                    {
                        'Name': 'string',
                        'Values': [
                            'string',
                        ]
                    },
                ]
            },
        ],
        'ProposedConfiguration': [
            {
                'Type': 'string',
                'Parameters': [
                    {
                        'Name': 'string',
                        'Values': [
                            'string',
                        ]
                    },
                ]
            },
        ],
        'Status': 'UPDATING'|'UPDATE_COMPLETE'|'UPDATE_FAILED',
        'FailureReason': 'string'
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      The description of the resource group.

      • GroupArn (string) --

        The Amazon resource name (ARN) of the resource group.

      • Name (string) --

        The name of the resource group.

      • Description (string) --

        The description of the resource group.

      • Criticality (integer) --

        The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.

      • Owner (string) --

        A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.

      • DisplayName (string) --

        The name of the application group, which you can change at any time.

      • ApplicationTag (dict) --

        A tag that defines the application group membership. This tag is only supported for application groups.

        • (string) --

          • (string) --

    • ResourceQuery (dict) --

      The resource query associated with the group. For more information about resource queries, see Create a tag-based group in Resource Groups.

      • Type (string) --

        The type of the query to perform. This can have one of two values:

        • CLOUDFORMATION_STACK_1_0: Specifies that you want the group to contain the members of an CloudFormation stack. The Query contains a StackIdentifier element with an Amazon resource name (ARN) for a CloudFormation stack.

        • TAG_FILTERS_1_0: Specifies that you want the group to include resource that have tags that match the query.

      • Query (string) --

        The query that defines a group or a search. The contents depends on the value of the Type element.

        • ResourceTypeFilters – Applies to all ResourceQuery objects of either Type . This element contains one of the following two items:

          • The value AWS::AllSupported . This causes the ResourceQuery to match resources of any resource type that also match the query.

          • A list (a JSON array) of resource type identifiers that limit the query to only resources of the specified types. For the complete list of resource types that you can use in the array value for ResourceTypeFilters , see Resources you can use with Resource Groups and Tag Editor in the Resource Groups User Guide .

        Example: "ResourceTypeFilters": ["AWS::AllSupported"] or "ResourceTypeFilters": ["AWS::EC2::Instance", "AWS::S3::Bucket"]

        • TagFilters – applicable only if Type = TAG_FILTERS_1_0 . The Query contains a JSON string that represents a collection of simple tag filters. The JSON string uses a syntax similar to the GetResources operation, but uses only the ResourceTypeFilters and TagFilters fields. If you specify more than one tag key, only resources that match all tag keys, and at least one value of each specified tag key, are returned in your query. If you specify more than one value for a tag key, a resource matches the filter if it has a tag key value that matches any of the specified values. For example, consider the following sample query for resources that have two tags, Stage and Version , with two values each: [{"Stage":["Test","Deploy"]},{"Version":["1","2"]}] The results of this resource query could include the following.

          • An Amazon EC2 instance that has the following two tags: {"Stage":"Deploy"} , and {"Version":"2"}

          • An S3 bucket that has the following two tags: {"Stage":"Test"} , and {"Version":"1"}

        The resource query results would not include the following items in the results, however.

        • An Amazon EC2 instance that has only the following tag: {"Stage":"Deploy"} . The instance does not have all of the tag keys specified in the filter, so it is excluded from the results.

        • An RDS database that has the following two tags: {"Stage":"Archived"} and {"Version":"4"} The database has all of the tag keys, but none of those keys has an associated value that matches at least one of the specified values in the filter.

        Example: "TagFilters": [ { "Key": "Stage", "Values": [ "Gamma", "Beta" ] }

        • StackIdentifier – applicable only if Type = CLOUDFORMATION_STACK_1_0 . The value of this parameter is the Amazon Resource Name (ARN) of the CloudFormation stack whose resources you want included in the group.

    • Tags (dict) --

      The tags associated with the group.

      • (string) --

        • (string) --

    • GroupConfiguration (dict) --

      The service configuration associated with the resource group. For details about the syntax of a service configuration, see Service configurations for Resource Groups.

      • Configuration (list) --

        The configuration currently associated with the group and in effect.

      • ProposedConfiguration (list) --

        If present, the new configuration that is in the process of being applied to the group.

      • Status (string) --

        The current status of an attempt to update the group configuration.

      • FailureReason (string) --

        If present, the reason why a request to update the group configuration failed.

DeleteGroup (updated) Link ¶
Changes (response)
{'Group': {'ApplicationTag': {'string': 'string'},
           'Criticality': 'integer',
           'DisplayName': 'string',
           'Owner': 'string'}}

Deletes the specified resource group. Deleting a resource group does not delete any resources that are members of the group; it only deletes the group structure.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:DeleteGroup

See also: AWS API Documentation

Request Syntax

client.delete_group(
    GroupName='string',
    Group='string'
)
type GroupName

string

param GroupName

Deprecated - don't use this parameter. Use Group instead.

type Group

string

param Group

The name or the Amazon resource name (ARN) of the resource group to delete.

rtype

dict

returns

Response Syntax

{
    'Group': {
        'GroupArn': 'string',
        'Name': 'string',
        'Description': 'string',
        'Criticality': 123,
        'Owner': 'string',
        'DisplayName': 'string',
        'ApplicationTag': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      A full description of the deleted resource group.

      • GroupArn (string) --

        The Amazon resource name (ARN) of the resource group.

      • Name (string) --

        The name of the resource group.

      • Description (string) --

        The description of the resource group.

      • Criticality (integer) --

        The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.

      • Owner (string) --

        A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.

      • DisplayName (string) --

        The name of the application group, which you can change at any time.

      • ApplicationTag (dict) --

        A tag that defines the application group membership. This tag is only supported for application groups.

        • (string) --

          • (string) --

GetGroup (updated) Link ¶
Changes (response)
{'Group': {'ApplicationTag': {'string': 'string'},
           'Criticality': 'integer',
           'DisplayName': 'string',
           'Owner': 'string'}}

Returns information about a specified resource group.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:GetGroup

See also: AWS API Documentation

Request Syntax

client.get_group(
    GroupName='string',
    Group='string'
)
type GroupName

string

param GroupName

Deprecated - don't use this parameter. Use Group instead.

type Group

string

param Group

The name or the Amazon resource name (ARN) of the resource group to retrieve.

rtype

dict

returns

Response Syntax

{
    'Group': {
        'GroupArn': 'string',
        'Name': 'string',
        'Description': 'string',
        'Criticality': 123,
        'Owner': 'string',
        'DisplayName': 'string',
        'ApplicationTag': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      A structure that contains the metadata details for the specified resource group. Use GetGroupQuery and GetGroupConfiguration to get those additional details of the resource group.

      • GroupArn (string) --

        The Amazon resource name (ARN) of the resource group.

      • Name (string) --

        The name of the resource group.

      • Description (string) --

        The description of the resource group.

      • Criticality (integer) --

        The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.

      • Owner (string) --

        A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.

      • DisplayName (string) --

        The name of the application group, which you can change at any time.

      • ApplicationTag (dict) --

        A tag that defines the application group membership. This tag is only supported for application groups.

        • (string) --

          • (string) --

ListGroups (updated) Link ¶
Changes (request, response)
Request
{'Filters': {'Name': {'criticality', 'owner', 'display-name'}}}
Response
{'GroupIdentifiers': {'Criticality': 'integer',
                      'Description': 'string',
                      'DisplayName': 'string',
                      'Owner': 'string'},
 'Groups': {'ApplicationTag': {'string': 'string'},
            'Criticality': 'integer',
            'DisplayName': 'string',
            'Owner': 'string'}}

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

client.list_groups(
    Filters=[
        {
            'Name': 'resource-type'|'configuration-type'|'owner'|'display-name'|'criticality',
            '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.

  • resource-type - Filter the results to include only those resource groups that have the specified resource type in their ResourceTypeFilter . For example, AWS::EC2::Instance would return any resource group with a ResourceTypeFilter that 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::ResourceGroups::ApplicationGroup

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

type MaxResults

integer

param MaxResults

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 NextToken response element is present and has a value (is not null). Include that value as the NextToken request 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 NextToken after every operation to ensure that you receive all of the results.

type NextToken

string

param NextToken

The parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value provided by a previous call's NextToken response to indicate where the output should continue from.

rtype

dict

returns

Response Syntax

{
    'GroupIdentifiers': [
        {
            'GroupName': 'string',
            'GroupArn': 'string',
            'Description': 'string',
            'Criticality': 123,
            'Owner': 'string',
            'DisplayName': 'string'
        },
    ],
    'Groups': [
        {
            'GroupArn': 'string',
            'Name': 'string',
            'Description': 'string',
            'Criticality': 123,
            'Owner': 'string',
            'DisplayName': 'string',
            'ApplicationTag': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • GroupIdentifiers (list) --

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

      • (dict) --

        The unique identifiers for a resource group.

        • GroupName (string) --

          The name of the resource group.

        • GroupArn (string) --

          The Amazon resource name (ARN) of the resource group.

        • Description (string) --

          The description of the application group.

        • Criticality (integer) --

          The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.

        • Owner (string) --

          A name, email address or other identifier for the person or group who is considered as the owner of this group within your organization.

        • DisplayName (string) --

          The name of the application group, which you can change at any time.

    • Groups (list) --

      Warning

      Deprecated - don't use this field. Use the GroupIdentifiers response 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 Amazon resource name (ARN) of the resource group.

        • Name (string) --

          The name of the resource group.

        • Description (string) --

          The description of the resource group.

        • Criticality (integer) --

          The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.

        • Owner (string) --

          A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.

        • DisplayName (string) --

          The name of the application group, which you can change at any time.

        • ApplicationTag (dict) --

          A tag that defines the application group membership. This tag is only supported for application groups.

          • (string) --

            • (string) --

    • NextToken (string) --

      If present, indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null .

UpdateGroup (updated) Link ¶
Changes (request, response)
Request
{'Criticality': 'integer', 'DisplayName': 'string', 'Owner': 'string'}
Response
{'Group': {'ApplicationTag': {'string': 'string'},
           'Criticality': 'integer',
           'DisplayName': 'string',
           'Owner': 'string'}}

Updates the description for an existing group. You cannot update the name of a resource group.

Minimum permissions

To run this command, you must have the following permissions:

  • resource-groups:UpdateGroup

See also: AWS API Documentation

Request Syntax

client.update_group(
    GroupName='string',
    Group='string',
    Description='string',
    Criticality=123,
    Owner='string',
    DisplayName='string'
)
type GroupName

string

param GroupName

Don't use this parameter. Use Group instead.

type Group

string

param Group

The name or the ARN of the resource group to update.

type Description

string

param Description

The new description that you want to update the resource group with. Descriptions can contain letters, numbers, hyphens, underscores, periods, and spaces.

type Criticality

integer

param Criticality

The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.

type Owner

string

param Owner

A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.

type DisplayName

string

param DisplayName

The name of the application group, which you can change at any time.

rtype

dict

returns

Response Syntax

{
    'Group': {
        'GroupArn': 'string',
        'Name': 'string',
        'Description': 'string',
        'Criticality': 123,
        'Owner': 'string',
        'DisplayName': 'string',
        'ApplicationTag': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      The update description of the resource group.

      • GroupArn (string) --

        The Amazon resource name (ARN) of the resource group.

      • Name (string) --

        The name of the resource group.

      • Description (string) --

        The description of the resource group.

      • Criticality (integer) --

        The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.

      • Owner (string) --

        A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.

      • DisplayName (string) --

        The name of the application group, which you can change at any time.

      • ApplicationTag (dict) --

        A tag that defines the application group membership. This tag is only supported for application groups.

        • (string) --

          • (string) --