Deletes a prefetch schedule for a specific playback configuration. If you call DeletePrefetchSchedule on an expired prefetch schedule, MediaTailor returns an HTTP 404 status code. For more information about ad prefetching, see Using ad prefetching in the MediaTailor User Guide.
Parameters:
-
name
(__string)
–
The name of the prefetch schedule. If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.
-
playback_configuration_name
(__string)
–
The name of the playback configuration for this prefetch schedule.
Raises:
Source code in docs_src/capo_mediatailor/_services/media_tailor.py
| def delete_prefetch_schedule(
self,
name: "capo_mediatailor.types.__string.__string",
playback_configuration_name: "capo_mediatailor.types.__string.__string",
*,
config_overrides: Optional[MediaTailorClientConfig] = None,
) -> "capo_mediatailor.types.delete_prefetch_schedule_response.DeletePrefetchScheduleResponse":
"""<p>Deletes a prefetch schedule for a specific playback configuration. If you call <code>DeletePrefetchSchedule</code> on an expired prefetch schedule, MediaTailor returns an HTTP 404 status code. 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. If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.</p>
playback_configuration_name: <p>The name of the playback configuration for this prefetch schedule.</p>
Raises:
capo_mediatailor.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_mediatailor.types.delete_prefetch_schedule_request.DeletePrefetchScheduleRequest]",
) -> OperationResponse[
"capo_mediatailor.types.delete_prefetch_schedule_response.DeletePrefetchScheduleResponse"
]:
import capo_mediatailor._operations.media_tailor.delete_prefetch_schedule
output, http_response = (
capo_mediatailor._operations.media_tailor.delete_prefetch_schedule.delete_prefetch_schedule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeletePrefetchSchedule")
)
input_: capo_mediatailor.types.delete_prefetch_schedule_request.DeletePrefetchScheduleRequest = {
"name": name,
"playback_configuration_name": playback_configuration_name,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|