IoTSiteWise / Client / create_workspace

create_workspace

IoTSiteWise.Client.create_workspace(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_workspace(
    workspaceName='string',
    workspaceDescription='string',
    encryptionConfiguration={
        'encryptionType': 'SITEWISE_DEFAULT_ENCRYPTION'|'KMS_BASED_ENCRYPTION',
        'kmsKeyId': 'string'
    },
    tags={
        'string': 'string'
    },
    clientToken='string'
)
Parameters:
  • workspaceName (string) –

    [REQUIRED]

    The name of the workspace to create.

  • workspaceDescription (string) – A description for the workspace.

  • encryptionConfiguration (dict) –

    [REQUIRED]

    The encryption configuration for the workspace.

    • encryptionType (string) – [REQUIRED]

      The encryption scheme for the workspace. SITEWISE_DEFAULT_ENCRYPTION encrypts data with the IoT SiteWise default key. KMS_BASED_ENCRYPTION encrypts data with the customer managed KMS key identified by kmsKeyId.

    • kmsKeyId (string) –

      The customer managed KMS key used when encryptionType is KMS_BASED_ENCRYPTION. Accepts a key ID, key ARN, or key alias. Required for KMS_BASED_ENCRYPTION; must be omitted for SITEWISE_DEFAULT_ENCRYPTION. After a workspace’s customer managed key configuration becomes active, the key can’t be changed.

  • tags (dict) –

    A list of key-value pairs that contain metadata for the workspace. For more information, see Tagging your IoT SiteWise resources in the IoT SiteWise User Guide.

    • (string) –

      • (string) –

  • clientToken (string) –

    A 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.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'workspaceName': 'string',
    'workspaceArn': 'string',
    'workspaceStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string'
        }
    }
}

Response Structure

  • (dict) –

    • workspaceName (string) –

      The name of the workspace.

    • workspaceArn (string) –

      The ARN of the workspace.

    • workspaceStatus (dict) –

      The status of the workspace, which is CREATING when the operation returns.

      • state (string) –

        The current state of the workspace.

      • error (dict) –

        Contains associated error information, if any.

        • code (string) –

          The error code.

        • message (string) –

          The error message.

Exceptions