Skip to main content

prefetch_schedules

Creates, updates, deletes, gets or lists a prefetch_schedules resource.

Overview

Nameprefetch_schedules
TypeResource
Idaws.mediatailor.prefetch_schedules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the prefetch schedule.
consumptionobjectFor single prefetch, describes how and when that MediaTailor places prefetched ads into upcoming ad breaks.
namestringThe name of the prefetch schedule. The name must be unique among all prefetch schedules that are associated with the specified playback configuration.
playback_configuration_namestringThe name of the playback configuration to create the prefetch schedule for.
recurring_prefetch_configurationobjectThe configuration that defines how MediaTailor performs recurring prefetch.
retrievalobjectA complex type that contains settings governing when MediaTailor prefetches ads, and which dynamic variables that MediaTailor includes in the request to the ad decision server.
schedule_typestringThe frequency that MediaTailor creates prefetch schedules. SINGLE indicates that this schedule applies to one ad break. RECURRING indicates that MediaTailor automatically creates a schedule for each ad avail in a live event. (SINGLE, RECURRING)
stream_idstringAn optional stream identifier that you can specify in order to prefetch for multiple streams that use the same playback configuration.
tagsobjectThe tags assigned to the prefetch schedule. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_prefetch_scheduleselectname, playback_configuration_name, regionRetrieves 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.
list_prefetch_schedulesselectplayback_configuration_name, regionLists the prefetch schedules for a playback configuration.
create_prefetch_scheduleinsertname, playback_configuration_name, regionCreates 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.
delete_prefetch_scheduledeletename, playback_configuration_name, regionDeletes 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

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namestringThe 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_namestringThe name of the playback configuration for this prefetch schedule.
regionstringAWS region (default: us-east-1)

SELECT examples

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.

SELECT
arn,
consumption,
name,
playback_configuration_name,
recurring_prefetch_configuration,
retrieval,
schedule_type,
stream_id,
tags
FROM aws.mediatailor.prefetch_schedules
WHERE name = '{{ name }}' -- required
AND playback_configuration_name = '{{ playback_configuration_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates 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.

INSERT INTO aws.mediatailor.prefetch_schedules (
Consumption,
Retrieval,
RecurringPrefetchConfiguration,
ScheduleType,
StreamId,
Tags,
name,
playback_configuration_name,
region
)
SELECT
'{{ Consumption }}',
'{{ Retrieval }}',
'{{ RecurringPrefetchConfiguration }}',
'{{ ScheduleType }}',
'{{ StreamId }}',
'{{ Tags }}',
'{{ name }}',
'{{ playback_configuration_name }}',
'{{ region }}'
RETURNING
arn,
consumption,
name,
playback_configuration_name,
recurring_prefetch_configuration,
retrieval,
schedule_type,
stream_id,
tags
;

DELETE examples

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.

DELETE FROM aws.mediatailor.prefetch_schedules
WHERE name = '{{ name }}' --required
AND playback_configuration_name = '{{ playback_configuration_name }}' --required
AND region = '{{ region }}' --required
;