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 = '{{ region }}' 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 = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
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:
| Parameter | Description |
|---|---|
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:
- 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