aws-sdk-kinesisvideoarchivedmedia 1.19.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2c63f8222ba081bf804fcf84b7d3ec9c9cda98a9
4
- data.tar.gz: b6041842d2005028573c9d1e78609fcd604ba80d
2
+ SHA256:
3
+ metadata.gz: 5690d22953400fb776cde8fd8e468bbe1f63072c26c166b1c10563500d120ae9
4
+ data.tar.gz: d69c149d62a2144aeed5fce8e0297fd9c079888cb7414a1135f3342f31cbef2f
5
5
  SHA512:
6
- metadata.gz: cfffcf4f8beafff1a36a07d6e6ddb428bea95508e6bb7175674d274e9ab3cf9072f44a94b8c99b21a72f3d0f2328c756b111939eb3f7fb7ad8f40dd38e70cab6
7
- data.tar.gz: 1beac9db327d3cf993bfba4d66645b69c4e0534b393aed67589cbda55f3a3def6c00830dee2b6342c2e7ba25e3509276c897d84fceb4757d092a5d4c93a9a419
6
+ metadata.gz: 3119727a1eafedaf87cb2933bc9f6fd7775d3b708016c3b8a182b5a2c99e3a4924d13e0b341e8da49b85109d22107d58e4aee82d786d970a358177cacf41f6b8
7
+ data.tar.gz: 933a7861a1cd472a392a460740a6a64c8377943d88467e2da0d5ebab0c26224f029cbd3efb33cf7fe9b3566684eb9034254aab1732ea5686ae2fb14bc4a36b76
@@ -24,17 +24,20 @@ require_relative 'aws-sdk-kinesisvideoarchivedmedia/customizations'
24
24
  # methods each accept a hash of request parameters and return a response
25
25
  # structure.
26
26
  #
27
+ # kinesis_video_archived_media = Aws::KinesisVideoArchivedMedia::Client.new
28
+ # resp = kinesis_video_archived_media.get_clip(params)
29
+ #
27
30
  # See {Client} for more information.
28
31
  #
29
32
  # # Errors
30
33
  #
31
- # Errors returned from Amazon Kinesis Video Streams Archived Media all
32
- # extend {Errors::ServiceError}.
34
+ # Errors returned from Amazon Kinesis Video Streams Archived Media are defined in the
35
+ # {Errors} module and all extend {Errors::ServiceError}.
33
36
  #
34
37
  # begin
35
38
  # # do stuff
36
39
  # rescue Aws::KinesisVideoArchivedMedia::Errors::ServiceError
37
- # # rescues all service API errors
40
+ # # rescues all Amazon Kinesis Video Streams Archived Media API errors
38
41
  # end
39
42
  #
40
43
  # See {Errors} for more information.
@@ -42,6 +45,6 @@ require_relative 'aws-sdk-kinesisvideoarchivedmedia/customizations'
42
45
  # @service
43
46
  module Aws::KinesisVideoArchivedMedia
44
47
 
45
- GEM_VERSION = '1.19.0'
48
+ GEM_VERSION = '1.24.0'
46
49
 
47
50
  end
@@ -30,6 +30,18 @@ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
30
30
  Aws::Plugins::GlobalConfiguration.add_identifier(:kinesisvideoarchivedmedia)
31
31
 
32
32
  module Aws::KinesisVideoArchivedMedia
33
+ # An API client for KinesisVideoArchivedMedia. To construct a client, you need to configure a `:region` and `:credentials`.
34
+ #
35
+ # client = Aws::KinesisVideoArchivedMedia::Client.new(
36
+ # region: region_name,
37
+ # credentials: credentials,
38
+ # # ...
39
+ # )
40
+ #
41
+ # For details on configuring region and credentials see
42
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
43
+ #
44
+ # See {#initialize} for a full list of supported configuration options.
33
45
  class Client < Seahorse::Client::Base
34
46
 
35
47
  include Aws::ClientStubs
@@ -93,7 +105,7 @@ module Aws::KinesisVideoArchivedMedia
93
105
  # @option options [required, String] :region
94
106
  # The AWS region to connect to. The configured `:region` is
95
107
  # used to determine the service `:endpoint`. When not passed,
96
- # a default `:region` is search for in the following locations:
108
+ # a default `:region` is searched for in the following locations:
97
109
  #
98
110
  # * `Aws.config[:region]`
99
111
  # * `ENV['AWS_REGION']`
@@ -108,6 +120,12 @@ module Aws::KinesisVideoArchivedMedia
108
120
  # When set to `true`, a thread polling for endpoints will be running in
109
121
  # the background every 60 secs (default). Defaults to `false`.
110
122
  #
123
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
124
+ # Used only in `adaptive` retry mode. When true, the request will sleep
125
+ # until there is sufficent client side capacity to retry the request.
126
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
127
+ # not retry instead of sleeping.
128
+ #
111
129
  # @option options [Boolean] :client_side_monitoring (false)
112
130
  # When `true`, client-side metrics will be collected for all API requests from
113
131
  # this client.
