Creates a new HarvestJob record.
Parameters:
-
end_time
(Optional[__string], default:
None
)
–
The end of the time-window which will be harvested
-
id
(Optional[__string], default:
None
)
–
The ID of the HarvestJob. The ID must be unique within the region and it cannot be changed after the HarvestJob is submitted
-
origin_endpoint_id
(Optional[__string], default:
None
)
–
The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot be changed after the HarvestJob is submitted.
-
start_time
(Optional[__string], default:
None
)
–
The start of the time-window which will be harvested
Raises:
Source code in docs_src/capo_mediapackage/_services/media_package.py
| def create_harvest_job(
self,
*,
config_overrides: Optional[MediaPackageClientConfig] = None,
end_time: Optional["capo_mediapackage.types.__string.__string"] = None,
id: Optional["capo_mediapackage.types.__string.__string"] = None,
origin_endpoint_id: Optional[
"capo_mediapackage.types.__string.__string"
] = None,
s3_destination: Optional[
"capo_mediapackage.types.s3_destination.S3Destination"
] = None,
start_time: Optional["capo_mediapackage.types.__string.__string"] = None,
) -> "capo_mediapackage.types.create_harvest_job_response.CreateHarvestJobResponse":
"""Creates a new HarvestJob record.
Args:
end_time: The end of the time-window which will be harvested
id: The ID of the HarvestJob. The ID must be unique within the region and it cannot be changed after the HarvestJob is submitted
origin_endpoint_id: The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot be changed after the HarvestJob is submitted.
start_time: The start of the time-window which will be harvested
Raises:
capo_mediapackage.errors.forbidden_exception.ForbiddenException: The client is not authorized to access the requested resource.
capo_mediapackage.errors.internal_server_error_exception.InternalServerErrorException: An unexpected error occurred.
capo_mediapackage.errors.not_found_exception.NotFoundException: The requested resource does not exist.
capo_mediapackage.errors.service_unavailable_exception.ServiceUnavailableException: An unexpected error occurred.
capo_mediapackage.errors.too_many_requests_exception.TooManyRequestsException: The client has exceeded their resource or throttling limits.
capo_mediapackage.errors.unprocessable_entity_exception.UnprocessableEntityException: The parameters sent in the request are not valid.
capo_mediapackage.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_mediapackage.types.create_harvest_job_request.CreateHarvestJobRequest]",
) -> OperationResponse[
"capo_mediapackage.types.create_harvest_job_response.CreateHarvestJobResponse"
]:
import capo_mediapackage._operations.media_package.create_harvest_job
output, http_response = (
capo_mediapackage._operations.media_package.create_harvest_job.create_harvest_job(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateHarvestJob")
)
input_: capo_mediapackage.types.create_harvest_job_request.CreateHarvestJobRequest = {}
if end_time is not None:
input_["end_time"] = end_time
if id is not None:
input_["id"] = id
if origin_endpoint_id is not None:
input_["origin_endpoint_id"] = origin_endpoint_id
if s3_destination is not None:
input_["s3_destination"] = s3_destination
if start_time is not None:
input_["start_time"] = start_time
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|