startReplicationTaskAssessmentRun method

Future<StartReplicationTaskAssessmentRunResponse> startReplicationTaskAssessmentRun({
  1. required String assessmentRunName,
  2. required String replicationTaskArn,
  3. required String resultLocationBucket,
  4. required String serviceAccessRoleArn,
  5. List<String>? exclude,
  6. List<String>? includeOnly,
  7. String? resultEncryptionMode,
  8. String? resultKmsKeyArn,
  9. String? resultLocationFolder,
})

Starts a new premigration assessment run for one or more individual assessments of a migration task.

The assessments that you can specify depend on the source and target database engine and the migration type defined for the given task. To run this operation, your migration task must already be created. After you run this operation, you can review the status of each individual assessment. You can also run the migration task manually after the assessment run and its individual assessments complete.

May throw AccessDeniedFault. May throw ResourceNotFoundFault. May throw InvalidResourceStateFault. May throw KMSAccessDeniedFault. May throw KMSDisabledFault. May throw KMSFault. May throw KMSInvalidStateFault. May throw KMSNotFoundFault. May throw KMSKeyNotAccessibleFault. May throw S3AccessDeniedFault. May throw S3ResourceNotFoundFault. May throw ResourceAlreadyExistsFault.

Parameter assessmentRunName : Unique name to identify the assessment run.

Parameter replicationTaskArn : Amazon Resource Name (ARN) of the migration task associated with the premigration assessment run that you want to start.

Parameter resultLocationBucket : Amazon S3 bucket where you want AWS DMS to store the results of this assessment run.

Parameter serviceAccessRoleArn : ARN of a service role needed to start the assessment run.

Parameter exclude : Space-separated list of names for specific individual assessments that you want to exclude. These names come from the default list of individual assessments that AWS DMS supports for the associated migration task. This task is specified by ReplicationTaskArn.

To identify the names of the default individual assessments that AWS DMS supports for the associated migration task, run the DescribeApplicableIndividualAssessments operation using its own ReplicationTaskArn request parameter.

Parameter includeOnly : Space-separated list of names for specific individual assessments that you want to include. These names come from the default list of individual assessments that AWS DMS supports for the associated migration task. This task is specified by ReplicationTaskArn.

To identify the names of the default individual assessments that AWS DMS supports for the associated migration task, run the DescribeApplicableIndividualAssessments operation using its own ReplicationTaskArn request parameter.

Parameter resultEncryptionMode : Encryption mode that you can specify to encrypt the results of this assessment run. If you don't specify this request parameter, AWS DMS stores the assessment run results without encryption. You can specify one of the options following:

  • "SSE_S3" – The server-side encryption provided as a default by Amazon S3.
  • "SSE_KMS" – AWS Key Management Service (AWS KMS) encryption. This encryption can use either a custom KMS encryption key that you specify or the default KMS encryption key that DMS provides.

Parameter resultKmsKeyArn : ARN of a custom KMS encryption key that you specify when you set ResultEncryptionMode to "SSE_KMS".

Parameter resultLocationFolder : Folder within an Amazon S3 bucket where you want AWS DMS to store the results of this assessment run.

Implementation

Future<StartReplicationTaskAssessmentRunResponse>
    startReplicationTaskAssessmentRun({
  required String assessmentRunName,
  required String replicationTaskArn,
  required String resultLocationBucket,
  required String serviceAccessRoleArn,
  List<String>? exclude,
  List<String>? includeOnly,
  String? resultEncryptionMode,
  String? resultKmsKeyArn,
  String? resultLocationFolder,
}) async {
  ArgumentError.checkNotNull(assessmentRunName, 'assessmentRunName');
  ArgumentError.checkNotNull(replicationTaskArn, 'replicationTaskArn');
  ArgumentError.checkNotNull(resultLocationBucket, 'resultLocationBucket');
  ArgumentError.checkNotNull(serviceAccessRoleArn, 'serviceAccessRoleArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.StartReplicationTaskAssessmentRun'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AssessmentRunName': assessmentRunName,
      'ReplicationTaskArn': replicationTaskArn,
      'ResultLocationBucket': resultLocationBucket,
      'ServiceAccessRoleArn': serviceAccessRoleArn,
      if (exclude != null) 'Exclude': exclude,
      if (includeOnly != null) 'IncludeOnly': includeOnly,
      if (resultEncryptionMode != null)
        'ResultEncryptionMode': resultEncryptionMode,
      if (resultKmsKeyArn != null) 'ResultKmsKeyArn': resultKmsKeyArn,
      if (resultLocationFolder != null)
        'ResultLocationFolder': resultLocationFolder,
    },
  );

  return StartReplicationTaskAssessmentRunResponse.fromJson(
      jsonResponse.body);
}