updateDataset method
Update a dataset to replace its schema with a new or existing one. For more information, see Replacing a dataset's schema.
May throw InvalidInputException.
May throw ResourceInUseException.
May throw ResourceNotFoundException.
Parameter datasetArn :
The Amazon Resource Name (ARN) of the dataset that you want to update.
Parameter schemaArn :
The Amazon Resource Name (ARN) of the new schema you want use.
Implementation
Future<UpdateDatasetResponse> updateDataset({
required String datasetArn,
required String schemaArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonPersonalize.UpdateDataset'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'datasetArn': datasetArn,
'schemaArn': schemaArn,
},
);
return UpdateDatasetResponse.fromJson(jsonResponse.body);
}