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 = '{{ region }}' AND
Identifier = '{{ id }}';
Lists all tag_options in a region.
SELECT
region,
id
FROM awscc.servicecatalog.tag_options_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.servicecatalog.tag_options (
Active,
Value,
Key,
region
)
SELECT
'{{ active }}',
'{{ value }}',
'{{ key }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.servicecatalog.tag_options
WHERE
Identifier = '{{ id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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