programs
Creates, updates, deletes, gets or lists a programs resource.
Overview
| Name | programs |
| Type | Resource |
| Id | aws.mediatailor.programs |
Fields
The following fields are returned by SELECT queries:
- describe_program
| Name | Datatype | Description |
|---|---|---|
ad_breaks | array | The ad break configuration settings. |
arn | string | The ARN of the program. |
audience_media | array | The list of AudienceMedia defined in program. |
channel_name | string | The name of the channel that the program belongs to. |
clip_range | object | Clip range configuration for the VOD source associated with the program. |
creation_time | string (date-time) | The timestamp of when the program was created. |
duration_millis | integer (int64) | The duration of the live program in milliseconds. |
live_source_name | string | The name of the LiveSource for this Program. |
program_name | string | The name of the program. |
scheduled_start_time | string (date-time) | The date and time that the program is scheduled to start in ISO 8601 format and Coordinated Universal Time (UTC). For example, the value 2021-03-27T17:48:16.751Z represents March 27, 2021 at 17:48:16.751 UTC. |
source_location_name | string | The source location name. |
tags | object | The tags assigned to the program. 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. |
vod_source_name | string | The name that's used to refer to a VOD source. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_program | select | channel_name, program_name, region | Describes a program within a channel. For information about programs, see Working with programs in the MediaTailor User Guide. | |
create_program | insert | channel_name, program_name, region, ScheduleConfiguration, SourceLocationName | Creates a program within a channel. For information about programs, see Working with programs in the MediaTailor User Guide. | |
update_program | update | channel_name, program_name, region, ScheduleConfiguration | Updates a program within a channel. | |
delete_program | delete | channel_name, program_name, region | Deletes a program within a channel. For information about programs, see Working with programs 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.
| Name | Datatype | Description |
|---|---|---|
channel_name | string | The name of the channel. |
program_name | string | The name of the program. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_program
Describes a program within a channel. For information about programs, see Working with programs in the MediaTailor User Guide.
SELECT
ad_breaks,
arn,
audience_media,
channel_name,
clip_range,
creation_time,
duration_millis,
live_source_name,
program_name,
scheduled_start_time,
source_location_name,
tags,
vod_source_name
FROM aws.mediatailor.programs
WHERE channel_name = '{{ channel_name }}' -- required
AND program_name = '{{ program_name }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_program
- Manifest
Creates a program within a channel. For information about programs, see Working with programs in the MediaTailor User Guide.
INSERT INTO aws.mediatailor.programs (
AdBreaks,
LiveSourceName,
ScheduleConfiguration,
SourceLocationName,
VodSourceName,
AudienceMedia,
Tags,
channel_name,
program_name,
region
)
SELECT
'{{ AdBreaks }}',
'{{ LiveSourceName }}',
'{{ ScheduleConfiguration }}' /* required */,
'{{ SourceLocationName }}' /* required */,
'{{ VodSourceName }}',
'{{ AudienceMedia }}',
'{{ Tags }}',
'{{ channel_name }}',
'{{ program_name }}',
'{{ region }}'
RETURNING
ad_breaks,
arn,
audience_media,
channel_name,
clip_range,
creation_time,
duration_millis,
live_source_name,
program_name,
scheduled_start_time,
source_location_name,
tags,
vod_source_name
;
# Description fields are for documentation purposes
- name: programs
props:
- name: channel_name
value: "{{ channel_name }}"
description: Required parameter for the programs resource.
- name: program_name
value: "{{ program_name }}"
description: Required parameter for the programs resource.
- name: region
value: "{{ region }}"
description: Required parameter for the programs resource.
- name: AdBreaks
value:
- MessageType: "{{ MessageType }}"
OffsetMillis: {{ OffsetMillis }}
Slate:
SourceLocationName: "{{ SourceLocationName }}"
VodSourceName: "{{ VodSourceName }}"
SpliceInsertMessage:
AvailNum: {{ AvailNum }}
AvailsExpected: {{ AvailsExpected }}
SpliceEventId: {{ SpliceEventId }}
UniqueProgramId: {{ UniqueProgramId }}
TimeSignalMessage:
SegmentationDescriptors:
- SegmentationEventId: {{ SegmentationEventId }}
SegmentationUpidType: {{ SegmentationUpidType }}
SegmentationUpid: "{{ SegmentationUpid }}"
SegmentationTypeId: {{ SegmentationTypeId }}
SegmentNum: {{ SegmentNum }}
SegmentsExpected: {{ SegmentsExpected }}
SubSegmentNum: {{ SubSegmentNum }}
SubSegmentsExpected: {{ SubSegmentsExpected }}
AdBreakMetadata: "{{ AdBreakMetadata }}"
- name: LiveSourceName
value: "{{ LiveSourceName }}"
- name: ScheduleConfiguration
description: |
Schedule configuration parameters. A channel must be stopped before changes can be made to the schedule.
value:
Transition:
DurationMillis: {{ DurationMillis }}
RelativePosition: "{{ RelativePosition }}"
RelativeProgram: "{{ RelativeProgram }}"
ScheduledStartTimeMillis: {{ ScheduledStartTimeMillis }}
Type: "{{ Type }}"
ClipRange:
EndOffsetMillis: {{ EndOffsetMillis }}
StartOffsetMillis: {{ StartOffsetMillis }}
- name: SourceLocationName
value: "{{ SourceLocationName }}"
- name: VodSourceName
value: "{{ VodSourceName }}"
- name: AudienceMedia
value:
- Audience: "{{ Audience }}"
AlternateMedia: "{{ AlternateMedia }}"
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_program
Updates a program within a channel.
UPDATE aws.mediatailor.programs
SET
AdBreaks = '{{ AdBreaks }}',
ScheduleConfiguration = '{{ ScheduleConfiguration }}',
AudienceMedia = '{{ AudienceMedia }}'
WHERE
channel_name = '{{ channel_name }}' --required
AND program_name = '{{ program_name }}' --required
AND region = '{{ region }}' --required
AND ScheduleConfiguration = '{{ ScheduleConfiguration }}' --required
RETURNING
ad_breaks,
arn,
audience_media,
channel_name,
clip_range,
creation_time,
duration_millis,
live_source_name,
program_name,
scheduled_start_time,
source_location_name,
tags,
vod_source_name;
DELETE examples
- delete_program
Deletes a program within a channel. For information about programs, see Working with programs in the MediaTailor User Guide.
DELETE FROM aws.mediatailor.programs
WHERE channel_name = '{{ channel_name }}' --required
AND program_name = '{{ program_name }}' --required
AND region = '{{ region }}' --required
;