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 | awscc.resourcegroups.tag_sync_tasks |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
task_arn | string | The ARN of the TagSyncTask resource |
region | string | AWS region. |
For more information, see AWS::ResourceGroups::TagSyncTask.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | tag_sync_tasks | INSERT | Group, TagKey, TagValue, RoleArn, region |
delete_resource | tag_sync_tasks | DELETE | Identifier, region |
list_resources | tag_sync_tasks_list_only | SELECT | region |
get_resource | tag_sync_tasks | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.resourcegroups.tag_sync_tasks
WHERE
region = '{{ region }}' AND
Identifier = '{{ task_arn }}';
Lists all tag_sync_tasks in a region.
SELECT
region,
task_arn
FROM awscc.resourcegroups.tag_sync_tasks_list_only
WHERE
region = '{{ region }}';
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 awscc.resourcegroups.tag_sync_tasks (
Group,
TagKey,
TagValue,
RoleArn,
region
)
SELECT
'{{ group }}',
'{{ tag_key }}',
'{{ tag_value }}',
'{{ role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.resourcegroups.tag_sync_tasks (
Group,
TagKey,
TagValue,
RoleArn,
region
)
SELECT
'{{ group }}',
'{{ tag_key }}',
'{{ tag_value }}',
'{{ role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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: tag_key
value: '{{ tag_key }}'
- name: tag_value
value: '{{ tag_value }}'
- name: role_arn
value: '{{ role_arn }}'
DELETE example
/*+ delete */
DELETE FROM awscc.resourcegroups.tag_sync_tasks
WHERE
Identifier = '{{ task_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the tag_sync_tasks resource, the following permissions are required:
- Create
- Read
- Delete
- List
resource-groups:StartTagSyncTask,
resource-groups:CreateGroup,
iam:PassRole
resource-groups:GetTagSyncTask
resource-groups:CancelTagSyncTask,
resource-groups:DeleteGroup
resource-groups:ListTagSyncTasks