aws-sdk-dynamodbstreams 1.0.0.rc1
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 +7 -0
- data/lib/aws-sdk-dynamodbstreams.rb +47 -0
- data/lib/aws-sdk-dynamodbstreams/client.rb +390 -0
- data/lib/aws-sdk-dynamodbstreams/client_api.rb +246 -0
- data/lib/aws-sdk-dynamodbstreams/customizations.rb +7 -0
- data/lib/aws-sdk-dynamodbstreams/errors.rb +23 -0
- data/lib/aws-sdk-dynamodbstreams/resource.rb +25 -0
- data/lib/aws-sdk-dynamodbstreams/types.rb +579 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5f07eeebd3ecf220eff1ebf73624fd7e2acda970
|
4
|
+
data.tar.gz: 905611f933a17c7644d1ef46e1613971f1ce67c5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3ee48b3371a9d683ccefa67fc16ef7bcbb7e58e65e16c7b36500cb34f13e14a12f1b2f3570601c5897ba67656145cdd748fd96daba50aef805813a5a317cc0df
|
7
|
+
data.tar.gz: dc24c92e8138ed8a7b16ec12d2375c81370f0737fd41b15e365e0c8aee9683ee4b34bd129dfaee15fdb7aae0cd01ae19706a4e635d1516b86d0e3a6c2699567d
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core'
|
9
|
+
require 'aws-sigv4'
|
10
|
+
|
11
|
+
require_relative 'aws-sdk-dynamodbstreams/types'
|
12
|
+
require_relative 'aws-sdk-dynamodbstreams/client_api'
|
13
|
+
require_relative 'aws-sdk-dynamodbstreams/client'
|
14
|
+
require_relative 'aws-sdk-dynamodbstreams/errors'
|
15
|
+
require_relative 'aws-sdk-dynamodbstreams/resource'
|
16
|
+
require_relative 'aws-sdk-dynamodbstreams/customizations'
|
17
|
+
|
18
|
+
# This module provides support for Amazon DynamoDB Streams. This module is available in the
|
19
|
+
# `aws-sdk-dynamodbstreams` gem.
|
20
|
+
#
|
21
|
+
# # Client
|
22
|
+
#
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
25
|
+
# structure.
|
26
|
+
#
|
27
|
+
# See {Client} for more information.
|
28
|
+
#
|
29
|
+
# # Errors
|
30
|
+
#
|
31
|
+
# Errors returned from Amazon DynamoDB Streams all
|
32
|
+
# extend {Errors::ServiceError}.
|
33
|
+
#
|
34
|
+
# begin
|
35
|
+
# # do stuff
|
36
|
+
# rescue Aws::DynamoDBStreams::Errors::ServiceError
|
37
|
+
# # rescues all service API errors
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# See {Errors} for more information.
|
41
|
+
#
|
42
|
+
# @service
|
43
|
+
module Aws::DynamoDBStreams
|
44
|
+
|
45
|
+
GEM_VERSION = '1.0.0.rc1'
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,390 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
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/response_paging.rb'
|
19
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
20
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
21
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
22
|
+
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
23
|
+
|
24
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:dynamodbstreams)
|
25
|
+
|
26
|
+
module Aws
|
27
|
+
module DynamoDBStreams
|
28
|
+
class Client < Seahorse::Client::Base
|
29
|
+
|
30
|
+
include Aws::ClientStubs
|
31
|
+
|
32
|
+
@identifier = :dynamodbstreams
|
33
|
+
|
34
|
+
set_api(ClientApi::API)
|
35
|
+
|
36
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
37
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
38
|
+
add_plugin(Aws::Plugins::Logging)
|
39
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
40
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
41
|
+
add_plugin(Aws::Plugins::UserAgent)
|
42
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
43
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
44
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
45
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
46
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
47
|
+
add_plugin(Aws::Plugins::StubResponses)
|
48
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
49
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
50
|
+
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
51
|
+
|
52
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
53
|
+
# Your AWS credentials. This can be an instance of any one of the
|
54
|
+
# following classes:
|
55
|
+
#
|
56
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
57
|
+
# credentials.
|
58
|
+
#
|
59
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
60
|
+
# from an EC2 IMDS on an EC2 instance.
|
61
|
+
#
|
62
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
63
|
+
# shared file, such as `~/.aws/config`.
|
64
|
+
#
|
65
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
66
|
+
#
|
67
|
+
# When `:credentials` are not configured directly, the following
|
68
|
+
# locations will be searched for credentials:
|
69
|
+
#
|
70
|
+
# * `Aws.config[:credentials]`
|
71
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
72
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
73
|
+
# * `~/.aws/credentials`
|
74
|
+
# * `~/.aws/config`
|
75
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
76
|
+
# very aggressive. Construct and pass an instance of
|
77
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
78
|
+
# timeouts.
|
79
|
+
# @option options [required, String] :region
|
80
|
+
# The AWS region to connect to. The configured `:region` is
|
81
|
+
# used to determine the service `:endpoint`. When not passed,
|
82
|
+
# a default `:region` is search for in the following locations:
|
83
|
+
#
|
84
|
+
# * `Aws.config[:region]`
|
85
|
+
# * `ENV['AWS_REGION']`
|
86
|
+
# * `ENV['AMAZON_REGION']`
|
87
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
88
|
+
# * `~/.aws/credentials`
|
89
|
+
# * `~/.aws/config`
|
90
|
+
# @option options [String] :access_key_id
|
91
|
+
# @option options [Boolean] :convert_params (true)
|
92
|
+
# When `true`, an attempt is made to coerce request parameters into
|
93
|
+
# the required types.
|
94
|
+
# @option options [String] :endpoint
|
95
|
+
# The client endpoint is normally constructed from the `:region`
|
96
|
+
# option. You should only configure an `:endpoint` when connecting
|
97
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
98
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
99
|
+
# The log formatter.
|
100
|
+
# @option options [Symbol] :log_level (:info)
|
101
|
+
# The log level to send messages to the `:logger` at.
|
102
|
+
# @option options [Logger] :logger
|
103
|
+
# The Logger instance to send log messages to. If this option
|
104
|
+
# is not set, logging will be disabled.
|
105
|
+
# @option options [String] :profile ("default")
|
106
|
+
# Used when loading credentials from the shared credentials file
|
107
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
108
|
+
# @option options [Integer] :retry_limit (3)
|
109
|
+
# The maximum number of times to retry failed requests. Only
|
110
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
111
|
+
# are retried. Generally, these are throttling errors, data
|
112
|
+
# checksum errors, networking errors, timeout errors and auth
|
113
|
+
# errors from expired credentials.
|
114
|
+
# @option options [String] :secret_access_key
|
115
|
+
# @option options [String] :session_token
|
116
|
+
# @option options [Boolean] :simple_json (false)
|
117
|
+
# Disables request parameter conversion, validation, and formatting.
|
118
|
+
# Also disable response data type conversions. This option is useful
|
119
|
+
# when you want to ensure the highest level of performance by
|
120
|
+
# avoiding overhead of walking request parameters and response data
|
121
|
+
# structures.
|
122
|
+
#
|
123
|
+
# When `:simple_json` is enabled, the request parameters hash must
|
124
|
+
# be formatted exactly as the DynamoDB API expects.
|
125
|
+
# @option options [Boolean] :stub_responses (false)
|
126
|
+
# Causes the client to return stubbed responses. By default
|
127
|
+
# fake responses are generated and returned. You can specify
|
128
|
+
# the response data to return or errors to raise by calling
|
129
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
130
|
+
#
|
131
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
132
|
+
# requests are made, and retries are disabled.
|
133
|
+
# @option options [Boolean] :validate_params (true)
|
134
|
+
# When `true`, request parameters are validated before
|
135
|
+
# sending the request.
|
136
|
+
def initialize(*args)
|
137
|
+
super
|
138
|
+
end
|
139
|
+
|
140
|
+
# @!group API Operations
|
141
|
+
|
142
|
+
# Returns information about a stream, including the current status of
|
143
|
+
# the stream, its Amazon Resource Name (ARN), the composition of its
|
144
|
+
# shards, and its corresponding DynamoDB table.
|
145
|
+
#
|
146
|
+
# <note markdown="1"> You can call *DescribeStream* at a maximum rate of 10 times per
|
147
|
+
# second.
|
148
|
+
#
|
149
|
+
# </note>
|
150
|
+
#
|
151
|
+
# Each shard in the stream has a `SequenceNumberRange` associated with
|
152
|
+
# it. If the `SequenceNumberRange` has a `StartingSequenceNumber` but no
|
153
|
+
# `EndingSequenceNumber`, then the shard is still open (able to receive
|
154
|
+
# more stream records). If both `StartingSequenceNumber` and
|
155
|
+
# `EndingSequenceNumber` are present, then that shard is closed and can
|
156
|
+
# no longer receive more data.
|
157
|
+
# @option params [required, String] :stream_arn
|
158
|
+
# The Amazon Resource Name (ARN) for the stream.
|
159
|
+
# @option params [Integer] :limit
|
160
|
+
# The maximum number of shard objects to return. The upper limit is 100.
|
161
|
+
# @option params [String] :exclusive_start_shard_id
|
162
|
+
# The shard ID of the first item that this operation will evaluate. Use
|
163
|
+
# the value that was returned for `LastEvaluatedShardId` in the previous
|
164
|
+
# operation.
|
165
|
+
# @return [Types::DescribeStreamOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
166
|
+
#
|
167
|
+
# * {Types::DescribeStreamOutput#stream_description #StreamDescription} => Types::StreamDescription
|
168
|
+
#
|
169
|
+
# @example Request syntax with placeholder values
|
170
|
+
# resp = client.describe_stream({
|
171
|
+
# stream_arn: "StreamArn", # required
|
172
|
+
# limit: 1,
|
173
|
+
# exclusive_start_shard_id: "ShardId",
|
174
|
+
# })
|
175
|
+
#
|
176
|
+
# @example Response structure
|
177
|
+
# resp.stream_description.stream_arn #=> String
|
178
|
+
# resp.stream_description.stream_label #=> String
|
179
|
+
# resp.stream_description.stream_status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED"
|
180
|
+
# resp.stream_description.stream_view_type #=> String, one of "NEW_IMAGE", "OLD_IMAGE", "NEW_AND_OLD_IMAGES", "KEYS_ONLY"
|
181
|
+
# resp.stream_description.creation_request_date_time #=> Time
|
182
|
+
# resp.stream_description.table_name #=> String
|
183
|
+
# resp.stream_description.key_schema #=> Array
|
184
|
+
# resp.stream_description.key_schema[0].attribute_name #=> String
|
185
|
+
# resp.stream_description.key_schema[0].key_type #=> String, one of "HASH", "RANGE"
|
186
|
+
# resp.stream_description.shards #=> Array
|
187
|
+
# resp.stream_description.shards[0].shard_id #=> String
|
188
|
+
# resp.stream_description.shards[0].sequence_number_range.starting_sequence_number #=> String
|
189
|
+
# resp.stream_description.shards[0].sequence_number_range.ending_sequence_number #=> String
|
190
|
+
# resp.stream_description.shards[0].parent_shard_id #=> String
|
191
|
+
# resp.stream_description.last_evaluated_shard_id #=> String
|
192
|
+
# @overload describe_stream(params = {})
|
193
|
+
# @param [Hash] params ({})
|
194
|
+
def describe_stream(params = {}, options = {})
|
195
|
+
req = build_request(:describe_stream, params)
|
196
|
+
req.send_request(options)
|
197
|
+
end
|
198
|
+
|
199
|
+
# Retrieves the stream records from a given shard.
|
200
|
+
#
|
201
|
+
# Specify a shard iterator using the `ShardIterator` parameter. The
|
202
|
+
# shard iterator specifies the position in the shard from which you want
|
203
|
+
# to start reading stream records sequentially. If there are no stream
|
204
|
+
# records available in the portion of the shard that the iterator points
|
205
|
+
# to, `GetRecords` returns an empty list. Note that it might take
|
206
|
+
# multiple calls to get to a portion of the shard that contains stream
|
207
|
+
# records.
|
208
|
+
#
|
209
|
+
# <note markdown="1"> `GetRecords` can retrieve a maximum of 1 MB of data or 1000 stream
|
210
|
+
# records, whichever comes first.
|
211
|
+
#
|
212
|
+
# </note>
|
213
|
+
# @option params [required, String] :shard_iterator
|
214
|
+
# A shard iterator that was retrieved from a previous GetShardIterator
|
215
|
+
# operation. This iterator can be used to access the stream records in
|
216
|
+
# this shard.
|
217
|
+
# @option params [Integer] :limit
|
218
|
+
# The maximum number of records to return from the shard. The upper
|
219
|
+
# limit is 1000.
|
220
|
+
# @return [Types::GetRecordsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
221
|
+
#
|
222
|
+
# * {Types::GetRecordsOutput#records #Records} => Array<Types::Record>
|
223
|
+
# * {Types::GetRecordsOutput#next_shard_iterator #NextShardIterator} => String
|
224
|
+
#
|
225
|
+
# @example Request syntax with placeholder values
|
226
|
+
# resp = client.get_records({
|
227
|
+
# shard_iterator: "ShardIterator", # required
|
228
|
+
# limit: 1,
|
229
|
+
# })
|
230
|
+
#
|
231
|
+
# @example Response structure
|
232
|
+
# resp.records #=> Array
|
233
|
+
# resp.records[0].event_id #=> String
|
234
|
+
# resp.records[0].event_name #=> String, one of "INSERT", "MODIFY", "REMOVE"
|
235
|
+
# resp.records[0].event_version #=> String
|
236
|
+
# resp.records[0].event_source #=> String
|
237
|
+
# resp.records[0].aws_region #=> String
|
238
|
+
# resp.records[0].dynamodb.approximate_creation_date_time #=> Time
|
239
|
+
# resp.records[0].dynamodb.keys #=> Hash
|
240
|
+
# resp.records[0].dynamodb.keys["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
|
241
|
+
# resp.records[0].dynamodb.new_image #=> Hash
|
242
|
+
# resp.records[0].dynamodb.new_image["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
|
243
|
+
# resp.records[0].dynamodb.old_image #=> Hash
|
244
|
+
# resp.records[0].dynamodb.old_image["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
|
245
|
+
# resp.records[0].dynamodb.sequence_number #=> String
|
246
|
+
# resp.records[0].dynamodb.size_bytes #=> Integer
|
247
|
+
# resp.records[0].dynamodb.stream_view_type #=> String, one of "NEW_IMAGE", "OLD_IMAGE", "NEW_AND_OLD_IMAGES", "KEYS_ONLY"
|
248
|
+
# resp.next_shard_iterator #=> String
|
249
|
+
# @overload get_records(params = {})
|
250
|
+
# @param [Hash] params ({})
|
251
|
+
def get_records(params = {}, options = {})
|
252
|
+
req = build_request(:get_records, params)
|
253
|
+
req.send_request(options)
|
254
|
+
end
|
255
|
+
|
256
|
+
# Returns a shard iterator. A shard iterator provides information about
|
257
|
+
# how to retrieve the stream records from within a shard. Use the shard
|
258
|
+
# iterator in a subsequent `GetRecords` request to read the stream
|
259
|
+
# records from the shard.
|
260
|
+
#
|
261
|
+
# <note markdown="1"> A shard iterator expires 15 minutes after it is returned to the
|
262
|
+
# requester.
|
263
|
+
#
|
264
|
+
# </note>
|
265
|
+
# @option params [required, String] :stream_arn
|
266
|
+
# The Amazon Resource Name (ARN) for the stream.
|
267
|
+
# @option params [required, String] :shard_id
|
268
|
+
# The identifier of the shard. The iterator will be returned for this
|
269
|
+
# shard ID.
|
270
|
+
# @option params [required, String] :shard_iterator_type
|
271
|
+
# Determines how the shard iterator is used to start reading stream
|
272
|
+
# records from the shard:
|
273
|
+
#
|
274
|
+
# * `AT_SEQUENCE_NUMBER` - Start reading exactly from the position
|
275
|
+
# denoted by a specific sequence number.
|
276
|
+
#
|
277
|
+
# * `AFTER_SEQUENCE_NUMBER` - Start reading right after the position
|
278
|
+
# denoted by a specific sequence number.
|
279
|
+
#
|
280
|
+
# * `TRIM_HORIZON` - Start reading at the last (untrimmed) stream
|
281
|
+
# record, which is the oldest record in the shard. In DynamoDB
|
282
|
+
# Streams, there is a 24 hour limit on data retention. Stream records
|
283
|
+
# whose age exceeds this limit are subject to removal (trimming) from
|
284
|
+
# the stream.
|
285
|
+
#
|
286
|
+
# * `LATEST` - Start reading just after the most recent stream record in
|
287
|
+
# the shard, so that you always read the most recent data in the
|
288
|
+
# shard.
|
289
|
+
# @option params [String] :sequence_number
|
290
|
+
# The sequence number of a stream record in the shard from which to
|
291
|
+
# start reading.
|
292
|
+
# @return [Types::GetShardIteratorOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
293
|
+
#
|
294
|
+
# * {Types::GetShardIteratorOutput#shard_iterator #ShardIterator} => String
|
295
|
+
#
|
296
|
+
# @example Request syntax with placeholder values
|
297
|
+
# resp = client.get_shard_iterator({
|
298
|
+
# stream_arn: "StreamArn", # required
|
299
|
+
# shard_id: "ShardId", # required
|
300
|
+
# shard_iterator_type: "TRIM_HORIZON", # required, accepts TRIM_HORIZON, LATEST, AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER
|
301
|
+
# sequence_number: "SequenceNumber",
|
302
|
+
# })
|
303
|
+
#
|
304
|
+
# @example Response structure
|
305
|
+
# resp.shard_iterator #=> String
|
306
|
+
# @overload get_shard_iterator(params = {})
|
307
|
+
# @param [Hash] params ({})
|
308
|
+
def get_shard_iterator(params = {}, options = {})
|
309
|
+
req = build_request(:get_shard_iterator, params)
|
310
|
+
req.send_request(options)
|
311
|
+
end
|
312
|
+
|
313
|
+
# Returns an array of stream ARNs associated with the current account
|
314
|
+
# and endpoint. If the `TableName` parameter is present, then
|
315
|
+
# *ListStreams* will return only the streams ARNs for that table.
|
316
|
+
#
|
317
|
+
# <note markdown="1"> You can call *ListStreams* at a maximum rate of 5 times per second.
|
318
|
+
#
|
319
|
+
# </note>
|
320
|
+
# @option params [String] :table_name
|
321
|
+
# If this parameter is provided, then only the streams associated with
|
322
|
+
# this table name are returned.
|
323
|
+
# @option params [Integer] :limit
|
324
|
+
# The maximum number of streams to return. The upper limit is 100.
|
325
|
+
# @option params [String] :exclusive_start_stream_arn
|
326
|
+
# The ARN (Amazon Resource Name) of the first item that this operation
|
327
|
+
# will evaluate. Use the value that was returned for
|
328
|
+
# `LastEvaluatedStreamArn` in the previous operation.
|
329
|
+
# @return [Types::ListStreamsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
330
|
+
#
|
331
|
+
# * {Types::ListStreamsOutput#streams #Streams} => Array<Types::Stream>
|
332
|
+
# * {Types::ListStreamsOutput#last_evaluated_stream_arn #LastEvaluatedStreamArn} => String
|
333
|
+
#
|
334
|
+
# @example Request syntax with placeholder values
|
335
|
+
# resp = client.list_streams({
|
336
|
+
# table_name: "TableName",
|
337
|
+
# limit: 1,
|
338
|
+
# exclusive_start_stream_arn: "StreamArn",
|
339
|
+
# })
|
340
|
+
#
|
341
|
+
# @example Response structure
|
342
|
+
# resp.streams #=> Array
|
343
|
+
# resp.streams[0].stream_arn #=> String
|
344
|
+
# resp.streams[0].table_name #=> String
|
345
|
+
# resp.streams[0].stream_label #=> String
|
346
|
+
# resp.last_evaluated_stream_arn #=> String
|
347
|
+
# @overload list_streams(params = {})
|
348
|
+
# @param [Hash] params ({})
|
349
|
+
def list_streams(params = {}, options = {})
|
350
|
+
req = build_request(:list_streams, params)
|
351
|
+
req.send_request(options)
|
352
|
+
end
|
353
|
+
|
354
|
+
# @!endgroup
|
355
|
+
|
356
|
+
# @param params ({})
|
357
|
+
# @api private
|
358
|
+
def build_request(operation_name, params = {})
|
359
|
+
handlers = @handlers.for(operation_name)
|
360
|
+
context = Seahorse::Client::RequestContext.new(
|
361
|
+
operation_name: operation_name,
|
362
|
+
operation: config.api.operation(operation_name),
|
363
|
+
client: self,
|
364
|
+
params: params,
|
365
|
+
config: config)
|
366
|
+
context[:gem_name] = 'aws-sdk-dynamodbstreams'
|
367
|
+
context[:gem_version] = '1.0.0.rc1'
|
368
|
+
Seahorse::Client::Request.new(handlers, context)
|
369
|
+
end
|
370
|
+
|
371
|
+
# @api private
|
372
|
+
# @deprecated
|
373
|
+
def waiter_names
|
374
|
+
[]
|
375
|
+
end
|
376
|
+
|
377
|
+
class << self
|
378
|
+
|
379
|
+
# @api private
|
380
|
+
attr_reader :identifier
|
381
|
+
|
382
|
+
# @api private
|
383
|
+
def errors_module
|
384
|
+
Errors
|
385
|
+
end
|
386
|
+
|
387
|
+
end
|
388
|
+
end
|
389
|
+
end
|
390
|
+
end
|
@@ -0,0 +1,246 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws
|
9
|
+
module DynamoDBStreams
|
10
|
+
# @api private
|
11
|
+
module ClientApi
|
12
|
+
|
13
|
+
include Seahorse::Model
|
14
|
+
|
15
|
+
AttributeMap = Shapes::MapShape.new(name: 'AttributeMap')
|
16
|
+
AttributeName = Shapes::StringShape.new(name: 'AttributeName')
|
17
|
+
AttributeValue = Shapes::StructureShape.new(name: 'AttributeValue')
|
18
|
+
BinaryAttributeValue = Shapes::BlobShape.new(name: 'BinaryAttributeValue')
|
19
|
+
BinarySetAttributeValue = Shapes::ListShape.new(name: 'BinarySetAttributeValue')
|
20
|
+
BooleanAttributeValue = Shapes::BooleanShape.new(name: 'BooleanAttributeValue')
|
21
|
+
Date = Shapes::TimestampShape.new(name: 'Date')
|
22
|
+
DescribeStreamInput = Shapes::StructureShape.new(name: 'DescribeStreamInput')
|
23
|
+
DescribeStreamOutput = Shapes::StructureShape.new(name: 'DescribeStreamOutput')
|
24
|
+
ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
|
25
|
+
ExpiredIteratorException = Shapes::StructureShape.new(name: 'ExpiredIteratorException')
|
26
|
+
GetRecordsInput = Shapes::StructureShape.new(name: 'GetRecordsInput')
|
27
|
+
GetRecordsOutput = Shapes::StructureShape.new(name: 'GetRecordsOutput')
|
28
|
+
GetShardIteratorInput = Shapes::StructureShape.new(name: 'GetShardIteratorInput')
|
29
|
+
GetShardIteratorOutput = Shapes::StructureShape.new(name: 'GetShardIteratorOutput')
|
30
|
+
InternalServerError = Shapes::StructureShape.new(name: 'InternalServerError')
|
31
|
+
KeySchema = Shapes::ListShape.new(name: 'KeySchema')
|
32
|
+
KeySchemaAttributeName = Shapes::StringShape.new(name: 'KeySchemaAttributeName')
|
33
|
+
KeySchemaElement = Shapes::StructureShape.new(name: 'KeySchemaElement')
|
34
|
+
KeyType = Shapes::StringShape.new(name: 'KeyType')
|
35
|
+
LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
|
36
|
+
ListAttributeValue = Shapes::ListShape.new(name: 'ListAttributeValue')
|
37
|
+
ListStreamsInput = Shapes::StructureShape.new(name: 'ListStreamsInput')
|
38
|
+
ListStreamsOutput = Shapes::StructureShape.new(name: 'ListStreamsOutput')
|
39
|
+
MapAttributeValue = Shapes::MapShape.new(name: 'MapAttributeValue')
|
40
|
+
NullAttributeValue = Shapes::BooleanShape.new(name: 'NullAttributeValue')
|
41
|
+
NumberAttributeValue = Shapes::StringShape.new(name: 'NumberAttributeValue')
|
42
|
+
NumberSetAttributeValue = Shapes::ListShape.new(name: 'NumberSetAttributeValue')
|
43
|
+
OperationType = Shapes::StringShape.new(name: 'OperationType')
|
44
|
+
PositiveIntegerObject = Shapes::IntegerShape.new(name: 'PositiveIntegerObject')
|
45
|
+
PositiveLongObject = Shapes::IntegerShape.new(name: 'PositiveLongObject')
|
46
|
+
Record = Shapes::StructureShape.new(name: 'Record')
|
47
|
+
RecordList = Shapes::ListShape.new(name: 'RecordList')
|
48
|
+
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
49
|
+
SequenceNumber = Shapes::StringShape.new(name: 'SequenceNumber')
|
50
|
+
SequenceNumberRange = Shapes::StructureShape.new(name: 'SequenceNumberRange')
|
51
|
+
Shard = Shapes::StructureShape.new(name: 'Shard')
|
52
|
+
ShardDescriptionList = Shapes::ListShape.new(name: 'ShardDescriptionList')
|
53
|
+
ShardId = Shapes::StringShape.new(name: 'ShardId')
|
54
|
+
ShardIterator = Shapes::StringShape.new(name: 'ShardIterator')
|
55
|
+
ShardIteratorType = Shapes::StringShape.new(name: 'ShardIteratorType')
|
56
|
+
Stream = Shapes::StructureShape.new(name: 'Stream')
|
57
|
+
StreamArn = Shapes::StringShape.new(name: 'StreamArn')
|
58
|
+
StreamDescription = Shapes::StructureShape.new(name: 'StreamDescription')
|
59
|
+
StreamList = Shapes::ListShape.new(name: 'StreamList')
|
60
|
+
StreamRecord = Shapes::StructureShape.new(name: 'StreamRecord')
|
61
|
+
StreamStatus = Shapes::StringShape.new(name: 'StreamStatus')
|
62
|
+
StreamViewType = Shapes::StringShape.new(name: 'StreamViewType')
|
63
|
+
String = Shapes::StringShape.new(name: 'String')
|
64
|
+
StringAttributeValue = Shapes::StringShape.new(name: 'StringAttributeValue')
|
65
|
+
StringSetAttributeValue = Shapes::ListShape.new(name: 'StringSetAttributeValue')
|
66
|
+
TableName = Shapes::StringShape.new(name: 'TableName')
|
67
|
+
TrimmedDataAccessException = Shapes::StructureShape.new(name: 'TrimmedDataAccessException')
|
68
|
+
|
69
|
+
AttributeMap.key = Shapes::ShapeRef.new(shape: AttributeName)
|
70
|
+
AttributeMap.value = Shapes::ShapeRef.new(shape: AttributeValue)
|
71
|
+
|
72
|
+
AttributeValue.add_member(:s, Shapes::ShapeRef.new(shape: StringAttributeValue, location_name: "S"))
|
73
|
+
AttributeValue.add_member(:n, Shapes::ShapeRef.new(shape: NumberAttributeValue, location_name: "N"))
|
74
|
+
AttributeValue.add_member(:b, Shapes::ShapeRef.new(shape: BinaryAttributeValue, location_name: "B"))
|
75
|
+
AttributeValue.add_member(:ss, Shapes::ShapeRef.new(shape: StringSetAttributeValue, location_name: "SS"))
|
76
|
+
AttributeValue.add_member(:ns, Shapes::ShapeRef.new(shape: NumberSetAttributeValue, location_name: "NS"))
|
77
|
+
AttributeValue.add_member(:bs, Shapes::ShapeRef.new(shape: BinarySetAttributeValue, location_name: "BS"))
|
78
|
+
AttributeValue.add_member(:m, Shapes::ShapeRef.new(shape: MapAttributeValue, location_name: "M"))
|
79
|
+
AttributeValue.add_member(:l, Shapes::ShapeRef.new(shape: ListAttributeValue, location_name: "L"))
|
80
|
+
AttributeValue.add_member(:null, Shapes::ShapeRef.new(shape: NullAttributeValue, location_name: "NULL"))
|
81
|
+
AttributeValue.add_member(:bool, Shapes::ShapeRef.new(shape: BooleanAttributeValue, location_name: "BOOL"))
|
82
|
+
AttributeValue.struct_class = Types::AttributeValue
|
83
|
+
|
84
|
+
BinarySetAttributeValue.member = Shapes::ShapeRef.new(shape: BinaryAttributeValue)
|
85
|
+
|
86
|
+
DescribeStreamInput.add_member(:stream_arn, Shapes::ShapeRef.new(shape: StreamArn, required: true, location_name: "StreamArn"))
|
87
|
+
DescribeStreamInput.add_member(:limit, Shapes::ShapeRef.new(shape: PositiveIntegerObject, location_name: "Limit"))
|
88
|
+
DescribeStreamInput.add_member(:exclusive_start_shard_id, Shapes::ShapeRef.new(shape: ShardId, location_name: "ExclusiveStartShardId"))
|
89
|
+
DescribeStreamInput.struct_class = Types::DescribeStreamInput
|
90
|
+
|
91
|
+
DescribeStreamOutput.add_member(:stream_description, Shapes::ShapeRef.new(shape: StreamDescription, location_name: "StreamDescription"))
|
92
|
+
DescribeStreamOutput.struct_class = Types::DescribeStreamOutput
|
93
|
+
|
94
|
+
GetRecordsInput.add_member(:shard_iterator, Shapes::ShapeRef.new(shape: ShardIterator, required: true, location_name: "ShardIterator"))
|
95
|
+
GetRecordsInput.add_member(:limit, Shapes::ShapeRef.new(shape: PositiveIntegerObject, location_name: "Limit"))
|
96
|
+
GetRecordsInput.struct_class = Types::GetRecordsInput
|
97
|
+
|
98
|
+
GetRecordsOutput.add_member(:records, Shapes::ShapeRef.new(shape: RecordList, location_name: "Records"))
|
99
|
+
GetRecordsOutput.add_member(:next_shard_iterator, Shapes::ShapeRef.new(shape: ShardIterator, location_name: "NextShardIterator"))
|
100
|
+
GetRecordsOutput.struct_class = Types::GetRecordsOutput
|
101
|
+
|
102
|
+
GetShardIteratorInput.add_member(:stream_arn, Shapes::ShapeRef.new(shape: StreamArn, required: true, location_name: "StreamArn"))
|
103
|
+
GetShardIteratorInput.add_member(:shard_id, Shapes::ShapeRef.new(shape: ShardId, required: true, location_name: "ShardId"))
|
104
|
+
GetShardIteratorInput.add_member(:shard_iterator_type, Shapes::ShapeRef.new(shape: ShardIteratorType, required: true, location_name: "ShardIteratorType"))
|
105
|
+
GetShardIteratorInput.add_member(:sequence_number, Shapes::ShapeRef.new(shape: SequenceNumber, location_name: "SequenceNumber"))
|
106
|
+
GetShardIteratorInput.struct_class = Types::GetShardIteratorInput
|
107
|
+
|
108
|
+
GetShardIteratorOutput.add_member(:shard_iterator, Shapes::ShapeRef.new(shape: ShardIterator, location_name: "ShardIterator"))
|
109
|
+
GetShardIteratorOutput.struct_class = Types::GetShardIteratorOutput
|
110
|
+
|
111
|
+
KeySchema.member = Shapes::ShapeRef.new(shape: KeySchemaElement)
|
112
|
+
|
113
|
+
KeySchemaElement.add_member(:attribute_name, Shapes::ShapeRef.new(shape: KeySchemaAttributeName, required: true, location_name: "AttributeName"))
|
114
|
+
KeySchemaElement.add_member(:key_type, Shapes::ShapeRef.new(shape: KeyType, required: true, location_name: "KeyType"))
|
115
|
+
KeySchemaElement.struct_class = Types::KeySchemaElement
|
116
|
+
|
117
|
+
ListAttributeValue.member = Shapes::ShapeRef.new(shape: AttributeValue)
|
118
|
+
|
119
|
+
ListStreamsInput.add_member(:table_name, Shapes::ShapeRef.new(shape: TableName, location_name: "TableName"))
|
120
|
+
ListStreamsInput.add_member(:limit, Shapes::ShapeRef.new(shape: PositiveIntegerObject, location_name: "Limit"))
|
121
|
+
ListStreamsInput.add_member(:exclusive_start_stream_arn, Shapes::ShapeRef.new(shape: StreamArn, location_name: "ExclusiveStartStreamArn"))
|
122
|
+
ListStreamsInput.struct_class = Types::ListStreamsInput
|
123
|
+
|
124
|
+
ListStreamsOutput.add_member(:streams, Shapes::ShapeRef.new(shape: StreamList, location_name: "Streams"))
|
125
|
+
ListStreamsOutput.add_member(:last_evaluated_stream_arn, Shapes::ShapeRef.new(shape: StreamArn, location_name: "LastEvaluatedStreamArn"))
|
126
|
+
ListStreamsOutput.struct_class = Types::ListStreamsOutput
|
127
|
+
|
128
|
+
MapAttributeValue.key = Shapes::ShapeRef.new(shape: AttributeName)
|
129
|
+
MapAttributeValue.value = Shapes::ShapeRef.new(shape: AttributeValue)
|
130
|
+
|
131
|
+
NumberSetAttributeValue.member = Shapes::ShapeRef.new(shape: NumberAttributeValue)
|
132
|
+
|
133
|
+
Record.add_member(:event_id, Shapes::ShapeRef.new(shape: String, location_name: "eventID"))
|
134
|
+
Record.add_member(:event_name, Shapes::ShapeRef.new(shape: OperationType, location_name: "eventName"))
|
135
|
+
Record.add_member(:event_version, Shapes::ShapeRef.new(shape: String, location_name: "eventVersion"))
|
136
|
+
Record.add_member(:event_source, Shapes::ShapeRef.new(shape: String, location_name: "eventSource"))
|
137
|
+
Record.add_member(:aws_region, Shapes::ShapeRef.new(shape: String, location_name: "awsRegion"))
|
138
|
+
Record.add_member(:dynamodb, Shapes::ShapeRef.new(shape: StreamRecord, location_name: "dynamodb"))
|
139
|
+
Record.struct_class = Types::Record
|
140
|
+
|
141
|
+
RecordList.member = Shapes::ShapeRef.new(shape: Record)
|
142
|
+
|
143
|
+
SequenceNumberRange.add_member(:starting_sequence_number, Shapes::ShapeRef.new(shape: SequenceNumber, location_name: "StartingSequenceNumber"))
|
144
|
+
SequenceNumberRange.add_member(:ending_sequence_number, Shapes::ShapeRef.new(shape: SequenceNumber, location_name: "EndingSequenceNumber"))
|
145
|
+
SequenceNumberRange.struct_class = Types::SequenceNumberRange
|
146
|
+
|
147
|
+
Shard.add_member(:shard_id, Shapes::ShapeRef.new(shape: ShardId, location_name: "ShardId"))
|
148
|
+
Shard.add_member(:sequence_number_range, Shapes::ShapeRef.new(shape: SequenceNumberRange, location_name: "SequenceNumberRange"))
|
149
|
+
Shard.add_member(:parent_shard_id, Shapes::ShapeRef.new(shape: ShardId, location_name: "ParentShardId"))
|
150
|
+
Shard.struct_class = Types::Shard
|
151
|
+
|
152
|
+
ShardDescriptionList.member = Shapes::ShapeRef.new(shape: Shard)
|
153
|
+
|
154
|
+
Stream.add_member(:stream_arn, Shapes::ShapeRef.new(shape: StreamArn, location_name: "StreamArn"))
|
155
|
+
Stream.add_member(:table_name, Shapes::ShapeRef.new(shape: TableName, location_name: "TableName"))
|
156
|
+
Stream.add_member(:stream_label, Shapes::ShapeRef.new(shape: String, location_name: "StreamLabel"))
|
157
|
+
Stream.struct_class = Types::Stream
|
158
|
+
|
159
|
+
StreamDescription.add_member(:stream_arn, Shapes::ShapeRef.new(shape: StreamArn, location_name: "StreamArn"))
|
160
|
+
StreamDescription.add_member(:stream_label, Shapes::ShapeRef.new(shape: String, location_name: "StreamLabel"))
|
161
|
+
StreamDescription.add_member(:stream_status, Shapes::ShapeRef.new(shape: StreamStatus, location_name: "StreamStatus"))
|
162
|
+
StreamDescription.add_member(:stream_view_type, Shapes::ShapeRef.new(shape: StreamViewType, location_name: "StreamViewType"))
|
163
|
+
StreamDescription.add_member(:creation_request_date_time, Shapes::ShapeRef.new(shape: Date, location_name: "CreationRequestDateTime"))
|
164
|
+
StreamDescription.add_member(:table_name, Shapes::ShapeRef.new(shape: TableName, location_name: "TableName"))
|
165
|
+
StreamDescription.add_member(:key_schema, Shapes::ShapeRef.new(shape: KeySchema, location_name: "KeySchema"))
|
166
|
+
StreamDescription.add_member(:shards, Shapes::ShapeRef.new(shape: ShardDescriptionList, location_name: "Shards"))
|
167
|
+
StreamDescription.add_member(:last_evaluated_shard_id, Shapes::ShapeRef.new(shape: ShardId, location_name: "LastEvaluatedShardId"))
|
168
|
+
StreamDescription.struct_class = Types::StreamDescription
|
169
|
+
|
170
|
+
StreamList.member = Shapes::ShapeRef.new(shape: Stream)
|
171
|
+
|
172
|
+
StreamRecord.add_member(:approximate_creation_date_time, Shapes::ShapeRef.new(shape: Date, location_name: "ApproximateCreationDateTime"))
|
173
|
+
StreamRecord.add_member(:keys, Shapes::ShapeRef.new(shape: AttributeMap, location_name: "Keys"))
|
174
|
+
StreamRecord.add_member(:new_image, Shapes::ShapeRef.new(shape: AttributeMap, location_name: "NewImage"))
|
175
|
+
StreamRecord.add_member(:old_image, Shapes::ShapeRef.new(shape: AttributeMap, location_name: "OldImage"))
|
176
|
+
StreamRecord.add_member(:sequence_number, Shapes::ShapeRef.new(shape: SequenceNumber, location_name: "SequenceNumber"))
|
177
|
+
StreamRecord.add_member(:size_bytes, Shapes::ShapeRef.new(shape: PositiveLongObject, location_name: "SizeBytes"))
|
178
|
+
StreamRecord.add_member(:stream_view_type, Shapes::ShapeRef.new(shape: StreamViewType, location_name: "StreamViewType"))
|
179
|
+
StreamRecord.struct_class = Types::StreamRecord
|
180
|
+
|
181
|
+
StringSetAttributeValue.member = Shapes::ShapeRef.new(shape: StringAttributeValue)
|
182
|
+
|
183
|
+
|
184
|
+
# @api private
|
185
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
186
|
+
|
187
|
+
api.version = "2012-08-10"
|
188
|
+
|
189
|
+
api.metadata = {
|
190
|
+
"endpointPrefix" => "streams.dynamodb",
|
191
|
+
"jsonVersion" => "1.0",
|
192
|
+
"protocol" => "json",
|
193
|
+
"serviceFullName" => "Amazon DynamoDB Streams",
|
194
|
+
"signatureVersion" => "v4",
|
195
|
+
"signingName" => "dynamodb",
|
196
|
+
"targetPrefix" => "DynamoDBStreams_20120810",
|
197
|
+
}
|
198
|
+
|
199
|
+
api.add_operation(:describe_stream, Seahorse::Model::Operation.new.tap do |o|
|
200
|
+
o.name = "DescribeStream"
|
201
|
+
o.http_method = "POST"
|
202
|
+
o.http_request_uri = "/"
|
203
|
+
o.input = Shapes::ShapeRef.new(shape: DescribeStreamInput)
|
204
|
+
o.output = Shapes::ShapeRef.new(shape: DescribeStreamOutput)
|
205
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
206
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
|
207
|
+
end)
|
208
|
+
|
209
|
+
api.add_operation(:get_records, Seahorse::Model::Operation.new.tap do |o|
|
210
|
+
o.name = "GetRecords"
|
211
|
+
o.http_method = "POST"
|
212
|
+
o.http_request_uri = "/"
|
213
|
+
o.input = Shapes::ShapeRef.new(shape: GetRecordsInput)
|
214
|
+
o.output = Shapes::ShapeRef.new(shape: GetRecordsOutput)
|
215
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
216
|
+
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
|
217
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
|
218
|
+
o.errors << Shapes::ShapeRef.new(shape: ExpiredIteratorException)
|
219
|
+
o.errors << Shapes::ShapeRef.new(shape: TrimmedDataAccessException)
|
220
|
+
end)
|
221
|
+
|
222
|
+
api.add_operation(:get_shard_iterator, Seahorse::Model::Operation.new.tap do |o|
|
223
|
+
o.name = "GetShardIterator"
|
224
|
+
o.http_method = "POST"
|
225
|
+
o.http_request_uri = "/"
|
226
|
+
o.input = Shapes::ShapeRef.new(shape: GetShardIteratorInput)
|
227
|
+
o.output = Shapes::ShapeRef.new(shape: GetShardIteratorOutput)
|
228
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
229
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
|
230
|
+
o.errors << Shapes::ShapeRef.new(shape: TrimmedDataAccessException)
|
231
|
+
end)
|
232
|
+
|
233
|
+
api.add_operation(:list_streams, Seahorse::Model::Operation.new.tap do |o|
|
234
|
+
o.name = "ListStreams"
|
235
|
+
o.http_method = "POST"
|
236
|
+
o.http_request_uri = "/"
|
237
|
+
o.input = Shapes::ShapeRef.new(shape: ListStreamsInput)
|
238
|
+
o.output = Shapes::ShapeRef.new(shape: ListStreamsOutput)
|
239
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
240
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
|
241
|
+
end)
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|