View a markdown version of this page

CreateDataset - Amazon Connect Health

CreateDataset

Creates a Dataset in a Domain and starts building it. A new dataset has the status CREATING. When it's ready to use, its status changes to ACTIVE, or to CREATE_FAILED if it fails to build. To check the status, call GetDataset.

This operation is idempotent: if you retry a request with the same clientToken, it returns the dataset that the first request created.

For a medical coding dataset, Amazon Connect Health uses the coded examples that are in the s3InputPath when you create the dataset, and writes evaluation scores to the s3OutputPath. Later changes to the s3InputPath don't change the dataset. To use this operation, you must have s3:GetObject and s3:ListBucket permissions for the input location and s3:PutObject permission for the output location, and kms:Decrypt and kms:GenerateDataKey permissions if you encrypt the locations with an AWS KMS key.

Datasets are in preview release and are subject to change.

Request Syntax

POST /domains/domainId/datasets HTTP/1.1 Content-type: application/json { "clientToken": "string", "config": { ... }, "name": "string" }

URI Request Parameters

The request uses the following URI parameters.

domainId

The unique identifier of the parent Domain.

Length Constraints: Minimum length of 20. Maximum length of 25.

Pattern: (hai-|dom-)[a-z0-9]+

Required: Yes

Request Body

The request accepts the following data in JSON format.

clientToken

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the operation returns the dataset that the first request created. If you reuse a clientToken with different parameters, the request fails with ConflictException. Use a new clientToken for a request with different parameters.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [\x21-\x7E]+

Required: No

config

The configuration of the dataset. The member that you set determines the dataset type. You can't change the configuration after you create the dataset.

Type: DatasetConfig object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: Yes

name

A name for the dataset.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1028.

Pattern: [\x20-\x21\x23\x24\x2A-\x3A\x3F-\x7E]*

Required: Yes

Response Syntax

HTTP/1.1 201 Content-type: application/json { "arn": "string", "createdAt": number, "datasetId": "string", "status": "string", "type": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in JSON format by the service.

arn

The Amazon Resource Name (ARN) of the dataset.

Type: String

Pattern: arn:aws[a-z\-]*:[a-z0-9\-]+:[a-z0-9\-]*:[0-9]{12}:.+

createdAt

The date and time that the dataset was created.

Type: Timestamp

datasetId

The unique identifier of the dataset.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-z0-9]{1,64}

status

The status of the dataset. A new dataset has the status CREATING.

Type: String

Valid Values: CREATING | ACTIVE | CREATE_FAILED | DELETING | DELETE_FAILED | DELETED

type

The type of the dataset, determined by the configuration that you provided.

Type: String

Valid Values: MEDICAL_CODING

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

This error is thrown when the client does not supply proper credentials to the API.

HTTP Status Code: 401

ConflictException

This error is thrown when a resource update is no longer valid due to assumptions about initial state changing.

HTTP Status Code: 409

InternalServerException

This error is thrown when a transient error causes our API to fail.

HTTP Status Code: 500

ResourceNotFoundException

This error is thrown when the requested resource is not found.

HTTP Status Code: 404

ServiceQuotaExceededException

The request exceeds a service quota.

HTTP Status Code: 402

ThrottlingException

This error is thrown when the client exceeds the allowed request rate.

HTTP Status Code: 429

ValidationException

This error is thrown when the client supplies invalid input to the API.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: