Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

IProgramLineupProvider2

An updated interface for IProgramLineupProvider which supports partially successful commits and provides error feedback for programs that failed to commit.

This provider is used to update the program lineup in the EPG. The upsert() function can be called multiple times within the same provider object to add programs to the commit queue. All operations performed within the provider will be persisted when the commit() function is called. Please note that this interface is not thread-safe. Do not create multiple instances of this object for use in different threads to avoid non-deterministic behavior. Please discard this object and create a new instance if this object has thrown an error in one of its methods.

Properties

clearAllPrograms

clearAllPrograms: () => Promise<void>

Clears all programs from the data store.

Removes all programs from the data store. This action is not persisted until commit() is called. This will not clear channel information from the data store. Utilize this function exclusively when there is a need to remove added programs from the Electronic Program Guide (EPG). The function call for clearAllPrograms() must preceed all calls to upsert() within the same transaction.

Methods

upsert()

upsert(programs: IProgram[]): Promise<IUpsertProgramFailure[]>

Upserts a list of programs for the program lineup in the EPG. Will skip any programs that fail to be inserted and will continue to try to insert the rest of the programs provided.

Inserts programs into the LiveTV Provider data store. This action is not persisted until commit() is called.

Parameters

programs

IProgram[]

An array of program instances to be inserted.

Throws

  • IllegalStateError if this function is called after the Provider has already thrown an error previously in one of its methods.
  • InternalError if the data cannot be added to the commit queue for any other reason.
  • StorageLimitError if this function encounters an error due to ingested data exceeding the storage limit. Consult with your Amazon contact if you encounter this error.

Returns

Promise<IUpsertProgramFailure[]>

IUpsertProgramFailure*[] A list of programs that failed to be added to the commit queue and the error causing the failure. An empty array will be returened if all programs are added to the commit queue successfully.


commit()

commit(version: string): Promise<void>

Commits any pending operations that didn't result in a IUpsertProgramFailure to the data store.

This function should be called after performing operations on the provider using the other methods in the provider interface. EpgLineupInformation.getLastCommittedProgramLineupVersion() will begin to return this version value once this call succeeds.

Parameters

version

string

A string representing the version of the program lineup that will be in the data store as a result of this commit.

Throws

  • IllegalStateError if this function is called after the Provider has already thrown an InternalError previously in one of its methods.
  • InternalError if the data cannot be committed to the data store.

Returns

Promise<void>


Last updated: Jul 22, 2026