Class: Aws::KinesisVideoMedia::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::KinesisVideoMedia::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-kinesisvideomedia/client.rb
Overview
An API client for KinesisVideoMedia. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::KinesisVideoMedia::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
-
#get_media(params = {}) ⇒ Types::GetMediaOutput
Use this API to retrieve media content from a Kinesis video stream.
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.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
422 423 424 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 422 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.
551 552 553 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 551 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.
554 555 556 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 554 def errors_module Errors end |
Instance Method Details
#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.
529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 529 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-kinesisvideomedia' context[:gem_version] = '1.56.0' Seahorse::Client::Request.new(handlers, context) end |
#get_media(params = {}) ⇒ Types::GetMediaOutput
Use this API to retrieve media content from a Kinesis video stream. In the request, you identify the stream name or stream Amazon Resource Name (ARN), and the starting chunk. Kinesis Video Streams then returns a stream of chunks in order by fragment number.
<note markdown=“1”> You must first call the ‘GetDataEndpoint` API to get an endpoint. Then send the `GetMedia` requests to this endpoint using the [–endpoint-url parameter].
</note>
When you put media data (fragments) on a stream, Kinesis Video Streams stores each incoming fragment and related metadata in what is called a “chunk.” For more information, see [PutMedia]. The ‘GetMedia` API returns a stream of these chunks starting from the chunk that you specify in the request.
The following limits apply when using the ‘GetMedia` API:
-
A client can call ‘GetMedia` up to five times per second per stream.
-
Kinesis Video Streams sends media data at a rate of up to 25 megabytes per second (or 200 megabits per second) during a ‘GetMedia` session.
<note markdown=“1”> If an error is thrown after invoking a Kinesis Video Streams media API, in addition to the HTTP status code and the response body, it includes the following pieces of information:
* `x-amz-ErrorType` HTTP header – contains a more specific error type
in addition to what the HTTP status code provides.
-
‘x-amz-RequestId` HTTP header – if you want to report an issue to AWS, the support team can better diagnose the problem if given the Request Id.
Both the HTTP status code and the ErrorType header can be utilized to
make programmatic decisions about whether errors are retry-able and under what conditions, as well as provide information on what actions the client programmer might need to take in order to successfully try again.
For more information, see the **Errors** section at the bottom of this
topic, as well as [Common Errors].
</note>
[1]: docs.aws.amazon.com/cli/latest/reference/ [2]: docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html [3]: docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html
520 521 522 523 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 520 def get_media(params = {}, = {}, &block) req = build_request(:get_media, params) req.send_request(, &block) 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.
544 545 546 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 544 def waiter_names [] end |