component_types
Creates, updates, deletes, gets or lists a component_types resource.
Overview
| Name | component_types |
| Type | Resource |
| Id | aws.iottwinmaker.component_types |
Fields
The following fields are returned by SELECT queries:
- get_component_type
- list_component_types
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the component type. (pattern: <code>arn:((aws)|(aws-cn)|(aws-us-gov)):iottwinmaker:[a-z0-9-]+:[0-9]{12}:[/a-zA-Z0-9_-.:]+</code>) |
component_type_id | string | The ID of the component type. (pattern: <code>[a-zA-Z_.-0-9:]+</code>) |
component_type_name | string | The component type name. (pattern: <code>.[^\u0000-\u001F\u007F].*</code>) |
composite_component_types | object | This is an object that maps strings to compositeComponentTypes of the componentType. CompositeComponentType is referenced by componentTypeId. |
creation_date_time | string (date-time) | The date and time when the component type was created. |
description | string | The description of the component type. (pattern: <code>.*</code>) |
extends_from | array | The name of the parent component type that this component type extends. |
functions | object | An object that maps strings to the functions in the component type. Each string in the mapping must be unique to this object. |
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. |
is_singleton | boolean | A Boolean value that specifies whether an entity can have more than one component of this type. |
property_definitions | object | An object that maps strings to the property definitions in the component type. Each string in the mapping must be unique to this object. |
property_groups | object | The maximum number of results to return at one time. The default is 25. Valid Range: Minimum value of 1. Maximum value of 250. |
status | object | The current status of the component type. |
sync_source | string | The syncSource of the SyncJob, if this entity was created by a SyncJob. (pattern: <code>[a-zA-Z_0-9]+</code>) |
update_date_time | string (date-time) | The date and time when the component was last updated. |
workspace_id | string | The ID of the workspace that contains the component type. (pattern: <code>[a-zA-Z_0-9][a-zA-Z_-0-9]*[a-zA-Z0-9]+</code>) |
| Name | Datatype | Description |
|---|---|---|
component_type_summaries | array | A list of objects that contain information about the component types. |
max_results | integer | Specifies the maximum number of results to display. |
next_token | string | The string that specifies the next page of results. (pattern: <code>.*</code>) |
workspace_id | string | The ID of the workspace. (pattern: <code>[a-zA-Z_0-9][a-zA-Z_-0-9]*[a-zA-Z0-9]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_component_type | select | workspace_id, component_type_id, region | Retrieves information about a component type. | |
list_component_types | select | workspace_id, region | Lists all component types in a workspace. | |
create_component_type | insert | workspace_id, component_type_id, region | Creates a component type. | |
update_component_type | update | workspace_id, component_type_id, region | Updates information in a component type. | |
delete_component_type | delete | workspace_id, component_type_id, region | Deletes a component type. |
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 |
|---|---|---|
component_type_id | string | The ID of the component type to delete. |
region | string | AWS region (default: us-east-1) |
workspace_id | string | The ID of the workspace that contains the component type. |
SELECT examples
- get_component_type
- list_component_types
Retrieves information about a component type.
SELECT
arn,
component_type_id,
component_type_name,
composite_component_types,
creation_date_time,
description,
extends_from,
functions,
is_abstract,
is_schema_initialized,
is_singleton,
property_definitions,
property_groups,
status,
sync_source,
update_date_time,
workspace_id
FROM aws.iottwinmaker.component_types
WHERE workspace_id = '{{ workspace_id }}' -- required
AND component_type_id = '{{ component_type_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists all component types in a workspace.
SELECT
component_type_summaries,
max_results,
next_token,
workspace_id
FROM aws.iottwinmaker.component_types
WHERE workspace_id = '{{ workspace_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_component_type
- Manifest
Creates a component type.
INSERT INTO aws.iottwinmaker.component_types (
isSingleton,
description,
propertyDefinitions,
extendsFrom,
functions,
tags,
propertyGroups,
componentTypeName,
compositeComponentTypes,
workspace_id,
component_type_id,
region
)
SELECT
{{ isSingleton }},
'{{ description }}',
'{{ propertyDefinitions }}',
'{{ extendsFrom }}',
'{{ functions }}',
'{{ tags }}',
'{{ propertyGroups }}',
'{{ componentTypeName }}',
'{{ compositeComponentTypes }}',
'{{ workspace_id }}',
'{{ component_type_id }}',
'{{ region }}'
RETURNING
arn,
creation_date_time,
state
;
# Description fields are for documentation purposes
- name: component_types
props:
- name: workspace_id
value: "{{ workspace_id }}"
description: Required parameter for the component_types resource.
- name: component_type_id
value: "{{ component_type_id }}"
description: Required parameter for the component_types resource.
- name: region
value: "{{ region }}"
description: Required parameter for the component_types resource.
- name: isSingleton
value: {{ isSingleton }}
- name: description
value: "{{ description }}"
- name: propertyDefinitions
value: "{{ propertyDefinitions }}"
- name: extendsFrom
value:
- "{{ extendsFrom }}"
- name: functions
value: "{{ functions }}"
- name: tags
value: "{{ tags }}"
- name: propertyGroups
value: "{{ propertyGroups }}"
- name: componentTypeName
value: "{{ componentTypeName }}"
- name: compositeComponentTypes
value: "{{ compositeComponentTypes }}"
UPDATE examples
- update_component_type
Updates information in a component type.
UPDATE aws.iottwinmaker.component_types
SET
isSingleton = {{ isSingleton }},
description = '{{ description }}',
propertyDefinitions = '{{ propertyDefinitions }}',
extendsFrom = '{{ extendsFrom }}',
functions = '{{ functions }}',
propertyGroups = '{{ propertyGroups }}',
componentTypeName = '{{ componentTypeName }}',
compositeComponentTypes = '{{ compositeComponentTypes }}'
WHERE
workspace_id = '{{ workspace_id }}' --required
AND component_type_id = '{{ component_type_id }}' --required
AND region = '{{ region }}' --required
RETURNING
arn,
component_type_id,
state,
workspace_id;
DELETE examples
- delete_component_type
Deletes a component type.
DELETE FROM aws.iottwinmaker.component_types
WHERE workspace_id = '{{ workspace_id }}' --required
AND component_type_id = '{{ component_type_id }}' --required
AND region = '{{ region }}' --required
;