createJob method
This operation initiates the process of scheduling an upload or download of your data. You include in the request a manifest that describes the data transfer specifics. The response to the request includes a job ID, which you can use in other operations, a signature that you use to identify your storage device, and the address where you should ship your storage device.
May throw MissingParameterException. May throw InvalidParameterException. May throw InvalidAccessKeyIdException. May throw InvalidAddressException. May throw InvalidManifestFieldException. May throw MissingManifestFieldException. May throw NoSuchBucketException. May throw MissingCustomsException. May throw InvalidCustomsException. May throw InvalidFileSystemException. May throw MultipleRegionsException. May throw BucketPermissionException. May throw MalformedManifestException. May throw CreateJobQuotaExceededException. May throw InvalidJobIdException. May throw InvalidVersionException.
Implementation
Future<CreateJobOutput> createJob({
required JobType jobType,
required String manifest,
required bool validateOnly,
String? aPIVersion,
String? manifestAddendum,
}) async {
ArgumentError.checkNotNull(jobType, 'jobType');
ArgumentError.checkNotNull(manifest, 'manifest');
ArgumentError.checkNotNull(validateOnly, 'validateOnly');
final $request = <String, dynamic>{};
$request['JobType'] = jobType.toValue();
$request['Manifest'] = manifest;
$request['ValidateOnly'] = validateOnly;
aPIVersion?.also((arg) => $request['APIVersion'] = arg);
manifestAddendum?.also((arg) => $request['ManifestAddendum'] = arg);
final $result = await _protocol.send(
$request,
action: 'CreateJob',
version: '2010-06-01',
method: 'POST',
requestUri: '/?Operation=CreateJob',
exceptionFnMap: _exceptionFns,
shape: shapes['CreateJobInput'],
shapes: shapes,
resultWrapper: 'CreateJobResult',
);
return CreateJobOutput.fromXml($result);
}