cancelTrainedModel method

Future<void> cancelTrainedModel({
  1. required String membershipIdentifier,
  2. required String trainedModelArn,
  3. String? versionIdentifier,
})

Submits a request to cancel the trained model job.

May throw AccessDeniedException. May throw ConflictException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter membershipIdentifier : The membership ID of the trained model job that you want to cancel.

Parameter trainedModelArn : The Amazon Resource Name (ARN) of the trained model job that you want to cancel.

Parameter versionIdentifier : The version identifier of the trained model to cancel. This parameter allows you to specify which version of the trained model you want to cancel when multiple versions exist.

If versionIdentifier is not specified, the base model will be cancelled.

Implementation

Future<void> cancelTrainedModel({
  required String membershipIdentifier,
  required String trainedModelArn,
  String? versionIdentifier,
}) async {
  final $query = <String, List<String>>{
    if (versionIdentifier != null) 'versionIdentifier': [versionIdentifier],
  };
  await _protocol.send(
    payload: null,
    method: 'PATCH',
    requestUri:
        '/memberships/${Uri.encodeComponent(membershipIdentifier)}/trained-models/${Uri.encodeComponent(trainedModelArn)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}