@@ -132,6 +150,10 @@ module Aws::KinesisVideoArchivedMedia
132
150
  # When `true`, an attempt is made to coerce request parameters into
133
151
  # the required types.
134
152
  #
153
+ # @option options [Boolean] :correct_clock_skew (true)
154
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
155
+ # a clock skew correction and retry requests with skewed client clocks.
156
+ #
135
157
  # @option options [Boolean] :disable_host_prefix_injection (false)
136
158
  # Set to true to disable SDK automatically adding host prefix
137
159
  # to default service endpoint when available.
@@ -139,7 +161,7 @@ module Aws::KinesisVideoArchivedMedia
139
161
  # @option options [String] :endpoint
140
162
  # The client endpoint is normally constructed from the `:region`
141
163
  # option. You should only configure an `:endpoint` when connecting
142
- # to test endpoints. This should be avalid HTTP(S) URI.
164
+ # to test endpoints. This should be a valid HTTP(S) URI.
143
165
  #
144
166
  # @option options [Integer] :endpoint_cache_max_entries (1000)
145
167
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -154,7 +176,7 @@ module Aws::KinesisVideoArchivedMedia
154
176
  # requests fetching endpoints information. Defaults to 60 sec.
155
177
  #
156
178
  # @option options [Boolean] :endpoint_discovery (false)
157
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
179
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
158
180
  #
159
181
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
160
182
  # The log formatter.
@@ -166,15 +188,29 @@ module Aws::KinesisVideoArchivedMedia
166
188
  # The Logger instance to send log messages to. If this option
167
189
  # is not set, logging will be disabled.
168
190
  #
191
+ # @option options [Integer] :max_attempts (3)
192
+ # An integer representing the maximum number attempts that will be made for
193
+ # a single request, including the initial attempt. For example,
194
+ # setting this value to 5 will result in a request being retried up to
195
+ # 4 times. Used in `standard` and `adaptive` retry modes.
196
+ #
169
197
  # @option options [String] :profile ("default")
170
198
  # Used when loading credentials from the shared credentials file
171
199
  # at HOME/.aws/credentials. When not specified, 'default' is used.
172
200
  #
201
+ # @option options [Proc] :retry_backoff
202
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
203
+ # This option is only used in the `legacy` retry mode.
204
+ #
173
205
  # @option options [Float] :retry_base_delay (0.3)
174
- # The base delay in seconds used by the default backoff function.
206
+ # The base delay in seconds used by the default backoff function. This option
207
+ # is only used in the `legacy` retry mode.
175
208
  #
176
209
  # @option options [Symbol] :retry_jitter (:none)
177
- # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
210
+ # A delay randomiser function used by the default backoff function.
211
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
212
+ # otherwise a Proc that takes and returns a number. This option is only used
213
+ # in the `legacy` retry mode.
178
214
  #
179
215
  # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
180
216
  #
@@ -182,11 +218,30 @@ module Aws::KinesisVideoArchivedMedia
182
218
  # The maximum number of times to retry failed requests. Only
183
219
  # ~ 500 level server errors and certain ~ 400 level client errors
184
220
  # are retried. Generally, these are throttling errors, data
185
- # checksum errors, networking errors, timeout errors and auth
186
- # errors from expired credentials.
221
+ # checksum errors, networking errors, timeout errors, auth errors,
222
+ # endpoint discovery, and errors from expired credentials.
223
+ # This option is only used in the `legacy` retry mode.
187
224
  #
188
225
  # @option options [Integer] :retry_max_delay (0)
189
- # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
226
+ # The maximum number of seconds to delay between retries (0 for no limit)
227
+ # used by the default backoff function. This option is only used in the
228
+ # `legacy` retry mode.
229
+ #
230
+ # @option options [String] :retry_mode ("legacy")
231
+ # Specifies which retry algorithm to use. Values are:
232
+ #
233
+ # * `legacy` - The pre-existing retry behavior. This is default value if
234
+ # no retry mode is provided.
235
+ #
236
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
237
+ # This includes support for retry quotas, which limit the number of
238
+ # unsuccessful retries a client can make.
239
+ #
240
+ # * `adaptive` - An experimental retry mode that includes all the
241
+ # functionality of `standard` mode along with automatic client side
242
+ # throttling. This is a provisional mode that may change behavior
243
+ # in the future.
244
+ #
190
245
  #
191
246
  # @option options [String] :secret_access_key
192
247
  #
@@ -209,16 +264,15 @@ module Aws::KinesisVideoArchivedMedia
209
264
  # requests through. Formatted like 'http://proxy.com:123'.
210
265
  #
211
266
  # @option options [Float] :http_open_timeout (15) The number of
212
- # seconds to wait when opening a HTTP session before rasing a
267
+ # seconds to wait when opening a HTTP session before raising a
213
268
  # `Timeout::Error`.
214
269
  #
215
270
  # @option options [Integer] :http_read_timeout (60) The default
216
271
  # number of seconds to wait for response data. This value can
