2026/11/17 - AWS Elemental Inference - 13 new 4 updated api methods
Changes AWS Elemental Inference now supports functions, for running your own analysis on feed media, and question sets, for custom decisions on contextual metadata shots and scenes.
Creates a function. A function analyzes a feed by building a request from the feed's media and metadata, optionally sending that request to an Amazon Bedrock model in your account, and publishing the result to the feed's metadata timeline.
A function runs only after you attach it to a feed as a function output. For more information, see Using functions in the AWS Elemental Inference User Guide.
See also: AWS API Documentation
Request Syntax
client.create_function(
name='string',
target={
'bedrock': {
'api': 'INVOKE_MODEL',
'model': 'string'
},
'passthrough': {}
},
requestExpression='string',
responseExpression='string',
description='string',
eventBridgeDelivery='ENABLED'|'DISABLED',
tags={
'string': 'string'
}
)
string
[REQUIRED]
A name for this function.
dict
[REQUIRED]
The destination for the request that the function builds.
bedrock (dict) --
Send the request to an Amazon Bedrock model.
api (string) -- [REQUIRED]
The Amazon Bedrock API to call. The only valid value is INVOKE_MODEL.
model (string) -- [REQUIRED]
The model to invoke. Specify one of the following:
A model ID.
An inference profile ID.
The ARN of a custom model.
The ARN of a provisioned model.
Elemental Inference invokes the model in the Region of the feed. To use a model in other Regions, specify a cross-Region inference profile ID. A custom or provisioned model must be in the Region of the feed.
The request expression must produce a request body that this model accepts, and the model must accept the kind of media that the request expression references. For example, a text-only model can't accept a request that references media.frames.
passthrough (dict) --
Send the request nowhere. Use this target to reshape the metadata that Elemental Inference already produces, with no model invocation and no model charges.
string
[REQUIRED]
The JSONata expression that builds the request. Elemental Inference evaluates it against the media object of the feed, which holds the media and metadata that the function asked for. Maximum length: 5,120 characters.
When you save the function, Elemental Inference evaluates the expression against sample media and rejects it if the evaluation fails. For a Bedrock target, the result must be a JSON object; Elemental Inference doesn't check that the object is a valid request body for the model. The expression can reference at most one of media.transcript, media.contextual, and media.clip. For a passthrough target, it can't reference media.frames.
string
The JSONata expression that selects what to store. Elemental Inference evaluates it against the result as its root: the model response for a Bedrock target, or the output of the request expression for a passthrough target. If a function has no response expression, Elemental Inference stores the entire result. Maximum length: 5,120 characters.
When you save the function, Elemental Inference checks that the expression is valid JSONata. For a passthrough target, it also evaluates the request and response expressions together against sample media, and rejects them if they produce no value.
string
The description of the function. Maximum length: 1,024 characters.
string
Specifies whether Elemental Inference also sends this function's results to Amazon EventBridge. Elemental Inference sends a result only when the result is a JSON object with a top-level eventBridge field set to true. It sends the result, unchanged, as a Function Metadata Generated event to the default event bus in your account, after the result is available from GetMetadata. If the result is larger than 64 KB, the event has resultOmitted set to true in place of the result.
Valid values:
ENABLED – Elemental Inference sends each marked result as an event.
DISABLED (default) – Elemental Inference doesn't send events.
For a Bedrock target, ENABLED requires a response expression, because the model response itself never has a top-level eventBridge field. A feed output that runs a function with ENABLED can't use a fixedInterval trigger shorter than 4 seconds.
dict
The tags to associate with this function.
(string) --
(string) --
dict
Response Syntax
{
'name': 'string',
'target': {
'bedrock': {
'api': 'INVOKE_MODEL',
'model': 'string'
},
'passthrough': {}
},
'requestExpression': 'string',
'responseExpression': 'string',
'description': 'string',
'eventBridgeDelivery': 'ENABLED'|'DISABLED',
'arn': 'string',
'id': 'string',
'status': 'CREATING'|'AVAILABLE'|'REFERENCED'|'DELETING'|'DELETED',
'references': [
'string',
],
'contextTypes': [
'FRAMES'|'SUBTITLES'|'CONTEXTUAL_METADATA'|'CLIP_METADATA',
],
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
name (string) --
The name of the function.
target (dict) --
The destination for the request that the function builds.
bedrock (dict) --
Send the request to an Amazon Bedrock model.
api (string) --
The Amazon Bedrock API to call. The only valid value is INVOKE_MODEL.
model (string) --
The model to invoke. Specify one of the following:
A model ID.
An inference profile ID.
The ARN of a custom model.
The ARN of a provisioned model.
Elemental Inference invokes the model in the Region of the feed. To use a model in other Regions, specify a cross-Region inference profile ID. A custom or provisioned model must be in the Region of the feed.
The request expression must produce a request body that this model accepts, and the model must accept the kind of media that the request expression references. For example, a text-only model can't accept a request that references media.frames.
passthrough (dict) --
Send the request nowhere. Use this target to reshape the metadata that Elemental Inference already produces, with no model invocation and no model charges.
requestExpression (string) --
The JSONata expression that builds the request. Elemental Inference evaluates it against the media object of the feed, which holds the media and metadata that the function asked for.
responseExpression (string) --
The JSONata expression that selects what to store. Elemental Inference evaluates it against the result as its root: the model response for a Bedrock target, or the output of the request expression for a passthrough target. If a function has no response expression, Elemental Inference stores the entire result.
description (string) --
The description of the function.
eventBridgeDelivery (string) --
Indicates whether Elemental Inference also sends this function's results to Amazon EventBridge. With ENABLED, each result that is a JSON object with a top-level eventBridge field set to true is also sent as a Function Metadata Generated event to the default event bus in your account.
arn (string) --
The ARN of the function.
id (string) --
The ID of the function.
status (string) --
The status of the function. A successful request returns CREATING. The function is ready to use as soon as the request succeeds.
references (list) --
The IDs of the feeds that have a function output, enabled or disabled, that references this function. While this list isn't empty, the function can't be deleted, and its name and target can't be changed.
(string) --
contextTypes (list) --
The kinds of media context that this function uses. Elemental Inference derives this field from the media paths that the request expression references; you can't set it. An empty list means that the expression references no media, so Elemental Inference supplies none at run time.
(string) --
One kind of media context that a function reads. Elemental Inference derives this value from the media paths that the request expression references:
FRAMES – Derived from media.frames.
SUBTITLES – Derived from media.transcript.
CONTEXTUAL_METADATA – Derived from media.contextual.
CLIP_METADATA – Derived from media.clip.
A request expression can reference at most one of SUBTITLES, CONTEXTUAL_METADATA, and CLIP_METADATA, in addition to FRAMES.
tags (dict) --
The tags associated with the function.
(string) --
(string) --
Lists the functions in this account, in this Region. Each entry is a summary. To get the expressions of a function, use GetFunction.
See also: AWS API Documentation
Request Syntax
client.list_functions(
maxResults=123,
nextToken='string'
)
integer
The maximum number of functions to return in one response. Valid range: 1 to 100. The default is 100.
string
The token that identifies the page of results to return. Use the nextToken value from a previous response.
dict
Response Syntax
{
'functions': [
{
'arn': 'string',
'id': 'string',
'name': 'string',
'description': 'string',
'status': 'CREATING'|'AVAILABLE'|'REFERENCED'|'DELETING'|'DELETED',
'target': {
'bedrock': {
'api': 'INVOKE_MODEL',
'model': 'string'
},
'passthrough': {}
},
'contextTypes': [
'FRAMES'|'SUBTITLES'|'CONTEXTUAL_METADATA'|'CLIP_METADATA',
]
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
functions (list) --
An array of function summaries.
(dict) --
Contains identifying and configuration details for a function, including its name, target, status, and derived media context.
arn (string) --
The ARN of the function.
id (string) --
The ID of the function.
name (string) --
The name of the function.
description (string) --
The description of the function.
status (string) --
The status of the function.
target (dict) --
The destination for the request that the function builds.
bedrock (dict) --
Send the request to an Amazon Bedrock model.
api (string) --
The Amazon Bedrock API to call. The only valid value is INVOKE_MODEL.
model (string) --
The model to invoke. Specify one of the following:
A model ID.
An inference profile ID.
The ARN of a custom model.
The ARN of a provisioned model.
Elemental Inference invokes the model in the Region of the feed. To use a model in other Regions, specify a cross-Region inference profile ID. A custom or provisioned model must be in the Region of the feed.
The request expression must produce a request body that this model accepts, and the model must accept the kind of media that the request expression references. For example, a text-only model can't accept a request that references media.frames.
passthrough (dict) --
Send the request nowhere. Use this target to reshape the metadata that Elemental Inference already produces, with no model invocation and no model charges.
contextTypes (list) --
The kinds of media context that this function uses. Elemental Inference derives this field from the media paths that the request expression references; you can't set it. An empty list means that the expression references no media, so Elemental Inference supplies none at run time.
(string) --
One kind of media context that a function reads. Elemental Inference derives this value from the media paths that the request expression references:
FRAMES – Derived from media.frames.
SUBTITLES – Derived from media.transcript.
CONTEXTUAL_METADATA – Derived from media.contextual.
CLIP_METADATA – Derived from media.clip.
A request expression can reference at most one of SUBTITLES, CONTEXTUAL_METADATA, and CLIP_METADATA, in addition to FRAMES.
nextToken (string) --
The token to use in a subsequent request to get the next page of results. This field is absent when there are no more results.
Deletes the specified question set, including its DRAFT version and all its published versions. You can't delete a question set while any feed references any of its versions, including an archived feed. You must first remove the question set from the customQuestions configuration of each feed output that references it, or delete those feeds.
See also: AWS API Documentation
Request Syntax
client.delete_question_set(
id='string'
)
string
[REQUIRED]
The ID of the question set to delete.
dict
Response Syntax
{
'arn': 'string',
'id': 'string'
}
Response Structure
(dict) --
arn (string) --
The ARN of the deleted question set.
id (string) --
The ID of the deleted question set.
Lists the question sets in your account. The response doesn't include the questions in each question set. To retrieve them, use GetQuestionSet.
See also: AWS API Documentation
Request Syntax
client.list_question_sets(
maxResults=123,
nextToken='string'
)
integer
The maximum number of results to return per API request. Valid range: 1 to 100.
string
The token that identifies the next batch of results to return.
dict
Response Syntax
{
'questionSets': [
{
'arn': 'string',
'id': 'string',
'name': 'string',
'latestVersion': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
questionSets (list) --
A list of QuestionSetSummary objects.
(dict) --
Contains summary information about a question set. Used in the ListQuestionSets response.
arn (string) --
The ARN of the question set.
id (string) --
The ID of the question set.
name (string) --
The name of the question set.
latestVersion (string) --
The number of the highest version that you have published for this question set, even if you have since deleted that version. Elemental Inference doesn't return this property if you haven't published a version.
nextToken (string) --
The token to use to retrieve the next batch of results.
Lists the versions of the specified question set. The list starts with the DRAFT version, followed by the published versions from the highest version number to the lowest. The list doesn't include deleted versions.
The response doesn't include the questions in each version. To retrieve them, use GetQuestionSet and specify questionSetVersion.
See also: AWS API Documentation
Request Syntax
client.list_question_set_versions(
id='string',
maxResults=123,
nextToken='string'
)
string
[REQUIRED]
The ID of the question set whose versions you want to list.
integer
The maximum number of results to return per API request. Valid range: 1 to 100.
string
The token that identifies the next batch of results to return.
dict
Response Syntax
{
'versions': [
{
'version': 'string',
'description': 'string',
'sha256': 'string',
'lastModifiedAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
versions (list) --
A list of QuestionSetVersionSummary objects.
(dict) --
Contains summary information about one version of a question set. Used in the ListQuestionSetVersions response.
version (string) --
The version: DRAFT or the number of a published version.
description (string) --
The description that you specified when you published this version. Elemental Inference doesn't return this property for DRAFT, or for a version that you published without a description.
sha256 (string) --
The SHA-256 hash of this version, as 64 lowercase hexadecimal characters. The hash covers the name of the question set and its questions at this version.
lastModifiedAt (datetime) --
For DRAFT, the time when you created the question set or last updated DRAFT. For a published version, the time when you published it.
nextToken (string) --
The token to use to retrieve the next batch of results.
Creates a question set. Use a question set to get answers about content that's specific to your business, in addition to the built-in contextual metadata classifications. A question set contains your own questions. You ask Elemental Inference these questions about each shot or scene of the media in a contextual metadata output, and Elemental Inference answers each question with scores. To use a question set, reference it in the customQuestions property of the contextual metadata configuration of a feed output.
CreateQuestionSet creates the question set with a DRAFT version that contains the questions in the request. To change DRAFT, use UpdateQuestionSet. To publish DRAFT as a numbered version, use CreateQuestionSetVersion. You can't change a published version.
A question set can contain the following types of questions. You must specify at least one question.
yesNo – Elemental Inference answers yes or no.
yesNoPerOption – Elemental Inference answers yes or no for each option.
chooseOne – Elemental Inference chooses one of the options.
A version can contain up to 100 scored items, where each yesNo question, each option of a yesNoPerOption question, and each chooseOne question counts as one item. The name of each question must be unique across all three types.
See also: AWS API Documentation
Request Syntax
client.create_question_set(
yesNo=[
{
'name': 'string',
'question': 'string'
},
],
yesNoPerOption=[
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
chooseOne=[
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
name='string',
tags={
'string': 'string'
}
)
list
An array of questions that Elemental Inference answers with yes or no. You can specify up to 50 yesNo questions. An empty array is the same as omitting this property.
(dict) --
A question that you ask Elemental Inference, which answers with yes or no. You specify it in the yesNo array of a question set.
name (string) -- [REQUIRED]
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) -- [REQUIRED]
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
list
An array of questions that you ask about each of their options. Elemental Inference answers yes or no for each option. You can specify up to 10 yesNoPerOption questions. An empty array is the same as omitting this property.
(dict) --
A question that you ask Elemental Inference separately about each of its options. Elemental Inference answers yes or no for each option. Word the question so that it fits any of the options. For example, ask Is this overlay visible? with one option for each overlay. You specify it in the yesNoPerOption array of a question set.
name (string) -- [REQUIRED]
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) -- [REQUIRED]
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) -- [REQUIRED]
The options that you ask the question about. You can specify from 1 to 50 options. Each option counts as one item toward the limit of 100 scored items in a version.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) -- [REQUIRED]
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) -- [REQUIRED]
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
list
An array of questions that Elemental Inference answers by choosing one of their options. You can specify up to 10 chooseOne questions. An empty array is the same as omitting this property.
(dict) --
A question that you ask Elemental Inference, which answers by choosing one of its options. You specify it in the chooseOne array of a question set.
name (string) -- [REQUIRED]
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) -- [REQUIRED]
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) -- [REQUIRED]
The options that Elemental Inference chooses from. You can specify from 2 to 26 options. The question counts as one item toward the limit of 100 scored items in a version, regardless of how many options it has.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) -- [REQUIRED]
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) -- [REQUIRED]
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
string
[REQUIRED]
A user-friendly name for this question set.
dict
Optional tags to associate with the question set. You can also add tags later, using TagResource.
(string) --
(string) --
dict
Response Syntax
{
'yesNo': [
{
'name': 'string',
'question': 'string'
},
],
'yesNoPerOption': [
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
'chooseOne': [
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
'arn': 'string',
'id': 'string',
'name': 'string',
'version': 'string',
'description': 'string',
'latestVersion': 'string',
'sha256': 'string',
'references': [
'string',
],
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
yesNo (list) --
The yesNo questions that you specified in the request, in the order that you specified them. Elemental Inference doesn't return this property if the request didn't include any yesNo questions.
(dict) --
A question that you ask Elemental Inference, which answers with yes or no. You specify it in the yesNo array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
yesNoPerOption (list) --
The yesNoPerOption questions that you specified in the request, in the order that you specified them. Elemental Inference doesn't return this property if the request didn't include any yesNoPerOption questions.
(dict) --
A question that you ask Elemental Inference separately about each of its options. Elemental Inference answers yes or no for each option. Word the question so that it fits any of the options. For example, ask Is this overlay visible? with one option for each overlay. You specify it in the yesNoPerOption array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) --
The options that you ask the question about. You can specify from 1 to 50 options. Each option counts as one item toward the limit of 100 scored items in a version.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) --
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) --
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
chooseOne (list) --
The chooseOne questions that you specified in the request, in the order that you specified them. Elemental Inference doesn't return this property if the request didn't include any chooseOne questions.
(dict) --
A question that you ask Elemental Inference, which answers by choosing one of its options. You specify it in the chooseOne array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) --
The options that Elemental Inference chooses from. You can specify from 2 to 26 options. The question counts as one item toward the limit of 100 scored items in a version, regardless of how many options it has.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) --
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) --
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
arn (string) --
The ARN of the question set.
id (string) --
A unique ID that Elemental Inference assigns to the question set.
name (string) --
The name that you specified in the request.
version (string) --
The version that this response describes. For CreateQuestionSet, the version is always DRAFT.
description (string) --
The description of the version. Elemental Inference doesn't return this property for CreateQuestionSet, because the DRAFT version has no description.
latestVersion (string) --
The number of the highest version that you have published for this question set. Elemental Inference doesn't return this property for CreateQuestionSet, because a new question set has no published versions.
sha256 (string) --
The SHA-256 hash of the DRAFT version, as 64 lowercase hexadecimal characters. The hash covers the name of the question set and its questions. You can specify this value in a CreateQuestionSetVersion request, so that Elemental Inference publishes DRAFT only if it hasn't changed.
references (list) --
A list of feed IDs that reference this version of the question set. For a new question set, the list is empty.
(string) --
tags (dict) --
Any tags that you included when you created the question set.
(string) --
(string) --
Updates the DRAFT version of the specified question set. UpdateQuestionSet doesn't create a version and doesn't change published versions. To publish the updated DRAFT as a new version, use CreateQuestionSetVersion.
UpdateQuestionSet replaces questions one type at a time. For each of yesNo, yesNoPerOption, and chooseOne: if you omit the array, DRAFT keeps its questions of that type. If you include the array, it replaces all the questions of that type in DRAFT. If you include an empty array, DRAFT no longer has questions of that type. The updated DRAFT must follow the same rules as in CreateQuestionSet, and Elemental Inference applies those rules to the questions that DRAFT keeps as well as to the questions in the request.
Feeds that reference the DRAFT version use the updated questions. To make sure that the questions for a feed don't change, reference a published version instead.
See also: AWS API Documentation
Request Syntax
client.update_question_set(
id='string',
yesNo=[
{
'name': 'string',
'question': 'string'
},
],
yesNoPerOption=[
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
chooseOne=[
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
name='string'
)
string
[REQUIRED]
The ID of the question set to update.
list
An array of questions that Elemental Inference answers with yes or no, to replace all the yesNo questions in DRAFT. You can specify up to 50 yesNo questions. If not specified, the yesNo questions are not changed. To remove all the yesNo questions, specify an empty array.
(dict) --
A question that you ask Elemental Inference, which answers with yes or no. You specify it in the yesNo array of a question set.
name (string) -- [REQUIRED]
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) -- [REQUIRED]
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
list
An array of questions that you ask about each of their options, to replace all the yesNoPerOption questions in DRAFT. You can specify up to 10 yesNoPerOption questions. If not specified, the yesNoPerOption questions are not changed. To remove all the yesNoPerOption questions, specify an empty array.
(dict) --
A question that you ask Elemental Inference separately about each of its options. Elemental Inference answers yes or no for each option. Word the question so that it fits any of the options. For example, ask Is this overlay visible? with one option for each overlay. You specify it in the yesNoPerOption array of a question set.
name (string) -- [REQUIRED]
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) -- [REQUIRED]
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) -- [REQUIRED]
The options that you ask the question about. You can specify from 1 to 50 options. Each option counts as one item toward the limit of 100 scored items in a version.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) -- [REQUIRED]
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) -- [REQUIRED]
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
list
An array of questions that Elemental Inference answers by choosing one of their options, to replace all the chooseOne questions in DRAFT. You can specify up to 10 chooseOne questions. If not specified, the chooseOne questions are not changed. To remove all the chooseOne questions, specify an empty array.
(dict) --
A question that you ask Elemental Inference, which answers by choosing one of its options. You specify it in the chooseOne array of a question set.
name (string) -- [REQUIRED]
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) -- [REQUIRED]
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) -- [REQUIRED]
The options that Elemental Inference chooses from. You can specify from 2 to 26 options. The question counts as one item toward the limit of 100 scored items in a version, regardless of how many options it has.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) -- [REQUIRED]
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) -- [REQUIRED]
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
string
A new name for the question set. If not specified, the name is not changed.
dict
Response Syntax
{
'yesNo': [
{
'name': 'string',
'question': 'string'
},
],
'yesNoPerOption': [
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
'chooseOne': [
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
'arn': 'string',
'id': 'string',
'name': 'string',
'version': 'string',
'description': 'string',
'latestVersion': 'string',
'sha256': 'string',
'references': [
'string',
],
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
yesNo (list) --
The yesNo questions in this version. Elemental Inference doesn't return this property if the version has no yesNo questions.
(dict) --
A question that you ask Elemental Inference, which answers with yes or no. You specify it in the yesNo array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
yesNoPerOption (list) --
The yesNoPerOption questions in this version. Elemental Inference doesn't return this property if the version has no yesNoPerOption questions.
(dict) --
A question that you ask Elemental Inference separately about each of its options. Elemental Inference answers yes or no for each option. Word the question so that it fits any of the options. For example, ask Is this overlay visible? with one option for each overlay. You specify it in the yesNoPerOption array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) --
The options that you ask the question about. You can specify from 1 to 50 options. Each option counts as one item toward the limit of 100 scored items in a version.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) --
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) --
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
chooseOne (list) --
The chooseOne questions in this version. Elemental Inference doesn't return this property if the version has no chooseOne questions.
(dict) --
A question that you ask Elemental Inference, which answers by choosing one of its options. You specify it in the chooseOne array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) --
The options that Elemental Inference chooses from. You can specify from 2 to 26 options. The question counts as one item toward the limit of 100 scored items in a version, regardless of how many options it has.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) --
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) --
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
arn (string) --
The ARN of the question set.
id (string) --
The ID of the question set.
name (string) --
The updated or original name of the question set.
version (string) --
The version that this response describes. For UpdateQuestionSet, the version is always DRAFT.
description (string) --
The description of the version. Elemental Inference doesn't return this property for UpdateQuestionSet, because the DRAFT version has no description.
latestVersion (string) --
The number of the highest version that you have published for this question set, even if you have since deleted that version. Elemental Inference doesn't return this property if you haven't published a version.
sha256 (string) --
The SHA-256 hash of the DRAFT version after the update, as 64 lowercase hexadecimal characters. The hash covers the name of the question set and its questions, so it changes when you rename the question set. You can specify this value in a CreateQuestionSetVersion request, so that Elemental Inference publishes DRAFT only if it hasn't changed since this update.
references (list) --
A list of feed IDs that reference the DRAFT version of the question set.
(string) --
tags (dict) --
Any tags associated with the question set.
(string) --
(string) --
Publishes the DRAFT version of the specified question set as a new version. The new version has the same name and questions as DRAFT, and you can't change it. DRAFT doesn't change, so you can continue to update it.
Version numbers start at 1, and each new version has the next number. Elemental Inference never reuses a version number, even after you delete that version.
If DRAFT hasn't changed since the latest published version, Elemental Inference doesn't create a version. Instead, it returns the latest version. A change to the name of the question set counts as a change to DRAFT.
A question set can have a limited number of versions. If the question set already has the maximum number of versions, Elemental Inference returns ServiceQuotaExceededException. To free space for a new version, delete a version that you no longer need, or create a new question set.
See also: AWS API Documentation
Request Syntax
client.create_question_set_version(
id='string',
sha256='string',
description='string'
)
string
[REQUIRED]
The ID of the question set whose DRAFT version you want to publish.
string
The SHA-256 hash of the DRAFT version that you want to publish, as returned by GetQuestionSet or UpdateQuestionSet. If you specify this value, Elemental Inference publishes DRAFT only if its current hash matches. If it doesn't match, because DRAFT changed after you retrieved it, the request fails with ConflictException.
If you don't specify this value, Elemental Inference publishes DRAFT as it is when it receives the request.
string
A description of the new version. You can't change the description after Elemental Inference publishes the version. If DRAFT hasn't changed since the latest version, Elemental Inference ignores this value and returns the latest version with its existing description.
The description can be up to 256 characters. It can contain the letters A-Z and a-z, the digits 0-9, underscores, spaces, and the following characters: - . ' , @ : ;.
dict
Response Syntax
{
'yesNo': [
{
'name': 'string',
'question': 'string'
},
],
'yesNoPerOption': [
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
'chooseOne': [
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
'arn': 'string',
'id': 'string',
'name': 'string',
'version': 'string',
'description': 'string',
'latestVersion': 'string',
'sha256': 'string',
'references': [
'string',
],
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
yesNo (list) --
The yesNo questions in this version. Elemental Inference doesn't return this property if the version has no yesNo questions.
(dict) --
A question that you ask Elemental Inference, which answers with yes or no. You specify it in the yesNo array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
yesNoPerOption (list) --
The yesNoPerOption questions in this version. Elemental Inference doesn't return this property if the version has no yesNoPerOption questions.
(dict) --
A question that you ask Elemental Inference separately about each of its options. Elemental Inference answers yes or no for each option. Word the question so that it fits any of the options. For example, ask Is this overlay visible? with one option for each overlay. You specify it in the yesNoPerOption array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) --
The options that you ask the question about. You can specify from 1 to 50 options. Each option counts as one item toward the limit of 100 scored items in a version.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) --
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) --
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
chooseOne (list) --
The chooseOne questions in this version. Elemental Inference doesn't return this property if the version has no chooseOne questions.
(dict) --
A question that you ask Elemental Inference, which answers by choosing one of its options. You specify it in the chooseOne array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) --
The options that Elemental Inference chooses from. You can specify from 2 to 26 options. The question counts as one item toward the limit of 100 scored items in a version, regardless of how many options it has.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) --
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) --
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
arn (string) --
The ARN of the question set.
id (string) --
The ID of the question set.
name (string) --
The name of the question set at this version.
version (string) --
The number of the version that Elemental Inference published. If DRAFT hadn't changed since the latest version, this is the number of that existing version.
description (string) --
The description of the version. For a new version, this is the description that you specified in the request. If DRAFT hadn't changed since the latest version, this is the description of that existing version. Elemental Inference doesn't return this property if the version has no description.
latestVersion (string) --
The number of the highest version that you have published for this question set. It's the same as version.
sha256 (string) --
The SHA-256 hash of the version, as 64 lowercase hexadecimal characters. It's the same as the hash of the DRAFT version that Elemental Inference published.
references (list) --
A list of feed IDs that reference this version of the question set. For a new version, the list is empty.
(string) --
tags (dict) --
Any tags associated with the question set.
(string) --
(string) --
Retrieves the details of a function, including its expressions, the media context that Elemental Inference derived from the request expression, and the feeds that currently reference it.
See also: AWS API Documentation
Request Syntax
client.get_function(
id='string'
)
string
[REQUIRED]
The ID of the function.
dict
Response Syntax
{
'name': 'string',
'target': {
'bedrock': {
'api': 'INVOKE_MODEL',
'model': 'string'
},
'passthrough': {}
},
'requestExpression': 'string',
'responseExpression': 'string',
'description': 'string',
'eventBridgeDelivery': 'ENABLED'|'DISABLED',
'arn': 'string',
'id': 'string',
'status': 'CREATING'|'AVAILABLE'|'REFERENCED'|'DELETING'|'DELETED',
'references': [
'string',
],
'contextTypes': [
'FRAMES'|'SUBTITLES'|'CONTEXTUAL_METADATA'|'CLIP_METADATA',
],
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
name (string) --
The name of the function.
target (dict) --
The destination for the request that the function builds.
bedrock (dict) --
Send the request to an Amazon Bedrock model.
api (string) --
The Amazon Bedrock API to call. The only valid value is INVOKE_MODEL.
model (string) --
The model to invoke. Specify one of the following:
A model ID.
An inference profile ID.
The ARN of a custom model.
The ARN of a provisioned model.
Elemental Inference invokes the model in the Region of the feed. To use a model in other Regions, specify a cross-Region inference profile ID. A custom or provisioned model must be in the Region of the feed.
The request expression must produce a request body that this model accepts, and the model must accept the kind of media that the request expression references. For example, a text-only model can't accept a request that references media.frames.
passthrough (dict) --
Send the request nowhere. Use this target to reshape the metadata that Elemental Inference already produces, with no model invocation and no model charges.
requestExpression (string) --
The JSONata expression that builds the request. Elemental Inference evaluates it against the media object of the feed, which holds the media and metadata that the function asked for.
responseExpression (string) --
The JSONata expression that selects what to store. Elemental Inference evaluates it against the result as its root: the model response for a Bedrock target, or the output of the request expression for a passthrough target. If a function has no response expression, Elemental Inference stores the entire result.
description (string) --
The description of the function.
eventBridgeDelivery (string) --
Indicates whether Elemental Inference also sends this function's results to Amazon EventBridge. With ENABLED, each result that is a JSON object with a top-level eventBridge field set to true is also sent as a Function Metadata Generated event to the default event bus in your account.
arn (string) --
The ARN of the function.
id (string) --
The ID of the function.
status (string) --
The status of the function.
references (list) --
The IDs of the feeds that have a function output, enabled or disabled, that references this function. While this list isn't empty, the function can't be deleted, and its name and target can't be changed.
(string) --
contextTypes (list) --
The kinds of media context that this function uses. Elemental Inference derives this field from the media paths that the request expression references; you can't set it. An empty list means that the expression references no media, so Elemental Inference supplies none at run time.
(string) --
One kind of media context that a function reads. Elemental Inference derives this value from the media paths that the request expression references:
FRAMES – Derived from media.frames.
SUBTITLES – Derived from media.transcript.
CONTEXTUAL_METADATA – Derived from media.contextual.
CLIP_METADATA – Derived from media.clip.
A request expression can reference at most one of SUBTITLES, CONTEXTUAL_METADATA, and CLIP_METADATA, in addition to FRAMES.
tags (dict) --
The tags associated with the function.
(string) --
(string) --
Deletes a published version of the specified question set. You can't delete a version while a feed references it, including an archived feed. You can't restore a deleted version, and Elemental Inference doesn't reuse its number.
You can't delete the DRAFT version on its own. To delete DRAFT, delete the question set by using DeleteQuestionSet.
Deleting a version doesn't change the latestVersion of the question set, even if you delete the highest version.
See also: AWS API Documentation
Request Syntax
client.delete_question_set_version(
id='string',
questionSetVersion='string'
)
string
[REQUIRED]
The ID of the question set that contains the version.
string
[REQUIRED]
The number of the published version to delete. You can't specify DRAFT.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes a function. If any feed still references the function, the operation returns a ConflictException. A disabled function output still references the function. Use GetFunction to find those feeds, then remove the function output from each one with UpdateFeed, or delete the feed, before retrying.
Deleting a function doesn't delete the metadata that it has already produced.
See also: AWS API Documentation
Request Syntax
client.delete_function(
id='string'
)
string
[REQUIRED]
The ID of the function.
dict
Response Syntax
{
'arn': 'string',
'id': 'string',
'status': 'CREATING'|'AVAILABLE'|'REFERENCED'|'DELETING'|'DELETED'
}
Response Structure
(dict) --
arn (string) --
The ARN of the function.
id (string) --
The ID of the function.
status (string) --
The status of the function. A successful request returns DELETING. Elemental Inference removes the function before it returns the response.
Updates a function. Include only the parameters that you want to change; parameters that you don't include aren't affected. Elemental Inference validates the updated expressions in the same way as CreateFunction.
While a feed references the function, you can change only its expressions and its description, and you can set eventBridgeDelivery to DISABLED but not to ENABLED. The request expression must keep referencing the same media context, as reported in contextTypes. Changing an expression changes the behavior of every feed that references the function.
See also: AWS API Documentation
Request Syntax
client.update_function(
id='string',
name='string',
target={
'bedrock': {
'api': 'INVOKE_MODEL',
'model': 'string'
},
'passthrough': {}
},
requestExpression='string',
responseExpression='string',
description='string',
eventBridgeDelivery='ENABLED'|'DISABLED'
)
string
[REQUIRED]
The ID of the function.
string
A new name for the function. You can't change the name while the function is referenced by a feed.
dict
A new target for the function. You can't change the target while the function is referenced by a feed.
bedrock (dict) --
Send the request to an Amazon Bedrock model.
api (string) -- [REQUIRED]
The Amazon Bedrock API to call. The only valid value is INVOKE_MODEL.
model (string) -- [REQUIRED]
The model to invoke. Specify one of the following:
A model ID.
An inference profile ID.
The ARN of a custom model.
The ARN of a provisioned model.
Elemental Inference invokes the model in the Region of the feed. To use a model in other Regions, specify a cross-Region inference profile ID. A custom or provisioned model must be in the Region of the feed.
The request expression must produce a request body that this model accepts, and the model must accept the kind of media that the request expression references. For example, a text-only model can't accept a request that references media.frames.
passthrough (dict) --
Send the request nowhere. Use this target to reshape the metadata that Elemental Inference already produces, with no model invocation and no model charges.
string
A new request expression for the function. Elemental Inference derives contextTypes again from the new expression. While a feed references the function, the new expression must reference the same media context as the current one.
string
A new response expression for the function. To remove the response expression, specify an empty string. A function with a Bedrock target and eventBridgeDelivery set to ENABLED must keep a response expression.
string
A new description for the function.
string
Specifies whether Elemental Inference also sends this function's marked results to Amazon EventBridge, as described for CreateFunction. If you omit this parameter, the current value is kept. While a feed references the function, you can change this value to DISABLED, but not to ENABLED.
dict
Response Syntax
{
'name': 'string',
'target': {
'bedrock': {
'api': 'INVOKE_MODEL',
'model': 'string'
},
'passthrough': {}
},
'requestExpression': 'string',
'responseExpression': 'string',
'description': 'string',
'eventBridgeDelivery': 'ENABLED'|'DISABLED',
'arn': 'string',
'id': 'string',
'status': 'CREATING'|'AVAILABLE'|'REFERENCED'|'DELETING'|'DELETED',
'references': [
'string',
],
'contextTypes': [
'FRAMES'|'SUBTITLES'|'CONTEXTUAL_METADATA'|'CLIP_METADATA',
],
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
name (string) --
The name of the function.
target (dict) --
The destination for the request that the function builds.
bedrock (dict) --
Send the request to an Amazon Bedrock model.
api (string) --
The Amazon Bedrock API to call. The only valid value is INVOKE_MODEL.
model (string) --
The model to invoke. Specify one of the following:
A model ID.
An inference profile ID.
The ARN of a custom model.
The ARN of a provisioned model.
Elemental Inference invokes the model in the Region of the feed. To use a model in other Regions, specify a cross-Region inference profile ID. A custom or provisioned model must be in the Region of the feed.
The request expression must produce a request body that this model accepts, and the model must accept the kind of media that the request expression references. For example, a text-only model can't accept a request that references media.frames.
passthrough (dict) --
Send the request nowhere. Use this target to reshape the metadata that Elemental Inference already produces, with no model invocation and no model charges.
requestExpression (string) --
The JSONata expression that builds the request. Elemental Inference evaluates it against the media object of the feed, which holds the media and metadata that the function asked for.
responseExpression (string) --
The JSONata expression that selects what to store. Elemental Inference evaluates it against the result as its root: the model response for a Bedrock target, or the output of the request expression for a passthrough target. If a function has no response expression, Elemental Inference stores the entire result.
description (string) --
The description of the function.
eventBridgeDelivery (string) --
Indicates whether Elemental Inference also sends this function's results to Amazon EventBridge. With ENABLED, each result that is a JSON object with a top-level eventBridge field set to true is also sent as a Function Metadata Generated event to the default event bus in your account.
arn (string) --
The ARN of the function.
id (string) --
The ID of the function.
status (string) --
The status of the function.
references (list) --
The IDs of the feeds that have a function output, enabled or disabled, that references this function. While this list isn't empty, the function can't be deleted, and its name and target can't be changed.
(string) --
contextTypes (list) --
The kinds of media context that this function uses. Elemental Inference derives this field from the media paths that the request expression references; you can't set it. An empty list means that the expression references no media, so Elemental Inference supplies none at run time.
(string) --
One kind of media context that a function reads. Elemental Inference derives this value from the media paths that the request expression references:
FRAMES – Derived from media.frames.
SUBTITLES – Derived from media.transcript.
CONTEXTUAL_METADATA – Derived from media.contextual.
CLIP_METADATA – Derived from media.clip.
A request expression can reference at most one of SUBTITLES, CONTEXTUAL_METADATA, and CLIP_METADATA, in addition to FRAMES.
tags (dict) --
The tags associated with the function.
(string) --
(string) --
Retrieves information about the specified question set at one version. By default, GetQuestionSet returns the DRAFT version. To retrieve a published version, specify questionSetVersion.
See also: AWS API Documentation
Request Syntax
client.get_question_set(
id='string',
questionSetVersion='string'
)
string
[REQUIRED]
The ID of the question set to retrieve.
string
The version of the question set to retrieve: DRAFT or the number of a published version. If you don't specify a version, Elemental Inference returns DRAFT.
dict
Response Syntax
{
'yesNo': [
{
'name': 'string',
'question': 'string'
},
],
'yesNoPerOption': [
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
'chooseOne': [
{
'name': 'string',
'question': 'string',
'options': [
{
'name': 'string',
'text': 'string'
},
]
},
],
'arn': 'string',
'id': 'string',
'name': 'string',
'version': 'string',
'description': 'string',
'latestVersion': 'string',
'sha256': 'string',
'references': [
'string',
],
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
yesNo (list) --
The yesNo questions in this version. Elemental Inference doesn't return this property if the version has no yesNo questions.
(dict) --
A question that you ask Elemental Inference, which answers with yes or no. You specify it in the yesNo array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
yesNoPerOption (list) --
The yesNoPerOption questions in this version. Elemental Inference doesn't return this property if the version has no yesNoPerOption questions.
(dict) --
A question that you ask Elemental Inference separately about each of its options. Elemental Inference answers yes or no for each option. Word the question so that it fits any of the options. For example, ask Is this overlay visible? with one option for each overlay. You specify it in the yesNoPerOption array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) --
The options that you ask the question about. You can specify from 1 to 50 options. Each option counts as one item toward the limit of 100 scored items in a version.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) --
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) --
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
chooseOne (list) --
The chooseOne questions in this version. Elemental Inference doesn't return this property if the version has no chooseOne questions.
(dict) --
A question that you ask Elemental Inference, which answers by choosing one of its options. You specify it in the chooseOne array of a question set.
name (string) --
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) --
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters: . , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
options (list) --
The options that Elemental Inference chooses from. You can specify from 2 to 26 options. The question counts as one item toward the limit of 100 scored items in a version, regardless of how many options it has.
(dict) --
An option in a yesNoPerOption question or a chooseOne question.
name (string) --
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) --
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
arn (string) --
The ARN of the question set.
id (string) --
The ID of the question set.
name (string) --
The name of the question set at this version. For a published version, this is the name that the question set had when the version was published.
version (string) --
The version that this response describes: DRAFT or the number of a published version.
description (string) --
The description that you specified when you published this version. Elemental Inference doesn't return this property for DRAFT, or for a version that you published without a description.
latestVersion (string) --
The number of the highest version that you have published for this question set, even if you have since deleted that version. Elemental Inference doesn't return this property if you haven't published a version.
sha256 (string) --
The SHA-256 hash of this version, as 64 lowercase hexadecimal characters. The hash covers the name of the question set and its questions at this version. For DRAFT, you can specify this value in a CreateQuestionSetVersion request, so that Elemental Inference publishes DRAFT only if it hasn't changed.
references (list) --
A list of feed IDs that reference this version of the question set. The list doesn't include feeds that reference other versions.
(string) --
tags (dict) --
The tags associated with the question set.
(string) --
(string) --
{'outputs': {'outputConfig': {'contextualMetadata': {'customQuestions': {'scene': {'questionSetId': 'string',
'version': 'string'},
'shot': {'questionSetId': 'string',
'version': 'string'}}},
'function': {'clippingSettings': {'outputName': 'string'},
'contextualMetadataSettings': {'outputName': 'string'},
'frameSettings': {'frameSampling': {'count': 'integer',
'mode': 'FIRST '
'| '
'UNIFORM '
'| '
'LAST'},
'frameSize': {'heightPixels': 'integer',
'widthPixels': 'integer'}},
'functionArn': 'string',
'subtitlingSettings': {'outputName': 'string'},
'trigger': {'fixedInterval': {'intervalSeconds': 'integer'},
'perClip': {},
'perScene': {},
'perShot': {}}}}}}
Associates a resource with the feed. The resource provides the input that Elemental Inference needs in order to perform an Elemental Inference feature, such as cropping video. You always provide the resource by associating it with a feed. You can associate only one resource with each feed. With an association, a specific source media is claiming ownership of the feed.
AssociateFeed is a PATCH operation, which means that you can include only parameters that you want to change. Parameters that you don't include will not be affected by the operation.
Specifically:
You can add more outputs to the existing outputs. New outputs will be appended.
You can't modify an existing output (for example to change its name). Instead, use UpdateFeed.
You can't delete an existing output. Instead, use UpdateFeed.
Also note that you can't change the feed name with AssociateFeed. Instead, use UpdateFeed.
See also: AWS API Documentation
Request Syntax
client.associate_feed(
id='string',
associatedResourceName='string',
outputs=[
{
'name': 'string',
'outputConfig': {
'cropping': {
'templateGroups': [
{
'name': 'string',
'templateUris': [
'string',
]
},
]
},
'clipping': {
'callbackMetadata': 'string',
'dataSourceConfiguration': {
'fixtureId': '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'
},
'contextualMetadata': {
'summaryGeneration': 'ENABLED'|'DISABLED',
'extendedAnalysis': 'ENABLED'|'DISABLED',
'customQuestions': {
'shot': {
'questionSetId': 'string',
'version': 'string'
},
'scene': {
'questionSetId': 'string',
'version': 'string'
}
}
},
'function': {
'functionArn': 'string',
'trigger': {
'fixedInterval': {
'intervalSeconds': 123
},
'perShot': {}
,
'perScene': {}
,
'perClip': {}
},
'frameSettings': {
'frameSampling': {
'mode': 'FIRST'|'UNIFORM'|'LAST',
'count': 123
},
'frameSize': {
'widthPixels': 123,
'heightPixels': 123
}
},
'subtitlingSettings': {
'outputName': 'string'
},
'contextualMetadataSettings': {
'outputName': 'string'
},
'clippingSettings': {
'outputName': 'string'
}
}
},
'status': 'ENABLED'|'DISABLED',
'description': 'string'
},
],
dryRun=True|False
)
string
[REQUIRED]
The ID of the feed.
string
[REQUIRED]
An identifier for the resource. This name must not resemble an ARN.
The resource is the source media that the feed will process. The name you assign should help you to later identify the source media that belongs to the feed. In this way, you will know which source media to push to the feed (using PutMedia).
This field is autopopulated if not provided.
list
[REQUIRED]
An array of one or more outputs that you want to add to this feed now, to supplement any outputs that you specified when you created or updated the feed.
(dict) --
Contains configuration information about one output in a feed. It is used in the AssociateFeed and the CreateFeed actions.
name (string) -- [REQUIRED]
A name for 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.
cropping (dict) --
The output config type that applies to the cropping feature.
templateGroups (list) --
An array of template groups for the crop output. Each template group provides the graphics-compositing templates that Elemental Inference applies to the cropped video. You can specify from 1 to 4 template groups.
(dict) --
A named set of graphics-compositing templates used by the crop feature, specified in the templateGroups array of a CroppingConfig.
name (string) -- [REQUIRED]
A name for the template group.
templateUris (list) -- [REQUIRED]
An array of Amazon S3 URIs that point to the graphics-compositing templates for this group. You can specify 1 or 2 URIs. Each URI must be in the form s3://bucket-name/key. Elemental Inference reads these templates using the IAM role that you specify in accessRoleArn.
(string) --
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.
dataSourceConfiguration (dict) --
The data source to map onto this clipping output. This parameter is optional. When you include this parameter, Elemental Inference reads the event data for the fixture that you specify, and includes that data in the event clipping metadata for this output.
If you omit this parameter, Elemental Inference doesn't map a data source onto this 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.
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).
contextualMetadata (dict) --
The output config type that applies to the contextual metadata feature.
summaryGeneration (string) --
Specifies whether Elemental Inference generates a descriptive summary of the media content for this output, along with the objects and actions that it detects. This setting is independent of extendedAnalysis.
Valid values:
ENABLED (default) – Elemental Inference populates the summary, objects, and actions fields, along with the IAB taxonomy and GARM suitability classifications.
DISABLED – Elemental Inference doesn't populate the summary, objects, and actions fields.
extendedAnalysis (string) --
Specifies whether Elemental Inference generates extended analysis of the media content for this output. Extended analysis identifies the people, environments, brands, and on-screen text in the media content. This setting is independent of summaryGeneration.
Valid values:
ENABLED (default) – Elemental Inference populates the people, environments, brands, and on-screen text fields.
DISABLED – Elemental Inference doesn't populate the people, environments, brands, and on-screen text fields.
If you specify customQuestions, you must set this property to DISABLED.
customQuestions (dict) --
The question sets that you ask Elemental Inference about each shot, each scene, or both, in this output.
If you specify customQuestions, you must also set extendedAnalysis to DISABLED. If you omit extendedAnalysis, it defaults to ENABLED, and the request fails.
While a feed references a version of a question set, you can't delete that version or the question set.
shot (dict) --
The version of a question set to ask Elemental Inference about each shot.
questionSetId (string) -- [REQUIRED]
The ID of the question set. The question set must be in your account.
version (string) -- [REQUIRED]
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
scene (dict) --
The version of a question set to ask Elemental Inference about each scene.
questionSetId (string) -- [REQUIRED]
The ID of the question set. The question set must be in your account.
version (string) -- [REQUIRED]
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
function (dict) --
The output config type that applies to a function.
functionArn (string) -- [REQUIRED]
The ARN of the function to run. The function must exist in the same account and the same Region as the feed.
trigger (dict) -- [REQUIRED]
Determines when the function runs.
fixedInterval (dict) --
Run the function at a fixed interval of content. This is the only trigger for a function that references media.transcript. Can't be used with a function that references media.contextual.
intervalSeconds (integer) -- [REQUIRED]
The amount of content, in seconds, between runs of the function. Valid range: 1 to 60. For a function with eventBridgeDelivery set to ENABLED, the minimum is 4.
perShot (dict) --
Run the function once for each shot that Elemental Inference detects. Can't be used with a function that references media.transcript or media.clip.
perScene (dict) --
Run the function once for each scene boundary that a contextual metadata output reports. Requires contextualMetadataSettings. Can't be used with a function that references media.transcript or media.clip.
perClip (dict) --
Run the function once for each clip that an event clipping output detects. Requires clippingSettings. Can't be used with a function that references media.transcript or media.contextual.
frameSettings (dict) --
The frames to send on each run: how many, which ones, and at what size. Applies to a function that references media.frames. If you omit this structure, Elemental Inference sends the first frame of the window, at its source size.
frameSampling (dict) -- [REQUIRED]
The method for choosing which frames to send.
mode (string) -- [REQUIRED]
Which frames of the window to send: FIRST (the first frames), UNIFORM (frames spread evenly across the window), or LAST (the last frames).
count (integer) --
The number of frames to send on each run. Valid range: 1 to 64. The default is 1. Each frame adds to the size of the model request and to what the model charges for it.
frameSize (dict) --
The size to resize each frame to. If you omit this structure, frames keep their source size. Smaller frames reduce the size of the model request.
widthPixels (integer) -- [REQUIRED]
The width of each frame, in pixels. Valid range: 1 to 1280.
heightPixels (integer) -- [REQUIRED]
The height of each frame, in pixels. Valid range: 1 to 720.
subtitlingSettings (dict) --
The smart subtitles output on this feed to read the transcript from. Required for a function that references media.transcript.
outputName (string) -- [REQUIRED]
The name of an ENABLED smart subtitles output on this feed.
contextualMetadataSettings (dict) --
The contextual metadata output on this feed to read scenes and classifications from. Required for a perScene trigger, and for a function that references media.contextual on a perShot trigger.
outputName (string) -- [REQUIRED]
The name of an ENABLED contextual metadata output on this feed.
clippingSettings (dict) --
The event clipping output on this feed to read clips from. Required for a perClip trigger, and for a function that references media.clip.
outputName (string) -- [REQUIRED]
The name of an ENABLED event clipping output on this feed.
status (string) -- [REQUIRED]
The status to assign to the output.
description (string) --
A description for the output.
boolean
Set to true if you want to do a dry run of the associate action.
Elemental Inference will validate that the real request would succeed without actually making any changes. A dry run catches errors such as missing IAM permissions, quota limits exceeded, conflicting outputs, and so on. If the dry run fails, the action returns a 4xx error code. After you've fixed the errors, resubmit the request.
dict
Response Syntax
{
'arn': 'string',
'id': 'string'
}
Response Structure
(dict) --
arn (string) --
The ARN of the feed.
id (string) --
The ID of the feed.
{'outputs': {'outputConfig': {'contextualMetadata': {'customQuestions': {'scene': {'questionSetId': 'string',
'version': 'string'},
'shot': {'questionSetId': 'string',
'version': 'string'}}},
'function': {'clippingSettings': {'outputName': 'string'},
'contextualMetadataSettings': {'outputName': 'string'},
'frameSettings': {'frameSampling': {'count': 'integer',
'mode': 'FIRST '
'| '
'UNIFORM '
'| '
'LAST'},
'frameSize': {'heightPixels': 'integer',
'widthPixels': 'integer'}},
'functionArn': 'string',
'subtitlingSettings': {'outputName': 'string'},
'trigger': {'fixedInterval': {'intervalSeconds': 'integer'},
'perClip': {},
'perScene': {},
'perShot': {}}}}}}
Creates a feed. The feed is the target for the live media stream that is being sent by the calling application. An example of a calling application is AWS Elemental MediaLive.
The key contents of the feed is an array of outputs. Each output represents an Elemental Inference feature. After you create the feed, you must associate a resource with the feed. At that point, you will have a useable feed: resource - feed - output or outputs.
See also: AWS API Documentation
Request Syntax
client.create_feed(
name='string',
accessRoleArn='string',
outputs=[
{
'name': 'string',
'outputConfig': {
'cropping': {
'templateGroups': [
{
'name': 'string',
'templateUris': [
'string',
]
},
]
},
'clipping': {
'callbackMetadata': 'string',
'dataSourceConfiguration': {
'fixtureId': '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'
},
'contextualMetadata': {
'summaryGeneration': 'ENABLED'|'DISABLED',
'extendedAnalysis': 'ENABLED'|'DISABLED',
'customQuestions': {
'shot': {
'questionSetId': 'string',
'version': 'string'
},
'scene': {
'questionSetId': 'string',
'version': 'string'
}
}
},
'function': {
'functionArn': 'string',
'trigger': {
'fixedInterval': {
'intervalSeconds': 123
},
'perShot': {}
,
'perScene': {}
,
'perClip': {}
},
'frameSettings': {
'frameSampling': {
'mode': 'FIRST'|'UNIFORM'|'LAST',
'count': 123
},
'frameSize': {
'widthPixels': 123,
'heightPixels': 123
}
},
'subtitlingSettings': {
'outputName': 'string'
},
'contextualMetadataSettings': {
'outputName': 'string'
},
'clippingSettings': {
'outputName': 'string'
}
}
},
'status': 'ENABLED'|'DISABLED',
'description': 'string'
},
],
tags={
'string': 'string'
}
)
string
[REQUIRED]
A user-friendly name for this feed.
string
The ARN of an IAM role that Elemental Inference assumes to access resources in your account on your behalf. For example, the smart crop feature uses this role to read graphics-compositing templates from your Amazon S3 bucket. You specify one access role for each feed.
list
[REQUIRED]
An array of outputs for this feed. Each output represents a specific Elemental Inference feature. For example, there is one output type for the smart crop feature. You must specify at least one output, but you can later add outputs using AssociateFeed, or add, modify, and delete outputs using UpdateFeed.
(dict) --
Contains configuration information about one output in a feed. It is used in the AssociateFeed and the CreateFeed actions.
name (string) -- [REQUIRED]
A name for 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.
cropping (dict) --
The output config type that applies to the cropping feature.
templateGroups (list) --
An array of template groups for the crop output. Each template group provides the graphics-compositing templates that Elemental Inference applies to the cropped video. You can specify from 1 to 4 template groups.
(dict) --
A named set of graphics-compositing templates used by the crop feature, specified in the templateGroups array of a CroppingConfig.
name (string) -- [REQUIRED]
A name for the template group.
templateUris (list) -- [REQUIRED]
An array of Amazon S3 URIs that point to the graphics-compositing templates for this group. You can specify 1 or 2 URIs. Each URI must be in the form s3://bucket-name/key. Elemental Inference reads these templates using the IAM role that you specify in accessRoleArn.
(string) --
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.
dataSourceConfiguration (dict) --
The data source to map onto this clipping output. This parameter is optional. When you include this parameter, Elemental Inference reads the event data for the fixture that you specify, and includes that data in the event clipping metadata for this output.
If you omit this parameter, Elemental Inference doesn't map a data source onto this 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.
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).
contextualMetadata (dict) --
The output config type that applies to the contextual metadata feature.
summaryGeneration (string) --
Specifies whether Elemental Inference generates a descriptive summary of the media content for this output, along with the objects and actions that it detects. This setting is independent of extendedAnalysis.
Valid values:
ENABLED (default) – Elemental Inference populates the summary, objects, and actions fields, along with the IAB taxonomy and GARM suitability classifications.
DISABLED – Elemental Inference doesn't populate the summary, objects, and actions fields.
extendedAnalysis (string) --
Specifies whether Elemental Inference generates extended analysis of the media content for this output. Extended analysis identifies the people, environments, brands, and on-screen text in the media content. This setting is independent of summaryGeneration.
Valid values:
ENABLED (default) – Elemental Inference populates the people, environments, brands, and on-screen text fields.
DISABLED – Elemental Inference doesn't populate the people, environments, brands, and on-screen text fields.
If you specify customQuestions, you must set this property to DISABLED.
customQuestions (dict) --
The question sets that you ask Elemental Inference about each shot, each scene, or both, in this output.
If you specify customQuestions, you must also set extendedAnalysis to DISABLED. If you omit extendedAnalysis, it defaults to ENABLED, and the request fails.
While a feed references a version of a question set, you can't delete that version or the question set.
shot (dict) --
The version of a question set to ask Elemental Inference about each shot.
questionSetId (string) -- [REQUIRED]
The ID of the question set. The question set must be in your account.
version (string) -- [REQUIRED]
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
scene (dict) --
The version of a question set to ask Elemental Inference about each scene.
questionSetId (string) -- [REQUIRED]
The ID of the question set. The question set must be in your account.
version (string) -- [REQUIRED]
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
function (dict) --
The output config type that applies to a function.
functionArn (string) -- [REQUIRED]
The ARN of the function to run. The function must exist in the same account and the same Region as the feed.
trigger (dict) -- [REQUIRED]
Determines when the function runs.
fixedInterval (dict) --
Run the function at a fixed interval of content. This is the only trigger for a function that references media.transcript. Can't be used with a function that references media.contextual.
intervalSeconds (integer) -- [REQUIRED]
The amount of content, in seconds, between runs of the function. Valid range: 1 to 60. For a function with eventBridgeDelivery set to ENABLED, the minimum is 4.
perShot (dict) --
Run the function once for each shot that Elemental Inference detects. Can't be used with a function that references media.transcript or media.clip.
perScene (dict) --
Run the function once for each scene boundary that a contextual metadata output reports. Requires contextualMetadataSettings. Can't be used with a function that references media.transcript or media.clip.
perClip (dict) --
Run the function once for each clip that an event clipping output detects. Requires clippingSettings. Can't be used with a function that references media.transcript or media.contextual.
frameSettings (dict) --
The frames to send on each run: how many, which ones, and at what size. Applies to a function that references media.frames. If you omit this structure, Elemental Inference sends the first frame of the window, at its source size.
frameSampling (dict) -- [REQUIRED]
The method for choosing which frames to send.
mode (string) -- [REQUIRED]
Which frames of the window to send: FIRST (the first frames), UNIFORM (frames spread evenly across the window), or LAST (the last frames).
count (integer) --
The number of frames to send on each run. Valid range: 1 to 64. The default is 1. Each frame adds to the size of the model request and to what the model charges for it.
frameSize (dict) --
The size to resize each frame to. If you omit this structure, frames keep their source size. Smaller frames reduce the size of the model request.
widthPixels (integer) -- [REQUIRED]
The width of each frame, in pixels. Valid range: 1 to 1280.
heightPixels (integer) -- [REQUIRED]
The height of each frame, in pixels. Valid range: 1 to 720.
subtitlingSettings (dict) --
The smart subtitles output on this feed to read the transcript from. Required for a function that references media.transcript.
outputName (string) -- [REQUIRED]
The name of an ENABLED smart subtitles output on this feed.
contextualMetadataSettings (dict) --
The contextual metadata output on this feed to read scenes and classifications from. Required for a perScene trigger, and for a function that references media.contextual on a perShot trigger.
outputName (string) -- [REQUIRED]
The name of an ENABLED contextual metadata output on this feed.
clippingSettings (dict) --
The event clipping output on this feed to read clips from. Required for a perClip trigger, and for a function that references media.clip.
outputName (string) -- [REQUIRED]
The name of an ENABLED event clipping output on this feed.
status (string) -- [REQUIRED]
The status to assign to the output.
description (string) --
A description for the output.
dict
Optional tags. You can also add tags later, using TagResource.
(string) --
(string) --
dict
Response Syntax
{
'arn': 'string',
'name': 'string',
'id': 'string',
'dataEndpoints': [
'string',
],
'outputs': [
{
'name': 'string',
'outputConfig': {
'cropping': {
'templateGroups': [
{
'name': 'string',
'templateUris': [
'string',
]
},
]
},
'clipping': {
'callbackMetadata': 'string',
'dataSourceConfiguration': {
'fixtureId': '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'
},
'contextualMetadata': {
'summaryGeneration': 'ENABLED'|'DISABLED',
'extendedAnalysis': 'ENABLED'|'DISABLED',
'customQuestions': {
'shot': {
'questionSetId': 'string',
'version': 'string'
},
'scene': {
'questionSetId': 'string',
'version': 'string'
}
}
},
'function': {
'functionArn': 'string',
'trigger': {
'fixedInterval': {
'intervalSeconds': 123
},
'perShot': {},
'perScene': {},
'perClip': {}
},
'frameSettings': {
'frameSampling': {
'mode': 'FIRST'|'UNIFORM'|'LAST',
'count': 123
},
'frameSize': {
'widthPixels': 123,
'heightPixels': 123
}
},
'subtitlingSettings': {
'outputName': 'string'
},
'contextualMetadataSettings': {
'outputName': 'string'
},
'clippingSettings': {
'outputName': 'string'
}
}
},
'status': 'ENABLED'|'DISABLED',
'description': 'string',
'fromAssociation': True|False
},
],
'accessRoleArn': 'string',
'status': 'CREATING'|'AVAILABLE'|'ACTIVE'|'UPDATING'|'DELETING'|'DELETED'|'ARCHIVED',
'association': {
'associatedResourceName': 'string'
},
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
arn (string) --
A unique ARN that Elemental Inference assigns to the feed.
name (string) --
The name that you specified in the request.
id (string) --
A unique ID that Elemental Inference assigns to the feed.
dataEndpoints (list) --
An array of endpoints for the feed. Typically, there is only one endpoint. The feed receives source media at this endpoint (when the calling application calls PutMedia) and returns the resulting metadata to this endpoint (when the calling application calls GetMetadata).
(string) --
outputs (list) --
Repeats the outputs that you specified in the request.
(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.
cropping (dict) --
The output config type that applies to the cropping feature.
templateGroups (list) --
An array of template groups for the crop output. Each template group provides the graphics-compositing templates that Elemental Inference applies to the cropped video. You can specify from 1 to 4 template groups.
(dict) --
A named set of graphics-compositing templates used by the crop feature, specified in the templateGroups array of a CroppingConfig.
name (string) --
A name for the template group.
templateUris (list) --
An array of Amazon S3 URIs that point to the graphics-compositing templates for this group. You can specify 1 or 2 URIs. Each URI must be in the form s3://bucket-name/key. Elemental Inference reads these templates using the IAM role that you specify in accessRoleArn.
(string) --
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.
dataSourceConfiguration (dict) --
The data source to map onto this clipping output. This parameter is optional. When you include this parameter, Elemental Inference reads the event data for the fixture that you specify, and includes that data in the event clipping metadata for this output.
If you omit this parameter, Elemental Inference doesn't map a data source onto this 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.
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).
contextualMetadata (dict) --
The output config type that applies to the contextual metadata feature.
summaryGeneration (string) --
Specifies whether Elemental Inference generates a descriptive summary of the media content for this output, along with the objects and actions that it detects. This setting is independent of extendedAnalysis.
Valid values:
ENABLED (default) – Elemental Inference populates the summary, objects, and actions fields, along with the IAB taxonomy and GARM suitability classifications.
DISABLED – Elemental Inference doesn't populate the summary, objects, and actions fields.
extendedAnalysis (string) --
Specifies whether Elemental Inference generates extended analysis of the media content for this output. Extended analysis identifies the people, environments, brands, and on-screen text in the media content. This setting is independent of summaryGeneration.
Valid values:
ENABLED (default) – Elemental Inference populates the people, environments, brands, and on-screen text fields.
DISABLED – Elemental Inference doesn't populate the people, environments, brands, and on-screen text fields.
If you specify customQuestions, you must set this property to DISABLED.
customQuestions (dict) --
The question sets that you ask Elemental Inference about each shot, each scene, or both, in this output.
If you specify customQuestions, you must also set extendedAnalysis to DISABLED. If you omit extendedAnalysis, it defaults to ENABLED, and the request fails.
While a feed references a version of a question set, you can't delete that version or the question set.
shot (dict) --
The version of a question set to ask Elemental Inference about each shot.
questionSetId (string) --
The ID of the question set. The question set must be in your account.
version (string) --
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
scene (dict) --
The version of a question set to ask Elemental Inference about each scene.
questionSetId (string) --
The ID of the question set. The question set must be in your account.
version (string) --
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
function (dict) --
The output config type that applies to a function.
functionArn (string) --
The ARN of the function to run. The function must exist in the same account and the same Region as the feed.
trigger (dict) --
Determines when the function runs.
fixedInterval (dict) --
Run the function at a fixed interval of content. This is the only trigger for a function that references media.transcript. Can't be used with a function that references media.contextual.
intervalSeconds (integer) --
The amount of content, in seconds, between runs of the function. Valid range: 1 to 60. For a function with eventBridgeDelivery set to ENABLED, the minimum is 4.
perShot (dict) --
Run the function once for each shot that Elemental Inference detects. Can't be used with a function that references media.transcript or media.clip.
perScene (dict) --
Run the function once for each scene boundary that a contextual metadata output reports. Requires contextualMetadataSettings. Can't be used with a function that references media.transcript or media.clip.
perClip (dict) --
Run the function once for each clip that an event clipping output detects. Requires clippingSettings. Can't be used with a function that references media.transcript or media.contextual.
frameSettings (dict) --
The frames to send on each run: how many, which ones, and at what size. Applies to a function that references media.frames. If you omit this structure, Elemental Inference sends the first frame of the window, at its source size.
frameSampling (dict) --
The method for choosing which frames to send.
mode (string) --
Which frames of the window to send: FIRST (the first frames), UNIFORM (frames spread evenly across the window), or LAST (the last frames).
count (integer) --
The number of frames to send on each run. Valid range: 1 to 64. The default is 1. Each frame adds to the size of the model request and to what the model charges for it.
frameSize (dict) --
The size to resize each frame to. If you omit this structure, frames keep their source size. Smaller frames reduce the size of the model request.
widthPixels (integer) --
The width of each frame, in pixels. Valid range: 1 to 1280.
heightPixels (integer) --
The height of each frame, in pixels. Valid range: 1 to 720.
subtitlingSettings (dict) --
The smart subtitles output on this feed to read the transcript from. Required for a function that references media.transcript.
outputName (string) --
The name of an ENABLED smart subtitles output on this feed.
contextualMetadataSettings (dict) --
The contextual metadata output on this feed to read scenes and classifications from. Required for a perScene trigger, and for a function that references media.contextual on a perShot trigger.
outputName (string) --
The name of an ENABLED contextual metadata output on this feed.
clippingSettings (dict) --
The event clipping output on this feed to read clips from. Required for a perClip trigger, and for a function that references media.clip.
outputName (string) --
The name of an ENABLED event clipping output on this feed.
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.
accessRoleArn (string) --
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that you specified in the request. This property is absent if you didn't specify an IAM role.
status (string) --
The current status of the feed. After creation of the feed has succeeded, the status will be AVAILABLE.
association (dict) --
The association for this feed. When you create the feed, this property is empty. You must associate a resource with the feed using AssociateFeed or UpdateFeed.
associatedResourceName (string) --
The name of the associated resource.
tags (dict) --
Any tags that you included when you created the feed.
(string) --
(string) --
{'outputs': {'outputConfig': {'contextualMetadata': {'customQuestions': {'scene': {'questionSetId': 'string',
'version': 'string'},
'shot': {'questionSetId': 'string',
'version': 'string'}}},
'function': {'clippingSettings': {'outputName': 'string'},
'contextualMetadataSettings': {'outputName': 'string'},
'frameSettings': {'frameSampling': {'count': 'integer',
'mode': 'FIRST '
'| '
'UNIFORM '
'| '
'LAST'},
'frameSize': {'heightPixels': 'integer',
'widthPixels': 'integer'}},
'functionArn': 'string',
'subtitlingSettings': {'outputName': 'string'},
'trigger': {'fixedInterval': {'intervalSeconds': 'integer'},
'perClip': {},
'perScene': {},
'perShot': {}}}}}}
Retrieves information about the specified feed.
See also: AWS API Documentation
Request Syntax
client.get_feed(
id='string'
)
string
[REQUIRED]
The ID of the feed to query.
dict
Response Syntax
{
'arn': 'string',
'name': 'string',
'id': 'string',
'dataEndpoints': [
'string',
],
'outputs': [
{
'name': 'string',
'outputConfig': {
'cropping': {
'templateGroups': [
{
'name': 'string',
'templateUris': [
'string',
]
},
]
},
'clipping': {
'callbackMetadata': 'string',
'dataSourceConfiguration': {
'fixtureId': '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'
},
'contextualMetadata': {
'summaryGeneration': 'ENABLED'|'DISABLED',
'extendedAnalysis': 'ENABLED'|'DISABLED',
'customQuestions': {
'shot': {
'questionSetId': 'string',
'version': 'string'
},
'scene': {
'questionSetId': 'string',
'version': 'string'
}
}
},
'function': {
'functionArn': 'string',
'trigger': {
'fixedInterval': {
'intervalSeconds': 123
},
'perShot': {},
'perScene': {},
'perClip': {}
},
'frameSettings': {
'frameSampling': {
'mode': 'FIRST'|'UNIFORM'|'LAST',
'count': 123
},
'frameSize': {
'widthPixels': 123,
'heightPixels': 123
}
},
'subtitlingSettings': {
'outputName': 'string'
},
'contextualMetadataSettings': {
'outputName': 'string'
},
'clippingSettings': {
'outputName': 'string'
}
}
},
'status': 'ENABLED'|'DISABLED',
'description': 'string',
'fromAssociation': True|False
},
],
'accessRoleArn': 'string',
'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 name of the feed.
id (string) --
The ID of the feed.
dataEndpoints (list) --
The dataEndpoints of the feed.
(string) --
outputs (list) --
An array of the outputs in the feed.
(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.
cropping (dict) --
The output config type that applies to the cropping feature.
templateGroups (list) --
An array of template groups for the crop output. Each template group provides the graphics-compositing templates that Elemental Inference applies to the cropped video. You can specify from 1 to 4 template groups.
(dict) --
A named set of graphics-compositing templates used by the crop feature, specified in the templateGroups array of a CroppingConfig.
name (string) --
A name for the template group.
templateUris (list) --
An array of Amazon S3 URIs that point to the graphics-compositing templates for this group. You can specify 1 or 2 URIs. Each URI must be in the form s3://bucket-name/key. Elemental Inference reads these templates using the IAM role that you specify in accessRoleArn.
(string) --
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.
dataSourceConfiguration (dict) --
The data source to map onto this clipping output. This parameter is optional. When you include this parameter, Elemental Inference reads the event data for the fixture that you specify, and includes that data in the event clipping metadata for this output.
If you omit this parameter, Elemental Inference doesn't map a data source onto this 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.
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).
contextualMetadata (dict) --
The output config type that applies to the contextual metadata feature.
summaryGeneration (string) --
Specifies whether Elemental Inference generates a descriptive summary of the media content for this output, along with the objects and actions that it detects. This setting is independent of extendedAnalysis.
Valid values:
ENABLED (default) – Elemental Inference populates the summary, objects, and actions fields, along with the IAB taxonomy and GARM suitability classifications.
DISABLED – Elemental Inference doesn't populate the summary, objects, and actions fields.
extendedAnalysis (string) --
Specifies whether Elemental Inference generates extended analysis of the media content for this output. Extended analysis identifies the people, environments, brands, and on-screen text in the media content. This setting is independent of summaryGeneration.
Valid values:
ENABLED (default) – Elemental Inference populates the people, environments, brands, and on-screen text fields.
DISABLED – Elemental Inference doesn't populate the people, environments, brands, and on-screen text fields.
If you specify customQuestions, you must set this property to DISABLED.
customQuestions (dict) --
The question sets that you ask Elemental Inference about each shot, each scene, or both, in this output.
If you specify customQuestions, you must also set extendedAnalysis to DISABLED. If you omit extendedAnalysis, it defaults to ENABLED, and the request fails.
While a feed references a version of a question set, you can't delete that version or the question set.
shot (dict) --
The version of a question set to ask Elemental Inference about each shot.
questionSetId (string) --
The ID of the question set. The question set must be in your account.
version (string) --
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
scene (dict) --
The version of a question set to ask Elemental Inference about each scene.
questionSetId (string) --
The ID of the question set. The question set must be in your account.
version (string) --
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
function (dict) --
The output config type that applies to a function.
functionArn (string) --
The ARN of the function to run. The function must exist in the same account and the same Region as the feed.
trigger (dict) --
Determines when the function runs.
fixedInterval (dict) --
Run the function at a fixed interval of content. This is the only trigger for a function that references media.transcript. Can't be used with a function that references media.contextual.
intervalSeconds (integer) --
The amount of content, in seconds, between runs of the function. Valid range: 1 to 60. For a function with eventBridgeDelivery set to ENABLED, the minimum is 4.
perShot (dict) --
Run the function once for each shot that Elemental Inference detects. Can't be used with a function that references media.transcript or media.clip.
perScene (dict) --
Run the function once for each scene boundary that a contextual metadata output reports. Requires contextualMetadataSettings. Can't be used with a function that references media.transcript or media.clip.
perClip (dict) --
Run the function once for each clip that an event clipping output detects. Requires clippingSettings. Can't be used with a function that references media.transcript or media.contextual.
frameSettings (dict) --
The frames to send on each run: how many, which ones, and at what size. Applies to a function that references media.frames. If you omit this structure, Elemental Inference sends the first frame of the window, at its source size.
frameSampling (dict) --
The method for choosing which frames to send.
mode (string) --
Which frames of the window to send: FIRST (the first frames), UNIFORM (frames spread evenly across the window), or LAST (the last frames).
count (integer) --
The number of frames to send on each run. Valid range: 1 to 64. The default is 1. Each frame adds to the size of the model request and to what the model charges for it.
frameSize (dict) --
The size to resize each frame to. If you omit this structure, frames keep their source size. Smaller frames reduce the size of the model request.
widthPixels (integer) --
The width of each frame, in pixels. Valid range: 1 to 1280.
heightPixels (integer) --
The height of each frame, in pixels. Valid range: 1 to 720.
subtitlingSettings (dict) --
The smart subtitles output on this feed to read the transcript from. Required for a function that references media.transcript.
outputName (string) --
The name of an ENABLED smart subtitles output on this feed.
contextualMetadataSettings (dict) --
The contextual metadata output on this feed to read scenes and classifications from. Required for a perScene trigger, and for a function that references media.contextual on a perShot trigger.
outputName (string) --
The name of an ENABLED contextual metadata output on this feed.
clippingSettings (dict) --
The event clipping output on this feed to read clips from. Required for a perClip trigger, and for a function that references media.clip.
outputName (string) --
The name of an ENABLED event clipping output on this feed.
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.
accessRoleArn (string) --
The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that Elemental Inference assumes. Elemental Inference uses this role to access resources in your account on your behalf. This property is absent if the feed doesn't have an IAM role.
status (string) --
The status of the feed.
association (dict) --
Information about the resource that is associated with the feed. It's possible that there is no associated resource. This is not an error.
associatedResourceName (string) --
The name of the associated resource.
tags (dict) --
A list of the tags, if any, for the feed.
(string) --
(string) --
{'outputs': {'outputConfig': {'contextualMetadata': {'customQuestions': {'scene': {'questionSetId': 'string',
'version': 'string'},
'shot': {'questionSetId': 'string',
'version': 'string'}}},
'function': {'clippingSettings': {'outputName': 'string'},
'contextualMetadataSettings': {'outputName': 'string'},
'frameSettings': {'frameSampling': {'count': 'integer',
'mode': 'FIRST '
'| '
'UNIFORM '
'| '
'LAST'},
'frameSize': {'heightPixels': 'integer',
'widthPixels': 'integer'}},
'functionArn': 'string',
'subtitlingSettings': {'outputName': 'string'},
'trigger': {'fixedInterval': {'intervalSeconds': 'integer'},
'perClip': {},
'perScene': {},
'perShot': {}}}}}}
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
client.update_feed(
name='string',
accessRoleArn='string',
id='string',
outputs=[
{
'name': 'string',
'outputConfig': {
'cropping': {
'templateGroups': [
{
'name': 'string',
'templateUris': [
'string',
]
},
]
},
'clipping': {
'callbackMetadata': 'string',
'dataSourceConfiguration': {
'fixtureId': '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'
},
'contextualMetadata': {
'summaryGeneration': 'ENABLED'|'DISABLED',
'extendedAnalysis': 'ENABLED'|'DISABLED',
'customQuestions': {
'shot': {
'questionSetId': 'string',
'version': 'string'
},
'scene': {
'questionSetId': 'string',
'version': 'string'
}
}
},
'function': {
'functionArn': 'string',
'trigger': {
'fixedInterval': {
'intervalSeconds': 123
},
'perShot': {}
,
'perScene': {}
,
'perClip': {}
},
'frameSettings': {
'frameSampling': {
'mode': 'FIRST'|'UNIFORM'|'LAST',
'count': 123
},
'frameSize': {
'widthPixels': 123,
'heightPixels': 123
}
},
'subtitlingSettings': {
'outputName': 'string'
},
'contextualMetadataSettings': {
'outputName': 'string'
},
'clippingSettings': {
'outputName': 'string'
}
}
},
'status': 'ENABLED'|'DISABLED',
'description': 'string',
'fromAssociation': True|False
},
]
)
string
[REQUIRED]
Required. You can specify the existing name (to leave it unchanged) or a new name.
string
The ARN of an IAM role that Elemental Inference assumes to access resources in your account on your behalf. You can specify the existing role (to leave it unchanged) or a new role. You specify one access role for each feed.
string
[REQUIRED]
The ID of the feed to update.
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.
cropping (dict) --
The output config type that applies to the cropping feature.
templateGroups (list) --
An array of template groups for the crop output. Each template group provides the graphics-compositing templates that Elemental Inference applies to the cropped video. You can specify from 1 to 4 template groups.
(dict) --
A named set of graphics-compositing templates used by the crop feature, specified in the templateGroups array of a CroppingConfig.
name (string) -- [REQUIRED]
A name for the template group.
templateUris (list) -- [REQUIRED]
An array of Amazon S3 URIs that point to the graphics-compositing templates for this group. You can specify 1 or 2 URIs. Each URI must be in the form s3://bucket-name/key. Elemental Inference reads these templates using the IAM role that you specify in accessRoleArn.
(string) --
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.
dataSourceConfiguration (dict) --
The data source to map onto this clipping output. This parameter is optional. When you include this parameter, Elemental Inference reads the event data for the fixture that you specify, and includes that data in the event clipping metadata for this output.
If you omit this parameter, Elemental Inference doesn't map a data source onto this 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.
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).
contextualMetadata (dict) --
The output config type that applies to the contextual metadata feature.
summaryGeneration (string) --
Specifies whether Elemental Inference generates a descriptive summary of the media content for this output, along with the objects and actions that it detects. This setting is independent of extendedAnalysis.
Valid values:
ENABLED (default) – Elemental Inference populates the summary, objects, and actions fields, along with the IAB taxonomy and GARM suitability classifications.
DISABLED – Elemental Inference doesn't populate the summary, objects, and actions fields.
extendedAnalysis (string) --
Specifies whether Elemental Inference generates extended analysis of the media content for this output. Extended analysis identifies the people, environments, brands, and on-screen text in the media content. This setting is independent of summaryGeneration.
Valid values:
ENABLED (default) – Elemental Inference populates the people, environments, brands, and on-screen text fields.
DISABLED – Elemental Inference doesn't populate the people, environments, brands, and on-screen text fields.
If you specify customQuestions, you must set this property to DISABLED.
customQuestions (dict) --
The question sets that you ask Elemental Inference about each shot, each scene, or both, in this output.
If you specify customQuestions, you must also set extendedAnalysis to DISABLED. If you omit extendedAnalysis, it defaults to ENABLED, and the request fails.
While a feed references a version of a question set, you can't delete that version or the question set.
shot (dict) --
The version of a question set to ask Elemental Inference about each shot.
questionSetId (string) -- [REQUIRED]
The ID of the question set. The question set must be in your account.
version (string) -- [REQUIRED]
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
scene (dict) --
The version of a question set to ask Elemental Inference about each scene.
questionSetId (string) -- [REQUIRED]
The ID of the question set. The question set must be in your account.
version (string) -- [REQUIRED]
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
function (dict) --
The output config type that applies to a function.
functionArn (string) -- [REQUIRED]
The ARN of the function to run. The function must exist in the same account and the same Region as the feed.
trigger (dict) -- [REQUIRED]
Determines when the function runs.
fixedInterval (dict) --
Run the function at a fixed interval of content. This is the only trigger for a function that references media.transcript. Can't be used with a function that references media.contextual.
intervalSeconds (integer) -- [REQUIRED]
The amount of content, in seconds, between runs of the function. Valid range: 1 to 60. For a function with eventBridgeDelivery set to ENABLED, the minimum is 4.
perShot (dict) --
Run the function once for each shot that Elemental Inference detects. Can't be used with a function that references media.transcript or media.clip.
perScene (dict) --
Run the function once for each scene boundary that a contextual metadata output reports. Requires contextualMetadataSettings. Can't be used with a function that references media.transcript or media.clip.
perClip (dict) --
Run the function once for each clip that an event clipping output detects. Requires clippingSettings. Can't be used with a function that references media.transcript or media.contextual.
frameSettings (dict) --
The frames to send on each run: how many, which ones, and at what size. Applies to a function that references media.frames. If you omit this structure, Elemental Inference sends the first frame of the window, at its source size.
frameSampling (dict) -- [REQUIRED]
The method for choosing which frames to send.
mode (string) -- [REQUIRED]
Which frames of the window to send: FIRST (the first frames), UNIFORM (frames spread evenly across the window), or LAST (the last frames).
count (integer) --
The number of frames to send on each run. Valid range: 1 to 64. The default is 1. Each frame adds to the size of the model request and to what the model charges for it.
frameSize (dict) --
The size to resize each frame to. If you omit this structure, frames keep their source size. Smaller frames reduce the size of the model request.
widthPixels (integer) -- [REQUIRED]
The width of each frame, in pixels. Valid range: 1 to 1280.
heightPixels (integer) -- [REQUIRED]
The height of each frame, in pixels. Valid range: 1 to 720.
subtitlingSettings (dict) --
The smart subtitles output on this feed to read the transcript from. Required for a function that references media.transcript.
outputName (string) -- [REQUIRED]
The name of an ENABLED smart subtitles output on this feed.
contextualMetadataSettings (dict) --
The contextual metadata output on this feed to read scenes and classifications from. Required for a perScene trigger, and for a function that references media.contextual on a perShot trigger.
outputName (string) -- [REQUIRED]
The name of an ENABLED contextual metadata output on this feed.
clippingSettings (dict) --
The event clipping output on this feed to read clips from. Required for a perClip trigger, and for a function that references media.clip.
outputName (string) -- [REQUIRED]
The name of an ENABLED event clipping output on this feed.
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.
dict
Response Syntax
{
'arn': 'string',
'name': 'string',
'id': 'string',
'dataEndpoints': [
'string',
],
'outputs': [
{
'name': 'string',
'outputConfig': {
'cropping': {
'templateGroups': [
{
'name': 'string',
'templateUris': [
'string',
]
},
]
},
'clipping': {
'callbackMetadata': 'string',
'dataSourceConfiguration': {
'fixtureId': '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'
},
'contextualMetadata': {
'summaryGeneration': 'ENABLED'|'DISABLED',
'extendedAnalysis': 'ENABLED'|'DISABLED',
'customQuestions': {
'shot': {
'questionSetId': 'string',
'version': 'string'
},
'scene': {
'questionSetId': 'string',
'version': 'string'
}
}
},
'function': {
'functionArn': 'string',
'trigger': {
'fixedInterval': {
'intervalSeconds': 123
},
'perShot': {},
'perScene': {},
'perClip': {}
},
'frameSettings': {
'frameSampling': {
'mode': 'FIRST'|'UNIFORM'|'LAST',
'count': 123
},
'frameSize': {
'widthPixels': 123,
'heightPixels': 123
}
},
'subtitlingSettings': {
'outputName': 'string'
},
'contextualMetadataSettings': {
'outputName': 'string'
},
'clippingSettings': {
'outputName': 'string'
}
}
},
'status': 'ENABLED'|'DISABLED',
'description': 'string',
'fromAssociation': True|False
},
],
'accessRoleArn': 'string',
'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.
cropping (dict) --
The output config type that applies to the cropping feature.
templateGroups (list) --
An array of template groups for the crop output. Each template group provides the graphics-compositing templates that Elemental Inference applies to the cropped video. You can specify from 1 to 4 template groups.
(dict) --
A named set of graphics-compositing templates used by the crop feature, specified in the templateGroups array of a CroppingConfig.
name (string) --
A name for the template group.
templateUris (list) --
An array of Amazon S3 URIs that point to the graphics-compositing templates for this group. You can specify 1 or 2 URIs. Each URI must be in the form s3://bucket-name/key. Elemental Inference reads these templates using the IAM role that you specify in accessRoleArn.
(string) --
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.
dataSourceConfiguration (dict) --
The data source to map onto this clipping output. This parameter is optional. When you include this parameter, Elemental Inference reads the event data for the fixture that you specify, and includes that data in the event clipping metadata for this output.
If you omit this parameter, Elemental Inference doesn't map a data source onto this 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.
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).
contextualMetadata (dict) --
The output config type that applies to the contextual metadata feature.
summaryGeneration (string) --
Specifies whether Elemental Inference generates a descriptive summary of the media content for this output, along with the objects and actions that it detects. This setting is independent of extendedAnalysis.
Valid values:
ENABLED (default) – Elemental Inference populates the summary, objects, and actions fields, along with the IAB taxonomy and GARM suitability classifications.
DISABLED – Elemental Inference doesn't populate the summary, objects, and actions fields.
extendedAnalysis (string) --
Specifies whether Elemental Inference generates extended analysis of the media content for this output. Extended analysis identifies the people, environments, brands, and on-screen text in the media content. This setting is independent of summaryGeneration.
Valid values:
ENABLED (default) – Elemental Inference populates the people, environments, brands, and on-screen text fields.
DISABLED – Elemental Inference doesn't populate the people, environments, brands, and on-screen text fields.
If you specify customQuestions, you must set this property to DISABLED.
customQuestions (dict) --
The question sets that you ask Elemental Inference about each shot, each scene, or both, in this output.
If you specify customQuestions, you must also set extendedAnalysis to DISABLED. If you omit extendedAnalysis, it defaults to ENABLED, and the request fails.
While a feed references a version of a question set, you can't delete that version or the question set.
shot (dict) --
The version of a question set to ask Elemental Inference about each shot.
questionSetId (string) --
The ID of the question set. The question set must be in your account.
version (string) --
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
scene (dict) --
The version of a question set to ask Elemental Inference about each scene.
questionSetId (string) --
The ID of the question set. The question set must be in your account.
version (string) --
The version of the question set: DRAFT or the number of a published version. The version must exist.
If you specify DRAFT, the output uses the current DRAFT questions and picks up changes that you make later by using UpdateQuestionSet. To keep the questions for the output fixed, specify a published version.
function (dict) --
The output config type that applies to a function.
functionArn (string) --
The ARN of the function to run. The function must exist in the same account and the same Region as the feed.
trigger (dict) --
Determines when the function runs.
fixedInterval (dict) --
Run the function at a fixed interval of content. This is the only trigger for a function that references media.transcript. Can't be used with a function that references media.contextual.
intervalSeconds (integer) --
The amount of content, in seconds, between runs of the function. Valid range: 1 to 60. For a function with eventBridgeDelivery set to ENABLED, the minimum is 4.
perShot (dict) --
Run the function once for each shot that Elemental Inference detects. Can't be used with a function that references media.transcript or media.clip.
perScene (dict) --
Run the function once for each scene boundary that a contextual metadata output reports. Requires contextualMetadataSettings. Can't be used with a function that references media.transcript or media.clip.
perClip (dict) --
Run the function once for each clip that an event clipping output detects. Requires clippingSettings. Can't be used with a function that references media.transcript or media.contextual.
frameSettings (dict) --
The frames to send on each run: how many, which ones, and at what size. Applies to a function that references media.frames. If you omit this structure, Elemental Inference sends the first frame of the window, at its source size.
frameSampling (dict) --
The method for choosing which frames to send.
mode (string) --
Which frames of the window to send: FIRST (the first frames), UNIFORM (frames spread evenly across the window), or LAST (the last frames).
count (integer) --
The number of frames to send on each run. Valid range: 1 to 64. The default is 1. Each frame adds to the size of the model request and to what the model charges for it.
frameSize (dict) --
The size to resize each frame to. If you omit this structure, frames keep their source size. Smaller frames reduce the size of the model request.
widthPixels (integer) --
The width of each frame, in pixels. Valid range: 1 to 1280.
heightPixels (integer) --
The height of each frame, in pixels. Valid range: 1 to 720.
subtitlingSettings (dict) --
The smart subtitles output on this feed to read the transcript from. Required for a function that references media.transcript.
outputName (string) --
The name of an ENABLED smart subtitles output on this feed.
contextualMetadataSettings (dict) --
The contextual metadata output on this feed to read scenes and classifications from. Required for a perScene trigger, and for a function that references media.contextual on a perShot trigger.
outputName (string) --
The name of an ENABLED contextual metadata output on this feed.
clippingSettings (dict) --
The event clipping output on this feed to read clips from. Required for a perClip trigger, and for a function that references media.clip.
outputName (string) --
The name of an ENABLED event clipping output on this feed.
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.
accessRoleArn (string) --
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role for the feed, after the update. This property is absent if the feed doesn't have an IAM role.
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) --