Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.codedeploy.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
next_tokenstringIf 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.
tagsarrayA 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:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectregionReturns 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_instancesupdateregion, tags, instanceNamesAdds tags to on-premises instances.
untag_resourceupdateregion, ResourceArn, TagKeysDisassociates 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_resourceupdateregion, ResourceArnAssociates the list of tags in the input Tags parameter with the resource identified by the ResourceArn input parameter.
remove_tags_from_on_premises_instancesexecregion, tags, instanceNamesRemoves 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.

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

SELECT examples

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

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;

Lifecycle Methods

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 }}"
}'
;