Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.codeguru_reviewer.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsobjectAn array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts: A tag key (for example, CostCenter, Environment, Project, or Secret). Tag keys are case sensitive. An optional field known as a tag value (for example, 111122223333, Production, or a team name). Omitting the tag value is the same as using an empty string. Like tag keys, tag values are case sensitive.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource_arn, regionReturns the list of tags associated with an associated repository resource.
untag_resourceupdateresource_arn, tagKeys, regionRemoves a tag from an associated repository.
tag_resourceupdateresource_arn, regionAdds one or more tags to an associated repository.

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)
resource_arnstringThe Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositoryAssociations.
tagKeysarrayA list of the keys for each tag you want to remove from an associated repository.

SELECT examples

Returns the list of tags associated with an associated repository resource.

SELECT
tags
FROM aws.codeguru_reviewer.tags
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Removes a tag from an associated repository.

UPDATE aws.codeguru_reviewer.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;