Retrieves a prefetch schedule for a playback configuration. A prefetch schedule allows you to tell MediaTailor to fetch and prepare certain ads before an ad break happens. For more information about ad prefetching, see Using ad prefetching in the MediaTailor User Guide.
Parameters:
-
name
(__string)
–
The name of the prefetch schedule. The name must be unique among all prefetch schedules that are associated with the specified playback configuration.
-
playback_configuration_name
(__string)
–
Returns information about the prefetch schedule for a specific playback configuration. If you call GetPrefetchSchedule on an expired prefetch schedule, MediaTailor returns an HTTP 404 status code.
Raises:
Source code in docs_src/capo_mediatailor/_services/async_media_tailor.py
| async def get_prefetch_schedule(
self,
name: "capo_mediatailor.types.__string.__string",
playback_configuration_name: "capo_mediatailor.types.__string.__string",
*,
config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
) -> "capo_mediatailor.types.get_prefetch_schedule_response.GetPrefetchScheduleResponse":
"""<p>Retrieves a prefetch schedule for a playback configuration. A prefetch schedule allows you to tell MediaTailor to fetch and prepare certain ads before an ad break happens. For more information about ad prefetching, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/prefetching-ads.html">Using ad prefetching</a> in the <i>MediaTailor User Guide</i>.</p>
Args:
name: <p>The name of the prefetch schedule. The name must be unique among all prefetch schedules that are associated with the specified playback configuration.</p>
playback_configuration_name: <p>Returns information about the prefetch schedule for a specific playback configuration. If you call <code>GetPrefetchSchedule</code> on an expired prefetch schedule, MediaTailor returns an HTTP 404 status code.</p>
Raises:
capo_mediatailor.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_mediatailor.types.get_prefetch_schedule_request.GetPrefetchScheduleRequest]",
) -> AsyncOperationResponse[
"capo_mediatailor.types.get_prefetch_schedule_response.GetPrefetchScheduleResponse"
]:
import capo_mediatailor._operations.media_tailor.get_prefetch_schedule
(
output,
http_response,
) = await capo_mediatailor._operations.media_tailor.get_prefetch_schedule.async_get_prefetch_schedule(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetPrefetchSchedule")
)
input_: capo_mediatailor.types.get_prefetch_schedule_request.GetPrefetchScheduleRequest = {
"name": name,
"playback_configuration_name": playback_configuration_name,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|