tag_options
Creates, updates, deletes or gets a tag_option resource or lists tag_options in a region
Overview
| Name | tag_options |
| Type | Resource |
| Description | Resource type definition for AWS::ServiceCatalog::TagOption |
| Id | awscc.servicecatalog.tag_options |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
id | string | The TagOption identifier. |
active | boolean | The TagOption active state. |
value | string | The TagOption value. |
key | string | The TagOption key. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | The TagOption identifier. |
region | string | AWS region. |
For more information, see AWS::ServiceCatalog::TagOption.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | tag_options | INSERT | Value, Key, region |
delete_resource | tag_options | DELETE | Identifier, region |
update_resource | tag_options | UPDATE | Identifier, PatchDocument, region |
list_resources | tag_options_list_only | SELECT | region |
get_resource | tag_options | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual tag_option.
SELECT
region,
id,
active,
value,
key
FROM awscc.servicecatalog.tag_options
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all tag_options in a region.
SELECT
region,
id
FROM awscc.servicecatalog.tag_options_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new tag_option resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.servicecatalog.tag_options (
Value,
Key,
region
)
SELECT
'{{ value }}',
'{{ key }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.servicecatalog.tag_options (
Active,
Value,
Key,
region
)
SELECT
'{{ active }}',
'{{ value }}',
'{{ key }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: tag_option
props:
- name: active
value: '{{ active }}'
- name: value
value: '{{ value }}'
- name: key
value: '{{ key }}'
UPDATE example
Use the following StackQL query and manifest file to update a tag_option resource, using stack-deploy.
/*+ update */
UPDATE awscc.servicecatalog.tag_options
SET PatchDocument = string('{{ {
"Active": active
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.servicecatalog.tag_options
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the tag_options resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
servicecatalog:CreateTagOption
servicecatalog:DescribeTagOption
servicecatalog:UpdateTagOption,
servicecatalog:DescribeTagOption
servicecatalog:DeleteTagOption
servicecatalog:ListTagOptions