acceptPredictions method
Accepts automatically generated business-friendly metadata for your Amazon DataZone assets.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainIdentifier :
The identifier of the Amazon DataZone domain.
Parameter identifier :
The identifier of the asset.
Parameter acceptChoices :
Specifies the prediction (aka, the automatically generated piece of
metadata) and the target (for example, a column name) that can be
accepted.
Parameter acceptRule :
Specifies the rule (or the conditions) under which a prediction can be
accepted.
Parameter clientToken :
A unique, case-sensitive identifier to ensure idempotency of the request.
This field is automatically populated if not provided.
Parameter revision :
The revision that is to be made to the asset.
Implementation
Future<AcceptPredictionsOutput> acceptPredictions({
required String domainIdentifier,
required String identifier,
List<AcceptChoice>? acceptChoices,
AcceptRule? acceptRule,
String? clientToken,
String? revision,
}) async {
final $query = <String, List<String>>{
if (revision != null) 'revision': [revision],
};
final $payload = <String, dynamic>{
if (acceptChoices != null) 'acceptChoices': acceptChoices,
if (acceptRule != null) 'acceptRule': acceptRule,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/assets/${Uri.encodeComponent(identifier)}/accept-predictions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return AcceptPredictionsOutput.fromJson(response);
}