aws-sdk-dynamodbstreams 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f07eeebd3ecf220eff1ebf73624fd7e2acda970
4
- data.tar.gz: 905611f933a17c7644d1ef46e1613971f1ce67c5
3
+ metadata.gz: 12f27110c0396705e6978093d2da35fbc426516a
4
+ data.tar.gz: 69da57dacb7b6cb9c83db2d45965bd78bbcfbfe0
5
5
  SHA512:
6
- metadata.gz: 3ee48b3371a9d683ccefa67fc16ef7bcbb7e58e65e16c7b36500cb34f13e14a12f1b2f3570601c5897ba67656145cdd748fd96daba50aef805813a5a317cc0df
7
- data.tar.gz: dc24c92e8138ed8a7b16ec12d2375c81370f0737fd41b15e365e0c8aee9683ee4b34bd129dfaee15fdb7aae0cd01ae19706a4e635d1516b86d0e3a6c2699567d
6
+ metadata.gz: 4f85c455c43b0f30466537c0caad0a38f3c2cdc14019117b1ed7576fbcc60c79fe660a8323b58e2d59ad7c1714e3cc34203788dd1bc6ea62a585dcec3f402d89
7
+ data.tar.gz: 399bcdc842f74ec07c5eca4195701bc018b65d5ba078a3a5446b77c561dce1ab3d6d30c399473697f09f981495b3c5456aa42af23e5dda32d46cbaba77350e1c
@@ -1,6 +1,6 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
@@ -42,6 +42,6 @@ require_relative 'aws-sdk-dynamodbstreams/customizations'
42
42
  # @service
43
43
  module Aws::DynamoDBStreams
44
44
 
45
- GEM_VERSION = '1.0.0.rc1'
45
+ GEM_VERSION = '1.0.0.rc2'
46
46
 
47
47
  end
@@ -1,6 +1,6 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
@@ -23,368 +23,419 @@ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
23
 
24
24
  Aws::Plugins::GlobalConfiguration.add_identifier(:dynamodbstreams)
25
25
 
26
- module Aws
27
- module DynamoDBStreams
28
- class Client < Seahorse::Client::Base
26
+ module Aws::DynamoDBStreams
27
+ class Client < Seahorse::Client::Base
29
28
 
30
- include Aws::ClientStubs
29
+ include Aws::ClientStubs
31
30
 
32
- @identifier = :dynamodbstreams
31
+ @identifier = :dynamodbstreams
33
32
 