217
- # safely be set
218
- # per-request on the session yeidled by {#session_for}.
272
+ # safely be set per-request on the session.
219
273
  #
220
274
  # @option options [Float] :http_idle_timeout (5) The number of
221
- # seconds a connection is allowed to sit idble before it is
275
+ # seconds a connection is allowed to sit idle before it is
222
276
  # considered stale. Stale connections are closed and removed
223
277
  # from the pool before making a request.
224
278
  #
@@ -227,7 +281,7 @@ module Aws::KinesisVideoArchivedMedia
227
281
  # request body. This option has no effect unless the request has
228
282
  # "Expect" header set to "100-continue". Defaults to `nil` which
229
283
  # disables this behaviour. This value can safely be set per
230
- # request on the session yeidled by {#session_for}.
284
+ # request on the session.
231
285
  #
232
286
  # @option options [Boolean] :http_wire_trace (false) When `true`,
233
287
  # HTTP debug output will be sent to the `:logger`.
@@ -254,6 +308,83 @@ module Aws::KinesisVideoArchivedMedia
254
308
 
255
309
  # @!group API Operations
256
310
 
311
+ # Downloads an MP4 file (clip) containing the archived, on-demand media
312
+ # from the specified video stream over the specified time range.
313
+ #
314
+ # Both the StreamName and the StreamARN parameters are optional, but you
315
+ # must specify either the StreamName or the StreamARN when invoking this
316
+ # API operation.
317
+ #
318
+ # As a prerequsite to using GetCLip API, you must obtain an endpoint
319
+ # using `GetDataEndpoint`, specifying GET\_CLIP for` the APIName
320
+ # parameter. </p> An Amazon Kinesis video stream has the following
321
+ # requirements for providing data through MP4: The media must contain
322
+ # h.264 or h.265 encoded video and, optionally, AAC or G.711 encoded
323
+ # audio. Specifically, the codec ID of track 1 should be V_MPEG/ISO/AVC
324
+ # (for h.264) or V_MPEGH/ISO/HEVC (for H.265). Optionally, the codec ID
325
+ # of track 2 should be A_AAC (for AAC) or A_MS/ACM (for G.711). Data
326
+ # retention must be greater than 0. The video track of each fragment
327
+ # must contain codec private data in the Advanced Video Coding (AVC) for
328
+ # H.264 format and HEVC for H.265 format. For more information, see
329
+ # MPEG-4 specification ISO/IEC 14496-15. For information about adapting
330
+ # stream data to a given format, see NAL Adaptation Flags. The audio
331
+ # track (if present) of each fragment must contain codec private data in
332
+ # the AAC format (AAC specification ISO/IEC 13818-7) or the MS Wave
333
+ # format. You can monitor the amount of outgoing data by monitoring
334
+ # the GetClip.OutgoingBytes Amazon CloudWatch metric. For information
335
+ # about using CloudWatch to monitor Kinesis Video Streams, see
336
+ # Monitoring Kinesis Video Streams. For pricing information, see Amazon
337
+ # Kinesis Video Streams Pricing and AWS Pricing. Charges for outgoing
338
+ # AWS data apply.
339
+ # `
340
+ #
341
+ # @option params [String] :stream_name
342
+ # The name of the stream for which to retrieve the media clip.
343
+ #
344
+ # You must specify either the StreamName or the StreamARN.
345
+ #
346
+ # @option params [String] :stream_arn
347
+ # The Amazon Resource Name (ARN) of the stream for which to retrieve the
348
+ # media clip.
349
+ #
350
+ # You must specify either the StreamName or the StreamARN.
351
+ #
352
+ # @option params [required, Types::ClipFragmentSelector] :clip_fragment_selector
353
+ # The time range of the requested clip and the source of the timestamps.
354
+ #
355
+ # @return [Types::GetClipOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
356
+ #
357
+ # * {Types::GetClipOutput#content_type #content_type} => String
358
+ # * {Types::GetClipOutput#payload #payload} => IO
359
+ #
360
+ # @example Request syntax with placeholder values
361
+ #
362
+ # resp = client.get_clip({
363
+ # stream_name: "StreamName",
364
+ # stream_arn: "ResourceARN",
365
+ # clip_fragment_selector: { # required
366
+ # fragment_selector_type: "PRODUCER_TIMESTAMP", # required, accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
367
+ # timestamp_range: { # required
368
+ # start_timestamp: Time.now, # required
369
+ # end_timestamp: Time.now, # required
370
+ # },
371
+ # },
372
+ # })
373
+ #
374
+ # @example Response structure
375
+ #
376
+ # resp.content_type #=> String
377
+ # resp.payload #=> IO
378
+ #
379
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetClip AWS API Documentation
380
+ #
381
+ # @overload get_clip(params = {})
382
+ # @param [Hash] params ({})
383
+ def get_clip(params = {}, options = {}, &block)
384
+ req = build_request(:get_clip, params)
385
+ req.send_request(options, &block)
386
+ end
387
+
257
388
  # Retrieves an MPEG Dynamic Adaptive Streaming over HTTP (DASH) URL for
