createHarvestJob method
Creates a new HarvestJob record.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
May throw UnprocessableEntityException.
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 {
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);
}