You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::KinesisVideoArchivedMedia::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-kinesisvideoarchivedmedia/lib/aws-sdk-kinesisvideoarchivedmedia/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



142
143
144
# File 'gems/aws-sdk-kinesisvideoarchivedmedia/lib/aws-sdk-kinesisvideoarchivedmedia/client.rb', line 142

def initialize(*args)
  super
end

Instance Method Details

#get_media_for_fragment_list(params = {}) ⇒ Types::GetMediaForFragmentListOutput

Gets media for a list of fragments (specified by fragment number) from the archived data in a Kinesis video stream.

This operation is only available for the AWS SDK for Java. It is not supported in AWS SDKs for other languages.

The following limits apply when using the GetMediaForFragmentList API:

  • A client can call GetMediaForFragmentList 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 GetMediaForFragmentList session.

Examples:

Request syntax with placeholder values


resp = client.get_media_for_fragment_list({
  stream_name: "StreamName", # required
  fragments: ["FragmentNumberString"], # required
})

Response structure


resp.content_type #=> String
resp.payload #=> IO

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :stream_name (required, String)

    The name of the stream from which to retrieve fragment media.

  • :fragments (required, Array<String>)

    A list of the numbers of fragments for which to retrieve media. You retrieve these values with ListFragments.

Returns:

See Also:



194
195
196
197
# File 'gems/aws-sdk-kinesisvideoarchivedmedia/lib/aws-sdk-kinesisvideoarchivedmedia/client.rb', line 194

def get_media_for_fragment_list(params = {}, options = {}, &block)
  req = build_request(:get_media_for_fragment_list, params)
  req.send_request(options, &block)
end

#list_fragments(params = {}) ⇒ Types::ListFragmentsOutput

Returns a list of Fragment objects from the specified stream and start location within the archived data.

Examples:

Request syntax with placeholder values


resp = client.list_fragments({
  stream_name: "StreamName", # required
  max_results: 1,
  next_token: "String",
  fragment_selector: {
    fragment_selector_type: "PRODUCER_TIMESTAMP", # required, accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
    timestamp_range: { # required
      start_timestamp: Time.now, # required
      end_timestamp: Time.now, # required
    },
  },
})

Response structure


resp.fragments #=> Array
resp.fragments[0].fragment_number #=> String
resp.fragments[0].fragment_size_in_bytes #=> Integer
resp.fragments[0].producer_timestamp #=> Time
resp.fragments[0].server_timestamp #=> Time
resp.fragments[0].fragment_length_in_milliseconds #=> Integer
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :stream_name (required, String)

    The name of the stream from which to retrieve a fragment list.

  • :max_results (Integer)

    The total number of fragments to return. If the total number of fragments available is more than the value specified in max-results, then a ListFragmentsOutput$NextToken is provided in the output that you can use to resume pagination.

  • :next_token (String)

    A token to specify where to start paginating. This is the ListFragmentsOutput$NextToken from a previously truncated response.

  • :fragment_selector (Types::FragmentSelector)

    Describes the time stamp range and time stamp origin for the range of fragments to return.

Returns:

See Also:



253
254
255
256
# File 'gems/aws-sdk-kinesisvideoarchivedmedia/lib/aws-sdk-kinesisvideoarchivedmedia/client.rb', line 253

def list_fragments(params = {}, options = {})
  req = build_request(:list_fragments, params)
  req.send_request(options)
end