Skip to main content

tags

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

Overview​

Nametags
TypeResource
Idaws.codecommit.tags

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
next_tokenstringAn enumeration token that allows the operation to batch the next results of the operation.
tagsobjectA list of tag key and value pairs associated with the specified resource.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectregionGets information about Amazon Web Servicestags for a specified Amazon Resource Name (ARN) in CodeCommit. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
tag_resourceupdateregion, resourceArn, tagsAdds or updates tags for a resource in CodeCommit. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.
untag_resourceupdateregion, resourceArn, tagKeysRemoves tags for a resource in CodeCommit. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.

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​

Gets information about Amazon Web Servicestags for a specified Amazon Resource Name (ARN) in CodeCommit. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.

SELECT
next_token,
tags
FROM aws.codecommit.tags
WHERE region = '{{ region }}' -- required
;

UPDATE examples​

Adds or updates tags for a resource in CodeCommit. For a list of valid resources in CodeCommit, see CodeCommit Resources and Operations in the CodeCommit User Guide.

UPDATE aws.codecommit.tags
SET
resourceArn = '{{ resourceArn }}',
tags = '{{ tags }}'
WHERE
region = '{{ region }}' --required
AND resourceArn = '{{ resourceArn }}' --required
AND tags = '{{ tags }}' --required;