tag_options
Creates, updates, deletes, gets or lists a tag_options resource.
Overview
| Name | tag_options |
| Type | Resource |
| Id | aws.servicecatalog.tag_options |
Fields
The following fields are returned by SELECT queries:
- describe_tag_option
| Name | Datatype | Description |
|---|---|---|
active | boolean | The TagOption active state. |
id | string | The TagOption identifier. |
key | string | The TagOption key. (pattern: <code>^([\p{L}\p{Z}\p{N}_.:/=+-@]*)$</code>) |
owner | string | The Amazon Web Services account Id of the owner account that created the TagOption. |
value | string | The TagOption value. (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 |
|---|---|---|---|---|
describe_tag_option | select | region | Gets information about the specified TagOption. | |
create_tag_option | insert | region | Creates a TagOption. | |
associate_tag_option_with_resource | update | region, ResourceId, TagOptionId | Associate the specified TagOption with the specified portfolio or product. | |
update_tag_option | update | region | Updates the specified TagOption. | |
delete_tag_option | delete | region | Deletes the specified TagOption. You cannot delete a TagOption if it is associated with a product or portfolio. | |
disassociate_tag_option_from_resource | exec | region, ResourceId, TagOptionId | Disassociates the specified TagOption from the specified resource. | |
list_tag_options | exec | region | Lists 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_tag_option
Gets information about the specified TagOption.
SELECT
active,
id,
key,
owner,
value
FROM aws.servicecatalog.tag_options
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_tag_option
- Manifest
Creates a TagOption.
INSERT INTO aws.servicecatalog.tag_options (
Key,
Value,
region
)
SELECT
'{{ Key }}',
'{{ Value }}',
'{{ region }}'
RETURNING
tag_option_detail
;
# Description fields are for documentation purposes
- name: tag_options
props:
- name: region
value: "{{ region }}"
description: Required parameter for the tag_options resource.
- name: Key
value: "{{ Key }}"
description: |
The TagOption key.
- name: Value
value: "{{ Value }}"
description: |
The TagOption value.
UPDATE examples
- associate_tag_option_with_resource
- update_tag_option
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;
Updates the specified TagOption.
UPDATE aws.servicecatalog.tag_options
SET
Id = '{{ Id }}',
Value = '{{ Value }}',
Active = {{ Active }}
WHERE
region = '{{ region }}' --required
RETURNING
tag_option_detail;
DELETE examples
- delete_tag_option
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
- disassociate_tag_option_from_resource
- list_tag_options
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 }}"
}'
;
Lists the specified TagOptions or all TagOptions.
EXEC aws.servicecatalog.tag_options.list_tag_options
@region='{{ region }}' --required
@@json=
'{
"Filters": "{{ Filters }}",
"PageSize": {{ PageSize }},
"PageToken": "{{ PageToken }}"
}'
;