Skip to main content

component_types

Creates, updates, deletes or gets a component_type resource or lists component_types in a region

Overview

Namecomponent_types
TypeResource
DescriptionResource schema for AWS::IoTTwinMaker::ComponentType
Idawscc.iottwinmaker.component_types

Fields

NameDatatypeDescription
workspace_idstringThe ID of the workspace that contains the component type.
component_type_idstringThe ID of the component type.
descriptionstringThe description of the component type.
extends_fromarraySpecifies the parent component type to extend.
functionsobjecta Map of functions in the component type. Each function's key must be unique to this map.
is_singletonbooleanA Boolean value that specifies whether an entity can have more than one component of this type.
property_definitionsobjectAn map of the property definitions in the component type. Each property definition's key must be unique to this map.
property_groupsobjectAn map of the property groups in the component type. Each property group's key must be unique to this map.
composite_component_typesobjectAn map of the composite component types in the component type. Each composite component type's key must be unique to this map.
arnstringThe ARN of the component type.
creation_date_timestringThe date and time when the component type was created.
statusobjectThe current status of the component type.
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.
tagsobjectA map of key-value pairs to associate with a resource.
regionstringAWS region.

For more information, see AWS::IoTTwinMaker::ComponentType.

Methods

NameResourceAccessible byRequired Params
create_resourcecomponent_typesINSERTWorkspaceId, ComponentTypeId, region
delete_resourcecomponent_typesDELETEIdentifier, region
update_resourcecomponent_typesUPDATEIdentifier, PatchDocument, region
list_resourcescomponent_types_list_onlySELECTregion
get_resourcecomponent_typesSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ workspace_id }}|{{ component_type_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new component_type resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.iottwinmaker.component_types (
WorkspaceId,
ComponentTypeId,
region
)
SELECT
'{{ workspace_id }}',
'{{ component_type_id }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.iottwinmaker.component_types
WHERE
Identifier = '{{ workspace_id }}|{{ component_type_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:

ParameterDescription
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 component_types resource, the following permissions are required:

iottwinmaker:CreateComponentType,
iottwinmaker:GetComponentType,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource