Skip to main content

entities

Creates, updates, deletes or gets an entity resource or lists entities in a region

Overview

Nameentities
TypeResource
DescriptionResource schema for AWS::IoTTwinMaker::Entity
Idawscc.iottwinmaker.entities

Fields

NameDatatypeDescription
entity_idstringThe ID of the entity.
entity_namestringThe name of the entity.
statusobjectThe current status of the entity.
has_child_entitiesbooleanA Boolean value that specifies whether the entity has child entities or not.
parent_entity_idstringThe ID of the parent entity.
arnstringThe ARN of the entity.
descriptionstringThe description of the entity.
creation_date_timestringThe date and time when the entity was created.
tagsobjectA key-value pair to associate with a resource.
workspace_idstringThe ID of the workspace.
componentsobjectA map that sets information about a component type.
composite_componentsobjectA map that sets information about a composite component.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourceentitiesINSERTWorkspaceId, EntityName, region
delete_resourceentitiesDELETEIdentifier, region
update_resourceentitiesUPDATEIdentifier, PatchDocument, region
list_resourcesentities_list_onlySELECTregion
get_resourceentitiesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual entity.

SELECT
region,
entity_id,
entity_name,
status,
has_child_entities,
parent_entity_id,
arn,
description,
creation_date_time,
update_date_time,
tags,
workspace_id,
components,
composite_components
FROM awscc.iottwinmaker.entities
WHERE
region = 'us-east-1' AND
Identifier = '{{ workspace_id }}|{{ entity_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.iottwinmaker.entities (
EntityName,
WorkspaceId,
region
)
SELECT
'{{ entity_name }}',
'{{ workspace_id }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a entity resource, using stack-deploy.

/*+ update */
UPDATE awscc.iottwinmaker.entities
SET PatchDocument = string('{{ {
"EntityName": entity_name,
"ParentEntityId": parent_entity_id,
"Description": description,
"Tags": tags,
"Components": components,
"CompositeComponents": composite_components
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ workspace_id }}|{{ entity_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.iottwinmaker.entities
WHERE
Identifier = '{{ workspace_id }}|{{ entity_id }}' AND
region = 'us-east-1';

Permissions

To operate on the entities resource, the following permissions are required:

iottwinmaker:GetWorkspace,
iottwinmaker:CreateEntity,
iottwinmaker:GetEntity,
iottwinmaker:ListComponents,
iottwinmaker:ListProperties,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource