Skip to main content

tag_sync_tasks

Creates, updates, deletes, gets or lists a tag_sync_tasks resource.

Overview

Nametag_sync_tasks
TypeResource
Idaws.resource_groups.tag_sync_tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The timestamp of when the tag-sync task was created.
error_messagestringThe specific error message in cases where the tag-sync task status is ERROR.
group_arnstringThe Amazon resource name (ARN) of the application group. (pattern: <code>arn:aws(-[a-z]+)*:resource-groups:[a-z]{2}(-[a-z]+)+-\d{1}:[0-9]{12}:group/([a-zA-Z0-9_.-]{1,300}|[a-zA-Z0-9_.-]{1,150}/[a-z0-9]{26})</code>)
group_namestringThe name of the application group. (pattern: <code>[a-zA-Z0-9_.-]{1,300}|[a-zA-Z0-9_.-]{1,150}/[a-z0-9]{26}</code>)
resource_queryobjectThe 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"]
role_arnstringThe 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. (pattern: <code>arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)
statusstringThe 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. (ACTIVE, ERROR)
tag_keystringThe tag key. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)
tag_valuestringThe tag value. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)
task_arnstringThe Amazon resource name (ARN) of the tag-sync task. (pattern: <code>arn:aws(-[a-z]+)*:resource-groups:[a-z]{2}(-[a-z]+)+-\d{1}:[0-9]{12}:group/[a-zA-Z0-9_.-]{1,150}/[a-z0-9]{26}/tag-sync-task/[a-z0-9]{26}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_tag_sync_taskselectregionReturns 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
list_tag_sync_tasksselectregionReturns 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

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

SELECT
created_at,
error_message,
group_arn,
group_name,
resource_query,
role_arn,
status,
tag_key,
tag_value,
task_arn
FROM aws.resource_groups.tag_sync_tasks
WHERE region = '{{ region }}' -- required
;