startFlywheelIteration method

Future<StartFlywheelIterationResponse> startFlywheelIteration({
  1. required String flywheelArn,
  2. String? clientRequestToken,
})

Start the flywheel iteration.This operation uses any new datasets to train a new model version. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.

May throw InternalServerException. May throw InvalidRequestException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw TooManyRequestsException.

Parameter flywheelArn : The ARN of the flywheel.

Parameter clientRequestToken : A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.

Implementation

Future<StartFlywheelIterationResponse> startFlywheelIteration({
  required String flywheelArn,
  String? clientRequestToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Comprehend_20171127.StartFlywheelIteration'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FlywheelArn': flywheelArn,
      if (clientRequestToken != null)
        'ClientRequestToken': clientRequestToken,
    },
  );

  return StartFlywheelIterationResponse.fromJson(jsonResponse.body);
}