workspaces
Creates, updates, deletes or gets a workspace resource or lists workspaces in a region
Overview
| Name | workspaces |
| Type | Resource |
| Description | Resource schema for AWS::IoTTwinMaker::Workspace |
| Id | awscc.iottwinmaker.workspaces |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
workspace_id | string | The ID of the workspace. |
arn | string | The ARN of the workspace. |
description | string | The description of the workspace. |
role | string | The ARN of the execution role associated with the workspace. |
s3_location | string | The ARN of the S3 bucket where resources associated with the workspace are stored. |
creation_date_time | string | The date and time when the workspace was created. |
tags | object | A map of key-value pairs to associate with a resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
workspace_id | string | The ID of the workspace. |
region | string | AWS region. |
For more information, see AWS::IoTTwinMaker::Workspace.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | workspaces | INSERT | WorkspaceId, Role, S3Location, region |
delete_resource | workspaces | DELETE | Identifier, region |
update_resource | workspaces | UPDATE | Identifier, PatchDocument, region |
list_resources | workspaces_list_only | SELECT | region |
get_resource | workspaces | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all workspaces in a region.
SELECT
region,
workspace_id
FROM awscc.iottwinmaker.workspaces_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new workspace resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iottwinmaker.workspaces (
WorkspaceId,
Role,
S3Location,
region
)
SELECT
'{{ workspace_id }}',
'{{ role }}',
'{{ s3_location }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.iottwinmaker.workspaces (
WorkspaceId,
Description,
Role,
S3Location,
Tags,
region
)
SELECT
'{{ workspace_id }}',
'{{ description }}',
'{{ role }}',
'{{ s3_location }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: workspace
props:
- name: workspace_id
value: '{{ workspace_id }}'
- name: description
value: '{{ description }}'
- name: role
value: '{{ role }}'
- name: s3_location
value: '{{ s3_location }}'
- name: tags
value: {}
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:
- Create
- Read
- Update
- Delete
- List
iam:PassRole,
iottwinmaker:CreateWorkspace,
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:TagResource,
iottwinmaker:UntagResource,
iottwinmaker:UpdateWorkspace
iottwinmaker:DeleteWorkspace,
iottwinmaker:GetWorkspace
iottwinmaker:GetWorkspace,
iottwinmaker:ListTagsForResource,
iottwinmaker:ListWorkspaces