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 | aws.iottwinmaker.workspaces |
Fields
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. |
update_date_time | string | The date and time of the current update. |
tags | object | A map of key-value pairs to associate with a resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | WorkspaceId, Role, S3Location, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iottwinmaker.workspaces (
WorkspaceId,
Role,
S3Location,
region
)
SELECT
'{{ WorkspaceId }}',
'{{ Role }}',
'{{ S3Location }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iottwinmaker.workspaces (
WorkspaceId,
Description,
Role,
S3Location,
Tags,
region
)
SELECT
'{{ WorkspaceId }}',
'{{ Description }}',
'{{ Role }}',
'{{ S3Location }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: workspace
props:
- name: WorkspaceId
value: '{{ WorkspaceId }}'
- name: Description
value: '{{ Description }}'
- name: Role
value: '{{ Role }}'
- name: S3Location
value: '{{ S3Location }}'
- name: Tags
value: {}
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