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.
444 445 446 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 444 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.
578 579 580 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 578 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.
581 582 583 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 581 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.
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 551 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::KinesisVideoMedia') ) 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-kinesisvideomedia' context[:gem_version] = '1.63.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
542 543 544 545 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 542 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.
571 572 573 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 571 def waiter_names [] end |