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.

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

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

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

Implementation

Future<StopProjectVersionResponse> stopProjectVersion({
  required String projectVersionArn,
}) async {
  ArgumentError.checkNotNull(projectVersionArn, 'projectVersionArn');
  _s.validateStringLength(
    'projectVersionArn',
    projectVersionArn,
    20,
    2048,
    isRequired: true,
  );
  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);
}