258
389
  # the stream. You can then open the URL in a media player to view the
259
390
  # stream contents.
@@ -1157,12 +1288,14 @@ module Aws::KinesisVideoArchivedMedia
1157
1288
  # * {Types::ListFragmentsOutput#fragments #fragments} => Array&lt;Types::Fragment&gt;
1158
1289
  # * {Types::ListFragmentsOutput#next_token #next_token} => String
1159
1290
  #
1291
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1292
+ #
1160
1293
  # @example Request syntax with placeholder values
1161
1294
  #
1162
1295
  # resp = client.list_fragments({
1163
1296
  # stream_name: "StreamName", # required
1164
1297
  # max_results: 1,
1165
- # next_token: "String",
1298
+ # next_token: "NextToken",
1166
1299
  # fragment_selector: {
1167
1300
  # fragment_selector_type: "PRODUCER_TIMESTAMP", # required, accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
1168
1301
  # timestamp_range: { # required
@@ -1204,7 +1337,7 @@ module Aws::KinesisVideoArchivedMedia
1204
1337
  params: params,
1205
1338
  config: config)
1206
1339
  context[:gem_name] = 'aws-sdk-kinesisvideoarchivedmedia'
1207
- context[:gem_version] = '1.19.0'
1340
+ context[:gem_version] = '1.24.0'
1208
1341
  Seahorse::Client::Request.new(handlers, context)
1209
1342
  end
1210
1343
 
@@ -12,6 +12,9 @@ module Aws::KinesisVideoArchivedMedia
12
12
  include Seahorse::Model
13
13
 
14
14
  ClientLimitExceededException = Shapes::StructureShape.new(name: 'ClientLimitExceededException')
15
+ ClipFragmentSelector = Shapes::StructureShape.new(name: 'ClipFragmentSelector')
16
+ ClipFragmentSelectorType = Shapes::StringShape.new(name: 'ClipFragmentSelectorType')
17
+ ClipTimestampRange = Shapes::StructureShape.new(name: 'ClipTimestampRange')
15
18
  ContainerFormat = Shapes::StringShape.new(name: 'ContainerFormat')
16
19
  ContentType = Shapes::StringShape.new(name: 'ContentType')
17
20
  DASHDisplayFragmentNumber = Shapes::StringShape.new(name: 'DASHDisplayFragmentNumber')
@@ -29,6 +32,8 @@ module Aws::KinesisVideoArchivedMedia
29
32
  FragmentNumberString = Shapes::StringShape.new(name: 'FragmentNumberString')
30
33
  FragmentSelector = Shapes::StructureShape.new(name: 'FragmentSelector')
31
34
  FragmentSelectorType = Shapes::StringShape.new(name: 'FragmentSelectorType')
35
+ GetClipInput = Shapes::StructureShape.new(name: 'GetClipInput')
36
+ GetClipOutput = Shapes::StructureShape.new(name: 'GetClipOutput')
32
37
  GetDASHStreamingSessionURLInput = Shapes::StructureShape.new(name: 'GetDASHStreamingSessionURLInput')
33
38
  GetDASHStreamingSessionURLOutput = Shapes::StructureShape.new(name: 'GetDASHStreamingSessionURLOutput')
34
39
  GetHLSStreamingSessionURLInput = Shapes::StructureShape.new(name: 'GetHLSStreamingSessionURLInput')
@@ -44,10 +49,12 @@ module Aws::KinesisVideoArchivedMedia
44
49
  HLSTimestampRange = Shapes::StructureShape.new(name: 'HLSTimestampRange')
45
50
  InvalidArgumentException = Shapes::StructureShape.new(name: 'InvalidArgumentException')
46
51
  InvalidCodecPrivateDataException = Shapes::StructureShape.new(name: 'InvalidCodecPrivateDataException')
52
+ InvalidMediaFrameException = Shapes::StructureShape.new(name: 'InvalidMediaFrameException')
47
53
  ListFragmentsInput = Shapes::StructureShape.new(name: 'ListFragmentsInput')
48
54
  ListFragmentsOutput = Shapes::StructureShape.new(name: 'ListFragmentsOutput')
49
55
  Long = Shapes::IntegerShape.new(name: 'Long')
50
56
  MissingCodecPrivateDataException = Shapes::StructureShape.new(name: 'MissingCodecPrivateDataException')
57
+ NextToken = Shapes::StringShape.new(name: 'NextToken')
51
58
  NoDataRetentionException = Shapes::StructureShape.new(name: 'NoDataRetentionException')
52
59
  NotAuthorizedException = Shapes::StructureShape.new(name: 'NotAuthorizedException')
53
60
  PageLimit = Shapes::IntegerShape.new(name: 'PageLimit')
@@ -55,7 +62,6 @@ module Aws::KinesisVideoArchivedMedia
55
62
  ResourceARN = Shapes::StringShape.new(name: 'ResourceARN')