34
- set_api(ClientApi::API)
33
+ set_api(ClientApi::API)
35
34
 
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)
35
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
36
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
37
+ add_plugin(Aws::Plugins::Logging)
38
+ add_plugin(Aws::Plugins::ParamConverter)
39
+ add_plugin(Aws::Plugins::ParamValidator)
40
+ add_plugin(Aws::Plugins::UserAgent)
41
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
42
+ add_plugin(Aws::Plugins::RetryErrors)
43
+ add_plugin(Aws::Plugins::GlobalConfiguration)
44
+ add_plugin(Aws::Plugins::RegionalEndpoint)
45
+ add_plugin(Aws::Plugins::ResponsePaging)
46
+ add_plugin(Aws::Plugins::StubResponses)
47
+ add_plugin(Aws::Plugins::IdempotencyToken)
48
+ add_plugin(Aws::Plugins::SignatureV4)
49
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
51
50
 
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
51
+ # @option options [required, Aws::CredentialProvider] :credentials
52
+ # Your AWS credentials. This can be an instance of any one of the
53
+ # following classes:
54
+ #
55
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
56
+ # credentials.
57
+ #
58
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
59
+ # from an EC2 IMDS on an EC2 instance.
60
+ #
61
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
62
+ # shared file, such as `~/.aws/config`.
63
+ #
64
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
65
+ #
66
+ # When `:credentials` are not configured directly, the following
67
+ # locations will be searched for credentials:
68
+ #
69
+ # * `Aws.config[:credentials]`
70
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
71
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
72
+ # * `~/.aws/credentials`
73
+ # * `~/.aws/config`
74
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
75
+ # very aggressive. Construct and pass an instance of
76
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
77
+ # timeouts.
78
+ #
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
+ #
91
+ # @option options [String] :access_key_id
92
+ #
93
+ # @option options [Boolean] :convert_params (true)
94
+ # When `true`, an attempt is made to coerce request parameters into
95
+ # the required types.
96
+ #
97
+ # @option options [String] :endpoint
98
+ # The client endpoint is normally constructed from the `:region`
99
+ # option. You should only configure an `:endpoint` when connecting
100
+ # to test endpoints. This should be avalid HTTP(S) URI.
101
+ #
102
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
103
+ # The log formatter.
104
+ #
105
+ # @option options [Symbol] :log_level (:info)
106
+ # The log level to send messages to the `:logger` at.
107
+ #
108
+ # @option options [Logger] :logger
109
+ # The Logger instance to send log messages to. If this option
110
+ # is not set, logging will be disabled.
111
+ #
112
+ # @option options [String] :profile ("default")
113
+ # Used when loading credentials from the shared credentials file
114
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
115
+ #
116
+ # @option options [Integer] :retry_limit (3)
117
+ # The maximum number of times to retry failed requests. Only
118
+ # ~ 500 level server errors and certain ~ 400 level client errors
119
+ # are retried. Generally, these are throttling errors, data
120
+ # checksum errors, networking errors, timeout errors and auth
121
+ # errors from expired credentials.
122
+ #
123
+ # @option options [String] :secret_access_key
124
+ #
125
+ # @option options [String] :session_token
126
+ #
127
+ # @option options [Boolean] :simple_json (false)
128
+ # Disables request parameter conversion, validation, and formatting.
129
+ # Also disable response data type conversions. This option is useful
130
+ # when you want to ensure the highest level of performance by
131
+ # avoiding overhead of walking request parameters and response data
132
+ # structures.
133
+ #
134
+ # When `:simple_json` is enabled, the request parameters hash must
135
+ # be formatted exactly as the DynamoDB API expects.
136
+ #
137
+ # @option options [Boolean] :stub_responses (false)
138
+ # Causes the client to return stubbed responses. By default
139
+ # fake responses are generated and returned. You can specify
140
+ # the response data to return or errors to raise by calling
141
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
142
+ #
143
+ # ** Please note ** When response stubbing is enabled, no HTTP
144
+ # requests are made, and retries are disabled.
145
+ #
146
+ # @option options [Boolean] :validate_params (true)
147
+ # When `true`, request parameters are validated before
148
+ # sending the request.
149
+ #
150
+ def initialize(*args)
151
+ super
152
+ end
139
153
 
