createDataset method
Creates a new DataBrew dataset.
May throw AccessDeniedException.
May throw ConflictException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter name :
The name of the dataset to be created. Valid characters are alphanumeric
(A-Z, a-z, 0-9), hyphen (-), period (.), and space.
Parameter format :
The file format of a dataset that is created from an Amazon S3 file or
folder.
Parameter pathOptions :
A set of options that defines how DataBrew interprets an Amazon S3 path of
the dataset.
Parameter tags :
Metadata tags to apply to this dataset.
Implementation
Future<CreateDatasetResponse> createDataset({
required Input input,
required String name,
InputFormat? format,
FormatOptions? formatOptions,
PathOptions? pathOptions,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'Input': input,
'Name': name,
if (format != null) 'Format': format.value,
if (formatOptions != null) 'FormatOptions': formatOptions,
if (pathOptions != null) 'PathOptions': pathOptions,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/datasets',
exceptionFnMap: _exceptionFns,
);
return CreateDatasetResponse.fromJson(response);
}