component_types
Creates, updates, deletes or gets a component_type resource or lists component_types in a region
Overview
| Name | component_types |
| Type | Resource |
| Description | Resource schema for AWS::IoTTwinMaker::ComponentType |
| Id | awscc.iottwinmaker.component_types |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
description | string | The description of the component type. |
extends_from | array | Specifies the parent component type to extend. |
functions | object | a Map of functions in the component type. Each function's key must be unique to this map. |
is_singleton | boolean | A Boolean value that specifies whether an entity can have more than one component of this type. |
property_definitions | object | An map of the property definitions in the component type. Each property definition's key must be unique to this map. |
property_groups | object | An map of the property groups in the component type. Each property group's key must be unique to this map. |
composite_component_types | object | An map of the composite component types in the component type. Each composite component type's key must be unique to this map. |
arn | string | The ARN of the component type. |
creation_date_time | string | The date and time when the component type was created. |
status | object | The current status of the component type. |
is_abstract | boolean | A Boolean value that specifies whether the component type is abstract. |
is_schema_initialized | boolean | A Boolean value that specifies whether the component type has a schema initializer and that the schema initializer has run. |
tags | object | A map of key-value pairs to associate with a resource. |
region | string | AWS region. |
| 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. |
For more information, see AWS::IoTTwinMaker::ComponentType.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | component_types | INSERT | WorkspaceId, ComponentTypeId, region |
delete_resource | component_types | DELETE | Identifier, region |
update_resource | component_types | UPDATE | Identifier, PatchDocument, region |
list_resources | component_types_list_only | SELECT | region |
get_resource | component_types | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual component_type.
SELECT
region,
workspace_id,
component_type_id,
description,
extends_from,
functions,
is_singleton,
property_definitions,
property_groups,
composite_component_types,
arn,
creation_date_time,
update_date_time,
status,
is_abstract,
is_schema_initialized,
tags
FROM awscc.iottwinmaker.component_types
WHERE
region = 'us-east-1' AND
Identifier = '{{ workspace_id }}|{{ component_type_id }}';
Lists all component_types in a region.
SELECT
region,
workspace_id,
component_type_id
FROM awscc.iottwinmaker.component_types_list_only
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 awscc.iottwinmaker.component_types (
WorkspaceId,
ComponentTypeId,
region
)
SELECT
'{{ workspace_id }}',
'{{ component_type_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iottwinmaker.component_types (
WorkspaceId,
ComponentTypeId,
Description,
ExtendsFrom,
Functions,
IsSingleton,
PropertyDefinitions,
PropertyGroups,
CompositeComponentTypes,
Tags,
region
)
SELECT
'{{ workspace_id }}',
'{{ component_type_id }}',
'{{ description }}',
'{{ extends_from }}',
'{{ functions }}',
'{{ is_singleton }}',
'{{ property_definitions }}',
'{{ property_groups }}',
'{{ composite_component_types }}',
'{{ 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: workspace_id
value: '{{ workspace_id }}'
- name: component_type_id
value: '{{ component_type_id }}'
- name: description
value: '{{ description }}'
- name: extends_from
value:
- '{{ extends_from[0] }}'
- name: functions
value: {}
- name: is_singleton
value: '{{ is_singleton }}'
- name: property_definitions
value: {}
- name: property_groups
value: {}
- name: composite_component_types
value: {}
- name: tags
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a component_type resource, using stack-deploy.
/*+ update */
UPDATE awscc.iottwinmaker.component_types
SET PatchDocument = string('{{ {
"Description": description,
"ExtendsFrom": extends_from,
"Functions": functions,
"IsSingleton": is_singleton,
"PropertyDefinitions": property_definitions,
"PropertyGroups": property_groups,
"CompositeComponentTypes": composite_component_types,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ workspace_id }}|{{ component_type_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iottwinmaker.component_types
WHERE
Identifier = '{{ workspace_id }}|{{ component_type_id }}' AND
region = 'us-east-1';
Permissions
To operate on the component_types resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iottwinmaker:CreateComponentType,
iottwinmaker:GetComponentType,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource
iottwinmaker:GetComponentType,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource
iottwinmaker:GetComponentType,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource,
iottwinmaker:UntagResource,
iottwinmaker:UpdateComponentType
iottwinmaker:DeleteComponentType,
iottwinmaker:GetComponentType,
iottwinmaker:GetWorkspace
iottwinmaker:GetComponentType,
iottwinmaker:GetWorkspace,
iottwinmaker:ListComponentTypes,
iottwinmaker:ListTagsForResource