IoTSiteWise / Client / create_dataset

create_dataset#

IoTSiteWise.Client.create_dataset(**kwargs)#

Creates a dataset to connect an external datasource.

See also: AWS API Documentation

Request Syntax

response = client.create_dataset(
    datasetId='string',
    datasetName='string',
    datasetDescription='string',
    datasetSource={
        'sourceType': 'KENDRA',
        'sourceFormat': 'KNOWLEDGE_BASE',
        'sourceDetail': {
            'kendra': {
                'knowledgeBaseArn': 'string',
                'roleArn': 'string'
            }
        }
    },
    clientToken='string',
    tags={
        'string': 'string'
    }
)
Parameters:
  • datasetId (string) – The ID of the dataset.

  • datasetName (string) –

    [REQUIRED]

    The name of the dataset.

  • datasetDescription (string) – A description about the dataset, and its functionality.

  • datasetSource (dict) –

    [REQUIRED]

    The data source for the dataset.

    • sourceType (string) – [REQUIRED]

      The type of data source for the dataset.

    • sourceFormat (string) – [REQUIRED]

      The format of the dataset source associated with the dataset.

    • sourceDetail (dict) –

      The details of the dataset source associated with the dataset.

      • kendra (dict) –

        Contains details about the Kendra dataset source.

        • knowledgeBaseArn (string) – [REQUIRED]

          The knowledgeBaseArn details for the Kendra dataset source.

        • roleArn (string) – [REQUIRED]

          The roleARN details for the Kendra dataset source.

  • clientToken (string) –

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don’t reuse this client token if a new idempotent request is required.

    This field is autopopulated if not provided.

  • tags (dict) –

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

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'datasetId': 'string',
    'datasetArn': 'string',
    'datasetStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) –

    • datasetId (string) –

      The ID of the dataset.

    • datasetArn (string) –

      The ARN of the dataset. The format is arn:${Partition}:iotsitewise:${Region}:${Account}:dataset/${DatasetId}.

    • datasetStatus (dict) –

      The status of the dataset. This contains the state and any error messages. State is CREATING after a successfull call to this API, and any associated error message. The state is ACTIVE when ready to use.

      • state (string) –

        The current status of the dataset.

      • error (dict) –

        Contains the details of an IoT SiteWise error.

        • code (string) –

          The error code.

        • message (string) –

          The error message.

        • details (list) –

          A list of detailed errors.

          • (dict) –

            Contains detailed error information.

            • code (string) –

              The error code.

            • message (string) –

              The error message.

Exceptions