startImportFileTask method
Starts a file import.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter s3Bucket :
The S3 bucket where the import file is located. The bucket name is
required to begin with migrationhub-strategy-.
Parameter name :
A descriptive name for the request.
Parameter s3key :
The Amazon S3 key name of the import file.
Parameter dataSourceType :
Specifies the source that the servers are coming from. By default,
Strategy Recommendations assumes that the servers specified in the import
file are available in AWS Application Discovery Service.
Parameter groupId :
Groups the resources in the import file together with a unique name. This
ID can be as filter in ListApplicationComponents and
ListServers.
Parameter s3bucketForReportData :
The S3 bucket where Strategy Recommendations uploads import results. The
bucket name is required to begin with migrationhub-strategy-.
Implementation
Future<StartImportFileTaskResponse> startImportFileTask({
required String s3Bucket,
required String name,
required String s3key,
DataSourceType? dataSourceType,
List<Group>? groupId,
String? s3bucketForReportData,
}) async {
final $payload = <String, dynamic>{
'S3Bucket': s3Bucket,
'name': name,
's3key': s3key,
if (dataSourceType != null) 'dataSourceType': dataSourceType.value,
if (groupId != null) 'groupId': groupId,
if (s3bucketForReportData != null)
's3bucketForReportData': s3bucketForReportData,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/start-import-file-task',
exceptionFnMap: _exceptionFns,
);
return StartImportFileTaskResponse.fromJson(response);
}