Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.ce.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
next_page_tokenstringThe token for the next set of retrievable results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size. (pattern: <code>[\S\s]*</code>)
return_sizeintegerThe number of query results that Amazon Web Services returns at a time.
tagsarrayThe tags that match your request.
total_sizeintegerThe total number of query results.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_tagsselectregionQueries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string.
list_tags_for_resourceselectregionReturns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).
tag_resourceupdateregion, ResourceArn, ResourceTagsAn API operation for adding one or more tags (key-value pairs) to a resource. You can use the TagResource operation with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value you specify replaces the previous value for that tag. Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.
untag_resourceupdateregion, ResourceArn, ResourceTagKeysRemoves one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.

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

Queries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string.

SELECT
next_page_token,
return_size,
tags,
total_size
FROM aws.ce.tags
WHERE region = '{{ region }}' -- required
;

UPDATE examples

An API operation for adding one or more tags (key-value pairs) to a resource. You can use the TagResource operation with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value you specify replaces the previous value for that tag. Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.

UPDATE aws.ce.tags
SET
ResourceArn = '{{ ResourceArn }}',
ResourceTags = '{{ ResourceTags }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required
AND ResourceTags = '{{ ResourceTags }}' --required;