rdsdataservice.d.ts
  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-base';
  7  interface Blob {}
  8  declare class RDSDataService extends Service {
  9    /**
 10     * Constructs a service object. This object has one method for each API operation.
 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.  &lt;important&gt; &lt;p&gt;A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours.&lt;/p&gt; &lt;p&gt;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.&lt;/p&gt; &lt;p&gt;DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate &lt;code&gt;ExecuteStatement&lt;/code&gt; call with &lt;code&gt;continueAfterTimeout&lt;/code&gt; enabled.&lt;/p&gt; &lt;/important&gt; 
 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.  &lt;important&gt; &lt;p&gt;A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours.&lt;/p&gt; &lt;p&gt;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.&lt;/p&gt; &lt;p&gt;DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate &lt;code&gt;ExecuteStatement&lt;/code&gt; call with &lt;code&gt;continueAfterTimeout&lt;/code&gt; enabled.&lt;/p&gt; &lt;/important&gt; 
 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       * An array of arrays.
 69       */
 70      arrayValues?: ArrayOfArray;
 71      /**
 72       * An array of Boolean values.
 73       */
 74      booleanValues?: BooleanArray;
 75      /**
 76       * An array of integers.
 77       */
 78      doubleValues?: DoubleArray;
 79      /**
 80       * An array of floating point numbers.
 81       */
 82      longValues?: LongArray;
 83      /**
 84       * An array of strings.
 85       */
 86      stringValues?: StringArray;
 87    }
 88    export type ArrayValueList = Value[];
 89    export interface BatchExecuteStatementRequest {
 90      /**
 91       * The name of the database.
 92       */
 93      database?: DbName;
 94      /**
 95       * The parameter set for the batch operation. The SQL statement is executed as many times as the number of parameter sets provided. To execute a SQL statement with no parameters, use one of the following options:   Specify one or more empty parameter sets.   Use the ExecuteStatement operation instead of the BatchExecuteStatement operation.    Array parameters are not supported. 
 96       */
 97      parameterSets?: SqlParameterSets;
 98      /**
 99       * The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
100       */
101      resourceArn: Arn;
102      /**
103       * The name of the database schema.
104       */
105      schema?: DbName;
106      /**
107       * The name or ARN of the secret that enables access to the DB cluster.
108       */
109      secretArn: Arn;
110      /**
111       * The SQL statement to run.
112       */
113      sql: SqlStatement;
114      /**
115       * 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.
116       */
117      transactionId?: Id;
118    }
119    export interface BatchExecuteStatementResponse {
120      /**
121       * The execution results of each batch entry.
122       */
123      updateResults?: UpdateResults;
124    }
125    export interface BeginTransactionRequest {
126      /**
127       * The name of the database.
128       */
129      database?: DbName;
130      /**
131       * The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
132       */
133      resourceArn: Arn;
134      /**
135       * The name of the database schema.
136       */
137      schema?: DbName;
138      /**
139       * The name or ARN of the secret that enables access to the DB cluster.
140       */
141      secretArn: Arn;
142    }
143    export interface BeginTransactionResponse {
144      /**
145       * The transaction ID of the transaction started by the call.
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       * The type of the column.
160       */
161      arrayBaseColumnType?: Integer;
162      /**
163       * A value that indicates whether the column increments automatically.
164       */
165      isAutoIncrement?: Boolean;
166      /**
167       * A value that indicates whether the column is case-sensitive.
168       */
169      isCaseSensitive?: Boolean;
170      /**
171       * A value that indicates whether the column contains currency values.
172       */
173      isCurrency?: Boolean;
174      /**
175       * A value that indicates whether an integer column is signed.
176       */
177      isSigned?: Boolean;
178      /**
179       * The label for the column.
180       */
181      label?: String;
182      /**
183       * The name of the column.
184       */
185      name?: String;
186      /**
187       * A value that indicates whether the column is nullable.
188       */
189      nullable?: Integer;
190      /**
191       * The precision value of a decimal number column.
192       */
193      precision?: Integer;
194      /**
195       * The scale value of a decimal number column.
196       */
197      scale?: Integer;
198      /**
199       * The name of the schema that owns the table that includes the column.
200       */
201      schemaName?: String;
202      /**
203       * The name of the table that includes the column.
204       */
205      tableName?: String;
206      /**
207       * The type of the column.
208       */
209      type?: Integer;
210      /**
211       * The database-specific data type of the column.
212       */
213      typeName?: String;
214    }
215    export interface CommitTransactionRequest {
216      /**
217       * The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
218       */
219      resourceArn: Arn;
220      /**
221       * The name or ARN of the secret that enables access to the DB cluster.
222       */
223      secretArn: Arn;
224      /**
225       * The identifier of the transaction to end and commit.
226       */
227      transactionId: Id;
228    }
229    export interface CommitTransactionResponse {
230      /**
231       * The status of the commit operation.
232       */
233      transactionStatus?: TransactionStatus;
234    }
235    export type DbName = string;
236    export type DecimalReturnType = "STRING"|"DOUBLE_OR_LONG"|string;
237    export type DoubleArray = BoxedDouble[];
238    export interface ExecuteSqlRequest {
239      /**
240       * The Amazon Resource Name (ARN) of the secret that enables access to the DB cluster.
241       */
242      awsSecretStoreArn: Arn;
243      /**
244       * The name of the database.
245       */
246      database?: DbName;
247      /**
248       * The ARN of the Aurora Serverless DB cluster.
249       */
250      dbClusterOrInstanceArn: Arn;
251      /**
252       * The name of the database schema.
253       */
254      schema?: DbName;
255      /**
256       * 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. 
257       */
258      sqlStatements: SqlStatement;
259    }
260    export interface ExecuteSqlResponse {
261      /**
262       * The results of the SQL statement or statements.
263       */
264      sqlStatementResults?: SqlStatementResults;
265    }
266    export interface ExecuteStatementRequest {
267      /**
268       * 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. 
269       */
270      continueAfterTimeout?: Boolean;
271      /**
272       * The name of the database.
273       */
274      database?: DbName;
275      /**
276       * A value that indicates whether to include metadata in the results.
277       */
278      includeResultMetadata?: Boolean;
279      /**
280       * The parameters for the SQL statement.  Array parameters are not supported. 
281       */
282      parameters?: SqlParametersList;
283      /**
284       * The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
285       */
286      resourceArn: Arn;
287      /**
288       * Options that control how the result set is returned.
289       */
290      resultSetOptions?: ResultSetOptions;
291      /**
292       * The name of the database schema.  Currently, the schema parameter isn't supported. 
293       */
294      schema?: DbName;
295      /**
296       * The name or ARN of the secret that enables access to the DB cluster.
297       */
298      secretArn: Arn;
299      /**
300       * The SQL statement to run.
301       */
302      sql: SqlStatement;
303      /**
304       * 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.
305       */
306      transactionId?: Id;
307    }
308    export interface ExecuteStatementResponse {
309      /**
310       * Metadata for the columns included in the results.
311       */
312      columnMetadata?: Metadata;
313      /**
314       * Values for fields generated during the request.  &lt;note&gt; &lt;p&gt;The &lt;code&gt;generatedFields&lt;/code&gt; data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the &lt;code&gt;RETURNING&lt;/code&gt; clause. For more information, see &lt;a href=&quot;https://www.postgresql.org/docs/10/dml-returning.html&quot;&gt;Returning Data From Modified Rows&lt;/a&gt; in the PostgreSQL documentation.&lt;/p&gt; &lt;/note&gt; 
315       */
316      generatedFields?: FieldList;
317      /**
318       * The number of records updated by the request.
319       */
320      numberOfRecordsUpdated?: RecordsUpdated;
321      /**
322       * The records returned by the SQL statement.
323       */
324      records?: SqlRecords;
325    }
326    export interface Field {
327      /**
328       * An array of values.
329       */
330      arrayValue?: ArrayValue;
331      /**
332       * A value of BLOB data type.
333       */
334      blobValue?: _Blob;
335      /**
336       * A value of Boolean data type.
337       */
338      booleanValue?: BoxedBoolean;
339      /**
340       * A value of double data type.
341       */
342      doubleValue?: BoxedDouble;
343      /**
344       * A NULL value.
345       */
346      isNull?: BoxedBoolean;
347      /**
348       * A value of long data type.
349       */
350      longValue?: BoxedLong;
351      /**
352       * A value of string data type.
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       * The values returned in the record.
366       */
367      values?: Row;
368    }
369    export type Records = Record[];
370    export type RecordsUpdated = number;
371    export interface ResultFrame {
372      /**
373       * The records in the result set.
374       */
375      records?: Records;
376      /**
377       * The result-set metadata in the result set.
378       */
379      resultSetMetadata?: ResultSetMetadata;
380    }
381    export interface ResultSetMetadata {
382      /**
383       * The number of columns in the result set.
384       */
385      columnCount?: Long;
386      /**
387       * The metadata of the columns in the result set.
388       */
389      columnMetadata?: Metadata;
390    }
391    export interface ResultSetOptions {
392      /**
393       * 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. 
394       */
395      decimalReturnType?: DecimalReturnType;
396    }
397    export interface RollbackTransactionRequest {
398      /**
399       * The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
400       */
401      resourceArn: Arn;
402      /**
403       * The name or ARN of the secret that enables access to the DB cluster.
404       */
405      secretArn: Arn;
406      /**
407       * The identifier of the transaction to roll back.
408       */
409      transactionId: Id;
410    }
411    export interface RollbackTransactionResponse {
412      /**
413       * The status of the rollback operation.
414       */
415      transactionStatus?: TransactionStatus;
416    }
417    export type Row = Value[];
418    export interface SqlParameter {
419      /**
420       * The name of the parameter.
421       */
422      name?: ParameterName;
423      /**
424       * A hint that specifies the correct object type for data type mapping. Possible values are as follows:    DATE - The corresponding String parameter value is sent as an object of DATE type to the database. The accepted format is YYYY-MM-DD.    DECIMAL - The corresponding String parameter value is sent as an object of DECIMAL type to the database.    JSON - The corresponding String parameter value is sent as an object of JSON type to the database.    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].    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].    UUID - The corresponding String parameter value is sent as an object of UUID type to the database.   
425       */
426      typeHint?: TypeHint;
427      /**
428       * The value of the parameter.
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       * The number of records updated by a SQL statement.
439       */
440      numberOfRecordsUpdated?: RecordsUpdated;
441      /**
442       * The result set of the SQL statement.
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       * The attributes returned in the record.
452       */
453      attributes?: ArrayValueList;
454    }
455    export type TransactionStatus = string;
456    export type TypeHint = "JSON"|"UUID"|"TIMESTAMP"|"DATE"|"TIME"|"DECIMAL"|string;
457    export interface UpdateResult {
458      /**
459       * Values for fields generated during the request.
460       */
461      generatedFields?: FieldList;
462    }
463    export type UpdateResults = UpdateResult[];
464    export interface Value {
465      /**
466       * An array of column values.
467       */
468      arrayValues?: ArrayValueList;
469      /**
470       * A value for a column of big integer data type.
471       */
472      bigIntValue?: BoxedLong;
473      /**
474       * A value for a column of BIT data type.
475       */
476      bitValue?: BoxedBoolean;
477      /**
478       * A value for a column of BLOB data type.
479       */
480      blobValue?: _Blob;
481      /**
482       * A value for a column of double data type.
483       */
484      doubleValue?: BoxedDouble;
485      /**
486       * A value for a column of integer data type.
487       */
488      intValue?: BoxedInteger;
489      /**
490       * A NULL value.
491       */
492      isNull?: BoxedBoolean;
493      /**
494       * A value for a column of real data type.
495       */
496      realValue?: BoxedFloat;
497      /**
498       * A value for a column of string data type.
499       */
500      stringValue?: String;
501      /**
502       * A value for a column of STRUCT data type.
503       */
504      structValue?: StructValue;
505    }
506    /**
507     * 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.
508     */
509    export type apiVersion = "2018-08-01"|"latest"|string;
510    export interface ClientApiVersions {
511      /**
512       * 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.
513       */
514      apiVersion?: apiVersion;
515    }
516    export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
517    /**
518     * Contains interfaces for use with the RDSDataService client.
519     */
520    export import Types = RDSDataService;
521  }
522  export = RDSDataService;