component_types
Used to retrieve a list of component_types
in a region or to create or delete a component_types
resource, use component_type
to read or update an individual resource.
Overview
Name | component_types |
Type | Resource |
Description | Resource schema for AWS::IoTTwinMaker::ComponentType |
Id | aws.iottwinmaker.component_types |
Fields
Name | Datatype | Description |
---|---|---|
workspace_id | string | The ID of the workspace that contains the component type. |
component_type_id | string | The ID of the component type. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | WorkspaceId, ComponentTypeId, region |
delete_resource | DELETE | data__Identifier, region |
list_resource | SELECT | region |
SELECT
Example
SELECT
region,
workspace_id,
component_type_id
FROM aws.iottwinmaker.component_types
WHERE region = 'us-east-1';
INSERT
Example
Use the following StackQL query and manifest file to create a new component_type
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iottwinmaker.component_types (
WorkspaceId,
ComponentTypeId,
region
)
SELECT
'{{ WorkspaceId }}',
'{{ ComponentTypeId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iottwinmaker.component_types (
WorkspaceId,
ComponentTypeId,
Description,
ExtendsFrom,
Functions,
IsSingleton,
PropertyDefinitions,
PropertyGroups,
CompositeComponentTypes,
Tags,
region
)
SELECT
'{{ WorkspaceId }}',
'{{ ComponentTypeId }}',
'{{ Description }}',
'{{ ExtendsFrom }}',
'{{ Functions }}',
'{{ IsSingleton }}',
'{{ PropertyDefinitions }}',
'{{ PropertyGroups }}',
'{{ CompositeComponentTypes }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: component_type
props:
- name: WorkspaceId
value: '{{ WorkspaceId }}'
- name: ComponentTypeId
value: '{{ ComponentTypeId }}'
- name: Description
value: '{{ Description }}'
- name: ExtendsFrom
value:
- '{{ ExtendsFrom[0] }}'
- name: Functions
value: {}
- name: IsSingleton
value: '{{ IsSingleton }}'
- name: PropertyDefinitions
value: {}
- name: PropertyGroups
value: {}
- name: CompositeComponentTypes
value: {}
- name: Tags
value: {}
DELETE
Example
/*+ delete */
DELETE FROM aws.iottwinmaker.component_types
WHERE data__Identifier = '<WorkspaceId|ComponentTypeId>'
AND region = 'us-east-1';
Permissions
To operate on the component_types
resource, the following permissions are required:
Create
iottwinmaker:CreateComponentType,
iottwinmaker:GetComponentType,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource
Delete
iottwinmaker:DeleteComponentType,
iottwinmaker:GetComponentType,
iottwinmaker:GetWorkspace
List
iottwinmaker:GetComponentType,
iottwinmaker:GetWorkspace,
iottwinmaker:ListComponentTypes,
iottwinmaker:ListTagsForResource