startDataIngestionJob method
Starts a data ingestion job. Amazon Lookout for Equipment returns the job status.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter datasetName :
The name of the dataset being used by the data ingestion job.
Parameter ingestionInputConfiguration :
Specifies information for the input data for the data ingestion job,
including dataset S3 location.
Parameter roleArn :
The Amazon Resource Name (ARN) of a role with permission to access the
data source for the data ingestion job.
Parameter clientToken :
A unique identifier for the request. If you do not set the client request
token, Amazon Lookout for Equipment generates one.
Implementation
Future<StartDataIngestionJobResponse> startDataIngestionJob({
required String datasetName,
required IngestionInputConfiguration ingestionInputConfiguration,
required String roleArn,
String? clientToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSLookoutEquipmentFrontendService.StartDataIngestionJob'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatasetName': datasetName,
'IngestionInputConfiguration': ingestionInputConfiguration,
'RoleArn': roleArn,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
},
);
return StartDataIngestionJobResponse.fromJson(jsonResponse.body);
}