Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.organizations.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
keystringThe key identifier, or name, of the tag. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)
valuestringThe string value that's associated with the key of the tag. You can set the value of a tag to an empty string, but you can't set the value of a tag to null. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectregionLists tags that are attached to the specified resource. You can attach tags to the following resources in Organizations. Amazon Web Services account Organization root Organizational unit (OU) Policy (any type) You can only call this operation from the management account or a member account that is a delegated administrator.
tag_resourceupdateregion, ResourceId, TagsAdds one or more tags to the specified resource. Currently, you can attach tags to the following resources in Organizations. Amazon Web Services account Organization root Organizational unit (OU) Policy (any type) You can only call this operation from the management account or a member account that is a delegated administrator.
untag_resourceupdateregion, ResourceId, TagKeysRemoves any tags with the specified keys from the specified resource. You can attach tags to the following resources in Organizations. Amazon Web Services account Organization root Organizational unit (OU) Policy (any type) You can only call this operation from the management account or a member account that is a delegated administrator.

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

Lists tags that are attached to the specified resource. You can attach tags to the following resources in Organizations. Amazon Web Services account Organization root Organizational unit (OU) Policy (any type) You can only call this operation from the management account or a member account that is a delegated administrator.

SELECT
key,
value
FROM aws.organizations.tags
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Adds one or more tags to the specified resource. Currently, you can attach tags to the following resources in Organizations. Amazon Web Services account Organization root Organizational unit (OU) Policy (any type) You can only call this operation from the management account or a member account that is a delegated administrator.

UPDATE aws.organizations.tags
SET
ResourceId = '{{ ResourceId }}',
Tags = '{{ Tags }}'
WHERE
region = '{{ region }}' --required
AND ResourceId = '{{ ResourceId }}' --required
AND Tags = '{{ Tags }}' --required;