56
63
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
57
64
  StreamName = Shapes::StringShape.new(name: 'StreamName')
58
- String = Shapes::StringShape.new(name: 'String')
59
65
  Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
60
66
  TimestampRange = Shapes::StructureShape.new(name: 'TimestampRange')
61
67
  UnsupportedStreamMediaTypeException = Shapes::StructureShape.new(name: 'UnsupportedStreamMediaTypeException')
@@ -63,6 +69,14 @@ module Aws::KinesisVideoArchivedMedia
63
69
  ClientLimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
64
70
  ClientLimitExceededException.struct_class = Types::ClientLimitExceededException
65
71
 
72
+ ClipFragmentSelector.add_member(:fragment_selector_type, Shapes::ShapeRef.new(shape: ClipFragmentSelectorType, required: true, location_name: "FragmentSelectorType"))
73
+ ClipFragmentSelector.add_member(:timestamp_range, Shapes::ShapeRef.new(shape: ClipTimestampRange, required: true, location_name: "TimestampRange"))
74
+ ClipFragmentSelector.struct_class = Types::ClipFragmentSelector
75
+
76
+ ClipTimestampRange.add_member(:start_timestamp, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "StartTimestamp"))
77
+ ClipTimestampRange.add_member(:end_timestamp, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "EndTimestamp"))
78
+ ClipTimestampRange.struct_class = Types::ClipTimestampRange
79
+
66
80
  DASHFragmentSelector.add_member(:fragment_selector_type, Shapes::ShapeRef.new(shape: DASHFragmentSelectorType, location_name: "FragmentSelectorType"))
67
81
  DASHFragmentSelector.add_member(:timestamp_range, Shapes::ShapeRef.new(shape: DASHTimestampRange, location_name: "TimestampRange"))
68
82
  DASHFragmentSelector.struct_class = Types::DASHFragmentSelector
@@ -71,7 +85,7 @@ module Aws::KinesisVideoArchivedMedia
71
85
  DASHTimestampRange.add_member(:end_timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "EndTimestamp"))
72
86
  DASHTimestampRange.struct_class = Types::DASHTimestampRange
73
87
 
74
- Fragment.add_member(:fragment_number, Shapes::ShapeRef.new(shape: String, location_name: "FragmentNumber"))
88
+ Fragment.add_member(:fragment_number, Shapes::ShapeRef.new(shape: FragmentNumberString, location_name: "FragmentNumber"))
75
89
  Fragment.add_member(:fragment_size_in_bytes, Shapes::ShapeRef.new(shape: Long, location_name: "FragmentSizeInBytes"))
76
90
  Fragment.add_member(:producer_timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "ProducerTimestamp"))
77
91
  Fragment.add_member(:server_timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "ServerTimestamp"))
@@ -86,6 +100,17 @@ module Aws::KinesisVideoArchivedMedia
86
100
  FragmentSelector.add_member(:timestamp_range, Shapes::ShapeRef.new(shape: TimestampRange, required: true, location_name: "TimestampRange"))
87
101
  FragmentSelector.struct_class = Types::FragmentSelector
88
102
 
103
+ GetClipInput.add_member(:stream_name, Shapes::ShapeRef.new(shape: StreamName, location_name: "StreamName"))
104
+ GetClipInput.add_member(:stream_arn, Shapes::ShapeRef.new(shape: ResourceARN, location_name: "StreamARN"))
105
+ GetClipInput.add_member(:clip_fragment_selector, Shapes::ShapeRef.new(shape: ClipFragmentSelector, required: true, location_name: "ClipFragmentSelector"))
106
+ GetClipInput.struct_class = Types::GetClipInput
107
+
108
+ GetClipOutput.add_member(:content_type, Shapes::ShapeRef.new(shape: ContentType, location: "header", location_name: "Content-Type"))
109
+ GetClipOutput.add_member(:payload, Shapes::ShapeRef.new(shape: Payload, location_name: "Payload"))
110
+ GetClipOutput.struct_class = Types::GetClipOutput
111
+ GetClipOutput[:payload] = :payload
112
+ GetClipOutput[:payload_member] = GetClipOutput.member(:payload)
113
+
89
114
  GetDASHStreamingSessionURLInput.add_member(:stream_name, Shapes::ShapeRef.new(shape: StreamName, location_name: "StreamName"))
90
115
  GetDASHStreamingSessionURLInput.add_member(:stream_arn, Shapes::ShapeRef.new(shape: ResourceARN, location_name: "StreamARN"))
91
116
  GetDASHStreamingSessionURLInput.add_member(:playback_mode, Shapes::ShapeRef.new(shape: DASHPlaybackMode, location_name: "PlaybackMode"))
@@ -137,14 +162,17 @@ module Aws::KinesisVideoArchivedMedia
137
162
  InvalidCodecPrivateDataException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
138
163
  InvalidCodecPrivateDataException.struct_class = Types::InvalidCodecPrivateDataException
139
164
 
