ResourceGroups ************** Client ====== class ResourceGroups.Client A low-level client representing AWS Resource Groups Resource Groups lets you organize Amazon Web Services resources such as Amazon Elastic Compute Cloud instances, Amazon Relational Database Service databases, and Amazon Simple Storage Service buckets into groups using criteria that you define as tags. A resource group is a collection of resources that match the resource types specified in a query, and share one or more tags or portions of tags. You can create a group of resources based on their roles in your cloud infrastructure, lifecycle stages, regions, application layers, or virtually any criteria. Resource Groups enable you to automate management tasks, such as those in Amazon Web Services Systems Manager Automation documents, on tag-related resources in Amazon Web Services Systems Manager. Groups of tagged resources also let you quickly view a custom console in Amazon Web Services Systems Manager that shows Config compliance and other monitoring data about member resources. To create a resource group, build a resource query, and specify tags that identify the criteria that members of the group have in common. Tags are key-value pairs. For more information about Resource Groups, see the Resource Groups User Guide. Resource Groups uses a REST-compliant API that you can use to perform the following types of operations. * Create, Read, Update, and Delete (CRUD) operations on resource groups and resource query entities * Applying, editing, and removing tags from resource groups * Resolving resource group member Amazon resource names (ARN)s so they can be returned as search results * Getting data about resources that are members of a group * Searching Amazon Web Services resources based on a resource query import boto3 client = boto3.client('resource-groups') These are the available methods: * can_paginate * cancel_tag_sync_task * close * create_group * delete_group * get_account_settings * get_group * get_group_configuration * get_group_query * get_paginator * get_tag_sync_task * get_tags * get_waiter * group_resources * list_group_resources * list_grouping_statuses * list_groups * list_tag_sync_tasks * put_group_configuration * search_resources * start_tag_sync_task * tag * ungroup_resources * untag * update_account_settings * update_group * update_group_query Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * ListGroupResources * ListGroupingStatuses * ListGroups * ListTagSyncTasks * SearchResources ResourceGroups / Paginator / SearchResources SearchResources *************** class ResourceGroups.Paginator.SearchResources paginator = client.get_paginator('search_resources') paginate(**kwargs) Creates an iterator that will paginate through responses from "ResourceGroups.Client.search_resources()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( ResourceQuery={ 'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0', 'Query': 'string' }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **ResourceQuery** (*dict*) -- **[REQUIRED]** The search query, using the same formats that are supported for resource group definition. For more information, see CreateGroup. * **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. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'ResourceIdentifiers': [ { 'ResourceArn': 'string', 'ResourceType': 'string' }, ], 'QueryErrors': [ { 'ErrorCode': 'CLOUDFORMATION_STACK_INACTIVE'|'CLOUDFORMATION_STACK_NOT_EXISTING'|'CLOUDFORMATION_STACK_UNASSUMABLE_ROLE'|'RESOURCE_TYPE_NOT_SUPPORTED', 'Message': 'string' }, ] } **Response Structure** * *(dict) --* * **ResourceIdentifiers** *(list) --* The ARNs and resource types of resources that are members of the group that you specified. * *(dict) --* A structure that contains the ARN of a resource and its resource type. * **ResourceArn** *(string) --* The Amazon resource name (ARN) of a resource. * **ResourceType** *(string) --* The resource type of a resource, such as "AWS::EC2::Instance". * **QueryErrors** *(list) --* A list of "QueryError" objects. Each error contains an "ErrorCode" and "Message". Possible values for "ErrorCode": * "CLOUDFORMATION_STACK_INACTIVE" * "CLOUDFORMATION_STACK_NOT_EXISTING" * "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE" * *(dict) --* A two-part error structure that can occur in "ListGroupResources" or "SearchResources". * **ErrorCode** *(string) --* Specifies the error code that was raised. * **Message** *(string) --* A message that explains the "ErrorCode". ResourceGroups / Paginator / ListTagSyncTasks ListTagSyncTasks **************** class ResourceGroups.Paginator.ListTagSyncTasks paginator = client.get_paginator('list_tag_sync_tasks') paginate(**kwargs) Creates an iterator that will paginate through responses from "ResourceGroups.Client.list_tag_sync_tasks()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( Filters=[ { 'GroupArn': 'string', 'GroupName': 'string' }, ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **Filters** (*list*) -- 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. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'TagSyncTasks': [ { 'GroupArn': 'string', 'GroupName': 'string', 'TaskArn': 'string', 'TagKey': 'string', 'TagValue': 'string', 'ResourceQuery': { 'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0', 'Query': 'string' }, 'RoleArn': 'string', 'Status': 'ACTIVE'|'ERROR', 'ErrorMessage': 'string', 'CreatedAt': datetime(2015, 1, 1) }, ], } **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. * **ResourceQuery** *(dict) --* The query you can use to define a resource group or a search for resources. A "ResourceQuery" specifies both a query "Type" and a "Query" string as JSON string objects. See the examples section for example JSON strings. For more information about creating a resource group with a resource query, see Build queries and groups in Resource Groups in the *Resource Groups User Guide* When you combine all of the elements together into a single string, any double quotes that are embedded inside another double quote pair must be escaped by preceding the embedded double quote with a backslash character (). For example, a complete "ResourceQuery" parameter must be formatted like the following CLI parameter example: "--resource-query '{"Type":"TAG_FILTERS_1_0","Query" :"{\"ResourceTypeFilters\":[\"AWS::AllSupported\"],\ "TagFilters\":[{\"Key\":\"Stage\",\"Values\":[\"Test \"]}]}"}'" In the preceding example, all of the double quote characters in the value part of the "Query" element must be escaped because the value itself is surrounded by double quotes. For more information, see Quoting strings in the *Command Line Interface User Guide*. 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*. For example: ""ResourceTypeFilters":["AWS::S3::Bucket", "AWS::EC2::Instance"]" * **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. * **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. ResourceGroups / Paginator / ListGroupResources ListGroupResources ****************** class ResourceGroups.Paginator.ListGroupResources paginator = client.get_paginator('list_group_resources') paginate(**kwargs) Creates an iterator that will paginate through responses from "ResourceGroups.Client.list_group_resources()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( GroupName='string', Group='string', Filters=[ { 'Name': 'resource-type', 'Values': [ 'string', ] }, ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **GroupName** (*string*) -- Warning: Deprecated - don't use this parameter. Use the "Group" request field instead. * **Group** (*string*) -- The name or the Amazon resource name (ARN) of the resource group. * **Filters** (*list*) -- Filters, formatted as ResourceFilter objects, that you want to apply to a "ListGroupResources" operation. Filters the results to include only those of the specified resource types. * "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". When you specify a "resource-type" filter for "ListGroupResources", Resource Groups validates your filter resource types against the types that are defined in the query associated with the group. For example, if a group contains only S3 buckets because its query specifies only that resource type, but your "resource-type" filter includes EC2 instances, AWS Resource Groups does not filter for EC2 instances. In this case, a "ListGroupResources" request returns a "BadRequestException" error with a message similar to the following: "The resource types specified as filters in the request are not valid." The error includes a list of resource types that failed the validation because they are not part of the query associated with the group. This validation doesn't occur when the group query specifies "AWS::AllSupported", because a group based on such a query can contain any of the allowed resource types for the query type (tag-based or Amazon CloudFront stack-based queries). * *(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) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'Resources': [ { 'Identifier': { 'ResourceArn': 'string', 'ResourceType': 'string' }, 'Status': { 'Name': 'PENDING' } }, ], 'ResourceIdentifiers': [ { 'ResourceArn': 'string', 'ResourceType': 'string' }, ], 'QueryErrors': [ { 'ErrorCode': 'CLOUDFORMATION_STACK_INACTIVE'|'CLOUDFORMATION_STACK_NOT_EXISTING'|'CLOUDFORMATION_STACK_UNASSUMABLE_ROLE'|'RESOURCE_TYPE_NOT_SUPPORTED', 'Message': 'string' }, ] } **Response Structure** * *(dict) --* * **Resources** *(list) --* An array of resources from which you can determine each resource's identity, type, and group membership status. * *(dict) --* A structure returned by the ListGroupResources operation that contains identity and group membership status information for one of the resources in the group. * **Identifier** *(dict) --* A structure that contains the ARN of a resource and its resource type. * **ResourceArn** *(string) --* The Amazon resource name (ARN) of a resource. * **ResourceType** *(string) --* The resource type of a resource, such as "AWS::EC2::Instance". * **Status** *(dict) --* A structure that contains the status of this resource's membership in the group. Note: This field is present in the response only if the group is of type "AWS::EC2::HostManagement". * **Name** *(string) --* The current status. * **ResourceIdentifiers** *(list) --* Warning: Deprecated - don't use this parameter. Use the "Resources" response field instead. * *(dict) --* A structure that contains the ARN of a resource and its resource type. * **ResourceArn** *(string) --* The Amazon resource name (ARN) of a resource. * **ResourceType** *(string) --* The resource type of a resource, such as "AWS::EC2::Instance". * **QueryErrors** *(list) --* A list of "QueryError" objects. Each error contains an "ErrorCode" and "Message". Possible values for ErrorCode are "CLOUDFORMATION_STACK_INACTIVE", "CLOUDFORMATION_STACK_NOT_EXISTING", "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE" and "RESOURCE_TYPE_NOT_SUPPORTED". * *(dict) --* A two-part error structure that can occur in "ListGroupResources" or "SearchResources". * **ErrorCode** *(string) --* Specifies the error code that was raised. * **Message** *(string) --* A message that explains the "ErrorCode". ResourceGroups / Paginator / ListGroupingStatuses ListGroupingStatuses ******************** class ResourceGroups.Paginator.ListGroupingStatuses paginator = client.get_paginator('list_grouping_statuses') paginate(**kwargs) Creates an iterator that will paginate through responses from "ResourceGroups.Client.list_grouping_statuses()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( Group='string', Filters=[ { 'Name': 'status'|'resource-arn', 'Values': [ 'string', ] }, ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **Group** (*string*) -- **[REQUIRED]** The application group identifier, expressed as an Amazon resource name (ARN) or the application group name. * **Filters** (*list*) -- 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) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: 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) }, ], } **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. ResourceGroups / Paginator / ListGroups ListGroups ********** class ResourceGroups.Paginator.ListGroups paginator = client.get_paginator('list_groups') paginate(**kwargs) Creates an iterator that will paginate through responses from "ResourceGroups.Client.list_groups()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( Filters=[ { 'Name': 'resource-type'|'configuration-type'|'owner'|'display-name'|'criticality', 'Values': [ 'string', ] }, ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **Filters** (*list*) -- 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::ApplicationResourceGroup" * "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) --* * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: 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' } }, ], } **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) --* ResourceGroups / Client / get_paginator get_paginator ************* ResourceGroups.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. ResourceGroups / Client / tag tag *** ResourceGroups.Client.tag(**kwargs) Adds tags to a resource group with the specified Amazon resource name (ARN). Existing tags on a resource group are not changed if they are not specified in the request parameters. Warning: Do not store personally identifiable information (PII) or other confidential or sensitive information in tags. We use tags to provide you with billing and administration services. Tags are not intended to be used for private or sensitive data. **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:Tag" See also: AWS API Documentation **Request Syntax** response = client.tag( Arn='string', Tags={ 'string': 'string' } ) Parameters: * **Arn** (*string*) -- **[REQUIRED]** The Amazon resource name (ARN) of the resource group to which to add tags. * **Tags** (*dict*) -- **[REQUIRED]** The tags to add to the specified resource group. A tag is a string-to-string map of key-value pairs. * *(string) --* * *(string) --* Return type: dict Returns: **Response Syntax** { 'Arn': 'string', 'Tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **Arn** *(string) --* The Amazon resource name (ARN) of the tagged resource. * **Tags** *(dict) --* The tags that have been added to the specified resource group. * *(string) --* * *(string) --* **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / can_paginate can_paginate ************ ResourceGroups.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. ResourceGroups / Client / get_group_query get_group_query *************** ResourceGroups.Client.get_group_query(**kwargs) Retrieves the resource query associated with the specified resource group. For more information about resource queries, see Create a tag-based group in Resource Groups. **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:GetGroupQuery" See also: AWS API Documentation **Request Syntax** response = client.get_group_query( GroupName='string', Group='string' ) Parameters: * **GroupName** (*string*) -- Don't use this parameter. Use "Group" instead. * **Group** (*string*) -- The name or the Amazon resource name (ARN) of the resource group to query. Return type: dict Returns: **Response Syntax** { 'GroupQuery': { 'GroupName': 'string', 'ResourceQuery': { 'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0', 'Query': 'string' } } } **Response Structure** * *(dict) --* * **GroupQuery** *(dict) --* The resource query associated with the specified group. For more information about resource queries, see Create a tag- based group in Resource Groups. * **GroupName** *(string) --* The name of the resource group that is associated with the specified resource query. * **ResourceQuery** *(dict) --* The resource query that determines which Amazon Web Services resources are members of the associated resource group. * **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. **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / get_account_settings get_account_settings ******************** ResourceGroups.Client.get_account_settings() Retrieves the current status of optional features in Resource Groups. See also: AWS API Documentation **Request Syntax** response = client.get_account_settings() Return type: dict Returns: **Response Syntax** { 'AccountSettings': { 'GroupLifecycleEventsDesiredStatus': 'ACTIVE'|'INACTIVE', 'GroupLifecycleEventsStatus': 'ACTIVE'|'INACTIVE'|'IN_PROGRESS'|'ERROR', 'GroupLifecycleEventsStatusMessage': 'string' } } **Response Structure** * *(dict) --* * **AccountSettings** *(dict) --* The current settings for the optional features in Resource Groups. * **GroupLifecycleEventsDesiredStatus** *(string) --* The desired target status of the group lifecycle events feature. If * **GroupLifecycleEventsStatus** *(string) --* The current status of the group lifecycle events feature. * **GroupLifecycleEventsStatusMessage** *(string) --* The text of any error message occurs during an attempt to turn group lifecycle events on or off. **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / delete_group delete_group ************ ResourceGroups.Client.delete_group(**kwargs) 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** response = client.delete_group( GroupName='string', Group='string' ) Parameters: * **GroupName** (*string*) -- Deprecated - don't use this parameter. Use "Group" instead. * **Group** (*string*) -- The name or the Amazon resource name (ARN) of the resource group to delete. Return type: 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) --* **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / update_account_settings update_account_settings *********************** ResourceGroups.Client.update_account_settings(**kwargs) Turns on or turns off optional features in Resource Groups. The preceding example shows that the request to turn on group lifecycle events is "IN_PROGRESS". You can call the GetAccountSettings operation to check for completion by looking for "GroupLifecycleEventsStatus" to change to "ACTIVE". See also: AWS API Documentation **Request Syntax** response = client.update_account_settings( GroupLifecycleEventsDesiredStatus='ACTIVE'|'INACTIVE' ) Parameters: **GroupLifecycleEventsDesiredStatus** (*string*) -- Specifies whether you want to turn group lifecycle events on or off. You can't turn on group lifecycle events if your resource groups quota is greater than 2,000. Return type: dict Returns: **Response Syntax** { 'AccountSettings': { 'GroupLifecycleEventsDesiredStatus': 'ACTIVE'|'INACTIVE', 'GroupLifecycleEventsStatus': 'ACTIVE'|'INACTIVE'|'IN_PROGRESS'|'ERROR', 'GroupLifecycleEventsStatusMessage': 'string' } } **Response Structure** * *(dict) --* * **AccountSettings** *(dict) --* A structure that displays the status of the optional features in the account. * **GroupLifecycleEventsDesiredStatus** *(string) --* The desired target status of the group lifecycle events feature. If * **GroupLifecycleEventsStatus** *(string) --* The current status of the group lifecycle events feature. * **GroupLifecycleEventsStatusMessage** *(string) --* The text of any error message occurs during an attempt to turn group lifecycle events on or off. **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / put_group_configuration put_group_configuration *********************** ResourceGroups.Client.put_group_configuration(**kwargs) Attaches a service configuration to the specified group. This occurs asynchronously, and can take time to complete. You can use GetGroupConfiguration to check the status of the update. **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:PutGroupConfiguration" See also: AWS API Documentation **Request Syntax** response = client.put_group_configuration( Group='string', Configuration=[ { 'Type': 'string', 'Parameters': [ { 'Name': 'string', 'Values': [ 'string', ] }, ] }, ] ) Parameters: * **Group** (*string*) -- The name or Amazon resource name (ARN) of the resource group with the configuration that you want to update. * **Configuration** (*list*) -- The new configuration to associate with the specified group. 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 information about the syntax of a service configuration, see Service configurations for Resource Groups. Note: A resource group can contain either a "Configuration" or a "ResourceQuery", but not both. * *(dict) --* An item in a group configuration. A group service configuration can have one or more items. For details about group service configuration syntax, see Service configurations for resource groups. * **Type** *(string) --* **[REQUIRED]** Specifies the type of group configuration item. Each item must have a unique value for "type". For the list of types that you can specify for a configuration item, see Supported resource types and parameters. * **Parameters** *(list) --* A collection of parameters for this group configuration item. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * *(dict) --* A parameter for a group configuration item. For details about group service configuration syntax, see Service configurations for resource groups. * **Name** *(string) --* **[REQUIRED]** The name of the group configuration parameter. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * **Values** *(list) --* The value or values to be used for the specified parameter. For the list of values you can use with each parameter, see Supported resource types and parameters. * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / get_waiter get_waiter ********** ResourceGroups.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" ResourceGroups / Client / update_group_query update_group_query ****************** ResourceGroups.Client.update_group_query(**kwargs) Updates the resource query of a group. For more information about resource queries, see Create a tag-based group in Resource Groups. **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:UpdateGroupQuery" See also: AWS API Documentation **Request Syntax** response = client.update_group_query( GroupName='string', Group='string', ResourceQuery={ 'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0', 'Query': 'string' } ) Parameters: * **GroupName** (*string*) -- Don't use this parameter. Use "Group" instead. * **Group** (*string*) -- The name or the Amazon resource name (ARN) of the resource group to query. * **ResourceQuery** (*dict*) -- **[REQUIRED]** The resource query to determine which Amazon Web Services resources are members of this resource group. Note: A resource group can contain either a "Configuration" or a "ResourceQuery", 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. Return type: dict Returns: **Response Syntax** { 'GroupQuery': { 'GroupName': 'string', 'ResourceQuery': { 'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0', 'Query': 'string' } } } **Response Structure** * *(dict) --* * **GroupQuery** *(dict) --* The updated resource query associated with the resource group after the update. * **GroupName** *(string) --* The name of the resource group that is associated with the specified resource query. * **ResourceQuery** *(dict) --* The resource query that determines which Amazon Web Services resources are members of the associated resource group. * **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. **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / list_group_resources list_group_resources ******************** ResourceGroups.Client.list_group_resources(**kwargs) Returns a list of Amazon resource names (ARNs) of the resources that are members of a specified resource group. **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:ListGroupResources" * "cloudformation:DescribeStacks" * "cloudformation:ListStackResources" * "tag:GetResources" See also: AWS API Documentation **Request Syntax** response = client.list_group_resources( GroupName='string', Group='string', Filters=[ { 'Name': 'resource-type', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' ) Parameters: * **GroupName** (*string*) -- Warning: Deprecated - don't use this parameter. Use the "Group" request field instead. * **Group** (*string*) -- The name or the Amazon resource name (ARN) of the resource group. * **Filters** (*list*) -- Filters, formatted as ResourceFilter objects, that you want to apply to a "ListGroupResources" operation. Filters the results to include only those of the specified resource types. * "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". When you specify a "resource-type" filter for "ListGroupResources", Resource Groups validates your filter resource types against the types that are defined in the query associated with the group. For example, if a group contains only S3 buckets because its query specifies only that resource type, but your "resource-type" filter includes EC2 instances, AWS Resource Groups does not filter for EC2 instances. In this case, a "ListGroupResources" request returns a "BadRequestException" error with a message similar to the following: "The resource types specified as filters in the request are not valid." The error includes a list of resource types that failed the validation because they are not part of the query associated with the group. This validation doesn't occur when the group query specifies "AWS::AllSupported", because a group based on such a query can contain any of the allowed resource types for the query type (tag-based or Amazon CloudFront stack-based queries). * *(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) --* * **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 "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. * **NextToken** (*string*) -- 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. Return type: dict Returns: **Response Syntax** { 'Resources': [ { 'Identifier': { 'ResourceArn': 'string', 'ResourceType': 'string' }, 'Status': { 'Name': 'PENDING' } }, ], 'ResourceIdentifiers': [ { 'ResourceArn': 'string', 'ResourceType': 'string' }, ], 'NextToken': 'string', 'QueryErrors': [ { 'ErrorCode': 'CLOUDFORMATION_STACK_INACTIVE'|'CLOUDFORMATION_STACK_NOT_EXISTING'|'CLOUDFORMATION_STACK_UNASSUMABLE_ROLE'|'RESOURCE_TYPE_NOT_SUPPORTED', 'Message': 'string' }, ] } **Response Structure** * *(dict) --* * **Resources** *(list) --* An array of resources from which you can determine each resource's identity, type, and group membership status. * *(dict) --* A structure returned by the ListGroupResources operation that contains identity and group membership status information for one of the resources in the group. * **Identifier** *(dict) --* A structure that contains the ARN of a resource and its resource type. * **ResourceArn** *(string) --* The Amazon resource name (ARN) of a resource. * **ResourceType** *(string) --* The resource type of a resource, such as "AWS::EC2::Instance". * **Status** *(dict) --* A structure that contains the status of this resource's membership in the group. Note: This field is present in the response only if the group is of type "AWS::EC2::HostManagement". * **Name** *(string) --* The current status. * **ResourceIdentifiers** *(list) --* Warning: Deprecated - don't use this parameter. Use the "Resources" response field instead. * *(dict) --* A structure that contains the ARN of a resource and its resource type. * **ResourceArn** *(string) --* The Amazon resource name (ARN) of a resource. * **ResourceType** *(string) --* The resource type of a resource, such as "AWS::EC2::Instance". * **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". * **QueryErrors** *(list) --* A list of "QueryError" objects. Each error contains an "ErrorCode" and "Message". Possible values for ErrorCode are "CLOUDFORMATION_STACK_INACTIVE", "CLOUDFORMATION_STACK_NOT_EXISTING", "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE" and "RESOURCE_TYPE_NOT_SUPPORTED". * *(dict) --* A two-part error structure that can occur in "ListGroupResources" or "SearchResources". * **ErrorCode** *(string) --* Specifies the error code that was raised. * **Message** *(string) --* A message that explains the "ErrorCode". **Exceptions** * "ResourceGroups.Client.exceptions.UnauthorizedException" * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / get_group get_group ********* ResourceGroups.Client.get_group(**kwargs) 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** response = client.get_group( GroupName='string', Group='string' ) Parameters: * **GroupName** (*string*) -- Deprecated - don't use this parameter. Use "Group" instead. * **Group** (*string*) -- The name or the Amazon resource name (ARN) of the resource group to retrieve. Return type: 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) --* **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / list_grouping_statuses list_grouping_statuses ********************** ResourceGroups.Client.list_grouping_statuses(**kwargs) 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** response = client.list_grouping_statuses( Group='string', MaxResults=123, Filters=[ { 'Name': 'status'|'resource-arn', 'Values': [ 'string', ] }, ], NextToken='string' ) Parameters: * **Group** (*string*) -- **[REQUIRED]** The application group identifier, expressed as an Amazon resource name (ARN) or the application group name. * **MaxResults** (*integer*) -- The maximum number of resources and their statuses returned in the response. * **Filters** (*list*) -- 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) --* * **NextToken** (*string*) -- 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. Return type: 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". **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / create_group create_group ************ ResourceGroups.Client.create_group(**kwargs) 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** response = 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' ) Parameters: * **Name** (*string*) -- **[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. * **Description** (*string*) -- The description of the resource group. Descriptions can consist of letters, numbers, hyphens, underscores, periods, and spaces. * **ResourceQuery** (*dict*) -- 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. * **Tags** (*dict*) -- The tags to add to the group. A tag is key-value pair string. * *(string) --* * *(string) --* * **Configuration** (*list*) -- 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. * *(dict) --* An item in a group configuration. A group service configuration can have one or more items. For details about group service configuration syntax, see Service configurations for resource groups. * **Type** *(string) --* **[REQUIRED]** Specifies the type of group configuration item. Each item must have a unique value for "type". For the list of types that you can specify for a configuration item, see Supported resource types and parameters. * **Parameters** *(list) --* A collection of parameters for this group configuration item. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * *(dict) --* A parameter for a group configuration item. For details about group service configuration syntax, see Service configurations for resource groups. * **Name** *(string) --* **[REQUIRED]** The name of the group configuration parameter. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * **Values** *(list) --* The value or values to be used for the specified parameter. For the list of values you can use with each parameter, see Supported resource types and parameters. * *(string) --* * **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. Return type: 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. * *(dict) --* An item in a group configuration. A group service configuration can have one or more items. For details about group service configuration syntax, see Service configurations for resource groups. * **Type** *(string) --* Specifies the type of group configuration item. Each item must have a unique value for "type". For the list of types that you can specify for a configuration item, see Supported resource types and parameters. * **Parameters** *(list) --* A collection of parameters for this group configuration item. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * *(dict) --* A parameter for a group configuration item. For details about group service configuration syntax, see Service configurations for resource groups. * **Name** *(string) --* The name of the group configuration parameter. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * **Values** *(list) --* The value or values to be used for the specified parameter. For the list of values you can use with each parameter, see Supported resource types and parameters. * *(string) --* * **ProposedConfiguration** *(list) --* If present, the new configuration that is in the process of being applied to the group. * *(dict) --* An item in a group configuration. A group service configuration can have one or more items. For details about group service configuration syntax, see Service configurations for resource groups. * **Type** *(string) --* Specifies the type of group configuration item. Each item must have a unique value for "type". For the list of types that you can specify for a configuration item, see Supported resource types and parameters. * **Parameters** *(list) --* A collection of parameters for this group configuration item. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * *(dict) --* A parameter for a group configuration item. For details about group service configuration syntax, see Service configurations for resource groups. * **Name** *(string) --* The name of the group configuration parameter. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * **Values** *(list) --* The value or values to be used for the specified parameter. For the list of values you can use with each parameter, see Supported resource types and parameters. * *(string) --* * **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. **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / search_resources search_resources **************** ResourceGroups.Client.search_resources(**kwargs) Returns a list of Amazon Web Services resource identifiers that matches the specified query. The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery operation. **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:SearchResources" * "cloudformation:DescribeStacks" * "cloudformation:ListStackResources" * "tag:GetResources" See also: AWS API Documentation **Request Syntax** response = client.search_resources( ResourceQuery={ 'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0', 'Query': 'string' }, MaxResults=123, NextToken='string' ) Parameters: * **ResourceQuery** (*dict*) -- **[REQUIRED]** The search query, using the same formats that are supported for resource group definition. For more information, see CreateGroup. * **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. * **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 "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. * **NextToken** (*string*) -- 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. Return type: dict Returns: **Response Syntax** { 'ResourceIdentifiers': [ { 'ResourceArn': 'string', 'ResourceType': 'string' }, ], 'NextToken': 'string', 'QueryErrors': [ { 'ErrorCode': 'CLOUDFORMATION_STACK_INACTIVE'|'CLOUDFORMATION_STACK_NOT_EXISTING'|'CLOUDFORMATION_STACK_UNASSUMABLE_ROLE'|'RESOURCE_TYPE_NOT_SUPPORTED', 'Message': 'string' }, ] } **Response Structure** * *(dict) --* * **ResourceIdentifiers** *(list) --* The ARNs and resource types of resources that are members of the group that you specified. * *(dict) --* A structure that contains the ARN of a resource and its resource type. * **ResourceArn** *(string) --* The Amazon resource name (ARN) of a resource. * **ResourceType** *(string) --* The resource type of a resource, such as "AWS::EC2::Instance". * **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". * **QueryErrors** *(list) --* A list of "QueryError" objects. Each error contains an "ErrorCode" and "Message". Possible values for "ErrorCode": * "CLOUDFORMATION_STACK_INACTIVE" * "CLOUDFORMATION_STACK_NOT_EXISTING" * "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE" * *(dict) --* A two-part error structure that can occur in "ListGroupResources" or "SearchResources". * **ErrorCode** *(string) --* Specifies the error code that was raised. * **Message** *(string) --* A message that explains the "ErrorCode". **Exceptions** * "ResourceGroups.Client.exceptions.UnauthorizedException" * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / cancel_tag_sync_task cancel_tag_sync_task ******************** ResourceGroups.Client.cancel_tag_sync_task(**kwargs) 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** response = client.cancel_tag_sync_task( TaskArn='string' ) Parameters: **TaskArn** (*string*) -- **[REQUIRED]** The Amazon resource name (ARN) of the tag-sync task. Returns: None **Exceptions** * "ResourceGroups.Client.exceptions.UnauthorizedException" * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / untag untag ***** ResourceGroups.Client.untag(**kwargs) Deletes tags from a specified resource group. **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:Untag" See also: AWS API Documentation **Request Syntax** response = client.untag( Arn='string', Keys=[ 'string', ] ) Parameters: * **Arn** (*string*) -- **[REQUIRED]** The Amazon resource name (ARN) of the resource group from which to remove tags. The command removed both the specified keys and any values associated with those keys. * **Keys** (*list*) -- **[REQUIRED]** The keys of the tags to be removed. * *(string) --* Return type: dict Returns: **Response Syntax** { 'Arn': 'string', 'Keys': [ 'string', ] } **Response Structure** * *(dict) --* * **Arn** *(string) --* The Amazon resource name (ARN) of the resource group from which tags have been removed. * **Keys** *(list) --* The keys of the tags that were removed. * *(string) --* **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / ungroup_resources ungroup_resources ***************** ResourceGroups.Client.ungroup_resources(**kwargs) Removes the specified resources from the specified group. This operation works only with static groups that you populated using the GroupResources operation. It doesn't work with any resource groups that are automatically populated by tag-based or CloudFormation stack-based queries. **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:UngroupResources" See also: AWS API Documentation **Request Syntax** response = client.ungroup_resources( Group='string', ResourceArns=[ 'string', ] ) Parameters: * **Group** (*string*) -- **[REQUIRED]** The name or the Amazon resource name (ARN) of the resource group from which to remove the resources. * **ResourceArns** (*list*) -- **[REQUIRED]** The Amazon resource names (ARNs) of the resources to be removed from the group. * *(string) --* Return type: dict Returns: **Response Syntax** { 'Succeeded': [ 'string', ], 'Failed': [ { 'ResourceArn': 'string', 'ErrorMessage': 'string', 'ErrorCode': 'string' }, ], 'Pending': [ { 'ResourceArn': 'string' }, ] } **Response Structure** * *(dict) --* * **Succeeded** *(list) --* A list of resources that were successfully removed from the group by this operation. * *(string) --* * **Failed** *(list) --* A list of any resources that failed to be removed from the group by this operation. * *(dict) --* A resource that failed to be added to or removed from a group. * **ResourceArn** *(string) --* The Amazon resource name (ARN) of the resource that failed to be added or removed. * **ErrorMessage** *(string) --* The error message text associated with the failure. * **ErrorCode** *(string) --* The error code associated with the failure. * **Pending** *(list) --* A list of any resources that are still in the process of being removed from the group by this operation. These pending removals continue asynchronously. You can check the status of pending removals by using the "ListGroupResources" operation. After the resource is successfully removed, it no longer appears in the response. * *(dict) --* A structure that identifies a resource that is currently pending addition to the group as a member. Adding a resource to a resource group happens asynchronously as a background task and this one isn't completed yet. * **ResourceArn** *(string) --* The Amazon resource name (ARN) of the resource that's in a pending state. **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / get_tag_sync_task get_tag_sync_task ***************** ResourceGroups.Client.get_tag_sync_task(**kwargs) 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** response = client.get_tag_sync_task( TaskArn='string' ) Parameters: **TaskArn** (*string*) -- **[REQUIRED]** The Amazon resource name (ARN) of the tag-sync task. Return type: dict Returns: **Response Syntax** { 'GroupArn': 'string', 'GroupName': 'string', 'TaskArn': 'string', 'TagKey': 'string', 'TagValue': 'string', 'ResourceQuery': { 'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0', 'Query': '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. * **ResourceQuery** *(dict) --* The query you can use to define a resource group or a search for resources. A "ResourceQuery" specifies both a query "Type" and a "Query" string as JSON string objects. See the examples section for example JSON strings. For more information about creating a resource group with a resource query, see Build queries and groups in Resource Groups in the *Resource Groups User Guide* When you combine all of the elements together into a single string, any double quotes that are embedded inside another double quote pair must be escaped by preceding the embedded double quote with a backslash character (). For example, a complete "ResourceQuery" parameter must be formatted like the following CLI parameter example: "--resource-query '{"Type":"TAG_FILTERS_1_0","Query":"{\"Re sourceTypeFilters\":[\"AWS::AllSupported\"],\"TagFilters\": [{\"Key\":\"Stage\",\"Values\":[\"Test\"]}]}"}'" In the preceding example, all of the double quote characters in the value part of the "Query" element must be escaped because the value itself is surrounded by double quotes. For more information, see Quoting strings in the *Command Line Interface User Guide*. 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*. For example: ""ResourceTypeFilters":["AWS::S3::Bucket", "AWS::EC2::Instance"]" * **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. * **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. **Exceptions** * "ResourceGroups.Client.exceptions.UnauthorizedException" * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / close close ***** ResourceGroups.Client.close() Closes underlying endpoint connections. ResourceGroups / Client / start_tag_sync_task start_tag_sync_task ******************* ResourceGroups.Client.start_tag_sync_task(**kwargs) Creates a new tag-sync task to onboard and sync resources tagged with a specific tag key-value pair to an application. To start a tag-sync task, you need a resource tagging role. The resource tagging role grants permissions to tag and untag applications resources and must include a trust policy that allows Resource Groups to assume the role and perform resource tagging tasks on your behalf. For instructions on creating a tag-sync task, see Create a tag-sync using the Resource Groups API in the *Amazon Web Services Service Catalog AppRegistry Administrator Guide*. **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** response = client.start_tag_sync_task( Group='string', TagKey='string', TagValue='string', ResourceQuery={ 'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0', 'Query': 'string' }, RoleArn='string' ) Parameters: * **Group** (*string*) -- **[REQUIRED]** The Amazon resource name (ARN) or name of the application group for which you want to create a tag-sync task. * **TagKey** (*string*) -- 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. When using the "TagKey" parameter, you must also specify the "TagValue" parameter. If you specify a tag key-value pair, you can't use the "ResourceQuery" parameter. * **TagValue** (*string*) -- 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. When using the "TagValue" parameter, you must also specify the "TagKey" parameter. If you specify a tag key-value pair, you can't use the "ResourceQuery" parameter. * **ResourceQuery** (*dict*) -- The query you can use to create the tag-sync task. With this method, all resources matching the query are added to the specified application group. A "ResourceQuery" specifies both a query "Type" and a "Query" string as JSON string objects. For more information on defining a resource query for a tag- sync task, see the tag-based query type in Types of resource group queries in *Resource Groups User Guide*. When using the "ResourceQuery" parameter, you cannot use the "TagKey" and "TagValue" parameters. When you combine all of the elements together into a single string, any double quotes that are embedded inside another double quote pair must be escaped by preceding the embedded double quote with a backslash character (). For example, a complete "ResourceQuery" parameter must be formatted like the following CLI parameter example: "--resource-query '{"Type":"TAG_FILTERS_1_0","Query":"{\"Reso urceTypeFilters\":[\"AWS::AllSupported\"],\"TagFilters\":[{\" Key\":\"Stage\",\"Values\":[\"Test\"]}]}"}'" In the preceding example, all of the double quote characters in the value part of the "Query" element must be escaped because the value itself is surrounded by double quotes. For more information, see Quoting strings in the *Command Line Interface User Guide*. 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*. For example: ""ResourceTypeFilters":["AWS::S3::Bucket", "AWS::EC2::Instance"]" * **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. * **RoleArn** (*string*) -- **[REQUIRED]** The Amazon resource name (ARN) of the role assumed by the service to tag and untag resources on your behalf. Return type: dict Returns: **Response Syntax** { 'GroupArn': 'string', 'GroupName': 'string', 'TaskArn': 'string', 'TagKey': 'string', 'TagValue': 'string', 'ResourceQuery': { 'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0', 'Query': '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. * **ResourceQuery** *(dict) --* The query you can use to define a resource group or a search for resources. A "ResourceQuery" specifies both a query "Type" and a "Query" string as JSON string objects. See the examples section for example JSON strings. For more information about creating a resource group with a resource query, see Build queries and groups in Resource Groups in the *Resource Groups User Guide* When you combine all of the elements together into a single string, any double quotes that are embedded inside another double quote pair must be escaped by preceding the embedded double quote with a backslash character (). For example, a complete "ResourceQuery" parameter must be formatted like the following CLI parameter example: "--resource-query '{"Type":"TAG_FILTERS_1_0","Query":"{\"Re sourceTypeFilters\":[\"AWS::AllSupported\"],\"TagFilters\": [{\"Key\":\"Stage\",\"Values\":[\"Test\"]}]}"}'" In the preceding example, all of the double quote characters in the value part of the "Query" element must be escaped because the value itself is surrounded by double quotes. For more information, see Quoting strings in the *Command Line Interface User Guide*. 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*. For example: ""ResourceTypeFilters":["AWS::S3::Bucket", "AWS::EC2::Instance"]" * **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. * **RoleArn** *(string) --* The Amazon resource name (ARN) of the role assumed by the service to tag and untag resources on your behalf. **Exceptions** * "ResourceGroups.Client.exceptions.UnauthorizedException" * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" 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'|'owner'|'display-name'|'criticality', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' ) Parameters: * **Filters** (*list*) -- 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::ApplicationResourceGroup" * "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) --* * **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 "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. * **NextToken** (*string*) -- 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. Return type: 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". **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / get_tags get_tags ******** ResourceGroups.Client.get_tags(**kwargs) Returns a list of tags that are associated with a resource group, specified by an Amazon resource name (ARN). **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:GetTags" See also: AWS API Documentation **Request Syntax** response = client.get_tags( Arn='string' ) Parameters: **Arn** (*string*) -- **[REQUIRED]** The Amazon resource name (ARN) of the resource group whose tags you want to retrieve. Return type: dict Returns: **Response Syntax** { 'Arn': 'string', 'Tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **Arn** *(string) --* TheAmazon resource name (ARN) of the tagged resource group. * **Tags** *(dict) --* The tags associated with the specified resource group. * *(string) --* * *(string) --* **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / update_group update_group ************ ResourceGroups.Client.update_group(**kwargs) 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** response = client.update_group( GroupName='string', Group='string', Description='string', Criticality=123, Owner='string', DisplayName='string' ) Parameters: * **GroupName** (*string*) -- Don't use this parameter. Use "Group" instead. * **Group** (*string*) -- The name or the ARN of the resource group to update. * **Description** (*string*) -- The new description that you want to update the resource group with. Descriptions can contain letters, numbers, hyphens, underscores, periods, and spaces. * **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. Return type: 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) --* **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / group_resources group_resources *************** ResourceGroups.Client.group_resources(**kwargs) Adds the specified resources to the specified group. Warning: You can only use this operation with the following groups: * "AWS::EC2::HostManagement" * "AWS::EC2::CapacityReservationPool" * "AWS::ResourceGroups::ApplicationGroup" Other resource group types and resource types are not currently supported by this operation. **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:GroupResources" See also: AWS API Documentation **Request Syntax** response = client.group_resources( Group='string', ResourceArns=[ 'string', ] ) Parameters: * **Group** (*string*) -- **[REQUIRED]** The name or the Amazon resource name (ARN) of the resource group to add resources to. * **ResourceArns** (*list*) -- **[REQUIRED]** The list of Amazon resource names (ARNs) of the resources to be added to the group. * *(string) --* Return type: dict Returns: **Response Syntax** { 'Succeeded': [ 'string', ], 'Failed': [ { 'ResourceArn': 'string', 'ErrorMessage': 'string', 'ErrorCode': 'string' }, ], 'Pending': [ { 'ResourceArn': 'string' }, ] } **Response Structure** * *(dict) --* * **Succeeded** *(list) --* A list of Amazon resource names (ARNs) of the resources that this operation successfully added to the group. * *(string) --* * **Failed** *(list) --* A list of Amazon resource names (ARNs) of any resources that this operation failed to add to the group. * *(dict) --* A resource that failed to be added to or removed from a group. * **ResourceArn** *(string) --* The Amazon resource name (ARN) of the resource that failed to be added or removed. * **ErrorMessage** *(string) --* The error message text associated with the failure. * **ErrorCode** *(string) --* The error code associated with the failure. * **Pending** *(list) --* A list of Amazon resource names (ARNs) of any resources that this operation is still in the process adding to the group. These pending additions continue asynchronously. You can check the status of pending additions by using the "ListGroupResources" operation, and checking the "Resources" array in the response and the "Status" field of each object in that array. * *(dict) --* A structure that identifies a resource that is currently pending addition to the group as a member. Adding a resource to a resource group happens asynchronously as a background task and this one isn't completed yet. * **ResourceArn** *(string) --* The Amazon resource name (ARN) of the resource that's in a pending state. **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / get_group_configuration get_group_configuration *********************** ResourceGroups.Client.get_group_configuration(**kwargs) Retrieves the service configuration associated with the specified resource group. For details about the service configuration syntax, see Service configurations for Resource Groups. **Minimum permissions** To run this command, you must have the following permissions: * "resource-groups:GetGroupConfiguration" See also: AWS API Documentation **Request Syntax** response = client.get_group_configuration( Group='string' ) Parameters: **Group** (*string*) -- The name or the Amazon resource name (ARN) of the resource group for which you want to retrive the service configuration. Return type: dict Returns: **Response Syntax** { '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) --* * **GroupConfiguration** *(dict) --* A structure that describes the service configuration attached with the specified group. For details about the service configuration syntax, see Service configurations for Resource Groups. * **Configuration** *(list) --* The configuration currently associated with the group and in effect. * *(dict) --* An item in a group configuration. A group service configuration can have one or more items. For details about group service configuration syntax, see Service configurations for resource groups. * **Type** *(string) --* Specifies the type of group configuration item. Each item must have a unique value for "type". For the list of types that you can specify for a configuration item, see Supported resource types and parameters. * **Parameters** *(list) --* A collection of parameters for this group configuration item. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * *(dict) --* A parameter for a group configuration item. For details about group service configuration syntax, see Service configurations for resource groups. * **Name** *(string) --* The name of the group configuration parameter. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * **Values** *(list) --* The value or values to be used for the specified parameter. For the list of values you can use with each parameter, see Supported resource types and parameters. * *(string) --* * **ProposedConfiguration** *(list) --* If present, the new configuration that is in the process of being applied to the group. * *(dict) --* An item in a group configuration. A group service configuration can have one or more items. For details about group service configuration syntax, see Service configurations for resource groups. * **Type** *(string) --* Specifies the type of group configuration item. Each item must have a unique value for "type". For the list of types that you can specify for a configuration item, see Supported resource types and parameters. * **Parameters** *(list) --* A collection of parameters for this group configuration item. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * *(dict) --* A parameter for a group configuration item. For details about group service configuration syntax, see Service configurations for resource groups. * **Name** *(string) --* The name of the group configuration parameter. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters. * **Values** *(list) --* The value or values to be used for the specified parameter. For the list of values you can use with each parameter, see Supported resource types and parameters. * *(string) --* * **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. **Exceptions** * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.NotFoundException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException" ResourceGroups / Client / list_tag_sync_tasks list_tag_sync_tasks ******************* ResourceGroups.Client.list_tag_sync_tasks(**kwargs) 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** response = client.list_tag_sync_tasks( Filters=[ { 'GroupArn': 'string', 'GroupName': 'string' }, ], MaxResults=123, NextToken='string' ) Parameters: * **Filters** (*list*) -- 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. * **MaxResults** (*integer*) -- The maximum number of results to be included in the response. * **NextToken** (*string*) -- 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. Return type: dict Returns: **Response Syntax** { 'TagSyncTasks': [ { 'GroupArn': 'string', 'GroupName': 'string', 'TaskArn': 'string', 'TagKey': 'string', 'TagValue': 'string', 'ResourceQuery': { 'Type': 'TAG_FILTERS_1_0'|'CLOUDFORMATION_STACK_1_0', 'Query': '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. * **ResourceQuery** *(dict) --* The query you can use to define a resource group or a search for resources. A "ResourceQuery" specifies both a query "Type" and a "Query" string as JSON string objects. See the examples section for example JSON strings. For more information about creating a resource group with a resource query, see Build queries and groups in Resource Groups in the *Resource Groups User Guide* When you combine all of the elements together into a single string, any double quotes that are embedded inside another double quote pair must be escaped by preceding the embedded double quote with a backslash character (). For example, a complete "ResourceQuery" parameter must be formatted like the following CLI parameter example: "--resource-query '{"Type":"TAG_FILTERS_1_0","Query":"{ \"ResourceTypeFilters\":[\"AWS::AllSupported\"],\"TagFi lters\":[{\"Key\":\"Stage\",\"Values\":[\"Test\"]}]}"}'" In the preceding example, all of the double quote characters in the value part of the "Query" element must be escaped because the value itself is surrounded by double quotes. For more information, see Quoting strings in the *Command Line Interface User Guide*. 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*. For example: ""ResourceTypeFilters":["AWS::S3::Bucket", "AWS::EC2::Instance"]" * **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. * **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". **Exceptions** * "ResourceGroups.Client.exceptions.UnauthorizedException" * "ResourceGroups.Client.exceptions.BadRequestException" * "ResourceGroups.Client.exceptions.ForbiddenException" * "ResourceGroups.Client.exceptions.MethodNotAllowedException" * "ResourceGroups.Client.exceptions.TooManyRequestsException" * "ResourceGroups.Client.exceptions.InternalServerErrorException"