Skip to main content

workspaces

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

Overview

Nameworkspaces
TypeResource
Idaws.iotsitewise.workspaces

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The date the workspace was created, in Unix epoch time.
encryption_configurationobjectThe encryption configuration information for the workspace.
updated_atstring (date-time)The date the workspace was last updated, in Unix epoch time.
workspace_arnstringThe ARN of the workspace. (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-zA-Z0-9-:/_.]+$</code>)
workspace_descriptionstringThe description of the workspace. (pattern: <code>[^\u0000-\u001F\u007F]+</code>)
workspace_namestringThe name of the workspace. (pattern: <code>^[a-zA-Z0-9_-]+$</code>)
workspace_statusobjectThe status of the workspace, which contains the state and any error message.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_workspaceselectworkspace_name, regionRetrieves information about a workspace.
list_workspacesselectregionnextToken, maxResultsRetrieves a paginated list of workspaces. Use the nextToken parameter to retrieve additional results.
create_workspaceinsertregion, workspaceName, encryptionConfigurationCreates a workspace in IoT SiteWise. A workspace isolates its resources, such as datasets, time series, pipelines, and tasks, and their data from other workspaces, and has its own quotas and throttling limits. You must specify an encryption configuration when you create a workspace. The operation returns immediately with the workspace in the CREATING state. Provisioning completes asynchronously, after which the workspace state is ACTIVE, or FAILED if provisioning doesn't complete.
update_workspaceupdateworkspace_name, regionUpdates a workspace. You can update only workspaces in the ACTIVE or FAILED state. Fields that you omit from the request are left unchanged. To recover a workspace in the FAILED state, call this operation and supply its encryption configuration again.
delete_workspacedeleteworkspace_name, regionclientTokenDeletes a workspace. Before you delete a workspace, you must delete all resources contained in or associated with the workspace, such as datasets, time series, pipelines, and tasks.
batch_associate_data_segments_to_datasetexecdataset_id, region, workspaceName, associateDataSegmentEntriesAssociates a batch of data segments with a curated dataset. Data segments are time-bounded slices of time series data selected from source session datasets. Data segments that belong to the same time series can't overlap in time, regardless of which dataset they belong to.
batch_disassociate_data_segments_from_datasetexecdataset_id, region, workspaceName, disassociateDataSegmentEntriesDisassociates a batch of data segments from a curated dataset. Disassociating a data segment doesn't delete the underlying data in the source session dataset.
cancel_enrichment_jobexecworkspace_name, job_id, regionCancels a running or pending enrichment job. This is an idempotent operation—calling it multiple times with the same jobId is safe and returns the current status. Behavior Jobs in PENDING or RUNNING status transition to CANCELLED Jobs in RUNNING state may not be cancellable once they have progressed to certain processing stages Jobs already in terminal states (COMPLETED, FAILED, TIMED_OUT) cannot be cancelled; the operation returns a ConflictingOperationException Cancelling an already-CANCELLED job is a no-op and returns the current status (idempotent behavior) The API responds immediately after recording the cancellation Cleanup of job resources happens asynchronously in the background When to Cancel Cancel a job when: The job is taking longer than expected The job was created with incorrect parameters You no longer need the results Idempotency You can safely retry cancellation requests. Calling CancelEnrichmentJob multiple times for the same job returns the current status without error as long as the job is not in a terminal state other than CANCELLED.
cancel_queryexecworkspace_name, query_id, regionCancels a running query.
start_queryexecworkspace_name, region, queryStatementStarts an asynchronous SQL query against workspace telemetry, annotations, data segment, and dataset data.
start_searchexecworkspace_name, region, queryStatementStarts an asynchronous search over the data in a workspace. The search runs in the background; the response returns immediately with a searchId and an initial status of QUEUED. Use DescribeSearch to poll for completion and GetSearchResults to retrieve the results once the search reaches SUCCEEDED. The request is idempotent on clientToken: repeating a call with the same token returns the original search instead of starting a new one.

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
dataset_idstringThe ID of the curated dataset to disassociate data segments from.
job_idstringThe unique identifier of the enrichment job to cancel. This is the jobId returned by CreateEnrichmentJob.
query_idstringThe unique identifier for the query execution to cancel.
regionstringAWS region (default: us-east-1)
workspace_namestringThe name of the workspace whose data is searched.
clientTokenstringA unique, case-sensitive identifier that you provide to ensure that the request is idempotent. If you retry a request that completed successfully using the same client token, the retry succeeds without performing any further actions.
maxResultsintegerThe maximum number of results to return for each paginated request. Default: 50.
nextTokenstringThe token to be used for the next set of paginated results.

SELECT examples

Retrieves information about a workspace.

SELECT
created_at,
encryption_configuration,
updated_at,
workspace_arn,
workspace_description,
workspace_name,
workspace_status
FROM aws.iotsitewise.workspaces
WHERE workspace_name = '{{ workspace_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a workspace in IoT SiteWise. A workspace isolates its resources, such as datasets, time series, pipelines, and tasks, and their data from other workspaces, and has its own quotas and throttling limits. You must specify an encryption configuration when you create a workspace. The operation returns immediately with the workspace in the CREATING state. Provisioning completes asynchronously, after which the workspace state is ACTIVE, or FAILED if provisioning doesn't complete.

INSERT INTO aws.iotsitewise.workspaces (
workspaceName,
workspaceDescription,
encryptionConfiguration,
tags,
clientToken,
region
)
SELECT
'{{ workspaceName }}' /* required */,
'{{ workspaceDescription }}',
'{{ encryptionConfiguration }}' /* required */,
'{{ tags }}',
'{{ clientToken }}',
'{{ region }}'
RETURNING
workspace_arn,
workspace_name,
workspace_status
;

UPDATE examples

Updates a workspace. You can update only workspaces in the ACTIVE or FAILED state. Fields that you omit from the request are left unchanged. To recover a workspace in the FAILED state, call this operation and supply its encryption configuration again.

UPDATE aws.iotsitewise.workspaces
SET
workspaceDescription = '{{ workspaceDescription }}',
encryptionConfiguration = '{{ encryptionConfiguration }}',
clientToken = '{{ clientToken }}'
WHERE
workspace_name = '{{ workspace_name }}' --required
AND region = '{{ region }}' --required
RETURNING
workspace_status;

DELETE examples

Deletes a workspace. Before you delete a workspace, you must delete all resources contained in or associated with the workspace, such as datasets, time series, pipelines, and tasks.

DELETE FROM aws.iotsitewise.workspaces
WHERE workspace_name = '{{ workspace_name }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;

Lifecycle Methods

Associates a batch of data segments with a curated dataset. Data segments are time-bounded slices of time series data selected from source session datasets. Data segments that belong to the same time series can't overlap in time, regardless of which dataset they belong to.

EXEC aws.iotsitewise.workspaces.batch_associate_data_segments_to_dataset
@dataset_id='{{ dataset_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"workspaceName": "{{ workspaceName }}",
"associateDataSegmentEntries": "{{ associateDataSegmentEntries }}",
"clientToken": "{{ clientToken }}"
}'
;