140
- # @!group API Operations
154
+ # @!group API Operations
141
155
 
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&lt;Types::Record&gt;
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
156
+ # Returns information about a stream, including the current status of
157
+ # the stream, its Amazon Resource Name (ARN), the composition of its
158
+ # shards, and its corresponding DynamoDB table.
159
+ #
160
+ # <note markdown="1"> You can call `DescribeStream` at a maximum rate of 10 times per
161
+ # second.
162
+ #
163
+ # </note>
164
+ #
165
+ # Each shard in the stream has a `SequenceNumberRange` associated with
166
+ # it. If the `SequenceNumberRange` has a `StartingSequenceNumber` but no
167
+ # `EndingSequenceNumber`, then the shard is still open (able to receive
168
+ # more stream records). If both `StartingSequenceNumber` and
169
+ # `EndingSequenceNumber` are present, then that shard is closed and can
170
+ # no longer receive more data.
171
+ #
172
+ # @option params [required, String] :stream_arn
173
+ # The Amazon Resource Name (ARN) for the stream.
174
+ #
175
+ # @option params [Integer] :limit
176
+ # The maximum number of shard objects to return. The upper limit is 100.
177
+ #
178
+ # @option params [String] :exclusive_start_shard_id
179
+ # The shard ID of the first item that this operation will evaluate. Use
180
+ # the value that was returned for `LastEvaluatedShardId` in the previous
181
+ # operation.
182
+ #
183
+ # @return [Types::DescribeStreamOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
184
+ #
185
+ # * {Types::DescribeStreamOutput#stream_description #stream_description} => Types::StreamDescription
186
+ #
187
+ # @example Request syntax with placeholder values
188
+ #
189
+ # resp = client.describe_stream({
190
+ # stream_arn: "StreamArn", # required
191
+ # limit: 1,
192
+ # exclusive_start_shard_id: "ShardId",
193
+ # })
194
+ #
195
+ # @example Response structure
196
+ #
197
+ # resp.stream_description.stream_arn #=> String
198
+ # resp.stream_description.stream_label #=> String
199
+ # resp.stream_description.stream_status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED"
200
+ # resp.stream_description.stream_view_type #=> String, one of "NEW_IMAGE", "OLD_IMAGE", "NEW_AND_OLD_IMAGES", "KEYS_ONLY"
201
+ # resp.stream_description.creation_request_date_time #=> Time
202
+ # resp.stream_description.table_name #=> String
203
+ # resp.stream_description.key_schema #=> Array
204
+ # resp.stream_description.key_schema[0].attribute_name #=> String
205
+ # resp.stream_description.key_schema[0].key_type #=> String, one of "HASH", "RANGE"
206
+ # resp.stream_description.shards #=> Array
207
+ # resp.stream_description.shards[0].shard_id #=> String
208
+ # resp.stream_description.shards[0].sequence_number_range.starting_sequence_number #=> String
209
+ # resp.stream_description.shards[0].sequence_number_range.ending_sequence_number #=> String
210
+ # resp.stream_description.shards[0].parent_shard_id #=> String
211
+ # resp.stream_description.last_evaluated_shard_id #=> String
212
+ #
213
+ # @see http://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/DescribeStream AWS API Documentation
214
+ #
215
+ # @overload describe_stream(params = {})
216
+ # @param [Hash] params ({})
217
+ def describe_stream(params = {}, options = {})
218
+ req = build_request(:describe_stream, params)
219
+ req.send_request(options)
220
+ end
255
221
 
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
222
+ # Retrieves the stream records from a given shard.
223
+ #
224
+ # Specify a shard iterator using the `ShardIterator` parameter. The
225
+ # shard iterator specifies the position in the shard from which you want
226
+ # to start reading stream records sequentially. If there are no stream
227
+ # records available in the portion of the shard that the iterator points
228
+ # to, `GetRecords` returns an empty list. Note that it might take
229
+ # multiple calls to get to a portion of the shard that contains stream
230
+ # records.
231
+ #
232
+ # <note markdown="1"> `GetRecords` can retrieve a maximum of 1 MB of data or 1000 stream
233
+ # records, whichever comes first.
234
+ #
235
+ # </note>
236
+ #
237
+ # @option params [required, String] :shard_iterator
238
+ # A shard iterator that was retrieved from a previous GetShardIterator
239
+ # operation. This iterator can be used to access the stream records in
240
+ # this shard.
241
+ #
242
+ # @option params [Integer] :limit
243
+ # The maximum number of records to return from the shard. The upper
244
+ # limit is 1000.
245
+ #
246
+ # @return [Types::GetRecordsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
247
+ #
248
+ # * {Types::GetRecordsOutput#records #records} => Array&lt;Types::Record&gt;
249
+ # * {Types::GetRecordsOutput#next_shard_iterator #next_shard_iterator} => String
250
+ #
251
+ # @example Request syntax with placeholder values
252
+ #
253
+ # resp = client.get_records({
254
+ # shard_iterator: "ShardIterator", # required
255
+ # limit: 1,
256
+ # })
257
+ #
258
+ # @example Response structure
259
+ #
260
+ # resp.records #=> Array
261
+ # resp.records[0].event_id #=> String
262
+ # resp.records[0].event_name #=> String, one of "INSERT", "MODIFY", "REMOVE"
263
+ # resp.records[0].event_version #=> String
264
+ # resp.records[0].event_source #=> String
265
+ # resp.records[0].aws_region #=> String
266
+ # resp.records[0].dynamodb.approximate_creation_date_time #=> Time
267
+ # resp.records[0].dynamodb.keys #=> Hash
268
+ # resp.records[0].dynamodb.keys["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
269
+ # resp.records[0].dynamodb.new_image #=> Hash
270
+ # resp.records[0].dynamodb.new_image["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
271
+ # resp.records[0].dynamodb.old_image #=> Hash
272
+ # resp.records[0].dynamodb.old_image["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
273
+ # resp.records[0].dynamodb.sequence_number #=> String
274
+ # resp.records[0].dynamodb.size_bytes #=> Integer
275
+ # resp.records[0].dynamodb.stream_view_type #=> String, one of "NEW_IMAGE", "OLD_IMAGE", "NEW_AND_OLD_IMAGES", "KEYS_ONLY"
276
+ # resp.records[0].user_identity.principal_id #=> String
277
+ # resp.records[0].user_identity.type #=> String
278
+ # resp.next_shard_iterator #=> String
279
+ #
280
+ # @see http://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/GetRecords AWS API Documentation
281
+ #
282
+ # @overload get_records(params = {})
283
+ # @param [Hash] params ({})
284
+ def get_records(params = {}, options = {})
285
+ req = build_request(:get_records, params)
286
+ req.send_request(options)
287
+ end
312
288
 
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&lt;Types::Stream&gt;
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
289
+ # Returns a shard iterator. A shard iterator provides information about
290
+ # how to retrieve the stream records from within a shard. Use the shard
291
+ # iterator in a subsequent `GetRecords` request to read the stream
292
+ # records from the shard.
293
+ #
294
+ # <note markdown="1"> A shard iterator expires 15 minutes after it is returned to the
295
+ # requester.
296
+ #
297
+ # </note>
298
+ #
299
+ # @option params [required, String] :stream_arn
300
+ # The Amazon Resource Name (ARN) for the stream.
301
+ #
302
+ # @option params [required, String] :shard_id
303
+ # The identifier of the shard. The iterator will be returned for this
304
+ # shard ID.
305
+ #
306
+ # @option params [required, String] :shard_iterator_type
307
+ # Determines how the shard iterator is used to start reading stream
308
+ # records from the shard:
309
+ #
310
+ # * `AT_SEQUENCE_NUMBER` - Start reading exactly from the position
311
+ # denoted by a specific sequence number.
312
+ #
313
+ # * `AFTER_SEQUENCE_NUMBER` - Start reading right after the position
314
+ # denoted by a specific sequence number.
315
+ #
316
+ # * `TRIM_HORIZON` - Start reading at the last (untrimmed) stream
317
+ # record, which is the oldest record in the shard. In DynamoDB
318
+ # Streams, there is a 24 hour limit on data retention. Stream records
319
+ # whose age exceeds this limit are subject to removal (trimming) from
320
+ # the stream.
321
+ #
322
+ # * `LATEST` - Start reading just after the most recent stream record in
323
+ # the shard, so that you always read the most recent data in the
324
+ # shard.
325
+ #
326
+ # @option params [String] :sequence_number
327
+ # The sequence number of a stream record in the shard from which to
328
+ # start reading.
329
+ #
330
+ # @return [Types::GetShardIteratorOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
331
+ #
332
+ # * {Types::GetShardIteratorOutput#shard_iterator #shard_iterator} => String
333
+ #
334
+ # @example Request syntax with placeholder values
335
+ #
336
+ # resp = client.get_shard_iterator({
337
+ # stream_arn: "StreamArn", # required
338
+ # shard_id: "ShardId", # required
339
+ # shard_iterator_type: "TRIM_HORIZON", # required, accepts TRIM_HORIZON, LATEST, AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER
340
+ # sequence_number: "SequenceNumber",
341
+ # })
342
+ #
343
+ # @example Response structure
344
+ #
345
+ # resp.shard_iterator #=> String
346
+ #
347
+ # @see http://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/GetShardIterator AWS API Documentation
348
+ #
349
+ # @overload get_shard_iterator(params = {})
350
+ # @param [Hash] params ({})
351
+ def get_shard_iterator(params = {}, options = {})
352
+ req = build_request(:get_shard_iterator, params)
353
+ req.send_request(options)
354
+ end
353
355
 
