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.
467 468 469 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 467 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.
601 602 603 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 601 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.
604 605 606 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 604 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.
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 574 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.64.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
565 566 567 568 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 565 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.
594 595 596 |
# File 'lib/aws-sdk-kinesisvideomedia/client.rb', line 594 def waiter_names [] end |