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
Idawscc.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.
tagsobjectA map of key-value pairs to associate with a resource.
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourceworkspacesINSERTWorkspaceId, Role, S3Location, region
delete_resourceworkspacesDELETEIdentifier, region
update_resourceworkspacesUPDATEIdentifier, PatchDocument, region
list_resourcesworkspaces_list_onlySELECTregion
get_resourceworkspacesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual workspace.

SELECT
region,
workspace_id,
arn,
description,
role,
s3_location,
creation_date_time,
update_date_time,
tags
FROM awscc.iottwinmaker.workspaces
WHERE
region = 'us-east-1' AND
Identifier = '{{ workspace_id }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.iottwinmaker.workspaces
SET PatchDocument = string('{{ {
"Description": description,
"Role": role,
"S3Location": s3_location,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ workspace_id }}';

DELETE example

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

Permissions

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

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