Skip to main content

scenes

Creates, updates, deletes or gets a scene resource or lists scenes in a region

Overview

Namescenes
TypeResource
DescriptionResource schema for AWS::IoTTwinMaker::Scene
Idawscc.iottwinmaker.scenes

Fields

NameDatatypeDescription
scene_idstringThe ID of the scene.
arnstringThe ARN of the scene.
descriptionstringThe description of the scene.
content_locationstringThe relative path that specifies the location of the content definition file.
creation_date_timestringThe date and time when the scene was created.
tagsobjectA key-value pair to associate with a resource.
workspace_idstringThe ID of the scene.
capabilitiesarrayA list of capabilities that the scene uses to render.
scene_metadataobjectA key-value pair of scene metadata for the scene.
generated_scene_metadataobjectA key-value pair of generated scene metadata for the scene.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcescenesINSERTWorkspaceId, SceneId, ContentLocation, region
delete_resourcescenesDELETEIdentifier, region
update_resourcescenesUPDATEIdentifier, PatchDocument, region
list_resourcesscenes_list_onlySELECTregion
get_resourcescenesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual scene.

SELECT
region,
scene_id,
arn,
description,
content_location,
creation_date_time,
update_date_time,
tags,
workspace_id,
capabilities,
scene_metadata,
generated_scene_metadata
FROM awscc.iottwinmaker.scenes
WHERE
region = '{{ region }}' AND
Identifier = '{{ workspace_id }}|{{ scene_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.iottwinmaker.scenes (
SceneId,
ContentLocation,
WorkspaceId,
region
)
SELECT
'{{ scene_id }}',
'{{ content_location }}',
'{{ workspace_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 scene resource, using stack-deploy.

/*+ update */
UPDATE awscc.iottwinmaker.scenes
SET PatchDocument = string('{{ {
"Description": description,
"ContentLocation": content_location,
"Tags": tags,
"Capabilities": capabilities,
"SceneMetadata": scene_metadata
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ workspace_id }}|{{ scene_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.iottwinmaker.scenes
WHERE
Identifier = '{{ workspace_id }}|{{ scene_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 scenes resource, the following permissions are required:

iottwinmaker:CreateScene,
iottwinmaker:GetScene,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource