cancelQuantumTask method

Future<CancelQuantumTaskResponse> cancelQuantumTask({
  1. required String quantumTaskArn,
  2. String? clientToken,
})

Cancels the specified task.

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

Parameter quantumTaskArn : The ARN of the quantum task to cancel.

Parameter clientToken : The client token associated with the cancellation request.

Implementation

Future<CancelQuantumTaskResponse> cancelQuantumTask({
  required String quantumTaskArn,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/quantum-task/${Uri.encodeComponent(quantumTaskArn)}/cancel',
    exceptionFnMap: _exceptionFns,
  );
  return CancelQuantumTaskResponse.fromJson(response);
}