scenes
Creates, updates, deletes or gets a scene resource or lists scenes in a region
Overview
| Name | scenes |
| Type | Resource |
| Description | Resource schema for AWS::IoTTwinMaker::Scene |
| Id | awscc.iottwinmaker.scenes |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
scene_id | string | The ID of the scene. |
arn | string | The ARN of the scene. |
description | string | The description of the scene. |
content_location | string | The relative path that specifies the location of the content definition file. |
creation_date_time | string | The date and time when the scene was created. |
tags | object | A key-value pair to associate with a resource. |
workspace_id | string | The ID of the scene. |
capabilities | array | A list of capabilities that the scene uses to render. |
scene_metadata | object | A key-value pair of scene metadata for the scene. |
generated_scene_metadata | object | A key-value pair of generated scene metadata for the scene. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
scene_id | string | The ID of the scene. |
workspace_id | string | The ID of the scene. |
region | string | AWS region. |
For more information, see AWS::IoTTwinMaker::Scene.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | scenes | INSERT | WorkspaceId, SceneId, ContentLocation, region |
delete_resource | scenes | DELETE | Identifier, region |
update_resource | scenes | UPDATE | Identifier, PatchDocument, region |
list_resources | scenes_list_only | SELECT | region |
get_resource | scenes | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ workspace_id }}|{{ scene_id }}';
Lists all scenes in a region.
SELECT
region,
workspace_id,
scene_id
FROM awscc.iottwinmaker.scenes_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new scene resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iottwinmaker.scenes (
SceneId,
ContentLocation,
WorkspaceId,
region
)
SELECT
'{{ scene_id }}',
'{{ content_location }}',
'{{ workspace_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iottwinmaker.scenes (
SceneId,
Description,
ContentLocation,
Tags,
WorkspaceId,
Capabilities,
SceneMetadata,
region
)
SELECT
'{{ scene_id }}',
'{{ description }}',
'{{ content_location }}',
'{{ tags }}',
'{{ workspace_id }}',
'{{ capabilities }}',
'{{ scene_metadata }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: scene
props:
- name: scene_id
value: '{{ scene_id }}'
- name: description
value: '{{ description }}'
- name: content_location
value: '{{ content_location }}'
- name: tags
value: {}
- name: workspace_id
value: '{{ workspace_id }}'
- name: capabilities
value:
- '{{ capabilities[0] }}'
- name: scene_metadata
value: {}
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.iottwinmaker.scenes
WHERE
Identifier = '{{ workspace_id }}|{{ scene_id }}' AND
region = 'us-east-1';
Permissions
To operate on the scenes resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iottwinmaker:CreateScene,
iottwinmaker:GetScene,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource
iottwinmaker:GetWorkspace,
iottwinmaker:GetScene,
iottwinmaker:ListTagsForResource
iottwinmaker:GetScene,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource,
iottwinmaker:UntagResource,
iottwinmaker:UpdateScene
iottwinmaker:DeleteScene,
iottwinmaker:GetScene,
iottwinmaker:GetWorkspace
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:ListScenes