Skip to main content

workspaces

Creates, updates, deletes, gets or lists a workspaces resource.

Overview

Nameworkspaces
TypeResource
Idaws.iottwinmaker.workspaces

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe 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_timestring (date-time)The date and time when the workspace was created.
descriptionstringThe description of the workspace. (pattern: <code>.*</code>)
linked_servicesarrayA list of services that are linked to the workspace.
rolestringThe 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_locationstringThe 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_timestring (date-time)The date and time when the workspace was last updated.
workspace_idstringThe ID of the workspace. (pattern: <code>[a-zA-Z_0-9][a-zA-Z_-0-9]*[a-zA-Z0-9]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_workspaceselectworkspace_id, regionRetrieves information about a workspace.
list_workspacesselectregionRetrieves information about workspaces in the current account.
create_workspaceinsertworkspace_id, regionCreates a workplace.
update_workspaceupdateworkspace_id, regionUpdates a workspace.
delete_workspacedeleteworkspace_id, regionDeletes a workspace.
execute_queryexecregion, workspaceId, queryStatementRun 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
workspace_idstringThe ID of the workspace to delete.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

Deletes a workspace.

DELETE FROM aws.iottwinmaker.workspaces
WHERE workspace_id = '{{ workspace_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

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 }}"
}'
;