aws-sdk-kinesis 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-kinesis.rb +3 -1
- data/lib/aws-sdk-kinesis/async_client.rb +503 -0
- data/lib/aws-sdk-kinesis/client.rb +12 -1
- data/lib/aws-sdk-kinesis/client_api.rb +59 -9
- data/lib/aws-sdk-kinesis/event_streams.rb +87 -0
- data/lib/aws-sdk-kinesis/types.rb +197 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1cdd3d5aa2b9de3b6f611cd0f9190c1165cf281
|
4
|
+
data.tar.gz: 39cd9ea95062644e5869f646570a10eadb31b6c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 951c83869900743f2997db0a46aec6f1f66ae7ca53f2789ee7f88437cef26a090b5db727ec70b9edc2c3362a886f11a45ab0466bd9eccf0821c83c69674de856
|
7
|
+
data.tar.gz: da5b981c70bb2a437fb5b90e87e09d5d371fa2e1ddb581fd3057373dbe25d524acf1a637281a7a89cc86d06783e6f5817d304e96e2e7a04ca75f73319cb7b1ae
|
data/lib/aws-sdk-kinesis.rb
CHANGED
@@ -15,6 +15,8 @@ require_relative 'aws-sdk-kinesis/errors'
|
|
15
15
|
require_relative 'aws-sdk-kinesis/waiters'
|
16
16
|
require_relative 'aws-sdk-kinesis/resource'
|
17
17
|
require_relative 'aws-sdk-kinesis/customizations'
|
18
|
+
require_relative 'aws-sdk-kinesis/async_client'
|
19
|
+
require_relative 'aws-sdk-kinesis/event_streams'
|
18
20
|
|
19
21
|
# This module provides support for Amazon Kinesis. This module is available in the
|
20
22
|
# `aws-sdk-kinesis` gem.
|
@@ -43,6 +45,6 @@ require_relative 'aws-sdk-kinesis/customizations'
|
|
43
45
|
# @service
|
44
46
|
module Aws::Kinesis
|
45
47
|
|
46
|
-
GEM_VERSION = '1.
|
48
|
+
GEM_VERSION = '1.10.0'
|
47
49
|
|
48
50
|
end
|
@@ -0,0 +1,503 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
19
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
20
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
21
|
+
require 'aws-sdk-core/plugins/invocation_id.rb'
|
22
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
23
|
+
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
24
|
+
require 'aws-sdk-core/plugins/event_stream_configuration.rb'
|
25
|
+
|
26
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:kinesis)
|
27
|
+
|
28
|
+
module Aws::Kinesis
|
29
|
+
class AsyncClient < Seahorse::Client::AsyncBase
|
30
|
+
|
31
|
+
include Aws::AsyncClientStubs
|
32
|
+
|
33
|
+
@identifier = :kinesis
|
34
|
+
|
35
|
+
set_api(ClientApi::API)
|
36
|
+
|
37
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
38
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
39
|
+
add_plugin(Aws::Plugins::Logging)
|
40
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
41
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
42
|
+
add_plugin(Aws::Plugins::UserAgent)
|
43
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
44
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
45
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
46
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
47
|
+
add_plugin(Aws::Plugins::StubResponses)
|
48
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
49
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
50
|
+
add_plugin(Aws::Plugins::InvocationId)
|
51
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
52
|
+
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
53
|
+
add_plugin(Aws::Plugins::EventStreamConfiguration)
|
54
|
+
|
55
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
56
|
+
# Your AWS credentials. This can be an instance of any one of the
|
57
|
+
# following classes:
|
58
|
+
#
|
59
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
60
|
+
# credentials.
|
61
|
+
#
|
62
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
63
|
+
# from an EC2 IMDS on an EC2 instance.
|
64
|
+
#
|
65
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
66
|
+
# shared file, such as `~/.aws/config`.
|
67
|
+
#
|
68
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
69
|
+
#
|
70
|
+
# When `:credentials` are not configured directly, the following
|
71
|
+
# locations will be searched for credentials:
|
72
|
+
#
|
73
|
+
# * `Aws.config[:credentials]`
|
74
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
75
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
76
|
+
# * `~/.aws/credentials`
|
77
|
+
# * `~/.aws/config`
|
78
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
79
|
+
# very aggressive. Construct and pass an instance of
|
80
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
81
|
+
# timeouts.
|
82
|
+
#
|
83
|
+
# @option options [required, String] :region
|
84
|
+
# The AWS region to connect to. The configured `:region` is
|
85
|
+
# used to determine the service `:endpoint`. When not passed,
|
86
|
+
# a default `:region` is search for in the following locations:
|
87
|
+
#
|
88
|
+
# * `Aws.config[:region]`
|
89
|
+
# * `ENV['AWS_REGION']`
|
90
|
+
# * `ENV['AMAZON_REGION']`
|
91
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
92
|
+
# * `~/.aws/credentials`
|
93
|
+
# * `~/.aws/config`
|
94
|
+
#
|
95
|
+
# @option options [String] :access_key_id
|
96
|
+
#
|
97
|
+
# @option options [Boolean] :convert_params (true)
|
98
|
+
# When `true`, an attempt is made to coerce request parameters into
|
99
|
+
# the required types.
|
100
|
+
#
|
101
|
+
# @option options [String] :endpoint
|
102
|
+
# The client endpoint is normally constructed from the `:region`
|
103
|
+
# option. You should only configure an `:endpoint` when connecting
|
104
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
105
|
+
#
|
106
|
+
# @option options [Proc] :event_stream_handler
|
107
|
+
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
108
|
+
#
|
109
|
+
# @option options [Proc] :input_event_stream_handler
|
110
|
+
# When an EventStream or Proc object is provided, it can be used for sending events for the event stream.
|
111
|
+
#
|
112
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
113
|
+
# The log formatter.
|
114
|
+
#
|
115
|
+
# @option options [Symbol] :log_level (:info)
|
116
|
+
# The log level to send messages to the `:logger` at.
|
117
|
+
#
|
118
|
+
# @option options [Logger] :logger
|
119
|
+
# The Logger instance to send log messages to. If this option
|
120
|
+
# is not set, logging will be disabled.
|
121
|
+
#
|
122
|
+
# @option options [Proc] :output_event_stream_handler
|
123
|
+
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
124
|
+
#
|
125
|
+
# @option options [String] :profile ("default")
|
126
|
+
# Used when loading credentials from the shared credentials file
|
127
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
128
|
+
#
|
129
|
+
# @option options [Float] :retry_base_delay (0.3)
|
130
|
+
# The base delay in seconds used by the default backoff function.
|
131
|
+
#
|
132
|
+
# @option options [Symbol] :retry_jitter (:none)
|
133
|
+
# 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.
|
134
|
+
#
|
135
|
+
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
136
|
+
#
|
137
|
+
# @option options [Integer] :retry_limit (3)
|
138
|
+
# The maximum number of times to retry failed requests. Only
|
139
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
140
|
+
# are retried. Generally, these are throttling errors, data
|
141
|
+
# checksum errors, networking errors, timeout errors and auth
|
142
|
+
# errors from expired credentials.
|
143
|
+
#
|
144
|
+
# @option options [Integer] :retry_max_delay (0)
|
145
|
+
# The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
|
146
|
+
#
|
147
|
+
# @option options [String] :secret_access_key
|
148
|
+
#
|
149
|
+
# @option options [String] :session_token
|
150
|
+
#
|
151
|
+
# @option options [Boolean] :simple_json (false)
|
152
|
+
# Disables request parameter conversion, validation, and formatting.
|
153
|
+
# Also disable response data type conversions. This option is useful
|
154
|
+
# when you want to ensure the highest level of performance by
|
155
|
+
# avoiding overhead of walking request parameters and response data
|
156
|
+
# structures.
|
157
|
+
#
|
158
|
+
# When `:simple_json` is enabled, the request parameters hash must
|
159
|
+
# be formatted exactly as the DynamoDB API expects.
|
160
|
+
#
|
161
|
+
# @option options [Boolean] :stub_responses (false)
|
162
|
+
# Causes the client to return stubbed responses. By default
|
163
|
+
# fake responses are generated and returned. You can specify
|
164
|
+
# the response data to return or errors to raise by calling
|
165
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
166
|
+
#
|
167
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
168
|
+
# requests are made, and retries are disabled.
|
169
|
+
#
|
170
|
+
# @option options [Boolean] :validate_params (true)
|
171
|
+
# When `true`, request parameters are validated before
|
172
|
+
# sending the request.
|
173
|
+
#
|
174
|
+
def initialize(*args)
|
175
|
+
unless RUBY_VERSION >= '2.1'
|
176
|
+
raise "API operations over HTTP2 protocol is not supported"\
|
177
|
+
" for Ruby Version < 2.1"
|
178
|
+
end
|
179
|
+
super
|
180
|
+
end
|
181
|
+
|
182
|
+
# @!group API Operations
|
183
|
+
|
184
|
+
# Call this operation from your consumer after you call
|
185
|
+
# RegisterStreamConsumer to register the consumer with Kinesis Data
|
186
|
+
# Streams. If the call succeeds, your consumer starts receiving events
|
187
|
+
# of type SubscribeToShardEvent for up to 5 minutes, after which time
|
188
|
+
# you need to call `SubscribeToShard` again to renew the subscription if
|
189
|
+
# you want to continue to receive records.
|
190
|
+
#
|
191
|
+
# You can make one call to `SubscribeToShard` per second per
|
192
|
+
# `ConsumerARN`. If your call succeeds, and then you call the operation
|
193
|
+
# again less than 5 seconds later, the second call generates a
|
194
|
+
# ResourceInUseException. If you call the operation a second time more
|
195
|
+
# than 5 seconds after the first call succeeds, the second call succeeds
|
196
|
+
# and the first connection gets shut down.
|
197
|
+
#
|
198
|
+
# @option params [required, String] :consumer_arn
|
199
|
+
# For this parameter, use the value you obtained when you called
|
200
|
+
# RegisterStreamConsumer.
|
201
|
+
#
|
202
|
+
# @option params [required, String] :shard_id
|
203
|
+
# The ID of the shard you want to subscribe to. To see a list of all the
|
204
|
+
# shards for a given stream, use ListShards.
|
205
|
+
#
|
206
|
+
# @option params [required, Types::StartingPosition] :starting_position
|
207
|
+
#
|
208
|
+
# @return [Types::SubscribeToShardOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
209
|
+
#
|
210
|
+
# * {Types::SubscribeToShardOutput#event_stream #event_stream} => Types::SubscribeToShardEventStream
|
211
|
+
#
|
212
|
+
# @example EventStream Operation Example
|
213
|
+
#
|
214
|
+
# You can process event once it arrives immediately, or wait until
|
215
|
+
# full response complete and iterate through eventstream enumerator.
|
216
|
+
#
|
217
|
+
# To interact with event immediately, you need to register #subscribe_to_shard
|
218
|
+
# with callbacks, callbacks can be register for specifc events or for all events,
|
219
|
+
# callback for errors in the event stream is also available for register.
|
220
|
+
#
|
221
|
+
# Callbacks can be passed in by `:event_stream_handler` option or within block
|
222
|
+
# statement attached to #subscribe_to_shard call directly. Hybrid pattern of both
|
223
|
+
# is also supported.
|
224
|
+
#
|
225
|
+
# `:event_stream_handler` option takes in either Proc object or
|
226
|
+
# Aws::Kinesis::EventStreams::SubscribeToShardEventStream object.
|
227
|
+
#
|
228
|
+
# Usage pattern a): callbacks with a block attached to #subscribe_to_shard
|
229
|
+
# Example for registering callbacks for all event types and error event
|
230
|
+
#
|
231
|
+
# client.subscribe_to_shard( # params input# ) do |stream|
|
232
|
+
# stream.on_error_event do |event|
|
233
|
+
# # catch unmodeled error event in the stream
|
234
|
+
# raise event
|
235
|
+
# # => Aws::Errors::EventError
|
236
|
+
# # event.event_type => :error
|
237
|
+
# # event.error_code => String
|
238
|
+
# # event.error_message => String
|
239
|
+
# end
|
240
|
+
#
|
241
|
+
# stream.on_event do |event|
|
242
|
+
# # process all events arrive
|
243
|
+
# puts event.event_type
|
244
|
+
# ...
|
245
|
+
# end
|
246
|
+
#
|
247
|
+
# end
|
248
|
+
#
|
249
|
+
# Usage pattern b): pass in `:event_stream_handler` for #subscribe_to_shard
|
250
|
+
#
|
251
|
+
# 1) create a Aws::Kinesis::EventStreams::SubscribeToShardEventStream object
|
252
|
+
# Example for registering callbacks with specific events
|
253
|
+
#
|
254
|
+
# handler = Aws::Kinesis::EventStreams::SubscribeToShardEventStream.new
|
255
|
+
# handler.on_subscribe_to_shard_event_event do |event|
|
256
|
+
# event # => Aws::Kinesis::Types::SubscribeToShardEvent
|
257
|
+
# end
|
258
|
+
# handler.on_resource_not_found_exception_event do |event|
|
259
|
+
# event # => Aws::Kinesis::Types::ResourceNotFoundException
|
260
|
+
# end
|
261
|
+
# handler.on_resource_in_use_exception_event do |event|
|
262
|
+
# event # => Aws::Kinesis::Types::ResourceInUseException
|
263
|
+
# end
|
264
|
+
# handler.on_kms_disabled_exception_event do |event|
|
265
|
+
# event # => Aws::Kinesis::Types::KMSDisabledException
|
266
|
+
# end
|
267
|
+
# handler.on_kms_invalid_state_exception_event do |event|
|
268
|
+
# event # => Aws::Kinesis::Types::KMSInvalidStateException
|
269
|
+
# end
|
270
|
+
# handler.on_kms_access_denied_exception_event do |event|
|
271
|
+
# event # => Aws::Kinesis::Types::KMSAccessDeniedException
|
272
|
+
# end
|
273
|
+
# handler.on_kms_not_found_exception_event do |event|
|
274
|
+
# event # => Aws::Kinesis::Types::KMSNotFoundException
|
275
|
+
# end
|
276
|
+
# handler.on_kms_opt_in_required_event do |event|
|
277
|
+
# event # => Aws::Kinesis::Types::KMSOptInRequired
|
278
|
+
# end
|
279
|
+
# handler.on_kms_throttling_exception_event do |event|
|
280
|
+
# event # => Aws::Kinesis::Types::KMSThrottlingException
|
281
|
+
# end
|
282
|
+
# handler.on_internal_failure_exception_event do |event|
|
283
|
+
# event # => Aws::Kinesis::Types::InternalFailureException
|
284
|
+
# end
|
285
|
+
#
|
286
|
+
# client.subscribe_to_shard( # params input #, event_stream_handler: handler)
|
287
|
+
#
|
288
|
+
# 2) use a Ruby Proc object
|
289
|
+
# Example for registering callbacks with specific events
|
290
|
+
#
|
291
|
+
# handler = Proc.new do |stream|
|
292
|
+
# stream.on_subscribe_to_shard_event_event do |event|
|
293
|
+
# event # => Aws::Kinesis::Types::SubscribeToShardEvent
|
294
|
+
# end
|
295
|
+
# stream.on_resource_not_found_exception_event do |event|
|
296
|
+
# event # => Aws::Kinesis::Types::ResourceNotFoundException
|
297
|
+
# end
|
298
|
+
# stream.on_resource_in_use_exception_event do |event|
|
299
|
+
# event # => Aws::Kinesis::Types::ResourceInUseException
|
300
|
+
# end
|
301
|
+
# stream.on_kms_disabled_exception_event do |event|
|
302
|
+
# event # => Aws::Kinesis::Types::KMSDisabledException
|
303
|
+
# end
|
304
|
+
# stream.on_kms_invalid_state_exception_event do |event|
|
305
|
+
# event # => Aws::Kinesis::Types::KMSInvalidStateException
|
306
|
+
# end
|
307
|
+
# stream.on_kms_access_denied_exception_event do |event|
|
308
|
+
# event # => Aws::Kinesis::Types::KMSAccessDeniedException
|
309
|
+
# end
|
310
|
+
# stream.on_kms_not_found_exception_event do |event|
|
311
|
+
# event # => Aws::Kinesis::Types::KMSNotFoundException
|
312
|
+
# end
|
313
|
+
# stream.on_kms_opt_in_required_event do |event|
|
314
|
+
# event # => Aws::Kinesis::Types::KMSOptInRequired
|
315
|
+
# end
|
316
|
+
# stream.on_kms_throttling_exception_event do |event|
|
317
|
+
# event # => Aws::Kinesis::Types::KMSThrottlingException
|
318
|
+
# end
|
319
|
+
# stream.on_internal_failure_exception_event do |event|
|
320
|
+
# event # => Aws::Kinesis::Types::InternalFailureException
|
321
|
+
# end
|
322
|
+
# end
|
323
|
+
#
|
324
|
+
# client.subscribe_to_shard( # params input #, event_stream_handler: handler)
|
325
|
+
#
|
326
|
+
# Usage pattern c): hybird pattern of a) and b)
|
327
|
+
#
|
328
|
+
# handler = Aws::Kinesis::EventStreams::SubscribeToShardEventStream.new
|
329
|
+
# handler.on_subscribe_to_shard_event_event do |event|
|
330
|
+
# event # => Aws::Kinesis::Types::SubscribeToShardEvent
|
331
|
+
# end
|
332
|
+
# handler.on_resource_not_found_exception_event do |event|
|
333
|
+
# event # => Aws::Kinesis::Types::ResourceNotFoundException
|
334
|
+
# end
|
335
|
+
# handler.on_resource_in_use_exception_event do |event|
|
336
|
+
# event # => Aws::Kinesis::Types::ResourceInUseException
|
337
|
+
# end
|
338
|
+
# handler.on_kms_disabled_exception_event do |event|
|
339
|
+
# event # => Aws::Kinesis::Types::KMSDisabledException
|
340
|
+
# end
|
341
|
+
# handler.on_kms_invalid_state_exception_event do |event|
|
342
|
+
# event # => Aws::Kinesis::Types::KMSInvalidStateException
|
343
|
+
# end
|
344
|
+
# handler.on_kms_access_denied_exception_event do |event|
|
345
|
+
# event # => Aws::Kinesis::Types::KMSAccessDeniedException
|
346
|
+
# end
|
347
|
+
# handler.on_kms_not_found_exception_event do |event|
|
348
|
+
# event # => Aws::Kinesis::Types::KMSNotFoundException
|
349
|
+
# end
|
350
|
+
# handler.on_kms_opt_in_required_event do |event|
|
351
|
+
# event # => Aws::Kinesis::Types::KMSOptInRequired
|
352
|
+
# end
|
353
|
+
# handler.on_kms_throttling_exception_event do |event|
|
354
|
+
# event # => Aws::Kinesis::Types::KMSThrottlingException
|
355
|
+
# end
|
356
|
+
# handler.on_internal_failure_exception_event do |event|
|
357
|
+
# event # => Aws::Kinesis::Types::InternalFailureException
|
358
|
+
# end
|
359
|
+
#
|
360
|
+
# client.subscribe_to_shard( # params input #, event_stream_handler: handler) do |stream|
|
361
|
+
# stream.on_error_event do |event|
|
362
|
+
# # catch unmodeled error event in the stream
|
363
|
+
# raise event
|
364
|
+
# # => Aws::Errors::EventError
|
365
|
+
# # event.event_type => :error
|
366
|
+
# # event.error_code => String
|
367
|
+
# # event.error_message => String
|
368
|
+
# end
|
369
|
+
# end
|
370
|
+
#
|
371
|
+
# Besides above usage patterns for process events when they arrive immediately, you can also
|
372
|
+
# iterate through events after response complete.
|
373
|
+
#
|
374
|
+
# Events are available at resp.event_stream # => Enumerator
|
375
|
+
# For parameter input example, please refer to following request syntax
|
376
|
+
#
|
377
|
+
# @example Request syntax with placeholder values
|
378
|
+
#
|
379
|
+
# async_resp = async_client.subscribe_to_shard({
|
380
|
+
# consumer_arn: "ConsumerARN", # required
|
381
|
+
# shard_id: "ShardId", # required
|
382
|
+
# starting_position: { # required
|
383
|
+
# type: "AT_SEQUENCE_NUMBER", # required, accepts AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP
|
384
|
+
# sequence_number: "SequenceNumber",
|
385
|
+
# timestamp: Time.now,
|
386
|
+
# },
|
387
|
+
# })
|
388
|
+
# # => Seahorse::Client::AsyncResponse
|
389
|
+
# async_resp.wait
|
390
|
+
# # => Seahorse::Client::Response
|
391
|
+
# # Or use async_resp.join!
|
392
|
+
#
|
393
|
+
# @example Response structure
|
394
|
+
#
|
395
|
+
# All events are available at resp.event_stream:
|
396
|
+
# resp.event_stream #=> Enumerator
|
397
|
+
# resp.event_stream.event_types #=> [:subscribe_to_shard_event, :resource_not_found_exception, :resource_in_use_exception, :kms_disabled_exception, :kms_invalid_state_exception, :kms_access_denied_exception, :kms_not_found_exception, :kms_opt_in_required, :kms_throttling_exception, :internal_failure_exception]
|
398
|
+
#
|
399
|
+
# For :subscribe_to_shard_event event available at #on_subscribe_to_shard_event_event callback and response eventstream enumerator:
|
400
|
+
# event.records #=> Array
|
401
|
+
# event.records[0].sequence_number #=> String
|
402
|
+
# event.records[0].approximate_arrival_timestamp #=> Time
|
403
|
+
# event.records[0].data #=> String
|
404
|
+
# event.records[0].partition_key #=> String
|
405
|
+
# event.records[0].encryption_type #=> String, one of "NONE", "KMS"
|
406
|
+
# event.continuation_sequence_number #=> String
|
407
|
+
# event.millis_behind_latest #=> Integer
|
408
|
+
#
|
409
|
+
# For :resource_not_found_exception event available at #on_resource_not_found_exception_event callback and response eventstream enumerator:
|
410
|
+
# event.message #=> String
|
411
|
+
#
|
412
|
+
# For :resource_in_use_exception event available at #on_resource_in_use_exception_event callback and response eventstream enumerator:
|
413
|
+
# event.message #=> String
|
414
|
+
#
|
415
|
+
# For :kms_disabled_exception event available at #on_kms_disabled_exception_event callback and response eventstream enumerator:
|
416
|
+
# event.message #=> String
|
417
|
+
#
|
418
|
+
# For :kms_invalid_state_exception event available at #on_kms_invalid_state_exception_event callback and response eventstream enumerator:
|
419
|
+
# event.message #=> String
|
420
|
+
#
|
421
|
+
# For :kms_access_denied_exception event available at #on_kms_access_denied_exception_event callback and response eventstream enumerator:
|
422
|
+
# event.message #=> String
|
423
|
+
#
|
424
|
+
# For :kms_not_found_exception event available at #on_kms_not_found_exception_event callback and response eventstream enumerator:
|
425
|
+
# event.message #=> String
|
426
|
+
#
|
427
|
+
# For :kms_opt_in_required event available at #on_kms_opt_in_required_event callback and response eventstream enumerator:
|
428
|
+
# event.message #=> String
|
429
|
+
#
|
430
|
+
# For :kms_throttling_exception event available at #on_kms_throttling_exception_event callback and response eventstream enumerator:
|
431
|
+
# event.message #=> String
|
432
|
+
#
|
433
|
+
# For :internal_failure_exception event available at #on_internal_failure_exception_event callback and response eventstream enumerator:
|
434
|
+
# event.message #=> String
|
435
|
+
#
|
436
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SubscribeToShard AWS API Documentation
|
437
|
+
#
|
438
|
+
# @overload subscribe_to_shard(params = {})
|
439
|
+
# @param [Hash] params ({})
|
440
|
+
def subscribe_to_shard(params = {}, options = {})
|
441
|
+
params = params.dup
|
442
|
+
output_event_stream_handler = _event_stream_handler(
|
443
|
+
:output,
|
444
|
+
params.delete(:output_event_stream_handler) || params.delete(:event_stream_handler),
|
445
|
+
EventStreams::SubscribeToShardEventStream
|
446
|
+
)
|
447
|
+
|
448
|
+
yield(output_event_stream_handler) if block_given?
|
449
|
+
|
450
|
+
req = build_request(:subscribe_to_shard, params)
|
451
|
+
|
452
|
+
req.context[:output_event_stream_handler] = output_event_stream_handler
|
453
|
+
req.handlers.add(Aws::Binary::DecodeHandler, priority: 95)
|
454
|
+
|
455
|
+
req.send_request(options)
|
456
|
+
end
|
457
|
+
|
458
|
+
# @!endgroup
|
459
|
+
|
460
|
+
# @param params ({})
|
461
|
+
# @api private
|
462
|
+
def build_request(operation_name, params = {})
|
463
|
+
handlers = @handlers.for(operation_name)
|
464
|
+
context = Seahorse::Client::RequestContext.new(
|
465
|
+
operation_name: operation_name,
|
466
|
+
operation: config.api.operation(operation_name),
|
467
|
+
client: self,
|
468
|
+
params: params,
|
469
|
+
http_response: Seahorse::Client::Http::AsyncResponse.new,
|
470
|
+
config: config)
|
471
|
+
context[:gem_name] = 'aws-sdk-kinesis'
|
472
|
+
context[:gem_version] = '1.10.0'
|
473
|
+
Seahorse::Client::Request.new(handlers, context)
|
474
|
+
end
|
475
|
+
|
476
|
+
private
|
477
|
+
|
478
|
+
def _event_stream_handler(type, handler, event_stream_class)
|
479
|
+
case handler
|
480
|
+
when event_stream_class then handler
|
481
|
+
when Proc then event_stream_class.new.tap(&handler)
|
482
|
+
when nil then event_stream_class.new
|
483
|
+
else
|
484
|
+
msg = "expected #{type}_event_stream_handler to be a block or "\
|
485
|
+
"instance of Aws::Kinesis::#{event_stream_class}"\
|
486
|
+
", got `#{handler.inspect}` instead"
|
487
|
+
raise ArgumentError, msg
|
488
|
+
end
|
489
|
+
end
|
490
|
+
|
491
|
+
class << self
|
492
|
+
|
493
|
+
# @api private
|
494
|
+
attr_reader :identifier
|
495
|
+
|
496
|
+
# @api private
|
497
|
+
def errors_module
|
498
|
+
Errors
|
499
|
+
end
|
500
|
+
|
501
|
+
end
|
502
|
+
end
|
503
|
+
end
|
@@ -25,6 +25,7 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
25
25
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
26
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
27
27
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
28
|
+
require 'aws-sdk-core/plugins/event_stream_configuration.rb'
|
28
29
|
|
29
30
|
Aws::Plugins::GlobalConfiguration.add_identifier(:kinesis)
|
30
31
|
|
@@ -57,6 +58,7 @@ module Aws::Kinesis
|
|
57
58
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
58
59
|
add_plugin(Aws::Plugins::SignatureV4)
|
59
60
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
61
|
+
add_plugin(Aws::Plugins::EventStreamConfiguration)
|
60
62
|
|
61
63
|
# @overload initialize(options)
|
62
64
|
# @param [Hash] options
|
@@ -150,6 +152,12 @@ module Aws::Kinesis
|
|
150
152
|
# @option options [Boolean] :endpoint_discovery (false)
|
151
153
|
# When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
|
152
154
|
#
|
155
|
+
# @option options [Proc] :event_stream_handler
|
156
|
+
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
157
|
+
#
|
158
|
+
# @option options [Proc] :input_event_stream_handler
|
159
|
+
# When an EventStream or Proc object is provided, it can be used for sending events for the event stream.
|
160
|
+
#
|
153
161
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
154
162
|
# The log formatter.
|
155
163
|
#
|
@@ -160,6 +168,9 @@ module Aws::Kinesis
|
|
160
168
|
# The Logger instance to send log messages to. If this option
|
161
169
|
# is not set, logging will be disabled.
|
162
170
|
#
|
171
|
+
# @option options [Proc] :output_event_stream_handler
|
172
|
+
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
173
|
+
#
|
163
174
|
# @option options [String] :profile ("default")
|
164
175
|
# Used when loading credentials from the shared credentials file
|
165
176
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
@@ -2073,7 +2084,7 @@ module Aws::Kinesis
|
|
2073
2084
|
params: params,
|
2074
2085
|
config: config)
|
2075
2086
|
context[:gem_name] = 'aws-sdk-kinesis'
|
2076
|
-
context[:gem_version] = '1.
|
2087
|
+
context[:gem_version] = '1.10.0'
|
2077
2088
|
Seahorse::Client::Request.new(handlers, context)
|
2078
2089
|
end
|
2079
2090
|
|
@@ -119,6 +119,8 @@ module Aws::Kinesis
|
|
119
119
|
StreamStatus = Shapes::StringShape.new(name: 'StreamStatus')
|
120
120
|
SubscribeToShardEvent = Shapes::StructureShape.new(name: 'SubscribeToShardEvent')
|
121
121
|
SubscribeToShardEventStream = Shapes::StructureShape.new(name: 'SubscribeToShardEventStream')
|
122
|
+
SubscribeToShardInput = Shapes::StructureShape.new(name: 'SubscribeToShardInput')
|
123
|
+
SubscribeToShardOutput = Shapes::StructureShape.new(name: 'SubscribeToShardOutput')
|
122
124
|
Tag = Shapes::StructureShape.new(name: 'Tag')
|
123
125
|
TagKey = Shapes::StringShape.new(name: 'TagKey')
|
124
126
|
TagKeyList = Shapes::ListShape.new(name: 'TagKeyList')
|
@@ -238,6 +240,27 @@ module Aws::Kinesis
|
|
238
240
|
IncreaseStreamRetentionPeriodInput.add_member(:retention_period_hours, Shapes::ShapeRef.new(shape: RetentionPeriodHours, required: true, location_name: "RetentionPeriodHours"))
|
239
241
|
IncreaseStreamRetentionPeriodInput.struct_class = Types::IncreaseStreamRetentionPeriodInput
|
240
242
|
|
243
|
+
InternalFailureException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
|
244
|
+
InternalFailureException.struct_class = Types::InternalFailureException
|
245
|
+
|
246
|
+
KMSAccessDeniedException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
|
247
|
+
KMSAccessDeniedException.struct_class = Types::KMSAccessDeniedException
|
248
|
+
|
249
|
+
KMSDisabledException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
|
250
|
+
KMSDisabledException.struct_class = Types::KMSDisabledException
|
251
|
+
|
252
|
+
KMSInvalidStateException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
|
253
|
+
KMSInvalidStateException.struct_class = Types::KMSInvalidStateException
|
254
|
+
|
255
|
+
KMSNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
|
256
|
+
KMSNotFoundException.struct_class = Types::KMSNotFoundException
|
257
|
+
|
258
|
+
KMSOptInRequired.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
|
259
|
+
KMSOptInRequired.struct_class = Types::KMSOptInRequired
|
260
|
+
|
261
|
+
KMSThrottlingException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
|
262
|
+
KMSThrottlingException.struct_class = Types::KMSThrottlingException
|
263
|
+
|
241
264
|
ListShardsInput.add_member(:stream_name, Shapes::ShapeRef.new(shape: StreamName, location_name: "StreamName"))
|
242
265
|
ListShardsInput.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
|
243
266
|
ListShardsInput.add_member(:exclusive_start_shard_id, Shapes::ShapeRef.new(shape: ShardId, location_name: "ExclusiveStartShardId"))
|
@@ -339,6 +362,12 @@ module Aws::Kinesis
|
|
339
362
|
RemoveTagsFromStreamInput.add_member(:tag_keys, Shapes::ShapeRef.new(shape: TagKeyList, required: true, location_name: "TagKeys"))
|
340
363
|
RemoveTagsFromStreamInput.struct_class = Types::RemoveTagsFromStreamInput
|
341
364
|
|
365
|
+
ResourceInUseException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
|
366
|
+
ResourceInUseException.struct_class = Types::ResourceInUseException
|
367
|
+
|
368
|
+
ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
|
369
|
+
ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
|
370
|
+
|
342
371
|
SequenceNumberRange.add_member(:starting_sequence_number, Shapes::ShapeRef.new(shape: SequenceNumber, required: true, location_name: "StartingSequenceNumber"))
|
343
372
|
SequenceNumberRange.add_member(:ending_sequence_number, Shapes::ShapeRef.new(shape: SequenceNumber, location_name: "EndingSequenceNumber"))
|
344
373
|
SequenceNumberRange.struct_class = Types::SequenceNumberRange
|
@@ -404,17 +433,25 @@ module Aws::Kinesis
|
|
404
433
|
SubscribeToShardEvent.struct_class = Types::SubscribeToShardEvent
|
405
434
|
|
406
435
|
SubscribeToShardEventStream.add_member(:subscribe_to_shard_event, Shapes::ShapeRef.new(shape: SubscribeToShardEvent, required: true, event: true, location_name: "SubscribeToShardEvent"))
|
407
|
-
SubscribeToShardEventStream.add_member(:resource_not_found_exception, Shapes::ShapeRef.new(shape: ResourceNotFoundException, location_name: "ResourceNotFoundException"))
|
408
|
-
SubscribeToShardEventStream.add_member(:resource_in_use_exception, Shapes::ShapeRef.new(shape: ResourceInUseException, location_name: "ResourceInUseException"))
|
409
|
-
SubscribeToShardEventStream.add_member(:kms_disabled_exception, Shapes::ShapeRef.new(shape: KMSDisabledException, location_name: "KMSDisabledException"))
|
410
|
-
SubscribeToShardEventStream.add_member(:kms_invalid_state_exception, Shapes::ShapeRef.new(shape: KMSInvalidStateException, location_name: "KMSInvalidStateException"))
|
411
|
-
SubscribeToShardEventStream.add_member(:kms_access_denied_exception, Shapes::ShapeRef.new(shape: KMSAccessDeniedException, location_name: "KMSAccessDeniedException"))
|
412
|
-
SubscribeToShardEventStream.add_member(:kms_not_found_exception, Shapes::ShapeRef.new(shape: KMSNotFoundException, location_name: "KMSNotFoundException"))
|
413
|
-
SubscribeToShardEventStream.add_member(:kms_opt_in_required, Shapes::ShapeRef.new(shape: KMSOptInRequired, location_name: "KMSOptInRequired"))
|
414
|
-
SubscribeToShardEventStream.add_member(:kms_throttling_exception, Shapes::ShapeRef.new(shape: KMSThrottlingException, location_name: "KMSThrottlingException"))
|
415
|
-
SubscribeToShardEventStream.add_member(:internal_failure_exception, Shapes::ShapeRef.new(shape: InternalFailureException, location_name: "InternalFailureException"))
|
436
|
+
SubscribeToShardEventStream.add_member(:resource_not_found_exception, Shapes::ShapeRef.new(shape: ResourceNotFoundException, event: true, location_name: "ResourceNotFoundException"))
|
437
|
+
SubscribeToShardEventStream.add_member(:resource_in_use_exception, Shapes::ShapeRef.new(shape: ResourceInUseException, event: true, location_name: "ResourceInUseException"))
|
438
|
+
SubscribeToShardEventStream.add_member(:kms_disabled_exception, Shapes::ShapeRef.new(shape: KMSDisabledException, event: true, location_name: "KMSDisabledException"))
|
439
|
+
SubscribeToShardEventStream.add_member(:kms_invalid_state_exception, Shapes::ShapeRef.new(shape: KMSInvalidStateException, event: true, location_name: "KMSInvalidStateException"))
|
440
|
+
SubscribeToShardEventStream.add_member(:kms_access_denied_exception, Shapes::ShapeRef.new(shape: KMSAccessDeniedException, event: true, location_name: "KMSAccessDeniedException"))
|
441
|
+
SubscribeToShardEventStream.add_member(:kms_not_found_exception, Shapes::ShapeRef.new(shape: KMSNotFoundException, event: true, location_name: "KMSNotFoundException"))
|
442
|
+
SubscribeToShardEventStream.add_member(:kms_opt_in_required, Shapes::ShapeRef.new(shape: KMSOptInRequired, event: true, location_name: "KMSOptInRequired"))
|
443
|
+
SubscribeToShardEventStream.add_member(:kms_throttling_exception, Shapes::ShapeRef.new(shape: KMSThrottlingException, event: true, location_name: "KMSThrottlingException"))
|
444
|
+
SubscribeToShardEventStream.add_member(:internal_failure_exception, Shapes::ShapeRef.new(shape: InternalFailureException, event: true, location_name: "InternalFailureException"))
|
416
445
|
SubscribeToShardEventStream.struct_class = Types::SubscribeToShardEventStream
|
417
446
|
|
447
|
+
SubscribeToShardInput.add_member(:consumer_arn, Shapes::ShapeRef.new(shape: ConsumerARN, required: true, location_name: "ConsumerARN"))
|
448
|
+
SubscribeToShardInput.add_member(:shard_id, Shapes::ShapeRef.new(shape: ShardId, required: true, location_name: "ShardId"))
|
449
|
+
SubscribeToShardInput.add_member(:starting_position, Shapes::ShapeRef.new(shape: StartingPosition, required: true, location_name: "StartingPosition"))
|
450
|
+
SubscribeToShardInput.struct_class = Types::SubscribeToShardInput
|
451
|
+
|
452
|
+
SubscribeToShardOutput.add_member(:event_stream, Shapes::ShapeRef.new(shape: SubscribeToShardEventStream, required: true, eventstream: true, location_name: "EventStream"))
|
453
|
+
SubscribeToShardOutput.struct_class = Types::SubscribeToShardOutput
|
454
|
+
|
418
455
|
Tag.add_member(:key, Shapes::ShapeRef.new(shape: TagKey, required: true, location_name: "Key"))
|
419
456
|
Tag.add_member(:value, Shapes::ShapeRef.new(shape: TagValue, location_name: "Value"))
|
420
457
|
Tag.struct_class = Types::Tag
|
@@ -796,6 +833,19 @@ module Aws::Kinesis
|
|
796
833
|
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
797
834
|
end)
|
798
835
|
|
836
|
+
api.add_operation(:subscribe_to_shard, Seahorse::Model::Operation.new.tap do |o|
|
837
|
+
o.name = "SubscribeToShard"
|
838
|
+
o.http_method = "POST"
|
839
|
+
o.http_request_uri = "/"
|
840
|
+
o.input = Shapes::ShapeRef.new(shape: SubscribeToShardInput)
|
841
|
+
o.output = Shapes::ShapeRef.new(shape: SubscribeToShardOutput)
|
842
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
843
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidArgumentException)
|
844
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceInUseException)
|
845
|
+
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
|
846
|
+
o.async = true
|
847
|
+
end)
|
848
|
+
|
799
849
|
api.add_operation(:update_shard_count, Seahorse::Model::Operation.new.tap do |o|
|
800
850
|
o.name = "UpdateShardCount"
|
801
851
|
o.http_method = "POST"
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::Kinesis
|
9
|
+
module EventStreams
|
10
|
+
class SubscribeToShardEventStream
|
11
|
+
|
12
|
+
def initialize
|
13
|
+
@event_emitter = Aws::EventEmitter.new
|
14
|
+
end
|
15
|
+
|
16
|
+
def on_subscribe_to_shard_event_event(&block)
|
17
|
+
@event_emitter.on(:subscribe_to_shard_event, Proc.new)
|
18
|
+
end
|
19
|
+
|
20
|
+
def on_resource_not_found_exception_event(&block)
|
21
|
+
@event_emitter.on(:resource_not_found_exception, Proc.new)
|
22
|
+
end
|
23
|
+
|
24
|
+
def on_resource_in_use_exception_event(&block)
|
25
|
+
@event_emitter.on(:resource_in_use_exception, Proc.new)
|
26
|
+
end
|
27
|
+
|
28
|
+
def on_kms_disabled_exception_event(&block)
|
29
|
+
@event_emitter.on(:kms_disabled_exception, Proc.new)
|
30
|
+
end
|
31
|
+
|
32
|
+
def on_kms_invalid_state_exception_event(&block)
|
33
|
+
@event_emitter.on(:kms_invalid_state_exception, Proc.new)
|
34
|
+
end
|
35
|
+
|
36
|
+
def on_kms_access_denied_exception_event(&block)
|
37
|
+
@event_emitter.on(:kms_access_denied_exception, Proc.new)
|
38
|
+
end
|
39
|
+
|
40
|
+
def on_kms_not_found_exception_event(&block)
|
41
|
+
@event_emitter.on(:kms_not_found_exception, Proc.new)
|
42
|
+
end
|
43
|
+
|
44
|
+
def on_kms_opt_in_required_event(&block)
|
45
|
+
@event_emitter.on(:kms_opt_in_required, Proc.new)
|
46
|
+
end
|
47
|
+
|
48
|
+
def on_kms_throttling_exception_event(&block)
|
49
|
+
@event_emitter.on(:kms_throttling_exception, Proc.new)
|
50
|
+
end
|
51
|
+
|
52
|
+
def on_internal_failure_exception_event(&block)
|
53
|
+
@event_emitter.on(:internal_failure_exception, Proc.new)
|
54
|
+
end
|
55
|
+
|
56
|
+
def on_error_event(&block)
|
57
|
+
@event_emitter.on(:error, Proc.new)
|
58
|
+
end
|
59
|
+
|
60
|
+
def on_initial_response_event(&block)
|
61
|
+
@event_emitter.on(:initial_response, Proc.new)
|
62
|
+
end
|
63
|
+
|
64
|
+
def on_event(&block)
|
65
|
+
on_subscribe_to_shard_event_event(&block)
|
66
|
+
on_resource_not_found_exception_event(&block)
|
67
|
+
on_resource_in_use_exception_event(&block)
|
68
|
+
on_kms_disabled_exception_event(&block)
|
69
|
+
on_kms_invalid_state_exception_event(&block)
|
70
|
+
on_kms_access_denied_exception_event(&block)
|
71
|
+
on_kms_not_found_exception_event(&block)
|
72
|
+
on_kms_opt_in_required_event(&block)
|
73
|
+
on_kms_throttling_exception_event(&block)
|
74
|
+
on_internal_failure_exception_event(&block)
|
75
|
+
on_error_event(&block)
|
76
|
+
on_initial_response_event(&block)
|
77
|
+
end
|
78
|
+
|
79
|
+
# @api private
|
80
|
+
# @return Aws::EventEmitter
|
81
|
+
attr_reader :event_emitter
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
@@ -755,6 +755,117 @@ module Aws::Kinesis
|
|
755
755
|
include Aws::Structure
|
756
756
|
end
|
757
757
|
|
758
|
+
# @!attribute [rw] message
|
759
|
+
# @return [String]
|
760
|
+
#
|
761
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/InternalFailureException AWS API Documentation
|
762
|
+
#
|
763
|
+
class InternalFailureException < Struct.new(
|
764
|
+
:message,
|
765
|
+
:event_type)
|
766
|
+
include Aws::Structure
|
767
|
+
end
|
768
|
+
|
769
|
+
# The ciphertext references a key that doesn't exist or that you don't
|
770
|
+
# have access to.
|
771
|
+
#
|
772
|
+
# @!attribute [rw] message
|
773
|
+
# A message that provides information about the error.
|
774
|
+
# @return [String]
|
775
|
+
#
|
776
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/KMSAccessDeniedException AWS API Documentation
|
777
|
+
#
|
778
|
+
class KMSAccessDeniedException < Struct.new(
|
779
|
+
:message,
|
780
|
+
:event_type)
|
781
|
+
include Aws::Structure
|
782
|
+
end
|
783
|
+
|
784
|
+
# The request was rejected because the specified customer master key
|
785
|
+
# (CMK) isn't enabled.
|
786
|
+
#
|
787
|
+
# @!attribute [rw] message
|
788
|
+
# A message that provides information about the error.
|
789
|
+
# @return [String]
|
790
|
+
#
|
791
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/KMSDisabledException AWS API Documentation
|
792
|
+
#
|
793
|
+
class KMSDisabledException < Struct.new(
|
794
|
+
:message,
|
795
|
+
:event_type)
|
796
|
+
include Aws::Structure
|
797
|
+
end
|
798
|
+
|
799
|
+
# The request was rejected because the state of the specified resource
|
800
|
+
# isn't valid for this request. For more information, see [How Key
|
801
|
+
# State Affects Use of a Customer Master Key][1] in the *AWS Key
|
802
|
+
# Management Service Developer Guide*.
|
803
|
+
#
|
804
|
+
#
|
805
|
+
#
|
806
|
+
# [1]: http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
|
807
|
+
#
|
808
|
+
# @!attribute [rw] message
|
809
|
+
# A message that provides information about the error.
|
810
|
+
# @return [String]
|
811
|
+
#
|
812
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/KMSInvalidStateException AWS API Documentation
|
813
|
+
#
|
814
|
+
class KMSInvalidStateException < Struct.new(
|
815
|
+
:message,
|
816
|
+
:event_type)
|
817
|
+
include Aws::Structure
|
818
|
+
end
|
819
|
+
|
820
|
+
# The request was rejected because the specified entity or resource
|
821
|
+
# can't be found.
|
822
|
+
#
|
823
|
+
# @!attribute [rw] message
|
824
|
+
# A message that provides information about the error.
|
825
|
+
# @return [String]
|
826
|
+
#
|
827
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/KMSNotFoundException AWS API Documentation
|
828
|
+
#
|
829
|
+
class KMSNotFoundException < Struct.new(
|
830
|
+
:message,
|
831
|
+
:event_type)
|
832
|
+
include Aws::Structure
|
833
|
+
end
|
834
|
+
|
835
|
+
# The AWS access key ID needs a subscription for the service.
|
836
|
+
#
|
837
|
+
# @!attribute [rw] message
|
838
|
+
# A message that provides information about the error.
|
839
|
+
# @return [String]
|
840
|
+
#
|
841
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/KMSOptInRequired AWS API Documentation
|
842
|
+
#
|
843
|
+
class KMSOptInRequired < Struct.new(
|
844
|
+
:message,
|
845
|
+
:event_type)
|
846
|
+
include Aws::Structure
|
847
|
+
end
|
848
|
+
|
849
|
+
# The request was denied due to request throttling. For more information
|
850
|
+
# about throttling, see [Limits][1] in the *AWS Key Management Service
|
851
|
+
# Developer Guide*.
|
852
|
+
#
|
853
|
+
#
|
854
|
+
#
|
855
|
+
# [1]: http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second
|
856
|
+
#
|
857
|
+
# @!attribute [rw] message
|
858
|
+
# A message that provides information about the error.
|
859
|
+
# @return [String]
|
860
|
+
#
|
861
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/KMSThrottlingException AWS API Documentation
|
862
|
+
#
|
863
|
+
class KMSThrottlingException < Struct.new(
|
864
|
+
:message,
|
865
|
+
:event_type)
|
866
|
+
include Aws::Structure
|
867
|
+
end
|
868
|
+
|
758
869
|
# @note When making an API call, you may pass ListShardsInput
|
759
870
|
# data as a hash:
|
760
871
|
#
|
@@ -1475,6 +1586,36 @@ module Aws::Kinesis
|
|
1475
1586
|
include Aws::Structure
|
1476
1587
|
end
|
1477
1588
|
|
1589
|
+
# The resource is not available for this operation. For successful
|
1590
|
+
# operation, the resource must be in the `ACTIVE` state.
|
1591
|
+
#
|
1592
|
+
# @!attribute [rw] message
|
1593
|
+
# A message that provides information about the error.
|
1594
|
+
# @return [String]
|
1595
|
+
#
|
1596
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ResourceInUseException AWS API Documentation
|
1597
|
+
#
|
1598
|
+
class ResourceInUseException < Struct.new(
|
1599
|
+
:message,
|
1600
|
+
:event_type)
|
1601
|
+
include Aws::Structure
|
1602
|
+
end
|
1603
|
+
|
1604
|
+
# The requested resource could not be found. The stream might not be
|
1605
|
+
# specified correctly.
|
1606
|
+
#
|
1607
|
+
# @!attribute [rw] message
|
1608
|
+
# A message that provides information about the error.
|
1609
|
+
# @return [String]
|
1610
|
+
#
|
1611
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/ResourceNotFoundException AWS API Documentation
|
1612
|
+
#
|
1613
|
+
class ResourceNotFoundException < Struct.new(
|
1614
|
+
:message,
|
1615
|
+
:event_type)
|
1616
|
+
include Aws::Structure
|
1617
|
+
end
|
1618
|
+
|
1478
1619
|
# The range of possible sequence numbers for the shard.
|
1479
1620
|
#
|
1480
1621
|
# @!attribute [rw] starting_sequence_number
|
@@ -1614,6 +1755,15 @@ module Aws::Kinesis
|
|
1614
1755
|
include Aws::Structure
|
1615
1756
|
end
|
1616
1757
|
|
1758
|
+
# @note When making an API call, you may pass StartingPosition
|
1759
|
+
# data as a hash:
|
1760
|
+
#
|
1761
|
+
# {
|
1762
|
+
# type: "AT_SEQUENCE_NUMBER", # required, accepts AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP
|
1763
|
+
# sequence_number: "SequenceNumber",
|
1764
|
+
# timestamp: Time.now,
|
1765
|
+
# }
|
1766
|
+
#
|
1617
1767
|
# @!attribute [rw] type
|
1618
1768
|
# @return [String]
|
1619
1769
|
#
|
@@ -1900,6 +2050,53 @@ module Aws::Kinesis
|
|
1900
2050
|
include Aws::Structure
|
1901
2051
|
end
|
1902
2052
|
|
2053
|
+
# @note When making an API call, you may pass SubscribeToShardInput
|
2054
|
+
# data as a hash:
|
2055
|
+
#
|
2056
|
+
# {
|
2057
|
+
# consumer_arn: "ConsumerARN", # required
|
2058
|
+
# shard_id: "ShardId", # required
|
2059
|
+
# starting_position: { # required
|
2060
|
+
# type: "AT_SEQUENCE_NUMBER", # required, accepts AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST, AT_TIMESTAMP
|
2061
|
+
# sequence_number: "SequenceNumber",
|
2062
|
+
# timestamp: Time.now,
|
2063
|
+
# },
|
2064
|
+
# }
|
2065
|
+
#
|
2066
|
+
# @!attribute [rw] consumer_arn
|
2067
|
+
# For this parameter, use the value you obtained when you called
|
2068
|
+
# RegisterStreamConsumer.
|
2069
|
+
# @return [String]
|
2070
|
+
#
|
2071
|
+
# @!attribute [rw] shard_id
|
2072
|
+
# The ID of the shard you want to subscribe to. To see a list of all
|
2073
|
+
# the shards for a given stream, use ListShards.
|
2074
|
+
# @return [String]
|
2075
|
+
#
|
2076
|
+
# @!attribute [rw] starting_position
|
2077
|
+
# @return [Types::StartingPosition]
|
2078
|
+
#
|
2079
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SubscribeToShardInput AWS API Documentation
|
2080
|
+
#
|
2081
|
+
class SubscribeToShardInput < Struct.new(
|
2082
|
+
:consumer_arn,
|
2083
|
+
:shard_id,
|
2084
|
+
:starting_position)
|
2085
|
+
include Aws::Structure
|
2086
|
+
end
|
2087
|
+
|
2088
|
+
# @!attribute [rw] event_stream
|
2089
|
+
# The event stream that your consumer can use to read records from the
|
2090
|
+
# shard.
|
2091
|
+
# @return [Types::SubscribeToShardEventStream]
|
2092
|
+
#
|
2093
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kinesis-2013-12-02/SubscribeToShardOutput AWS API Documentation
|
2094
|
+
#
|
2095
|
+
class SubscribeToShardOutput < Struct.new(
|
2096
|
+
:event_stream)
|
2097
|
+
include Aws::Structure
|
2098
|
+
end
|
2099
|
+
|
1903
2100
|
# Metadata assigned to the stream, consisting of a key-value pair.
|
1904
2101
|
#
|
1905
2102
|
# @!attribute [rw] key
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-kinesis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.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:
|
11
|
+
date: 2019-03-14 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.
|
22
|
+
version: 3.47.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,21 +29,21 @@ dependencies:
|
|
29
29
|
version: '3'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.
|
32
|
+
version: 3.47.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '1.
|
39
|
+
version: '1.1'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '1.
|
46
|
+
version: '1.1'
|
47
47
|
description: Official AWS Ruby gem for Amazon Kinesis (Kinesis). This gem is part
|
48
48
|
of the AWS SDK for Ruby.
|
49
49
|
email:
|
@@ -53,10 +53,12 @@ extensions: []
|
|
53
53
|
extra_rdoc_files: []
|
54
54
|
files:
|
55
55
|
- lib/aws-sdk-kinesis.rb
|
56
|
+
- lib/aws-sdk-kinesis/async_client.rb
|
56
57
|
- lib/aws-sdk-kinesis/client.rb
|
57
58
|
- lib/aws-sdk-kinesis/client_api.rb
|
58
59
|
- lib/aws-sdk-kinesis/customizations.rb
|
59
60
|
- lib/aws-sdk-kinesis/errors.rb
|
61
|
+
- lib/aws-sdk-kinesis/event_streams.rb
|
60
62
|
- lib/aws-sdk-kinesis/resource.rb
|
61
63
|
- lib/aws-sdk-kinesis/types.rb
|
62
64
|
- lib/aws-sdk-kinesis/waiters.rb
|