Skip to main content

component_types

Creates, updates, deletes, gets or lists a component_types resource.

Overview

Namecomponent_types
TypeResource
Idaws.iottwinmaker.component_types

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe 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_idstringThe ID of the component type. (pattern: <code>[a-zA-Z_.-0-9:]+</code>)
component_type_namestringThe component type name. (pattern: <code>.[^\u0000-\u001F\u007F].*</code>)
composite_component_typesobjectThis is an object that maps strings to compositeComponentTypes of the componentType. CompositeComponentType is referenced by componentTypeId.
creation_date_timestring (date-time)The date and time when the component type was created.
descriptionstringThe description of the component type. (pattern: <code>.*</code>)
extends_fromarrayThe name of the parent component type that this component type extends.
functionsobjectAn object that maps strings to the functions in the component type. Each string in the mapping must be unique to this object.
is_abstractbooleanA Boolean value that specifies whether the component type is abstract.
is_schema_initializedbooleanA Boolean value that specifies whether the component type has a schema initializer and that the schema initializer has run.
is_singletonbooleanA Boolean value that specifies whether an entity can have more than one component of this type.
property_definitionsobjectAn object that maps strings to the property definitions in the component type. Each string in the mapping must be unique to this object.
property_groupsobjectThe maximum number of results to return at one time. The default is 25. Valid Range: Minimum value of 1. Maximum value of 250.
statusobjectThe current status of the component type.
sync_sourcestringThe syncSource of the SyncJob, if this entity was created by a SyncJob. (pattern: <code>[a-zA-Z_0-9]+</code>)
update_date_timestring (date-time)The date and time when the component was last updated.
workspace_idstringThe 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>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_component_typeselectworkspace_id, component_type_id, regionRetrieves information about a component type.
list_component_typesselectworkspace_id, regionLists all component types in a workspace.
create_component_typeinsertworkspace_id, component_type_id, regionCreates a component type.
update_component_typeupdateworkspace_id, component_type_id, regionUpdates information in a component type.
delete_component_typedeleteworkspace_id, component_type_id, regionDeletes 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.

NameDatatypeDescription
component_type_idstringThe ID of the component type to delete.
regionstringAWS region (default: us-east-1)
workspace_idstringThe ID of the workspace that contains the component type.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;