ElementalInference / Client / create_schedule_action
create_schedule_action¶
- ElementalInference.Client.create_schedule_action(**kwargs)¶
Creates a schedule action on a feed. A schedule action applies configuration changes to the feed at a time that you specify, in the same way as an UpdateFeed request.
Elemental Inference validates the targets of the action when you create it.
See also: AWS API Documentation
Request Syntax
response = client.create_schedule_action( id='string', actionName='string', startConfiguration={ 'fixedModeScheduleActionStartSettings': { 'scheduledAt': datetime(2015, 1, 1) } }, operations=[ { 'updateOutputStatus': { 'outputName': 'string', 'status': 'ENABLED'|'DISABLED' }, 'updateClippingDataSourceConfiguration': { 'outputName': 'string', 'dataSourceConfiguration': { 'fixtureId': 'string' } }, 'removeClippingDataSourceConfiguration': { 'outputName': 'string' } }, ] )
- Parameters:
id (string) –
[REQUIRED]
Specifies the ID of the feed that you want to add the schedule action to.
actionName (string) –
[REQUIRED]
A name for the schedule action. The name must be unique within the feed. You can reuse the name of an action that you deleted.
startConfiguration (dict) –
[REQUIRED]
Specifies when the action runs.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
fixedModeScheduleActionStartSettings.fixedModeScheduleActionStartSettings (dict) –
The start settings type for an action that runs once, at a fixed time.
scheduledAt (datetime) – [REQUIRED]
The UTC time at which the action runs. Specify the time in whole seconds. For the range of times that you can specify, see the AWS Elemental Inference User Guide.
This time is approximate. The change can take a few minutes to take effect on the media that the feed is processing.
operations (list) –
[REQUIRED]
Specifies the list of configuration changes that you want to make to the feed. Elemental Inference applies all the operations in an action together, in the order that you specify them. If any operation fails, Elemental Inference doesn’t apply any of them.
(dict) –
Holds one typed configuration change that a schedule action makes to a feed. Each operation must contain exactly one property.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
updateOutputStatus,updateClippingDataSourceConfiguration,removeClippingDataSourceConfiguration.updateOutputStatus (dict) –
The operation type that enables or disables an output.
outputName (string) – [REQUIRED]
The name of the output that you want to enable or disable. The output must exist in the feed when you create the action.
status (string) – [REQUIRED]
Specifies whether the output is enabled or disabled after the action runs.
updateClippingDataSourceConfiguration (dict) –
The operation type that attaches a game to an event clipping output.
outputName (string) – [REQUIRED]
The name of the output that you want to attach the game to.
dataSourceConfiguration (dict) – [REQUIRED]
The game that you want to attach to the output.
fixtureId (string) – [REQUIRED]
The ID of the fixture whose event data you want Elemental Inference to map onto this clipping output. The fixture should be the sports event in the source media that the feed is processing.
To obtain this ID, use the SearchFixtures operation to find the fixture, then use the fixtureId from the matching FixtureSummary.
removeClippingDataSourceConfiguration (dict) –
The operation type that removes the game from an event clipping output.
outputName (string) – [REQUIRED]
The name of the output that you want to remove the game from.
- Return type:
dict
- Returns:
Response Syntax
{ 'actionName': 'string', 'startConfiguration': { 'fixedModeScheduleActionStartSettings': { 'scheduledAt': datetime(2015, 1, 1) } }, 'operations': [ { 'updateOutputStatus': { 'outputName': 'string', 'status': 'ENABLED'|'DISABLED' }, 'updateClippingDataSourceConfiguration': { 'outputName': 'string', 'dataSourceConfiguration': { 'fixtureId': 'string' } }, 'removeClippingDataSourceConfiguration': { 'outputName': 'string' } }, ], 'status': 'PENDING'|'COMPLETED'|'FAILED', 'error': { 'errorCode': 'INVALID_ACTION_TARGET'|'INTERNAL_ERROR', 'errorMessage': 'string' } }
Response Structure
(dict) –
actionName (string) –
The name that you specified.
startConfiguration (dict) –
Specifies when the action runs.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
fixedModeScheduleActionStartSettings. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
fixedModeScheduleActionStartSettings (dict) –
The start settings type for an action that runs once, at a fixed time.
scheduledAt (datetime) –
The UTC time at which the action runs. Specify the time in whole seconds. For the range of times that you can specify, see the AWS Elemental Inference User Guide.
This time is approximate. The change can take a few minutes to take effect on the media that the feed is processing.
operations (list) –
The configuration changes that the action makes to the feed.
(dict) –
Holds one typed configuration change that a schedule action makes to a feed. Each operation must contain exactly one property.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
updateOutputStatus,updateClippingDataSourceConfiguration,removeClippingDataSourceConfiguration. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
updateOutputStatus (dict) –
The operation type that enables or disables an output.
outputName (string) –
The name of the output that you want to enable or disable. The output must exist in the feed when you create the action.
status (string) –
Specifies whether the output is enabled or disabled after the action runs.
updateClippingDataSourceConfiguration (dict) –
The operation type that attaches a game to an event clipping output.
outputName (string) –
The name of the output that you want to attach the game to.
dataSourceConfiguration (dict) –
The game that you want to attach to the output.
fixtureId (string) –
The ID of the fixture whose event data you want Elemental Inference to map onto this clipping output. The fixture should be the sports event in the source media that the feed is processing.
To obtain this ID, use the SearchFixtures operation to find the fixture, then use the fixtureId from the matching FixtureSummary.
removeClippingDataSourceConfiguration (dict) –
The operation type that removes the game from an event clipping output.
outputName (string) –
The name of the output that you want to remove the game from.
status (string) –
The status of the action. After you create the action successfully, Elemental Inference sets the status to PENDING.
error (dict) –
A description of why the action failed. Elemental Inference returns this property only when the status is FAILED.
errorCode (string) –
The type of failure. Valid values are the following:
INVALID_ACTION_TARGET
The action referred to something that didn’t exist or wasn’t valid at the scheduled time, for example an output that you deleted.
INTERNAL_ERROR
An unexpected error prevented the action from completing.
errorMessage (string) –
A description of the failure.
Exceptions