354
- # @!endgroup
356
+ # Returns an array of stream ARNs associated with the current account
357
+ # and endpoint. If the `TableName` parameter is present, then
358
+ # `ListStreams` will return only the streams ARNs for that table.
359
+ #
360
+ # <note markdown="1"> You can call `ListStreams` at a maximum rate of 5 times per second.
361
+ #
362
+ # </note>
363
+ #
364
+ # @option params [String] :table_name
365
+ # If this parameter is provided, then only the streams associated with
366
+ # this table name are returned.
367
+ #
368
+ # @option params [Integer] :limit
369
+ # The maximum number of streams to return. The upper limit is 100.
370
+ #
371
+ # @option params [String] :exclusive_start_stream_arn
372
+ # The ARN (Amazon Resource Name) of the first item that this operation
373
+ # will evaluate. Use the value that was returned for
374
+ # `LastEvaluatedStreamArn` in the previous operation.
375
+ #
376
+ # @return [Types::ListStreamsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
377
+ #
378
+ # * {Types::ListStreamsOutput#streams #streams} => Array&lt;Types::Stream&gt;
379
+ # * {Types::ListStreamsOutput#last_evaluated_stream_arn #last_evaluated_stream_arn} => String
380
+ #
381
+ # @example Request syntax with placeholder values
382
+ #
383
+ # resp = client.list_streams({
384
+ # table_name: "TableName",
385
+ # limit: 1,
386
+ # exclusive_start_stream_arn: "StreamArn",
387
+ # })
388
+ #
389
+ # @example Response structure
390
+ #
391
+ # resp.streams #=> Array
392
+ # resp.streams[0].stream_arn #=> String
393
+ # resp.streams[0].table_name #=> String
394
+ # resp.streams[0].stream_label #=> String
395
+ # resp.last_evaluated_stream_arn #=> String
396
+ #
397
+ # @see http://docs.aws.amazon.com/goto/WebAPI/streams-dynamodb-2012-08-10/ListStreams AWS API Documentation
398
+ #
399
+ # @overload list_streams(params = {})
400
+ # @param [Hash] params ({})
401
+ def list_streams(params = {}, options = {})
402
+ req = build_request(:list_streams, params)
403
+ req.send_request(options)
404
+ end
355
405
 
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
406
+ # @!endgroup
370
407
 
371
- # @api private
372
- # @deprecated
373
- def waiter_names
374
- []
375
- end
408
+ # @param params ({})
409
+ # @api private
410
+ def build_request(operation_name, params = {})
411
+ handlers = @handlers.for(operation_name)
412
+ context = Seahorse::Client::RequestContext.new(
413
+ operation_name: operation_name,
414
+ operation: config.api.operation(operation_name),
415
+ client: self,
416
+ params: params,
417
+ config: config)
418
+ context[:gem_name] = 'aws-sdk-dynamodbstreams'
419
+ context[:gem_version] = '1.0.0.rc2'
420
+ Seahorse::Client::Request.new(handlers, context)
421
+ end
376
422
 
377
- class << self
423
+ # @api private
424
+ # @deprecated
425
+ def waiter_names
426
+ []
427
+ end
378
428
 
379
- # @api private
380
- attr_reader :identifier
429
+ class << self
381
430
 
382
- # @api private
383
- def errors_module
384
- Errors
385
- end
431
+ # @api private
432
+ attr_reader :identifier
386
433
 
434
+ # @api private
435
+ def errors_module
436
+ Errors
387
437
  end
438
+
388
439
  end
389
440
  end
390
441
  end