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
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](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#associate_feed(params = {}) ⇒ Types::AssociateFeedResponse
Associates a resource with the feed.
-
#create_feed(params = {}) ⇒ Types::CreateFeedResponse
Creates a feed.
-
#delete_feed(params = {}) ⇒ Types::DeleteFeedResponse
Deletes the specified feed.
-
#disassociate_feed(params = {}) ⇒ Types::DisassociateFeedResponse
Releases the resource (for example, an MediaLive channel) that is associated with this feed.
-
#get_feed(params = {}) ⇒ Types::GetFeedResponse
Retrieves information about the specified feed.
-
#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.
-
#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_feed(params = {}) ⇒ Types::UpdateFeedResponse
Updates the name and/or outputs in a feed.
Class Method Summary collapse
- .errors_module ⇒ Object private
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.
473 474 475 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 473 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.
1115 1116 1117 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 1115 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.
1118 1119 1120 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 1118 def errors_module Errors end |
Instance Method Details
#associate_feed(params = {}) ⇒ Types::AssociateFeedResponse
Associates a resource with the feed. The resource provides the input that Elemental Inference needs 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.
541 542 543 544 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 541 def associate_feed(params = {}, = {}) req = build_request(:associate_feed, params) req.send_request() end |
#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.
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 975 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.3.0' Seahorse::Client::Request.new(handlers, context) end |
#create_feed(params = {}) ⇒ Types::CreateFeedResponse
Creates a feed. The feed is the target for live streams being sent by the calling application. An example of a calling application is AWS Elemental MediaLive. After you create the feed, you can associate a resource with the feed.
619 620 621 622 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 619 def create_feed(params = {}, = {}) req = build_request(:create_feed, params) req.send_request() end |
#delete_feed(params = {}) ⇒ Types::DeleteFeedResponse
Deletes the specified feed. The feed can be deleted at any time.
651 652 653 654 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 651 def delete_feed(params = {}, = {}) req = build_request(:delete_feed, params) req.send_request() end |
#disassociate_feed(params = {}) ⇒ Types::DisassociateFeedResponse
Releases the resource (for example, an MediaLive channel) that is associated with this feed. The outputs in the feed become disabled.
693 694 695 696 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 693 def disassociate_feed(params = {}, = {}) req = build_request(:disassociate_feed, params) req.send_request() end |
#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
747 748 749 750 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 747 def get_feed(params = {}, = {}) req = build_request(:get_feed, params) req.send_request() end |
#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.
804 805 806 807 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 804 def list_feeds(params = {}, = {}) req = build_request(:list_feeds, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List all tags that are on an Elemental Inference resource in the current region.
834 835 836 837 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 834 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#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.
866 867 868 869 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 866 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Deletes specified tags from the specified resource in the current region.
893 894 895 896 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 893 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_feed(params = {}) ⇒ Types::UpdateFeedResponse
Updates the name and/or outputs in a feed.
966 967 968 969 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 966 def update_feed(params = {}, = {}) req = build_request(:update_feed, params) req.send_request() end |
#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 |
1081 1082 1083 1084 1085 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 1081 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |
#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.
1089 1090 1091 |
# File 'lib/aws-sdk-elementalinference/client.rb', line 1089 def waiter_names waiters.keys end |