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 RDSDataService extends Service {
|
9 | |
10 |
|
11 |
|
12 | constructor(options?: RDSDataService.Types.ClientConfiguration)
|
13 | config: Config & RDSDataService.Types.ClientConfiguration;
|
14 | /**
|
15 | * Runs a batch SQL statement over an array of data. You can run bulk update and insert operations for multiple records using a DML statement with different parameter sets. Bulk operations can provide a significant performance improvement over individual insert and update operations. If a call isn't part of a transaction because it doesn't include the transactionID parameter, changes that result from the call are committed automatically.
|
16 | */
|
17 | batchExecuteStatement(params: RDSDataService.Types.BatchExecuteStatementRequest, callback?: (err: AWSError, data: RDSDataService.Types.BatchExecuteStatementResponse) => void): Request<RDSDataService.Types.BatchExecuteStatementResponse, AWSError>;
|
18 | /**
|
19 | * Runs a batch SQL statement over an array of data. You can run bulk update and insert operations for multiple records using a DML statement with different parameter sets. Bulk operations can provide a significant performance improvement over individual insert and update operations. If a call isn't part of a transaction because it doesn't include the transactionID parameter, changes that result from the call are committed automatically.
|
20 | */
|
21 | batchExecuteStatement(callback?: (err: AWSError, data: RDSDataService.Types.BatchExecuteStatementResponse) => void): Request<RDSDataService.Types.BatchExecuteStatementResponse, AWSError>;
|
22 | /**
|
23 | * Starts a SQL transaction. <important> <p>A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours.</p> <p>A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before it's committed, it's rolled back automatically.</p> <p>DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate <code>ExecuteStatement</code> call with <code>continueAfterTimeout</code> enabled.</p> </important>
|
24 | */
|
25 | beginTransaction(params: RDSDataService.Types.BeginTransactionRequest, callback?: (err: AWSError, data: RDSDataService.Types.BeginTransactionResponse) => void): Request<RDSDataService.Types.BeginTransactionResponse, AWSError>;
|
26 | /**
|
27 | * Starts a SQL transaction. <important> <p>A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours.</p> <p>A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before it's committed, it's rolled back automatically.</p> <p>DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate <code>ExecuteStatement</code> call with <code>continueAfterTimeout</code> enabled.</p> </important>
|
28 | */
|
29 | beginTransaction(callback?: (err: AWSError, data: RDSDataService.Types.BeginTransactionResponse) => void): Request<RDSDataService.Types.BeginTransactionResponse, AWSError>;
|
30 | /**
|
31 | * Ends a SQL transaction started with the BeginTransaction operation and commits the changes.
|
32 | */
|
33 | commitTransaction(params: RDSDataService.Types.CommitTransactionRequest, callback?: (err: AWSError, data: RDSDataService.Types.CommitTransactionResponse) => void): Request<RDSDataService.Types.CommitTransactionResponse, AWSError>;
|
34 | /**
|
35 | * Ends a SQL transaction started with the BeginTransaction operation and commits the changes.
|
36 | */
|
37 | commitTransaction(callback?: (err: AWSError, data: RDSDataService.Types.CommitTransactionResponse) => void): Request<RDSDataService.Types.CommitTransactionResponse, AWSError>;
|
38 | /**
|
39 | * Runs one or more SQL statements. This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation.
|
40 | */
|
41 | executeSql(params: RDSDataService.Types.ExecuteSqlRequest, callback?: (err: AWSError, data: RDSDataService.Types.ExecuteSqlResponse) => void): Request<RDSDataService.Types.ExecuteSqlResponse, AWSError>;
|
42 | /**
|
43 | * Runs one or more SQL statements. This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation.
|
44 | */
|
45 | executeSql(callback?: (err: AWSError, data: RDSDataService.Types.ExecuteSqlResponse) => void): Request<RDSDataService.Types.ExecuteSqlResponse, AWSError>;
|
46 | /**
|
47 | * Runs a SQL statement against a database. If a call isn't part of a transaction because it doesn't include the transactionID parameter, changes that result from the call are committed automatically. The response size limit is 1 MB. If the call returns more than 1 MB of response data, the call is terminated.
|
48 | */
|
49 | executeStatement(params: RDSDataService.Types.ExecuteStatementRequest, callback?: (err: AWSError, data: RDSDataService.Types.ExecuteStatementResponse) => void): Request<RDSDataService.Types.ExecuteStatementResponse, AWSError>;
|
50 | /**
|
51 | * Runs a SQL statement against a database. If a call isn't part of a transaction because it doesn't include the transactionID parameter, changes that result from the call are committed automatically. The response size limit is 1 MB. If the call returns more than 1 MB of response data, the call is terminated.
|
52 | */
|
53 | executeStatement(callback?: (err: AWSError, data: RDSDataService.Types.ExecuteStatementResponse) => void): Request<RDSDataService.Types.ExecuteStatementResponse, AWSError>;
|
54 | /**
|
55 | * Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
|
56 | */
|
57 | rollbackTransaction(params: RDSDataService.Types.RollbackTransactionRequest, callback?: (err: AWSError, data: RDSDataService.Types.RollbackTransactionResponse) => void): Request<RDSDataService.Types.RollbackTransactionResponse, AWSError>;
|
58 | /**
|
59 | * Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
|
60 | */
|
61 | rollbackTransaction(callback?: (err: AWSError, data: RDSDataService.Types.RollbackTransactionResponse) => void): Request<RDSDataService.Types.RollbackTransactionResponse, AWSError>;
|
62 | }
|
63 | declare namespace RDSDataService {
|
64 | export type Arn = string;
|
65 | export type ArrayOfArray = ArrayValue[];
|
66 | export interface ArrayValue {
|
67 | |
68 |
|
69 |
|
70 | arrayValues?: ArrayOfArray;
|
71 | |
72 |
|
73 |
|
74 | booleanValues?: BooleanArray;
|
75 | |
76 |
|
77 |
|
78 | doubleValues?: DoubleArray;
|
79 | |
80 |
|
81 |
|
82 | longValues?: LongArray;
|
83 | |
84 |
|
85 |
|
86 | stringValues?: StringArray;
|
87 | }
|
88 | export type ArrayValueList = Value[];
|
89 | export interface BatchExecuteStatementRequest {
|
90 | |
91 |
|
92 |
|
93 | database?: DbName;
|
94 | |
95 |
|
96 |
|
97 | parameterSets?: SqlParameterSets;
|
98 | |
99 |
|
100 |
|
101 | resourceArn: Arn;
|
102 | |
103 |
|
104 |
|
105 | schema?: DbName;
|
106 | |
107 |
|
108 |
|
109 | secretArn: Arn;
|
110 | |
111 |
|
112 |
|
113 | sql: SqlStatement;
|
114 | |
115 |
|
116 |
|
117 | transactionId?: Id;
|
118 | }
|
119 | export interface BatchExecuteStatementResponse {
|
120 | |
121 |
|
122 |
|
123 | updateResults?: UpdateResults;
|
124 | }
|
125 | export interface BeginTransactionRequest {
|
126 | |
127 |
|
128 |
|
129 | database?: DbName;
|
130 | |
131 |
|
132 |
|
133 | resourceArn: Arn;
|
134 | |
135 |
|
136 |
|
137 | schema?: DbName;
|
138 | |
139 |
|
140 |
|
141 | secretArn: Arn;
|
142 | }
|
143 | export interface BeginTransactionResponse {
|
144 | |
145 |
|
146 |
|
147 | transactionId?: Id;
|
148 | }
|
149 | export type _Blob = Buffer|Uint8Array|Blob|string;
|
150 | export type Boolean = boolean;
|
151 | export type BooleanArray = BoxedBoolean[];
|
152 | export type BoxedBoolean = boolean;
|
153 | export type BoxedDouble = number;
|
154 | export type BoxedFloat = number;
|
155 | export type BoxedInteger = number;
|
156 | export type BoxedLong = number;
|
157 | export interface ColumnMetadata {
|
158 | |
159 |
|
160 |
|
161 | arrayBaseColumnType?: Integer;
|
162 | |
163 |
|
164 |
|
165 | isAutoIncrement?: Boolean;
|
166 | |
167 |
|
168 |
|
169 | isCaseSensitive?: Boolean;
|
170 | |
171 |
|
172 |
|
173 | isCurrency?: Boolean;
|
174 | |
175 |
|
176 |
|
177 | isSigned?: Boolean;
|
178 | |
179 |
|
180 |
|
181 | label?: String;
|
182 | |
183 |
|
184 |
|
185 | name?: String;
|
186 | |
187 |
|
188 |
|
189 | nullable?: Integer;
|
190 | |
191 |
|
192 |
|
193 | precision?: Integer;
|
194 | |
195 |
|
196 |
|
197 | scale?: Integer;
|
198 | |
199 |
|
200 |
|
201 | schemaName?: String;
|
202 | |
203 |
|
204 |
|
205 | tableName?: String;
|
206 | |
207 |
|
208 |
|
209 | type?: Integer;
|
210 | |
211 |
|
212 |
|
213 | typeName?: String;
|
214 | }
|
215 | export interface CommitTransactionRequest {
|
216 | |
217 |
|
218 |
|
219 | resourceArn: Arn;
|
220 | |
221 |
|
222 |
|
223 | secretArn: Arn;
|
224 | |
225 |
|
226 |
|
227 | transactionId: Id;
|
228 | }
|
229 | export interface CommitTransactionResponse {
|
230 | |
231 |
|
232 |
|
233 | transactionStatus?: TransactionStatus;
|
234 | }
|
235 | export type DbName = string;
|
236 | export type DecimalReturnType = "DOUBLE_OR_LONG"|"STRING"|string;
|
237 | export type DoubleArray = BoxedDouble[];
|
238 | export interface ExecuteSqlRequest {
|
239 | |
240 |
|
241 |
|
242 | awsSecretStoreArn: Arn;
|
243 | |
244 |
|
245 |
|
246 | database?: DbName;
|
247 | |
248 |
|
249 |
|
250 | dbClusterOrInstanceArn: Arn;
|
251 | |
252 |
|
253 |
|
254 | schema?: DbName;
|
255 | |
256 |
|
257 |
|
258 | sqlStatements: SqlStatement;
|
259 | }
|
260 | export interface ExecuteSqlResponse {
|
261 | |
262 |
|
263 |
|
264 | sqlStatementResults?: SqlStatementResults;
|
265 | }
|
266 | export interface ExecuteStatementRequest {
|
267 | |
268 |
|
269 |
|
270 | continueAfterTimeout?: Boolean;
|
271 | |
272 |
|
273 |
|
274 | database?: DbName;
|
275 | |
276 |
|
277 |
|
278 | includeResultMetadata?: Boolean;
|
279 | |
280 |
|
281 |
|
282 | parameters?: SqlParametersList;
|
283 | |
284 |
|
285 |
|
286 | resourceArn: Arn;
|
287 | |
288 |
|
289 |
|
290 | resultSetOptions?: ResultSetOptions;
|
291 | |
292 |
|
293 |
|
294 | schema?: DbName;
|
295 | |
296 |
|
297 |
|
298 | secretArn: Arn;
|
299 | |
300 |
|
301 |
|
302 | sql: SqlStatement;
|
303 | |
304 |
|
305 |
|
306 | transactionId?: Id;
|
307 | }
|
308 | export interface ExecuteStatementResponse {
|
309 | |
310 |
|
311 |
|
312 | columnMetadata?: Metadata;
|
313 | |
314 |
|
315 |
|
316 | generatedFields?: FieldList;
|
317 | |
318 |
|
319 |
|
320 | numberOfRecordsUpdated?: RecordsUpdated;
|
321 | |
322 |
|
323 |
|
324 | records?: SqlRecords;
|
325 | }
|
326 | export interface Field {
|
327 | |
328 |
|
329 |
|
330 | arrayValue?: ArrayValue;
|
331 | |
332 |
|
333 |
|
334 | blobValue?: _Blob;
|
335 | |
336 |
|
337 |
|
338 | booleanValue?: BoxedBoolean;
|
339 | |
340 |
|
341 |
|
342 | doubleValue?: BoxedDouble;
|
343 | |
344 |
|
345 |
|
346 | isNull?: BoxedBoolean;
|
347 | |
348 |
|
349 |
|
350 | longValue?: BoxedLong;
|
351 | |
352 |
|
353 |
|
354 | stringValue?: String;
|
355 | }
|
356 | export type FieldList = Field[];
|
357 | export type Id = string;
|
358 | export type Integer = number;
|
359 | export type Long = number;
|
360 | export type LongArray = BoxedLong[];
|
361 | export type Metadata = ColumnMetadata[];
|
362 | export type ParameterName = string;
|
363 | export interface Record {
|
364 | |
365 |
|
366 |
|
367 | values?: Row;
|
368 | }
|
369 | export type Records = Record[];
|
370 | export type RecordsUpdated = number;
|
371 | export interface ResultFrame {
|
372 | |
373 |
|
374 |
|
375 | records?: Records;
|
376 | |
377 |
|
378 |
|
379 | resultSetMetadata?: ResultSetMetadata;
|
380 | }
|
381 | export interface ResultSetMetadata {
|
382 | |
383 |
|
384 |
|
385 | columnCount?: Long;
|
386 | |
387 |
|
388 |
|
389 | columnMetadata?: Metadata;
|
390 | }
|
391 | export interface ResultSetOptions {
|
392 | |
393 |
|
394 |
|
395 | decimalReturnType?: DecimalReturnType;
|
396 | }
|
397 | export interface RollbackTransactionRequest {
|
398 | |
399 |
|
400 |
|
401 | resourceArn: Arn;
|
402 | |
403 |
|
404 |
|
405 | secretArn: Arn;
|
406 | |
407 |
|
408 |
|
409 | transactionId: Id;
|
410 | }
|
411 | export interface RollbackTransactionResponse {
|
412 | |
413 |
|
414 |
|
415 | transactionStatus?: TransactionStatus;
|
416 | }
|
417 | export type Row = Value[];
|
418 | export interface SqlParameter {
|
419 | |
420 |
|
421 |
|
422 | name?: ParameterName;
|
423 | |
424 |
|
425 |
|
426 | typeHint?: TypeHint;
|
427 | |
428 |
|
429 |
|
430 | value?: Field;
|
431 | }
|
432 | export type SqlParameterSets = SqlParametersList[];
|
433 | export type SqlParametersList = SqlParameter[];
|
434 | export type SqlRecords = FieldList[];
|
435 | export type SqlStatement = string;
|
436 | export interface SqlStatementResult {
|
437 | |
438 |
|
439 |
|
440 | numberOfRecordsUpdated?: RecordsUpdated;
|
441 | |
442 |
|
443 |
|
444 | resultFrame?: ResultFrame;
|
445 | }
|
446 | export type SqlStatementResults = SqlStatementResult[];
|
447 | export type String = string;
|
448 | export type StringArray = String[];
|
449 | export interface StructValue {
|
450 | |
451 |
|
452 |
|
453 | attributes?: ArrayValueList;
|
454 | }
|
455 | export type TransactionStatus = string;
|
456 | export type TypeHint = "DATE"|"DECIMAL"|"TIME"|"TIMESTAMP"|string;
|
457 | export interface UpdateResult {
|
458 | |
459 |
|
460 |
|
461 | generatedFields?: FieldList;
|
462 | }
|
463 | export type UpdateResults = UpdateResult[];
|
464 | export interface Value {
|
465 | |
466 |
|
467 |
|
468 | arrayValues?: ArrayValueList;
|
469 | |
470 |
|
471 |
|
472 | bigIntValue?: BoxedLong;
|
473 | |
474 |
|
475 |
|
476 | bitValue?: BoxedBoolean;
|
477 | |
478 |
|
479 |
|
480 | blobValue?: _Blob;
|
481 | |
482 |
|
483 |
|
484 | doubleValue?: BoxedDouble;
|
485 | |
486 |
|
487 |
|
488 | intValue?: BoxedInteger;
|
489 | |
490 |
|
491 |
|
492 | isNull?: BoxedBoolean;
|
493 | |
494 |
|
495 |
|
496 | realValue?: BoxedFloat;
|
497 | |
498 |
|
499 |
|
500 | stringValue?: String;
|
501 | |
502 |
|
503 |
|
504 | structValue?: StructValue;
|
505 | }
|
506 | |
507 |
|
508 |
|
509 | export type apiVersion = "2018-08-01"|"latest"|string;
|
510 | export interface ClientApiVersions {
|
511 | |
512 |
|
513 |
|
514 | apiVersion?: apiVersion;
|
515 | }
|
516 | export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
|
517 | |
518 |
|
519 |
|
520 | export import Types = RDSDataService;
|
521 | }
|
522 | export = RDSDataService;
|