createDataSet method
This operation creates a data set.
May throw ThrottlingException. May throw ValidationException. May throw InternalServerException. May throw ServiceLimitExceededException. May throw AccessDeniedException.
Parameter assetType
:
The type of file your data is stored in. Currently, the supported asset
type is S3_SNAPSHOT.
Parameter description
:
A description for the data set. This value can be up to 16,348 characters
long.
Parameter name
:
The name of the data set.
Parameter tags
:
A data set tag is an optional label that you can assign to a data set when
you create it. Each tag consists of a key and an optional value, both of
which you define. When you use tagging, you can also use tag-based access
control in IAM policies to control access to these data sets and
revisions.
Implementation
Future<CreateDataSetResponse> createDataSet({
required AssetType assetType,
required String description,
required String name,
Map<String, String>? tags,
}) async {
ArgumentError.checkNotNull(assetType, 'assetType');
ArgumentError.checkNotNull(description, 'description');
ArgumentError.checkNotNull(name, 'name');
final $payload = <String, dynamic>{
'AssetType': assetType.toValue(),
'Description': description,
'Name': name,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/data-sets',
exceptionFnMap: _exceptionFns,
);
return CreateDataSetResponse.fromJson(response);
}