cancelReplicationTaskAssessmentRun method

Future<CancelReplicationTaskAssessmentRunResponse> cancelReplicationTaskAssessmentRun({
  1. required String replicationTaskAssessmentRunArn,
})

Cancels a single premigration assessment run.

This operation prevents any individual assessments from running if they haven't started running. It also attempts to cancel any individual assessments that are currently running.

May throw AccessDeniedFault. May throw ResourceNotFoundFault. May throw InvalidResourceStateFault.

Parameter replicationTaskAssessmentRunArn : Amazon Resource Name (ARN) of the premigration assessment run to be canceled.

Implementation

Future<CancelReplicationTaskAssessmentRunResponse>
    cancelReplicationTaskAssessmentRun({
  required String replicationTaskAssessmentRunArn,
}) async {
  ArgumentError.checkNotNull(
      replicationTaskAssessmentRunArn, 'replicationTaskAssessmentRunArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.CancelReplicationTaskAssessmentRun'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ReplicationTaskAssessmentRunArn': replicationTaskAssessmentRunArn,
    },
  );

  return CancelReplicationTaskAssessmentRunResponse.fromJson(
      jsonResponse.body);
}