Skip to main content

workspaces

Creates, updates, deletes or gets a workspace resource or lists workspaces in a region

Overview

Nameworkspaces
TypeResource
DescriptionResource schema for AWS::IoTTwinMaker::Workspace
Idaws.iottwinmaker.workspaces

Fields

NameDatatypeDescription
workspace_idstringThe ID of the workspace.
arnstringThe ARN of the workspace.
descriptionstringThe description of the workspace.
rolestringThe ARN of the execution role associated with the workspace.
s3_locationstringThe ARN of the S3 bucket where resources associated with the workspace are stored.
creation_date_timestringThe date and time when the workspace was created.
update_date_timestringThe date and time of the current update.
tagsobjectA map of key-value pairs to associate with a resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTWorkspaceId, Role, S3Location, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all workspaces in a region.

SELECT
region,
workspace_id,
arn,
description,
role,
s3_location,
creation_date_time,
update_date_time,
tags
FROM aws.iottwinmaker.workspaces
WHERE region = 'us-east-1';

Gets all properties from an individual workspace.

SELECT
region,
workspace_id,
arn,
description,
role,
s3_location,
creation_date_time,
update_date_time,
tags
FROM aws.iottwinmaker.workspaces
WHERE region = 'us-east-1' AND data__Identifier = '<WorkspaceId>';

INSERT example

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

/*+ create */
INSERT INTO aws.iottwinmaker.workspaces (
WorkspaceId,
Role,
S3Location,
region
)
SELECT
'{{ WorkspaceId }}',
'{{ Role }}',
'{{ S3Location }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iottwinmaker.workspaces
WHERE data__Identifier = '<WorkspaceId>'
AND region = 'us-east-1';

Permissions

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

Create

iam:PassRole,
iottwinmaker:CreateWorkspace,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource

Read

iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource

Update

iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource,
iottwinmaker:UntagResource,
iottwinmaker:UpdateWorkspace

Delete

iottwinmaker:DeleteWorkspace,
iottwinmaker:GetWorkspace

List

iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:ListWorkspaces