tag_sync_tasks
Creates, updates, deletes or gets a tag_sync_task
resource or lists tag_sync_tasks
in a region
Overview
Name | tag_sync_tasks |
Type | Resource |
Description | Schema for ResourceGroups::TagSyncTask |
Id | aws.resourcegroups.tag_sync_tasks |
Fields
Name | Datatype | Description |
---|---|---|
group | string | The Amazon resource name (ARN) or name of the application group for which you want to create a tag-sync task |
group_arn | string | The Amazon resource name (ARN) of the ApplicationGroup for which the TagSyncTask is created |
group_name | string | The Name of the application group for which the TagSyncTask is created |
task_arn | string | The ARN of the TagSyncTask resource |
tag_key | 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. |
tag_value | 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. |
role_arn | 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 TagSyncTask |
region | string | AWS region. |
For more information, see AWS::ResourceGroups::TagSyncTask
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Group, TagKey, TagValue, RoleArn, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all tag_sync_tasks
in a region.
SELECT
region,
group,
group_arn,
group_name,
task_arn,
tag_key,
tag_value,
role_arn,
status
FROM aws.resourcegroups.tag_sync_tasks
WHERE region = 'us-east-1';
Gets all properties from an individual tag_sync_task
.
SELECT
region,
group,
group_arn,
group_name,
task_arn,
tag_key,
tag_value,
role_arn,
status
FROM aws.resourcegroups.tag_sync_tasks
WHERE region = 'us-east-1' AND data__Identifier = '<TaskArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new tag_sync_task
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.resourcegroups.tag_sync_tasks (
Group,
TagKey,
TagValue,
RoleArn,
region
)
SELECT
'{{ Group }}',
'{{ TagKey }}',
'{{ TagValue }}',
'{{ RoleArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.resourcegroups.tag_sync_tasks (
Group,
TagKey,
TagValue,
RoleArn,
region
)
SELECT
'{{ Group }}',
'{{ TagKey }}',
'{{ TagValue }}',
'{{ RoleArn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: tag_sync_task
props:
- name: Group
value: '{{ Group }}'
- name: TagKey
value: '{{ TagKey }}'
- name: TagValue
value: '{{ TagValue }}'
- name: RoleArn
value: '{{ RoleArn }}'
DELETE
example
/*+ delete */
DELETE FROM aws.resourcegroups.tag_sync_tasks
WHERE data__Identifier = '<TaskArn>'
AND region = 'us-east-1';
Permissions
To operate on the tag_sync_tasks
resource, the following permissions are required:
Create
resource-groups:StartTagSyncTask,
resource-groups:CreateGroup,
iam:PassRole
Read
resource-groups:GetTagSyncTask
Delete
resource-groups:CancelTagSyncTask,
resource-groups:DeleteGroup
List
resource-groups:ListTagSyncTasks