workspaces
Creates, updates, deletes, gets or lists a workspaces resource.
Overview
| Name | workspaces |
| Type | Resource |
| Id | aws.iottwinmaker.workspaces |
Fields
The following fields are returned by SELECT queries:
- get_workspace
- list_workspaces
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the workspace. (pattern: <code>arn:((aws)|(aws-cn)|(aws-us-gov)):iottwinmaker:[a-z0-9-]+:[0-9]{12}:[/a-zA-Z0-9_-.:]+</code>) |
creation_date_time | string (date-time) | The date and time when the workspace was created. |
description | string | The description of the workspace. (pattern: <code>.*</code>) |
linked_services | array | A list of services that are linked to the workspace. |
role | string | The ARN of the execution role associated with the workspace. (pattern: <code>arn:((aws)|(aws-cn)|(aws-us-gov)):iam::[0-9]{12}:role/.*</code>) |
s_3_location | string | The ARN of the S3 bucket where resources associated with the workspace are stored. (pattern: <code>.(^arn:((aws)|(aws-cn)|(aws-us-gov)):s3:::)([a-zA-Z0-9_-]+$).</code>) |
update_date_time | string (date-time) | The date and time when the workspace was last updated. |
workspace_id | string | The ID of the workspace. (pattern: <code>[a-zA-Z_0-9][a-zA-Z_-0-9]*[a-zA-Z0-9]+</code>) |
| Name | Datatype | Description |
|---|---|---|
next_token | string | The string that specifies the next page of results. (pattern: <code>.*</code>) |
workspace_summaries | array | A list of objects that contain information about the workspaces. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_workspace | select | workspace_id, region | Retrieves information about a workspace. | |
list_workspaces | select | region | Retrieves information about workspaces in the current account. | |
create_workspace | insert | workspace_id, region | Creates a workplace. | |
update_workspace | update | workspace_id, region | Updates a workspace. | |
delete_workspace | delete | workspace_id, region | Deletes a workspace. | |
execute_query | exec | region, workspaceId, queryStatement | Run queries to access information from your knowledge graph of entities within individual workspaces. The ExecuteQuery action only works with Amazon Web Services Java SDK2. ExecuteQuery will not work with any Amazon Web Services Java SDK version < 2.x. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
workspace_id | string | The ID of the workspace to delete. |
SELECT examples
- get_workspace
- list_workspaces
Retrieves information about a workspace.
SELECT
arn,
creation_date_time,
description,
linked_services,
role,
s_3_location,
update_date_time,
workspace_id
FROM aws.iottwinmaker.workspaces
WHERE workspace_id = '{{ workspace_id }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves information about workspaces in the current account.
SELECT
next_token,
workspace_summaries
FROM aws.iottwinmaker.workspaces
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_workspace
- Manifest
Creates a workplace.
INSERT INTO aws.iottwinmaker.workspaces (
description,
s3Location,
role,
tags,
workspace_id,
region
)
SELECT
'{{ description }}',
'{{ s3Location }}',
'{{ role }}',
'{{ tags }}',
'{{ workspace_id }}',
'{{ region }}'
RETURNING
arn,
creation_date_time
;
# Description fields are for documentation purposes
- name: workspaces
props:
- name: workspace_id
value: "{{ workspace_id }}"
description: Required parameter for the workspaces resource.
- name: region
value: "{{ region }}"
description: Required parameter for the workspaces resource.
- name: description
value: "{{ description }}"
- name: s3Location
value: "{{ s3Location }}"
- name: role
value: "{{ role }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_workspace
Updates a workspace.
UPDATE aws.iottwinmaker.workspaces
SET
description = '{{ description }}',
role = '{{ role }}',
s3Location = '{{ s3Location }}'
WHERE
workspace_id = '{{ workspace_id }}' --required
AND region = '{{ region }}' --required
RETURNING
update_date_time;
DELETE examples
- delete_workspace
Deletes a workspace.
DELETE FROM aws.iottwinmaker.workspaces
WHERE workspace_id = '{{ workspace_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- execute_query
Run queries to access information from your knowledge graph of entities within individual workspaces. The ExecuteQuery action only works with Amazon Web Services Java SDK2. ExecuteQuery will not work with any Amazon Web Services Java SDK version < 2.x.
EXEC aws.iottwinmaker.workspaces.execute_query
@region='{{ region }}' --required
@@json=
'{
"workspaceId": "{{ workspaceId }}",
"queryStatement": "{{ queryStatement }}",
"maxResults": {{ maxResults }},
"nextToken": "{{ nextToken }}"
}'
;