Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.socialmessaging.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
status_codeintegerThe status code of the response.
tagsarrayThe tags for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresourceArn, regionList all tags associated with a resource, such as a phone number or WABA.
tag_resourceupdateregion, resourceArn, tagsAdds or overwrites only the specified tags for the specified resource. When you specify an existing tag key, the value is overwritten with the new value.
untag_resourceupdateregion, resourceArn, tagKeysRemoves the specified tags from a resource.

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)
resourceArnstringThe Amazon Resource Name (ARN) of the resource to retrieve the tags from.

SELECT examples

List all tags associated with a resource, such as a phone number or WABA.

SELECT
status_code,
tags
FROM aws.socialmessaging.tags
WHERE resourceArn = '{{ resourceArn }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Adds or overwrites only the specified tags for the specified resource. When you specify an existing tag key, the value is overwritten with the new value.

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