Skip to main content

tag_options

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

Overview

Nametag_options
TypeResource
Idaws.servicecatalog.tag_options

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
activebooleanThe TagOption active state.
idstringThe TagOption identifier.
keystringThe TagOption key. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)
ownerstringThe Amazon Web Services account Id of the owner account that created the TagOption.
valuestringThe TagOption value. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_tag_optionselectregionGets information about the specified TagOption.
create_tag_optioninsertregionCreates a TagOption.
associate_tag_option_with_resourceupdateregion, ResourceId, TagOptionIdAssociate the specified TagOption with the specified portfolio or product.
update_tag_optionupdateregionUpdates the specified TagOption.
delete_tag_optiondeleteregionDeletes the specified TagOption. You cannot delete a TagOption if it is associated with a product or portfolio.
disassociate_tag_option_from_resourceexecregion, ResourceId, TagOptionIdDisassociates the specified TagOption from the specified resource.
list_tag_optionsexecregionLists the specified TagOptions or all TagOptions.

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 the specified TagOption.

SELECT
active,
id,
key,
owner,
value
FROM aws.servicecatalog.tag_options
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a TagOption.

INSERT INTO aws.servicecatalog.tag_options (
Key,
Value,
region
)
SELECT
'{{ Key }}',
'{{ Value }}',
'{{ region }}'
RETURNING
tag_option_detail
;

UPDATE examples

Associate the specified TagOption with the specified portfolio or product.

UPDATE aws.servicecatalog.tag_options
SET
ResourceId = '{{ ResourceId }}',
TagOptionId = '{{ TagOptionId }}'
WHERE
region = '{{ region }}' --required
AND ResourceId = '{{ ResourceId }}' --required
AND TagOptionId = '{{ TagOptionId }}' --required;

DELETE examples

Deletes the specified TagOption. You cannot delete a TagOption if it is associated with a product or portfolio.

DELETE FROM aws.servicecatalog.tag_options
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Disassociates the specified TagOption from the specified resource.

EXEC aws.servicecatalog.tag_options.disassociate_tag_option_from_resource
@region='{{ region }}' --required
@@json=
'{
"ResourceId": "{{ ResourceId }}",
"TagOptionId": "{{ TagOptionId }}"
}'
;