startAssessment method

Future<StartAssessmentResponse> startAssessment({
  1. AssessmentDataSourceType? assessmentDataSourceType,
  2. List<AssessmentTarget>? assessmentTargets,
  3. String? s3bucketForAnalysisData,
  4. String? s3bucketForReportData,
})

Starts the assessment of an on-premises environment.

May throw AccessDeniedException. May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ThrottlingException.

Parameter assessmentDataSourceType : The data source type of an assessment to be started.

Parameter assessmentTargets : List of criteria for assessment.

Parameter s3bucketForAnalysisData : The S3 bucket used by the collectors to send analysis data to the service. The bucket name must begin with migrationhub-strategy-.

Parameter s3bucketForReportData : The S3 bucket where all the reports generated by the service are stored. The bucket name must begin with migrationhub-strategy-.

Implementation

Future<StartAssessmentResponse> startAssessment({
  AssessmentDataSourceType? assessmentDataSourceType,
  List<AssessmentTarget>? assessmentTargets,
  String? s3bucketForAnalysisData,
  String? s3bucketForReportData,
}) async {
  final $payload = <String, dynamic>{
    if (assessmentDataSourceType != null)
      'assessmentDataSourceType': assessmentDataSourceType.value,
    if (assessmentTargets != null) 'assessmentTargets': assessmentTargets,
    if (s3bucketForAnalysisData != null)
      's3bucketForAnalysisData': s3bucketForAnalysisData,
    if (s3bucketForReportData != null)
      's3bucketForReportData': s3bucketForReportData,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/start-assessment',
    exceptionFnMap: _exceptionFns,
  );
  return StartAssessmentResponse.fromJson(response);
}