165
+ InvalidMediaFrameException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
166
+ InvalidMediaFrameException.struct_class = Types::InvalidMediaFrameException
167
+
140
168
  ListFragmentsInput.add_member(:stream_name, Shapes::ShapeRef.new(shape: StreamName, required: true, location_name: "StreamName"))
141
169
  ListFragmentsInput.add_member(:max_results, Shapes::ShapeRef.new(shape: PageLimit, location_name: "MaxResults"))
142
- ListFragmentsInput.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
170
+ ListFragmentsInput.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
143
171
  ListFragmentsInput.add_member(:fragment_selector, Shapes::ShapeRef.new(shape: FragmentSelector, location_name: "FragmentSelector"))
144
172
  ListFragmentsInput.struct_class = Types::ListFragmentsInput
145
173
 
146
174
  ListFragmentsOutput.add_member(:fragments, Shapes::ShapeRef.new(shape: FragmentList, location_name: "Fragments"))
147
- ListFragmentsOutput.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
175
+ ListFragmentsOutput.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
148
176
  ListFragmentsOutput.struct_class = Types::ListFragmentsOutput
149
177
 
150
178
  MissingCodecPrivateDataException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
@@ -183,6 +211,23 @@ module Aws::KinesisVideoArchivedMedia
183
211
  "uid" => "kinesis-video-archived-media-2017-09-30",
184
212
  }
185
213
 
