tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.cloudhsmv2.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags
| Name | Datatype | Description |
|---|---|---|
key | string | The key of the tag. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>) |
value | string | The value of the tag. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags | select | region | Gets a list of tags for the specified CloudHSM cluster. This is a paginated operation, which means that each response might contain only a subset of all the tags. When the response contains only a subset of tags, it includes a NextToken value. Use this value in a subsequent ListTags request to get more tags. When you receive a response with no NextToken (or an empty or null value), that means there are no more tags to get. Cross-account use: No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account. | |
tag_resource | update | region, ResourceId, TagList | Adds or overwrites one or more tags for the specified CloudHSM cluster. Cross-account use: No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account. | |
untag_resource | update | region, ResourceId, TagKeyList | Removes the specified tag or tags from the specified CloudHSM cluster. Cross-account use: No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_tags
Gets a list of tags for the specified CloudHSM cluster. This is a paginated operation, which means that each response might contain only a subset of all the tags. When the response contains only a subset of tags, it includes a NextToken value. Use this value in a subsequent ListTags request to get more tags. When you receive a response with no NextToken (or an empty or null value), that means there are no more tags to get. Cross-account use: No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.
SELECT
key,
value
FROM aws.cloudhsmv2.tags
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- tag_resource
- untag_resource
Adds or overwrites one or more tags for the specified CloudHSM cluster. Cross-account use: No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.
UPDATE aws.cloudhsmv2.tags
SET
ResourceId = '{{ ResourceId }}',
TagList = '{{ TagList }}'
WHERE
region = '{{ region }}' --required
AND ResourceId = '{{ ResourceId }}' --required
AND TagList = '{{ TagList }}' --required;
Removes the specified tag or tags from the specified CloudHSM cluster. Cross-account use: No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.
UPDATE aws.cloudhsmv2.tags
SET
ResourceId = '{{ ResourceId }}',
TagKeyList = '{{ TagKeyList }}'
WHERE
region = '{{ region }}' --required
AND ResourceId = '{{ ResourceId }}' --required
AND TagKeyList = '{{ TagKeyList }}' --required;