createDataset method
Creates a container for a collection of data being ingested for analysis. The dataset contains the metadata describing where the data is and what the data actually looks like. For example, it contains the location of the data source, the data schema, and other information. A dataset also contains any tags associated with the ingested data.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter datasetName :
The name of the dataset being created.
Parameter clientToken :
A unique identifier for the request. If you do not set the client request
token, Amazon Lookout for Equipment generates one.
Parameter datasetSchema :
A JSON description of the data that is in each time series dataset,
including names, column names, and data types.
Parameter serverSideKmsKeyId :
Provides the identifier of the KMS key used to encrypt dataset data by
Amazon Lookout for Equipment.
Parameter tags :
Any tags associated with the ingested data described in the dataset.
Implementation
Future<CreateDatasetResponse> createDataset({
required String datasetName,
String? clientToken,
DatasetSchema? datasetSchema,
String? serverSideKmsKeyId,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSLookoutEquipmentFrontendService.CreateDataset'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatasetName': datasetName,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (datasetSchema != null) 'DatasetSchema': datasetSchema,
if (serverSideKmsKeyId != null)
'ServerSideKmsKeyId': serverSideKmsKeyId,
if (tags != null) 'Tags': tags,
},
);
return CreateDatasetResponse.fromJson(jsonResponse.body);
}