stopProjectVersion method

Future<StopProjectVersionResponse> stopProjectVersion({
  1. required String projectVersionArn,
})
Stops a running model. The operation might take a while to complete. To check the current status, call DescribeProjectVersions. Only applies to Custom Labels projects.

This operation requires permissions to perform the rekognition:StopProjectVersion action.

May throw AccessDeniedException. May throw InternalServerError. May throw InvalidParameterException. May throw ProvisionedThroughputExceededException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter projectVersionArn : The Amazon Resource Name (ARN) of the model version that you want to stop.

This operation requires permissions to perform the rekognition:StopProjectVersion action.

Implementation

Future<StopProjectVersionResponse> stopProjectVersion({
  required String projectVersionArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RekognitionService.StopProjectVersion'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ProjectVersionArn': projectVersionArn,
    },
  );

  return StopProjectVersionResponse.fromJson(jsonResponse.body);
}