tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.codedeploy.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_resource
| Name | Datatype | Description |
|---|---|---|
next_token | string | If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list application revisions call to return the next set of application revisions in the list. |
tags | array | A list of tags returned by ListTagsForResource. The tags are associated with the resource identified by the input ResourceArn parameter. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags_for_resource | select | region | Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN). Tags are used to organize and categorize your CodeDeploy resources. | |
add_tags_to_on_premises_instances | update | region, tags, instanceNames | Adds tags to on-premises instances. | |
untag_resource | update | region, ResourceArn, TagKeys | Disassociates a resource from a list of tags. The resource is identified by the ResourceArn input parameter. The tags are identified by the list of keys in the TagKeys input parameter. | |
tag_resource | update | region, ResourceArn | Associates the list of tags in the input Tags parameter with the resource identified by the ResourceArn input parameter. | |
remove_tags_from_on_premises_instances | exec | region, tags, instanceNames | Removes one or more tags from one or more on-premises instances. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_tags_for_resource
Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN). Tags are used to organize and categorize your CodeDeploy resources.
SELECT
next_token,
tags
FROM aws.codedeploy.tags
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- add_tags_to_on_premises_instances
- untag_resource
- tag_resource
Adds tags to on-premises instances.
UPDATE aws.codedeploy.tags
SET
tags = '{{ tags }}',
instanceNames = '{{ instanceNames }}'
WHERE
region = '{{ region }}' --required
AND tags = '{{ tags }}' --required
AND instanceNames = '{{ instanceNames }}' --required;
Disassociates a resource from a list of tags. The resource is identified by the ResourceArn input parameter. The tags are identified by the list of keys in the TagKeys input parameter.
UPDATE aws.codedeploy.tags
SET
ResourceArn = '{{ ResourceArn }}',
TagKeys = '{{ TagKeys }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required
AND TagKeys = '{{ TagKeys }}' --required;
Associates the list of tags in the input Tags parameter with the resource identified by the ResourceArn input parameter.
UPDATE aws.codedeploy.tags
SET
ResourceArn = '{{ ResourceArn }}',
Tags = '{{ Tags }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required;
Lifecycle Methods
- remove_tags_from_on_premises_instances
Removes one or more tags from one or more on-premises instances.
EXEC aws.codedeploy.tags.remove_tags_from_on_premises_instances
@region='{{ region }}' --required
@@json=
'{
"tags": "{{ tags }}",
"instanceNames": "{{ instanceNames }}"
}'
;