createHarvestJob method
Future<CreateHarvestJobResponse>
createHarvestJob({
- required String endTime,
- required String id,
- required String originEndpointId,
- required S3Destination s3Destination,
- required String startTime,
Creates a new HarvestJob record.
May throw UnprocessableEntityException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException.
Parameter endTime
:
The end of the time-window which will be harvested
Parameter id
:
The ID of the HarvestJob. The ID must be unique within the region
and it cannot be changed after the HarvestJob is submitted
Parameter originEndpointId
:
The ID of the OriginEndpoint that the HarvestJob will harvest from.
This cannot be changed after the HarvestJob is submitted.
Parameter startTime
:
The start of the time-window which will be harvested
Implementation
Future<CreateHarvestJobResponse> createHarvestJob({
required String endTime,
required String id,
required String originEndpointId,
required S3Destination s3Destination,
required String startTime,
}) async {
ArgumentError.checkNotNull(endTime, 'endTime');
ArgumentError.checkNotNull(id, 'id');
ArgumentError.checkNotNull(originEndpointId, 'originEndpointId');
ArgumentError.checkNotNull(s3Destination, 's3Destination');
ArgumentError.checkNotNull(startTime, 'startTime');
final $payload = <String, dynamic>{
'endTime': endTime,
'id': id,
'originEndpointId': originEndpointId,
's3Destination': s3Destination,
'startTime': startTime,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/harvest_jobs',
exceptionFnMap: _exceptionFns,
);
return CreateHarvestJobResponse.fromJson(response);
}