214
+ api.add_operation(:get_clip, Seahorse::Model::Operation.new.tap do |o|
215
+ o.name = "GetClip"
216
+ o.http_method = "POST"
217
+ o.http_request_uri = "/getClip"
218
+ o.input = Shapes::ShapeRef.new(shape: GetClipInput)
219
+ o.output = Shapes::ShapeRef.new(shape: GetClipOutput)
220
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
221
+ o.errors << Shapes::ShapeRef.new(shape: InvalidArgumentException)
222
+ o.errors << Shapes::ShapeRef.new(shape: ClientLimitExceededException)
223
+ o.errors << Shapes::ShapeRef.new(shape: NotAuthorizedException)
224
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedStreamMediaTypeException)
225
+ o.errors << Shapes::ShapeRef.new(shape: MissingCodecPrivateDataException)
226
+ o.errors << Shapes::ShapeRef.new(shape: InvalidCodecPrivateDataException)
227
+ o.errors << Shapes::ShapeRef.new(shape: InvalidMediaFrameException)
228
+ o.errors << Shapes::ShapeRef.new(shape: NoDataRetentionException)
229
+ end)
230
+
186
231
  api.add_operation(:get_dash_streaming_session_url, Seahorse::Model::Operation.new.tap do |o|
187
232
  o.name = "GetDASHStreamingSessionURL"
188
233
  o.http_method = "POST"
@@ -6,6 +6,37 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::KinesisVideoArchivedMedia
9
+
10
+ # When KinesisVideoArchivedMedia returns an error response, the Ruby SDK constructs and raises an error.
11
+ # These errors all extend Aws::KinesisVideoArchivedMedia::Errors::ServiceError < {Aws::Errors::ServiceError}
12
+ #
13
+ # You can rescue all KinesisVideoArchivedMedia errors using ServiceError:
14
+ #
15
+ # begin
16
+ # # do stuff
17
+ # rescue Aws::KinesisVideoArchivedMedia::Errors::ServiceError
18
+ # # rescues all KinesisVideoArchivedMedia API errors
19
+ # end
20
+ #
21
+ #
22
+ # ## Request Context
23
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
24
+ # information about the request that generated the error.
25
+ # See {Seahorse::Client::RequestContext} for more information.
26
+ #
27
+ # ## Error Classes
28
+ # * {ClientLimitExceededException}
29
+ # * {InvalidArgumentException}
30
+ # * {InvalidCodecPrivateDataException}
31
+ # * {InvalidMediaFrameException}
32
+ # * {MissingCodecPrivateDataException}
33
+ # * {NoDataRetentionException}
34
+ # * {NotAuthorizedException}
35
+ # * {ResourceNotFoundException}
36
+ # * {UnsupportedStreamMediaTypeException}
37
+ #
38
+ # Additionally, error classes are dynamically generated for service errors based on the error code
39
+ # if they are not defined above.
9
40
  module Errors
10
41
 
11
42
  extend Aws::Errors::DynamicErrors
@@ -23,7 +54,6 @@ module Aws::KinesisVideoArchivedMedia
23
54
  def message
24
55
  @message || @data[:message]
25
56
  end
26
-
27
57
  end
28
58
 
29
59
  class InvalidArgumentException < ServiceError
@@ -39,7 +69,6 @@ module Aws::KinesisVideoArchivedMedia
39
69
  def message
40
70
  @message || @data[:message]
41
71
  end
42
-
43
72
  end
44
73
 
45
74
  class InvalidCodecPrivateDataException < ServiceError
@@ -55,7 +84,21 @@ module Aws::KinesisVideoArchivedMedia
55
84
  def message
56
85
  @message || @data[:message]
57
86
  end
87
+ end
88
+
89
+ class InvalidMediaFrameException < ServiceError
90
+
91
+ # @param [Seahorse::Client::RequestContext] context
92
+ # @param [String] message
93
+ # @param [Aws::KinesisVideoArchivedMedia::Types::InvalidMediaFrameException] data
94
+ def initialize(context, message, data = Aws::EmptyStructure.new)
95
+ super(context, message, data)
96
+ end
58
97
 
98
+ # @return [String]
99
+ def message
100
+ @message || @data[:message]
101
+ end
59
102
  end
60
103
 
61
104
  class MissingCodecPrivateDataException < ServiceError
@@ -71,7 +114,6 @@ module Aws::KinesisVideoArchivedMedia
71
114
  def message
72
115
  @message || @data[:message]
73
116
  end
74
-
75
117
  end
76
118
 
77
119
  class NoDataRetentionException < ServiceError
@@ -87,7 +129,6 @@ module Aws::KinesisVideoArchivedMedia
87
129
  def message
88
130
  @message || @data[:message]
89
131
  end
90
-
91
132
  end
92
133
 
93
134
  class NotAuthorizedException < ServiceError
@@ -103,7 +144,6 @@ module Aws::KinesisVideoArchivedMedia
103
144
  def message
104
145
  @message || @data[:message]
105
146
  end
106
-
107
147
  end
108
148
 
109
149
  class ResourceNotFoundException < ServiceError
@@ -119,7 +159,6 @@ module Aws::KinesisVideoArchivedMedia
119
159
  def message
120
160
  @message || @data[:message]
121
161
  end
122
-
123
162
  end
124
163
 
125
164
  class UnsupportedStreamMediaTypeException < ServiceError
@@ -135,7 +174,6 @@ module Aws::KinesisVideoArchivedMedia
135
174
  def message
136
175
  @message || @data[:message]
137
176
  end
138
-
139
177
  end
140
178
 
141
179
  end
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::KinesisVideoArchivedMedia
9
+
9
10
  class Resource
10
11
 
11
12
  # @param options ({})
@@ -21,6 +21,91 @@ module Aws::KinesisVideoArchivedMedia
21
21
  include Aws::Structure
22
22
  end
23
23
 
24
+ # Describes the timestamp range and timestamp origin of a range of
25
+ # fragments.
26
+ #
27
+ # Fragments that have duplicate producer timestamps are deduplicated.
28
+ # This means that if producers are producing a stream of fragments with
29
+ # producer timestamps that are approximately equal to the true clock
30
+ # time, the clip will contain all of the fragments within the requested
31
+ # timestamp range. If some fragments are ingested within the same time
32
+ # range and very different points in time, only the oldest ingested
33
+ # collection of fragments are returned.
34
+ #
35
+ # @note When making an API call, you may pass ClipFragmentSelector
36
+ # data as a hash:
37
+ #
38
+ # {
39
+ # fragment_selector_type: "PRODUCER_TIMESTAMP", # required, accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
40
+ # timestamp_range: { # required
41
+ # start_timestamp: Time.now, # required
42
+ # end_timestamp: Time.now, # required
43
+ # },
44
+ # }
45
+ #
46
+ # @!attribute [rw] fragment_selector_type
47
+ # The origin of the timestamps to use (Server or Producer).
48
+ # @return [String]
49
+ #
50
+ # @!attribute [rw] timestamp_range
51
+ # The range of timestamps to return.
52
+ # @return [Types::ClipTimestampRange]
53
+ #
54
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ClipFragmentSelector AWS API Documentation
55
+ #
56
+ class ClipFragmentSelector < Struct.new(
57
+ :fragment_selector_type,
58
+ :timestamp_range)
59
+ include Aws::Structure
60
+ end
61
+
62
+ # The range of timestamps for which to return fragments.
63
+ #
64
+ # The values in the ClipTimestampRange are `inclusive`. Fragments that
65
+ # begin before the start time but continue past it, or fragments that
66
+ # begin before the end time but continue past it, are included in the
67
+ # session.
68
+ #
69
+ # @note When making an API call, you may pass ClipTimestampRange
70
+ # data as a hash:
71
+ #
72
+ # {
73
+ # start_timestamp: Time.now, # required
74
+ # end_timestamp: Time.now, # required
75
+ # }
76
+ #
77
+ # @!attribute [rw] start_timestamp
78
+ # The starting timestamp in the range of timestamps for which to
79
+ # return fragments.
80
+ #
81
+ # This value is inclusive. Fragments that start before the
82
+ # `StartTimestamp` and continue past it are included in the session.
83
+ # If `FragmentSelectorType` is `SERVER_TIMESTAMP`, the
84
+ # `StartTimestamp` must be later than the stream head.
85
+ # @return [Time]
86
+ #
87
+ # @!attribute [rw] end_timestamp
88
+ # The end of the timestamp range for the requested media.
89
+ #
90
+ # This value must be within 3 hours of the specified `StartTimestamp`,
91
+ # and it must be later than the `StartTimestamp` value. If
92
+ # `FragmentSelectorType` for the request is `SERVER_TIMESTAMP`, this
93
+ # value must be in the past.
94
+ #
95
+ # This value is inclusive. The `EndTimestamp` is compared to the
96
+ # (starting) timestamp of the fragment. Fragments that start before
97
+ # the `EndTimestamp` value and continue past it are included in the
98
+ # session.
99
+ # @return [Time]
100
+ #
101
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ClipTimestampRange AWS API Documentation
102
+ #
103
+ class ClipTimestampRange < Struct.new(
104
+ :start_timestamp,
105
+ :end_timestamp)
106
+ include Aws::Structure
107
+ end
108
+
24
109
  # Contains the range of timestamps for the requested media, and the
25
110
  # source of the timestamps.
26
111
  #
@@ -226,6 +311,68 @@ module Aws::KinesisVideoArchivedMedia
226
311
  include Aws::Structure
227
312
  end
228
313
 
314
+ # @note When making an API call, you may pass GetClipInput
315
+ # data as a hash:
316
+ #
317
+ # {
318
+ # stream_name: "StreamName",
319
+ # stream_arn: "ResourceARN",
320
+ # clip_fragment_selector: { # required
321
+ # fragment_selector_type: "PRODUCER_TIMESTAMP", # required, accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
322
+ # timestamp_range: { # required
323
+ # start_timestamp: Time.now, # required
324
+ # end_timestamp: Time.now, # required
325
+ # },
326
+ # },
327
+ # }
328
+ #
329
+ # @!attribute [rw] stream_name
330
+ # The name of the stream for which to retrieve the media clip.
331
+ #
332
+ # You must specify either the StreamName or the StreamARN.
333
+ # @return [String]
334
+ #
335
+ # @!attribute [rw] stream_arn
336
+ # The Amazon Resource Name (ARN) of the stream for which to retrieve
337
+ # the media clip.
338
+ #
339
+ # You must specify either the StreamName or the StreamARN.
340
+ # @return [String]
341
+ #
342
+ # @!attribute [rw] clip_fragment_selector
343
+ # The time range of the requested clip and the source of the
344
+ # timestamps.
345
+ # @return [Types::ClipFragmentSelector]
346
+ #
347
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetClipInput AWS API Documentation
348
+ #
349
+ class GetClipInput < Struct.new(
350
+ :stream_name,
351
+ :stream_arn,
352
+ :clip_fragment_selector)
353
+ include Aws::Structure
354
+ end
355
+
356
+ # @!attribute [rw] content_type
357
+ # The content type of the media in the requested clip.
358
+ # @return [String]
359
+ #
360
+ # @!attribute [rw] payload
361
+ # Traditional MP4 file that contains the media clip from the specified
362
+ # video stream. The output will contain the first 100 MB or the first
363
+ # 200 fragments from the specified start timestamp. For more
364
+ # information, see [Kinesis Video Streams Limits](Kinesis Video
365
+ # Streams Limits).
366
+ # @return [IO]
367
+ #
368
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetClipOutput AWS API Documentation
369
+ #
370
+ class GetClipOutput < Struct.new(
371
+ :content_type,
372
+ :payload)
373
+ include Aws::Structure
374
+ end
375
+
229
376
  # @note When making an API call, you may pass GetDASHStreamingSessionURLInput
230
377
  # data as a hash:
231
378
  #
@@ -881,13 +1028,26 @@ module Aws::KinesisVideoArchivedMedia
881
1028
  include Aws::Structure
882
1029
  end
883
1030
 
1031
+ # One or more frames in the requested clip could not be parsed based on
1032
+ # the specified codec.
1033
+ #
1034
+ # @!attribute [rw] message
1035
+ # @return [String]
1036
+ #
1037
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/InvalidMediaFrameException AWS API Documentation
1038
+ #
1039
+ class InvalidMediaFrameException < Struct.new(
1040
+ :message)
1041
+ include Aws::Structure
1042
+ end
1043
+
884
1044
  # @note When making an API call, you may pass ListFragmentsInput
885
1045
  # data as a hash:
886
1046
  #
887
1047
  # {
888
1048
  # stream_name: "StreamName", # required
889
1049
  # max_results: 1,
890
- # next_token: "String",
1050
+ # next_token: "NextToken",
891
1051
  # fragment_selector: {
892
1052
  # fragment_selector_type: "PRODUCER_TIMESTAMP", # required, accepts PRODUCER_TIMESTAMP, SERVER_TIMESTAMP
893
1053
  # timestamp_range: { # required
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-kinesisvideoarchivedmedia
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.0
4
+ version: 1.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-15 00:00:00.000000000 Z
11
+ date: 2020-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.61.1
22
+ version: 3.71.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.61.1
32
+ version: 3.71.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project:
84
- rubygems_version: 2.5.2.3
84
+ rubygems_version: 2.7.6.2
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: AWS SDK for Ruby - Kinesis Video Archived Media