ElementalInference / Client / update_feed
update_feed¶
- ElementalInference.Client.update_feed(**kwargs)¶
Updates the name and/or outputs in a feed.
UpdateFeed is a PUT operation, which means that the payload that you specify completely overwrites the existing payload.
This means that if you want to touch the array of outputs, you must pass in the full new list. So you must omit outputs you want to delete, and include outputs you want to add or modify.
If you want to patch the array of outputs to make selective additions, use AssociateFeed.
See also: AWS API Documentation
Request Syntax
response = client.update_feed( name='string', id='string', outputs=[ { 'name': 'string', 'outputConfig': { 'cropping': {} , 'clipping': { 'callbackMetadata': 'string' }, 'subtitling': { 'language': 'eng'|'eng-au'|'eng-gb'|'eng-us'|'fra'|'ita'|'deu'|'spa'|'por', 'aspectRatio': { 'width': 123, 'height': 123 }, 'dictionary': 'string', 'profanityFilter': 'DISABLED'|'CENSOR'|'DROP' } }, 'status': 'ENABLED'|'DISABLED', 'description': 'string', 'fromAssociation': True|False }, ] )
- Parameters:
name (string) –
[REQUIRED]
Required. You can specify the existing name (to leave it unchanged) or a new name.
id (string) –
[REQUIRED]
The ID of the feed to update.
outputs (list) –
[REQUIRED]
Required. You can specify the existing array of outputs (to leave outputs unchanged) or you can specify a new array.
(dict) –
Contains configuration information about one output in a feed. It is used in the UpdateFeed action.
name (string) – [REQUIRED]
The name of the output.
outputConfig (dict) – [REQUIRED]
A typed property for an output in a feed. It identifies the action for Elemental Inference to perform. It also provides a repository for the results of that action. For example, CroppingConfig output will contain the metadata for the crop feature.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
cropping,clipping,subtitling.cropping (dict) –
The output config type that applies to the cropping feature.
clipping (dict) –
The output config type that applies to the clipping feature.
callbackMetadata (string) –
A string that you want Elemental Inference to always include in the event clipping metadata for this output. The string might identify the sports event in the source media, for example.
subtitling (dict) –
The output config type that applies to the smart subtitling feature.
language (string) – [REQUIRED]
The language of the audio in the source media. Elemental Inference uses this setting to optimize transcription accuracy. Specify the language using an ISO 639-2/T three-letter code, optionally with a region subtag. Supported values: eng, eng-au, eng-gb, eng-us, fra, ita, deu, spa, por.
aspectRatio (dict) –
The aspect ratio of the output video, specified as width and height integer values. Elemental Inference uses the aspect ratio to determine subtitle layout and line lengths.
width (integer) – [REQUIRED]
The width component of the aspect ratio (for example, 16 in a 16:9 ratio).
height (integer) – [REQUIRED]
The height component of the aspect ratio (for example, 9 in a 16:9 ratio).
dictionary (string) –
The ID of a custom dictionary to improve transcription accuracy for domain-specific terminology. Use the CreateDictionary operation to create a dictionary.
profanityFilter (string) –
Controls how profanity is handled in the generated subtitles. Valid values: DISABLED (no filtering, default), CENSOR (replace profanity with asterisks), DROP (remove profanity from the transcript).
status (string) – [REQUIRED]
The status of the output.
description (string) –
A description of the output.
fromAssociation (boolean) –
Elemental Inference originally sets this parameter to True if this output was created by AssociateFeed or to False if this output was created by CreateFeed or UpdateFeed.
You must not change this value. Therefore, use GetFeed to determine the current value. Then in the UpdateFeed request, if the current value is True, include this parameter with a value of True. If it’s False, omit the parameter.
- Return type:
dict
- Returns:
Response Syntax
{ 'arn': 'string', 'name': 'string', 'id': 'string', 'dataEndpoints': [ 'string', ], 'outputs': [ { 'name': 'string', 'outputConfig': { 'cropping': {}, 'clipping': { 'callbackMetadata': 'string' }, 'subtitling': { 'language': 'eng'|'eng-au'|'eng-gb'|'eng-us'|'fra'|'ita'|'deu'|'spa'|'por', 'aspectRatio': { 'width': 123, 'height': 123 }, 'dictionary': 'string', 'profanityFilter': 'DISABLED'|'CENSOR'|'DROP' } }, 'status': 'ENABLED'|'DISABLED', 'description': 'string', 'fromAssociation': True|False }, ], 'status': 'CREATING'|'AVAILABLE'|'ACTIVE'|'UPDATING'|'DELETING'|'DELETED'|'ARCHIVED', 'association': { 'associatedResourceName': 'string' }, 'tags': { 'string': 'string' } }
Response Structure
(dict) –
arn (string) –
The ARN of the feed.
name (string) –
The updated or original name of the feed.
id (string) –
The ID of the feed.
dataEndpoints (list) –
The data endpoints of the feed.
(string) –
outputs (list) –
The array of outputs in the feed. You might have left this array unchanged, or you might have changed it.
(dict) –
Contains configuration information about one output in a feed. It is used in the GetFeed response.
name (string) –
The name of the output.
outputConfig (dict) –
A typed property for an output in a feed. It identifies the action for Elemental Inference to perform. It also provides a repository for the results of that action. For example, CroppingConfig output will contain the metadata for the crop feature.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
cropping,clipping,subtitling. 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'}
cropping (dict) –
The output config type that applies to the cropping feature.
clipping (dict) –
The output config type that applies to the clipping feature.
callbackMetadata (string) –
A string that you want Elemental Inference to always include in the event clipping metadata for this output. The string might identify the sports event in the source media, for example.
subtitling (dict) –
The output config type that applies to the smart subtitling feature.
language (string) –
The language of the audio in the source media. Elemental Inference uses this setting to optimize transcription accuracy. Specify the language using an ISO 639-2/T three-letter code, optionally with a region subtag. Supported values: eng, eng-au, eng-gb, eng-us, fra, ita, deu, spa, por.
aspectRatio (dict) –
The aspect ratio of the output video, specified as width and height integer values. Elemental Inference uses the aspect ratio to determine subtitle layout and line lengths.
width (integer) –
The width component of the aspect ratio (for example, 16 in a 16:9 ratio).
height (integer) –
The height component of the aspect ratio (for example, 9 in a 16:9 ratio).
dictionary (string) –
The ID of a custom dictionary to improve transcription accuracy for domain-specific terminology. Use the CreateDictionary operation to create a dictionary.
profanityFilter (string) –
Controls how profanity is handled in the generated subtitles. Valid values: DISABLED (no filtering, default), CENSOR (replace profanity with asterisks), DROP (remove profanity from the transcript).
status (string) –
The status of the output.
description (string) –
The description of the output.
fromAssociation (boolean) –
True means that the output was originally created in the feed using AssociateFeed. False means it was created using CreateFeed or UpdateFeed.
You will need this value if you use UpdateFeed to modify the list of outputs in the feed.
status (string) –
The status of the feed.
association (dict) –
Information about the resource that is associated with the feed, if any.
associatedResourceName (string) –
The name of the associated resource.
tags (dict) –
The tags associated with the feed.
(string) –
(string) –
Exceptions
ElementalInference.Client.exceptions.ValidationExceptionElementalInference.Client.exceptions.ResourceNotFoundExceptionElementalInference.Client.exceptions.InternalServerErrorExceptionElementalInference.Client.exceptions.AccessDeniedExceptionElementalInference.Client.exceptions.TooManyRequestExceptionElementalInference.Client.exceptions.ConflictExceptionElementalInference.Client.exceptions.ServiceQuotaExceededException