Class: Aws::ElementalInference::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ElementalInference::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-elementalinference/client.rb,
sig/client.rbs
Overview
An API client for ElementalInference. To construct a client, you need to configure a :region and :credentials.
client = Aws::ElementalInference::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Defined Under Namespace
Modules: _AssociateFeedResponseSuccess, _CreateDictionaryResponseSuccess, _CreateFeedResponseSuccess, _DeleteDictionaryResponseSuccess, _DeleteFeedResponseSuccess, _DisassociateFeedResponseSuccess, _ExportDictionaryEntriesResponseSuccess, _GetDictionaryResponseSuccess, _GetFeedResponseSuccess, _GetFixtureResponseSuccess, _ListDictionariesResponseSuccess, _ListFeedsResponseSuccess, _ListTagsForResourceResponseSuccess, _SearchFixturesResponseSuccess, _UpdateDictionaryResponseSuccess, _UpdateFeedResponseSuccess
Constant Summary collapse
- Params =
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#associate_feed(params = {}) ⇒ Types::AssociateFeedResponse
Associates a resource with the feed.
-
#create_dictionary(params = {}) ⇒ Types::CreateDictionaryResponse
Creates a custom dictionary for improving transcription accuracy.
-
#create_feed(params = {}) ⇒ Types::CreateFeedResponse
Creates a feed.
-
#delete_dictionary(params = {}) ⇒ Types::DeleteDictionaryResponse
Deletes the specified dictionary.
-
#delete_feed(params = {}) ⇒ Types::DeleteFeedResponse
Deletes the specified feed.
-
#disassociate_feed(params = {}) ⇒ Types::DisassociateFeedResponse
Releases the resource (the source media) that is associated with this feed.
-
#export_dictionary_entries(params = {}) ⇒ Types::ExportDictionaryEntriesResponse
Exports the entries from the specified dictionary.
-
#get_dictionary(params = {}) ⇒ Types::GetDictionaryResponse
Retrieves information about the specified dictionary.
-
#get_feed(params = {}) ⇒ Types::GetFeedResponse
Retrieves information about the specified feed.
-
#get_fixture(params = {}) ⇒ Types::GetFixtureResponse
Retrieves information about the specified fixture (a sports event, such as a specific basketball game).
-
#list_dictionaries(params = {}) ⇒ Types::ListDictionariesResponse
Lists the dictionaries in your account.
-
#list_feeds(params = {}) ⇒ Types::ListFeedsResponse
Displays a list of feeds that belong to this AWS account.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List all tags that are on an Elemental Inference resource in the current region.
-
#search_fixtures(params = {}) ⇒ Types::SearchFixturesResponse
Searches for the fixtures (sports events, such as a specific basketball game) that are available for a sport in a date window.
-
#tag_resource(params = {}) ⇒ Struct
Associates the specified tags to the resource identified by the specified resourceArn in the current region.
-
#untag_resource(params = {}) ⇒ Struct
Deletes specified tags from the specified resource in the current region.
-
#update_dictionary(params = {}) ⇒ Types::UpdateDictionaryResponse
Updates the specified dictionary.
-
#update_feed(params = {}) ⇒ Types::UpdateFeedResponse
Updates the name and/or outputs in a feed.
Class Method Summary collapse
- .errors_module ⇒ Object private
- .new ⇒ Object
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
471 472 473 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 471 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1673 1674 1675 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 1673 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1676 1677 1678 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 1676 def errors_module Errors end |
.new ⇒ Object
14 |
# File 'sig/client.rbs', line 14
def self.new: (
|
Instance Method Details
#associate_feed(params = {}) ⇒ Types::AssociateFeedResponse
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.
87 |
# File 'sig/client.rbs', line 87
def associate_feed: (
|
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 1533 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::ElementalInference') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-elementalinference' context[:gem_version] = '1.10.0' Seahorse::Client::Request.new(handlers, context) end |
#create_dictionary(params = {}) ⇒ Types::CreateDictionaryResponse
Creates a custom dictionary for improving transcription accuracy. A dictionary contains custom words and phrases that the ASR engine might not recognize, such as brand names, technical terms, or proper nouns. You can reference a dictionary when configuring a smart subtitles output.
108 |
# File 'sig/client.rbs', line 108
def create_dictionary: (
|
#create_feed(params = {}) ⇒ Types::CreateFeedResponse
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.
129 |
# File 'sig/client.rbs', line 129
def create_feed: (
|
#delete_dictionary(params = {}) ⇒ Types::DeleteDictionaryResponse
Deletes the specified dictionary. You cannot delete a dictionary that is referenced by a feed. You must first remove the dictionary reference from the feed's subtitling configuration.
146 |
# File 'sig/client.rbs', line 146
def delete_dictionary: (
|
#delete_feed(params = {}) ⇒ Types::DeleteFeedResponse
Deletes the specified feed. You can delete the feed at any time. Elemental Inference doesn't block you from deleting a feed when the calling application is calling PutMedia or GetMetadata on that feed, although both these calls will start to fail. For more information about managing inactive feeds, see the Elemental Inference User Guide.
158 |
# File 'sig/client.rbs', line 158
def delete_feed: (
|
#disassociate_feed(params = {}) ⇒ Types::DisassociateFeedResponse
Releases the resource (the source media) that is associated with this feed. The outputs in the feed become DISABLED.
169 |
# File 'sig/client.rbs', line 169
def disassociate_feed: (
|
#export_dictionary_entries(params = {}) ⇒ Types::ExportDictionaryEntriesResponse
Exports the entries from the specified dictionary.
181 |
# File 'sig/client.rbs', line 181
def export_dictionary_entries: (
|
#get_dictionary(params = {}) ⇒ Types::GetDictionaryResponse
Retrieves information about the specified dictionary.
197 |
# File 'sig/client.rbs', line 197
def get_dictionary: (
|
#get_feed(params = {}) ⇒ Types::GetFeedResponse
Retrieves information about the specified feed.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* feed_deleted
215 |
# File 'sig/client.rbs', line 215
def get_feed: (
|
#get_fixture(params = {}) ⇒ Types::GetFixtureResponse
Retrieves information about the specified fixture (a sports event, such as a specific basketball game). You obtain a fixtureId from SearchFixtures, or from the clipping output of a feed.
230 |
# File 'sig/client.rbs', line 230
def get_fixture: (
|
#list_dictionaries(params = {}) ⇒ Types::ListDictionariesResponse
Lists the dictionaries in your account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
241 |
# File 'sig/client.rbs', line 241
def list_dictionaries: (
|
#list_feeds(params = {}) ⇒ Types::ListFeedsResponse
Displays a list of feeds that belong to this AWS account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
253 |
# File 'sig/client.rbs', line 253
def list_feeds: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List all tags that are on an Elemental Inference resource in the current region.
264 |
# File 'sig/client.rbs', line 264
def list_tags_for_resource: (
|
#search_fixtures(params = {}) ⇒ Types::SearchFixturesResponse
Searches for the fixtures (sports events, such as a specific basketball game) that are available for a sport in a date window. Each fixture in the response includes a fixtureId that you specify in the clipping output of a feed, so that Elemental Inference maps the event data for that fixture onto the clipping metadata. This operation is paginated: if there are more fixtures than fit in one page, the response includes a nextToken that you pass in a subsequent request.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
275 |
# File 'sig/client.rbs', line 275
def search_fixtures: (
|
#tag_resource(params = {}) ⇒ Struct
Associates the specified tags to the resource identified by the specified resourceArn in the current region. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are also deleted.
291 |
# File 'sig/client.rbs', line 291
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Deletes specified tags from the specified resource in the current region.
298 |
# File 'sig/client.rbs', line 298
def untag_resource: (
|
#update_dictionary(params = {}) ⇒ Types::UpdateDictionaryResponse
Updates the specified dictionary.
315 |
# File 'sig/client.rbs', line 315
def update_dictionary: (
|
#update_feed(params = {}) ⇒ Types::UpdateFeedResponse
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.
336 |
# File 'sig/client.rbs', line 336
def update_feed: (
|
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Basic Usage
A waiter will call an API operation until:
- It is successful
- It enters a terminal state
- It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success or :failure from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
Valid Waiters
The following table lists the valid waiter names, the operations they call,
and the default :delay and :max_attempts values.
| waiter_name | params | :delay | :max_attempts |
|---|---|---|---|
| feed_deleted | #get_feed | 3 | 40 |
353 |
# File 'sig/client.rbs', line 353
def wait_until: (:feed_deleted waiter_name,
|
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1647 1648 1649 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 1647 def waiter_names waiters.keys end |