AWS Elemental MediaLive
User Guide

Deleting Actions Using the AWS CLI

When you use the AWS CLI, you can submit requests to delete one action or to delete several actions that you previously created in the schedule. You can also submit requests that combine deleting and creating actions. For more details on these "batch jobs", see How Batch Requests Work.

The actions you are deleting must have a UTC start time or a follow start time (for input switches) that is at least 15 seconds in the future. (In other words, it must not be already received in the channel.) After that cutoff, the delete request will be rejected.

You can delete an action from the schedule when the channel is running or when it isn't running.

You can delete any number of actions in one request. You can delete any combination of types of actions in one batch. For example, you can mix deletion of SCTE-35 message actions and image overlay actions.

Keep in mind that if you delete several actions in one request, then if one of the delete requests fails (usually because the start time isn't sufficiently in the future), then they will all fail.

To delete actions (AWS CLI)

  1. On the command line, enter this command:

    aws medialive batch-update-schedule --channel-id value --creates delete content

  2. In delete content, include the list of actions to delete by entering an array of ActionNames. You can obtain these ActionNames using the DescribeChannel command (see Viewing the Schedule Using the AWS CLI.

    For complete details on forming the command, see AWS CLI Command Reference. For complete information on the meaning and values for the fields, see the AWS API Guide.

  3. Press Enter to submit the command. The response appears on the screen. The response repeats the data from the request.

JSON for Deleting an Action

This JSON goes in the Deletes section of the command body. This JSON body has the Pascal case (upper camel case) that applies to the AWS CLI.

{ "ChannelId": "string", "Deletes": { "ActionNames": [ "" ] } }


This example of a request deletes the three actions identified by the ActionNames that were assigned when you created the names.

{ "ChannelId": "999999", "Deletes": { "ActionNames": [ "stop_overlay_33" "adavail_3711" "end_adavail_3711" ] } }