1 | import {Request} from '../lib/request';
|
2 | import {Response} from '../lib/response';
|
3 | import {AWSError} from '../lib/error';
|
4 | import {Service} from '../lib/service';
|
5 | import {ServiceConfigurationOptions} from '../lib/service';
|
6 | import {ConfigBase as Config} from '../lib/config';
|
7 | interface Blob {}
|
8 | declare class DynamoDBStreams extends Service {
|
9 | |
10 |
|
11 |
|
12 | constructor(options?: DynamoDBStreams.Types.ClientConfiguration)
|
13 | config: Config & DynamoDBStreams.Types.ClientConfiguration;
|
14 | /**
|
15 | * Returns information about a stream, including the current status of the stream, its Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB table. You can call DescribeStream at a maximum rate of 10 times per second. Each shard in the stream has a SequenceNumberRange associated with it. If the SequenceNumberRange has a StartingSequenceNumber but no EndingSequenceNumber, then the shard is still open (able to receive more stream records). If both StartingSequenceNumber and EndingSequenceNumber are present, then that shard is closed and can no longer receive more data.
|
16 | */
|
17 | describeStream(params: DynamoDBStreams.Types.DescribeStreamInput, callback?: (err: AWSError, data: DynamoDBStreams.Types.DescribeStreamOutput) => void): Request<DynamoDBStreams.Types.DescribeStreamOutput, AWSError>;
|
18 | /**
|
19 | * Returns information about a stream, including the current status of the stream, its Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB table. You can call DescribeStream at a maximum rate of 10 times per second. Each shard in the stream has a SequenceNumberRange associated with it. If the SequenceNumberRange has a StartingSequenceNumber but no EndingSequenceNumber, then the shard is still open (able to receive more stream records). If both StartingSequenceNumber and EndingSequenceNumber are present, then that shard is closed and can no longer receive more data.
|
20 | */
|
21 | describeStream(callback?: (err: AWSError, data: DynamoDBStreams.Types.DescribeStreamOutput) => void): Request<DynamoDBStreams.Types.DescribeStreamOutput, AWSError>;
|
22 | /**
|
23 | * Retrieves the stream records from a given shard. Specify a shard iterator using the ShardIterator parameter. The shard iterator specifies the position in the shard from which you want to start reading stream records sequentially. If there are no stream records available in the portion of the shard that the iterator points to, GetRecords returns an empty list. Note that it might take multiple calls to get to a portion of the shard that contains stream records. GetRecords can retrieve a maximum of 1 MB of data or 1000 stream records, whichever comes first.
|
24 | */
|
25 | getRecords(params: DynamoDBStreams.Types.GetRecordsInput, callback?: (err: AWSError, data: DynamoDBStreams.Types.GetRecordsOutput) => void): Request<DynamoDBStreams.Types.GetRecordsOutput, AWSError>;
|
26 | /**
|
27 | * Retrieves the stream records from a given shard. Specify a shard iterator using the ShardIterator parameter. The shard iterator specifies the position in the shard from which you want to start reading stream records sequentially. If there are no stream records available in the portion of the shard that the iterator points to, GetRecords returns an empty list. Note that it might take multiple calls to get to a portion of the shard that contains stream records. GetRecords can retrieve a maximum of 1 MB of data or 1000 stream records, whichever comes first.
|
28 | */
|
29 | getRecords(callback?: (err: AWSError, data: DynamoDBStreams.Types.GetRecordsOutput) => void): Request<DynamoDBStreams.Types.GetRecordsOutput, AWSError>;
|
30 | /**
|
31 | * Returns a shard iterator. A shard iterator provides information about how to retrieve the stream records from within a shard. Use the shard iterator in a subsequent GetRecords request to read the stream records from the shard. A shard iterator expires 15 minutes after it is returned to the requester.
|
32 | */
|
33 | getShardIterator(params: DynamoDBStreams.Types.GetShardIteratorInput, callback?: (err: AWSError, data: DynamoDBStreams.Types.GetShardIteratorOutput) => void): Request<DynamoDBStreams.Types.GetShardIteratorOutput, AWSError>;
|
34 | /**
|
35 | * Returns a shard iterator. A shard iterator provides information about how to retrieve the stream records from within a shard. Use the shard iterator in a subsequent GetRecords request to read the stream records from the shard. A shard iterator expires 15 minutes after it is returned to the requester.
|
36 | */
|
37 | getShardIterator(callback?: (err: AWSError, data: DynamoDBStreams.Types.GetShardIteratorOutput) => void): Request<DynamoDBStreams.Types.GetShardIteratorOutput, AWSError>;
|
38 | /**
|
39 | * Returns an array of stream ARNs associated with the current account and endpoint. If the TableName parameter is present, then ListStreams will return only the streams ARNs for that table. You can call ListStreams at a maximum rate of 5 times per second.
|
40 | */
|
41 | listStreams(params: DynamoDBStreams.Types.ListStreamsInput, callback?: (err: AWSError, data: DynamoDBStreams.Types.ListStreamsOutput) => void): Request<DynamoDBStreams.Types.ListStreamsOutput, AWSError>;
|
42 | /**
|
43 | * Returns an array of stream ARNs associated with the current account and endpoint. If the TableName parameter is present, then ListStreams will return only the streams ARNs for that table. You can call ListStreams at a maximum rate of 5 times per second.
|
44 | */
|
45 | listStreams(callback?: (err: AWSError, data: DynamoDBStreams.Types.ListStreamsOutput) => void): Request<DynamoDBStreams.Types.ListStreamsOutput, AWSError>;
|
46 | }
|
47 | declare namespace DynamoDBStreams {
|
48 | export type AttributeMap = {[key: string]: AttributeValue};
|
49 | export type AttributeName = string;
|
50 | export interface AttributeValue {
|
51 | |
52 |
|
53 |
|
54 | S?: StringAttributeValue;
|
55 | |
56 |
|
57 |
|
58 | N?: NumberAttributeValue;
|
59 | |
60 |
|
61 |
|
62 | B?: BinaryAttributeValue;
|
63 | |
64 |
|
65 |
|
66 | SS?: StringSetAttributeValue;
|
67 | |
68 |
|
69 |
|
70 | NS?: NumberSetAttributeValue;
|
71 | |
72 |
|
73 |
|
74 | BS?: BinarySetAttributeValue;
|
75 | |
76 |
|
77 |
|
78 | M?: MapAttributeValue;
|
79 | |
80 |
|
81 |
|
82 | L?: ListAttributeValue;
|
83 | |
84 |
|
85 |
|
86 | NULL?: NullAttributeValue;
|
87 | |
88 |
|
89 |
|
90 | BOOL?: BooleanAttributeValue;
|
91 | }
|
92 | export type BinaryAttributeValue = Buffer|Uint8Array|Blob|string;
|
93 | export type BinarySetAttributeValue = BinaryAttributeValue[];
|
94 | export type BooleanAttributeValue = boolean;
|
95 | export type _Date = Date;
|
96 | export interface DescribeStreamInput {
|
97 | |
98 |
|
99 |
|
100 | StreamArn: StreamArn;
|
101 | |
102 |
|
103 |
|
104 | Limit?: PositiveIntegerObject;
|
105 | |
106 |
|
107 |
|
108 | ExclusiveStartShardId?: ShardId;
|
109 | }
|
110 | export interface DescribeStreamOutput {
|
111 | |
112 |
|
113 |
|
114 | StreamDescription?: StreamDescription;
|
115 | }
|
116 | export interface GetRecordsInput {
|
117 | |
118 |
|
119 |
|
120 | ShardIterator: ShardIterator;
|
121 | |
122 |
|
123 |
|
124 | Limit?: PositiveIntegerObject;
|
125 | }
|
126 | export interface GetRecordsOutput {
|
127 | |
128 |
|
129 |
|
130 | Records?: RecordList;
|
131 | |
132 |
|
133 |
|
134 | NextShardIterator?: ShardIterator;
|
135 | }
|
136 | export interface GetShardIteratorInput {
|
137 | |
138 |
|
139 |
|
140 | StreamArn: StreamArn;
|
141 | |
142 |
|
143 |
|
144 | ShardId: ShardId;
|
145 | |
146 |
|
147 |
|
148 | ShardIteratorType: ShardIteratorType;
|
149 | |
150 |
|
151 |
|
152 | SequenceNumber?: SequenceNumber;
|
153 | }
|
154 | export interface GetShardIteratorOutput {
|
155 | |
156 |
|
157 |
|
158 | ShardIterator?: ShardIterator;
|
159 | }
|
160 | export interface Identity {
|
161 | |
162 |
|
163 |
|
164 | PrincipalId?: String;
|
165 | |
166 |
|
167 |
|
168 | Type?: String;
|
169 | }
|
170 | export type KeySchema = KeySchemaElement[];
|
171 | export type KeySchemaAttributeName = string;
|
172 | export interface KeySchemaElement {
|
173 | |
174 |
|
175 |
|
176 | AttributeName: KeySchemaAttributeName;
|
177 | |
178 |
|
179 |
|
180 | KeyType: KeyType;
|
181 | }
|
182 | export type KeyType = "HASH"|"RANGE"|string;
|
183 | export type ListAttributeValue = AttributeValue[];
|
184 | export interface ListStreamsInput {
|
185 | |
186 |
|
187 |
|
188 | TableName?: TableName;
|
189 | |
190 |
|
191 |
|
192 | Limit?: PositiveIntegerObject;
|
193 | |
194 |
|
195 |
|
196 | ExclusiveStartStreamArn?: StreamArn;
|
197 | }
|
198 | export interface ListStreamsOutput {
|
199 | |
200 |
|
201 |
|
202 | Streams?: StreamList;
|
203 | |
204 |
|
205 |
|
206 | LastEvaluatedStreamArn?: StreamArn;
|
207 | }
|
208 | export type MapAttributeValue = {[key: string]: AttributeValue};
|
209 | export type NullAttributeValue = boolean;
|
210 | export type NumberAttributeValue = string;
|
211 | export type NumberSetAttributeValue = NumberAttributeValue[];
|
212 | export type OperationType = "INSERT"|"MODIFY"|"REMOVE"|string;
|
213 | export type PositiveIntegerObject = number;
|
214 | export type PositiveLongObject = number;
|
215 | export interface Record {
|
216 | |
217 |
|
218 |
|
219 | eventID?: String;
|
220 | |
221 |
|
222 |
|
223 | eventName?: OperationType;
|
224 | |
225 |
|
226 |
|
227 | eventVersion?: String;
|
228 | |
229 |
|
230 |
|
231 | eventSource?: String;
|
232 | |
233 |
|
234 |
|
235 | awsRegion?: String;
|
236 | |
237 |
|
238 |
|
239 | dynamodb?: StreamRecord;
|
240 | |
241 |
|
242 |
|
243 | userIdentity?: Identity;
|
244 | }
|
245 | export type RecordList = Record[];
|
246 | export type SequenceNumber = string;
|
247 | export interface SequenceNumberRange {
|
248 | |
249 |
|
250 |
|
251 | StartingSequenceNumber?: SequenceNumber;
|
252 | |
253 |
|
254 |
|
255 | EndingSequenceNumber?: SequenceNumber;
|
256 | }
|
257 | export interface Shard {
|
258 | |
259 |
|
260 |
|
261 | ShardId?: ShardId;
|
262 | |
263 |
|
264 |
|
265 | SequenceNumberRange?: SequenceNumberRange;
|
266 | |
267 |
|
268 |
|
269 | ParentShardId?: ShardId;
|
270 | }
|
271 | export type ShardDescriptionList = Shard[];
|
272 | export type ShardId = string;
|
273 | export type ShardIterator = string;
|
274 | export type ShardIteratorType = "TRIM_HORIZON"|"LATEST"|"AT_SEQUENCE_NUMBER"|"AFTER_SEQUENCE_NUMBER"|string;
|
275 | export interface Stream {
|
276 | |
277 |
|
278 |
|
279 | StreamArn?: StreamArn;
|
280 | |
281 |
|
282 |
|
283 | TableName?: TableName;
|
284 | |
285 |
|
286 |
|
287 | StreamLabel?: String;
|
288 | }
|
289 | export type StreamArn = string;
|
290 | export interface StreamDescription {
|
291 | |
292 |
|
293 |
|
294 | StreamArn?: StreamArn;
|
295 | |
296 |
|
297 |
|
298 | StreamLabel?: String;
|
299 | |
300 |
|
301 |
|
302 | StreamStatus?: StreamStatus;
|
303 | |
304 |
|
305 |
|
306 | StreamViewType?: StreamViewType;
|
307 | |
308 |
|
309 |
|
310 | CreationRequestDateTime?: _Date;
|
311 | |
312 |
|
313 |
|
314 | TableName?: TableName;
|
315 | |
316 |
|
317 |
|
318 | KeySchema?: KeySchema;
|
319 | |
320 |
|
321 |
|
322 | Shards?: ShardDescriptionList;
|
323 | |
324 |
|
325 |
|
326 | LastEvaluatedShardId?: ShardId;
|
327 | }
|
328 | export type StreamList = Stream[];
|
329 | export interface StreamRecord {
|
330 | |
331 |
|
332 |
|
333 | ApproximateCreationDateTime?: _Date;
|
334 | |
335 |
|
336 |
|
337 | Keys?: AttributeMap;
|
338 | |
339 |
|
340 |
|
341 | NewImage?: AttributeMap;
|
342 | |
343 |
|
344 |
|
345 | OldImage?: AttributeMap;
|
346 | |
347 |
|
348 |
|
349 | SequenceNumber?: SequenceNumber;
|
350 | |
351 |
|
352 |
|
353 | SizeBytes?: PositiveLongObject;
|
354 | |
355 |
|
356 |
|
357 | StreamViewType?: StreamViewType;
|
358 | }
|
359 | export type StreamStatus = "ENABLING"|"ENABLED"|"DISABLING"|"DISABLED"|string;
|
360 | export type StreamViewType = "NEW_IMAGE"|"OLD_IMAGE"|"NEW_AND_OLD_IMAGES"|"KEYS_ONLY"|string;
|
361 | export type String = string;
|
362 | export type StringAttributeValue = string;
|
363 | export type StringSetAttributeValue = StringAttributeValue[];
|
364 | export type TableName = string;
|
365 | |
366 |
|
367 |
|
368 | export type apiVersion = "2012-08-10"|"latest"|string;
|
369 | export interface ClientApiVersions {
|
370 | |
371 |
|
372 |
|
373 | apiVersion?: apiVersion;
|
374 | }
|
375 | export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
|
376 | |
377 |
|
378 |
|
379 | export import Types = DynamoDBStreams;
|
380 | }
|
381 | export = DynamoDBStreams;
|