rdsdataservice.d.ts
20.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
import {Request} from '../lib/request';
import {Response} from '../lib/response';
import {AWSError} from '../lib/error';
import {Service} from '../lib/service';
import {ServiceConfigurationOptions} from '../lib/service';
import {ConfigBase as Config} from '../lib/config';
interface Blob {}
declare class RDSDataService extends Service {
/**
* Constructs a service object. This object has one method for each API operation.
*/
constructor(options?: RDSDataService.Types.ClientConfiguration)
config: Config & RDSDataService.Types.ClientConfiguration;
/**
* 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.
*/
batchExecuteStatement(params: RDSDataService.Types.BatchExecuteStatementRequest, callback?: (err: AWSError, data: RDSDataService.Types.BatchExecuteStatementResponse) => void): Request<RDSDataService.Types.BatchExecuteStatementResponse, AWSError>;
/**
* 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.
*/
batchExecuteStatement(callback?: (err: AWSError, data: RDSDataService.Types.BatchExecuteStatementResponse) => void): Request<RDSDataService.Types.BatchExecuteStatementResponse, AWSError>;
/**
* 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>
*/
beginTransaction(params: RDSDataService.Types.BeginTransactionRequest, callback?: (err: AWSError, data: RDSDataService.Types.BeginTransactionResponse) => void): Request<RDSDataService.Types.BeginTransactionResponse, AWSError>;
/**
* 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>
*/
beginTransaction(callback?: (err: AWSError, data: RDSDataService.Types.BeginTransactionResponse) => void): Request<RDSDataService.Types.BeginTransactionResponse, AWSError>;
/**
* Ends a SQL transaction started with the BeginTransaction operation and commits the changes.
*/
commitTransaction(params: RDSDataService.Types.CommitTransactionRequest, callback?: (err: AWSError, data: RDSDataService.Types.CommitTransactionResponse) => void): Request<RDSDataService.Types.CommitTransactionResponse, AWSError>;
/**
* Ends a SQL transaction started with the BeginTransaction operation and commits the changes.
*/
commitTransaction(callback?: (err: AWSError, data: RDSDataService.Types.CommitTransactionResponse) => void): Request<RDSDataService.Types.CommitTransactionResponse, AWSError>;
/**
* Runs one or more SQL statements. This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation.
*/
executeSql(params: RDSDataService.Types.ExecuteSqlRequest, callback?: (err: AWSError, data: RDSDataService.Types.ExecuteSqlResponse) => void): Request<RDSDataService.Types.ExecuteSqlResponse, AWSError>;
/**
* Runs one or more SQL statements. This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation.
*/
executeSql(callback?: (err: AWSError, data: RDSDataService.Types.ExecuteSqlResponse) => void): Request<RDSDataService.Types.ExecuteSqlResponse, AWSError>;
/**
* 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 or 1,000 records. If the call returns more than 1 MB of response data or over 1,000 records, the call is terminated.
*/
executeStatement(params: RDSDataService.Types.ExecuteStatementRequest, callback?: (err: AWSError, data: RDSDataService.Types.ExecuteStatementResponse) => void): Request<RDSDataService.Types.ExecuteStatementResponse, AWSError>;
/**
* 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 or 1,000 records. If the call returns more than 1 MB of response data or over 1,000 records, the call is terminated.
*/
executeStatement(callback?: (err: AWSError, data: RDSDataService.Types.ExecuteStatementResponse) => void): Request<RDSDataService.Types.ExecuteStatementResponse, AWSError>;
/**
* Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
*/
rollbackTransaction(params: RDSDataService.Types.RollbackTransactionRequest, callback?: (err: AWSError, data: RDSDataService.Types.RollbackTransactionResponse) => void): Request<RDSDataService.Types.RollbackTransactionResponse, AWSError>;
/**
* Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
*/
rollbackTransaction(callback?: (err: AWSError, data: RDSDataService.Types.RollbackTransactionResponse) => void): Request<RDSDataService.Types.RollbackTransactionResponse, AWSError>;
}
declare namespace RDSDataService {
export type Arn = string;
export type ArrayOfArray = ArrayValue[];
export interface ArrayValue {
/**
* An array of arrays.
*/
arrayValues?: ArrayOfArray;
/**
* An array of Boolean values.
*/
booleanValues?: BooleanArray;
/**
* An array of integers.
*/
doubleValues?: DoubleArray;
/**
* An array of floating point numbers.
*/
longValues?: LongArray;
/**
* An array of strings.
*/
stringValues?: StringArray;
}
export type ArrayValueList = Value[];
export interface BatchExecuteStatementRequest {
/**
* The name of the database.
*/
database?: DbName;
/**
* The parameter set for the batch operation. The maximum number of parameters in a parameter set is 1,000.
*/
parameterSets?: SqlParameterSets;
/**
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
*/
resourceArn: Arn;
/**
* The name of the database schema.
*/
schema?: DbName;
/**
* The name or ARN of the secret that enables access to the DB cluster.
*/
secretArn: Arn;
/**
* The SQL statement to run.
*/
sql: SqlStatement;
/**
* The identifier of a transaction that was started by using the BeginTransaction operation. Specify the transaction ID of the transaction that you want to include the SQL statement in. If the SQL statement is not part of a transaction, don't set this parameter.
*/
transactionId?: Id;
}
export interface BatchExecuteStatementResponse {
/**
* The execution results of each batch entry.
*/
updateResults?: UpdateResults;
}
export interface BeginTransactionRequest {
/**
* The name of the database.
*/
database?: DbName;
/**
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
*/
resourceArn: Arn;
/**
* The name of the database schema.
*/
schema?: DbName;
/**
* The name or ARN of the secret that enables access to the DB cluster.
*/
secretArn: Arn;
}
export interface BeginTransactionResponse {
/**
* The transaction ID of the transaction started by the call.
*/
transactionId?: Id;
}
export type _Blob = Buffer|Uint8Array|Blob|string;
export type Boolean = boolean;
export type BooleanArray = BoxedBoolean[];
export type BoxedBoolean = boolean;
export type BoxedDouble = number;
export type BoxedFloat = number;
export type BoxedInteger = number;
export type BoxedLong = number;
export interface ColumnMetadata {
/**
* The type of the column.
*/
arrayBaseColumnType?: Integer;
/**
* A value that indicates whether the column increments automatically.
*/
isAutoIncrement?: Boolean;
/**
* A value that indicates whether the column is case-sensitive.
*/
isCaseSensitive?: Boolean;
/**
* A value that indicates whether the column contains currency values.
*/
isCurrency?: Boolean;
/**
* A value that indicates whether an integer column is signed.
*/
isSigned?: Boolean;
/**
* The label for the column.
*/
label?: String;
/**
* The name of the column.
*/
name?: String;
/**
* A value that indicates whether the column is nullable.
*/
nullable?: Integer;
/**
* The precision value of a decimal number column.
*/
precision?: Integer;
/**
* The scale value of a decimal number column.
*/
scale?: Integer;
/**
* The name of the schema that owns the table that includes the column.
*/
schemaName?: String;
/**
* The name of the table that includes the column.
*/
tableName?: String;
/**
* The type of the column.
*/
type?: Integer;
/**
* The database-specific data type of the column.
*/
typeName?: String;
}
export interface CommitTransactionRequest {
/**
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
*/
resourceArn: Arn;
/**
* The name or ARN of the secret that enables access to the DB cluster.
*/
secretArn: Arn;
/**
* The identifier of the transaction to end and commit.
*/
transactionId: Id;
}
export interface CommitTransactionResponse {
/**
* The status of the commit operation.
*/
transactionStatus?: TransactionStatus;
}
export type DbName = string;
export type DecimalReturnType = "DOUBLE_OR_LONG"|"STRING"|string;
export type DoubleArray = BoxedDouble[];
export interface ExecuteSqlRequest {
/**
* The Amazon Resource Name (ARN) of the secret that enables access to the DB cluster.
*/
awsSecretStoreArn: Arn;
/**
* The name of the database.
*/
database?: DbName;
/**
* The ARN of the Aurora Serverless DB cluster.
*/
dbClusterOrInstanceArn: Arn;
/**
* The name of the database schema.
*/
schema?: DbName;
/**
* One or more SQL statements to run on the DB cluster. You can separate SQL statements from each other with a semicolon (;). Any valid SQL statement is permitted, including data definition, data manipulation, and commit statements.
*/
sqlStatements: SqlStatement;
}
export interface ExecuteSqlResponse {
/**
* The results of the SQL statement or statements.
*/
sqlStatementResults?: SqlStatementResults;
}
export interface ExecuteStatementRequest {
/**
* A value that indicates whether to continue running the statement after the call times out. By default, the statement stops running when the call times out. For DDL statements, we recommend continuing to run the statement after the call times out. When a DDL statement terminates before it is finished running, it can result in errors and possibly corrupted data structures.
*/
continueAfterTimeout?: Boolean;
/**
* The name of the database.
*/
database?: DbName;
/**
* A value that indicates whether to include metadata in the results.
*/
includeResultMetadata?: Boolean;
/**
* The parameters for the SQL statement.
*/
parameters?: SqlParametersList;
/**
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
*/
resourceArn: Arn;
/**
* Options that control how the result set is returned.
*/
resultSetOptions?: ResultSetOptions;
/**
* The name of the database schema.
*/
schema?: DbName;
/**
* The name or ARN of the secret that enables access to the DB cluster.
*/
secretArn: Arn;
/**
* The SQL statement to run.
*/
sql: SqlStatement;
/**
* The identifier of a transaction that was started by using the BeginTransaction operation. Specify the transaction ID of the transaction that you want to include the SQL statement in. If the SQL statement is not part of a transaction, don't set this parameter.
*/
transactionId?: Id;
}
export interface ExecuteStatementResponse {
/**
* Metadata for the columns included in the results.
*/
columnMetadata?: Metadata;
/**
* Values for fields generated during the request. <note> <p>The <code>generatedFields</code> data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the <code>RETURNING</code> clause. For more information, see <a href="https://www.postgresql.org/docs/10/dml-returning.html">Returning Data From Modified Rows</a> in the PostgreSQL documentation.</p> </note>
*/
generatedFields?: FieldList;
/**
* The number of records updated by the request.
*/
numberOfRecordsUpdated?: RecordsUpdated;
/**
* The records returned by the SQL statement.
*/
records?: SqlRecords;
}
export interface Field {
/**
* An array of values.
*/
arrayValue?: ArrayValue;
/**
* A value of BLOB data type.
*/
blobValue?: _Blob;
/**
* A value of Boolean data type.
*/
booleanValue?: BoxedBoolean;
/**
* A value of double data type.
*/
doubleValue?: BoxedDouble;
/**
* A NULL value.
*/
isNull?: BoxedBoolean;
/**
* A value of long data type.
*/
longValue?: BoxedLong;
/**
* A value of string data type.
*/
stringValue?: String;
}
export type FieldList = Field[];
export type Id = string;
export type Integer = number;
export type Long = number;
export type LongArray = BoxedLong[];
export type Metadata = ColumnMetadata[];
export type ParameterName = string;
export interface Record {
/**
* The values returned in the record.
*/
values?: Row;
}
export type Records = Record[];
export type RecordsUpdated = number;
export interface ResultFrame {
/**
* The records in the result set.
*/
records?: Records;
/**
* The result-set metadata in the result set.
*/
resultSetMetadata?: ResultSetMetadata;
}
export interface ResultSetMetadata {
/**
* The number of columns in the result set.
*/
columnCount?: Long;
/**
* The metadata of the columns in the result set.
*/
columnMetadata?: Metadata;
}
export interface ResultSetOptions {
/**
* A value that indicates how a field of DECIMAL type is represented in the response. The value of STRING, the default, specifies that it is converted to a String value. The value of DOUBLE_OR_LONG specifies that it is converted to a Long value if its scale is 0, or to a Double value otherwise. Conversion to Double or Long can result in roundoff errors due to precision loss. We recommend converting to String, especially when working with currency values.
*/
decimalReturnType?: DecimalReturnType;
}
export interface RollbackTransactionRequest {
/**
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
*/
resourceArn: Arn;
/**
* The name or ARN of the secret that enables access to the DB cluster.
*/
secretArn: Arn;
/**
* The identifier of the transaction to roll back.
*/
transactionId: Id;
}
export interface RollbackTransactionResponse {
/**
* The status of the rollback operation.
*/
transactionStatus?: TransactionStatus;
}
export type Row = Value[];
export interface SqlParameter {
/**
* The name of the parameter.
*/
name?: ParameterName;
/**
* A hint that specifies the correct object type for data type mapping. Values: DECIMAL - The corresponding String parameter value is sent as an object of DECIMAL type to the database. TIMESTAMP - The corresponding String parameter value is sent as an object of TIMESTAMP type to the database. The accepted format is YYYY-MM-DD HH:MM:SS[.FFF]. TIME - The corresponding String parameter value is sent as an object of TIME type to the database. The accepted format is HH:MM:SS[.FFF]. DATE - The corresponding String parameter value is sent as an object of DATE type to the database. The accepted format is YYYY-MM-DD.
*/
typeHint?: TypeHint;
/**
* The value of the parameter.
*/
value?: Field;
}
export type SqlParameterSets = SqlParametersList[];
export type SqlParametersList = SqlParameter[];
export type SqlRecords = FieldList[];
export type SqlStatement = string;
export interface SqlStatementResult {
/**
* The number of records updated by a SQL statement.
*/
numberOfRecordsUpdated?: RecordsUpdated;
/**
* The result set of the SQL statement.
*/
resultFrame?: ResultFrame;
}
export type SqlStatementResults = SqlStatementResult[];
export type String = string;
export type StringArray = String[];
export interface StructValue {
/**
* The attributes returned in the record.
*/
attributes?: ArrayValueList;
}
export type TransactionStatus = string;
export type TypeHint = "DATE"|"DECIMAL"|"TIME"|"TIMESTAMP"|string;
export interface UpdateResult {
/**
* Values for fields generated during the request.
*/
generatedFields?: FieldList;
}
export type UpdateResults = UpdateResult[];
export interface Value {
/**
* An array of column values.
*/
arrayValues?: ArrayValueList;
/**
* A value for a column of big integer data type.
*/
bigIntValue?: BoxedLong;
/**
* A value for a column of BIT data type.
*/
bitValue?: BoxedBoolean;
/**
* A value for a column of BLOB data type.
*/
blobValue?: _Blob;
/**
* A value for a column of double data type.
*/
doubleValue?: BoxedDouble;
/**
* A value for a column of integer data type.
*/
intValue?: BoxedInteger;
/**
* A NULL value.
*/
isNull?: BoxedBoolean;
/**
* A value for a column of real data type.
*/
realValue?: BoxedFloat;
/**
* A value for a column of string data type.
*/
stringValue?: String;
/**
* A value for a column of STRUCT data type.
*/
structValue?: StructValue;
}
/**
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
*/
export type apiVersion = "2018-08-01"|"latest"|string;
export interface ClientApiVersions {
/**
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
*/
apiVersion?: apiVersion;
}
export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
/**
* Contains interfaces for use with the RDSDataService client.
*/
export import Types = RDSDataService;
}
export = RDSDataService;