/ cloudformation-templates / node_modules / aws-cdk / node_modules / aws-sdk / clients / redshiftdata.d.ts
redshiftdata.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 RedshiftData extends Service { 9 /** 10 * Constructs a service object. This object has one method for each API operation. 11 */ 12 constructor(options?: RedshiftData.Types.ClientConfiguration) 13 config: Config & RedshiftData.Types.ClientConfiguration; 14 /** 15 * Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 16 */ 17 batchExecuteStatement(params: RedshiftData.Types.BatchExecuteStatementInput, callback?: (err: AWSError, data: RedshiftData.Types.BatchExecuteStatementOutput) => void): Request<RedshiftData.Types.BatchExecuteStatementOutput, AWSError>; 18 /** 19 * Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 20 */ 21 batchExecuteStatement(callback?: (err: AWSError, data: RedshiftData.Types.BatchExecuteStatementOutput) => void): Request<RedshiftData.Types.BatchExecuteStatementOutput, AWSError>; 22 /** 23 * Cancels a running query. To be canceled, a query must be running. 24 */ 25 cancelStatement(params: RedshiftData.Types.CancelStatementRequest, callback?: (err: AWSError, data: RedshiftData.Types.CancelStatementResponse) => void): Request<RedshiftData.Types.CancelStatementResponse, AWSError>; 26 /** 27 * Cancels a running query. To be canceled, a query must be running. 28 */ 29 cancelStatement(callback?: (err: AWSError, data: RedshiftData.Types.CancelStatementResponse) => void): Request<RedshiftData.Types.CancelStatementResponse, AWSError>; 30 /** 31 * Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information includes when the query started, when it finished, the query status, the number of rows returned, and the SQL statement. 32 */ 33 describeStatement(params: RedshiftData.Types.DescribeStatementRequest, callback?: (err: AWSError, data: RedshiftData.Types.DescribeStatementResponse) => void): Request<RedshiftData.Types.DescribeStatementResponse, AWSError>; 34 /** 35 * Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information includes when the query started, when it finished, the query status, the number of rows returned, and the SQL statement. 36 */ 37 describeStatement(callback?: (err: AWSError, data: RedshiftData.Types.DescribeStatementResponse) => void): Request<RedshiftData.Types.DescribeStatementResponse, AWSError>; 38 /** 39 * Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 40 */ 41 describeTable(params: RedshiftData.Types.DescribeTableRequest, callback?: (err: AWSError, data: RedshiftData.Types.DescribeTableResponse) => void): Request<RedshiftData.Types.DescribeTableResponse, AWSError>; 42 /** 43 * Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 44 */ 45 describeTable(callback?: (err: AWSError, data: RedshiftData.Types.DescribeTableResponse) => void): Request<RedshiftData.Types.DescribeTableResponse, AWSError>; 46 /** 47 * Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This statement must be a single SQL statement. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 48 */ 49 executeStatement(params: RedshiftData.Types.ExecuteStatementInput, callback?: (err: AWSError, data: RedshiftData.Types.ExecuteStatementOutput) => void): Request<RedshiftData.Types.ExecuteStatementOutput, AWSError>; 50 /** 51 * Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This statement must be a single SQL statement. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 52 */ 53 executeStatement(callback?: (err: AWSError, data: RedshiftData.Types.ExecuteStatementOutput) => void): Request<RedshiftData.Types.ExecuteStatementOutput, AWSError>; 54 /** 55 * Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results. 56 */ 57 getStatementResult(params: RedshiftData.Types.GetStatementResultRequest, callback?: (err: AWSError, data: RedshiftData.Types.GetStatementResultResponse) => void): Request<RedshiftData.Types.GetStatementResultResponse, AWSError>; 58 /** 59 * Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results. 60 */ 61 getStatementResult(callback?: (err: AWSError, data: RedshiftData.Types.GetStatementResultResponse) => void): Request<RedshiftData.Types.GetStatementResultResponse, AWSError>; 62 /** 63 * List the databases in a cluster. A token is returned to page through the database list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 64 */ 65 listDatabases(params: RedshiftData.Types.ListDatabasesRequest, callback?: (err: AWSError, data: RedshiftData.Types.ListDatabasesResponse) => void): Request<RedshiftData.Types.ListDatabasesResponse, AWSError>; 66 /** 67 * List the databases in a cluster. A token is returned to page through the database list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 68 */ 69 listDatabases(callback?: (err: AWSError, data: RedshiftData.Types.ListDatabasesResponse) => void): Request<RedshiftData.Types.ListDatabasesResponse, AWSError>; 70 /** 71 * Lists the schemas in a database. A token is returned to page through the schema list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 72 */ 73 listSchemas(params: RedshiftData.Types.ListSchemasRequest, callback?: (err: AWSError, data: RedshiftData.Types.ListSchemasResponse) => void): Request<RedshiftData.Types.ListSchemasResponse, AWSError>; 74 /** 75 * Lists the schemas in a database. A token is returned to page through the schema list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 76 */ 77 listSchemas(callback?: (err: AWSError, data: RedshiftData.Types.ListSchemasResponse) => void): Request<RedshiftData.Types.ListSchemasResponse, AWSError>; 78 /** 79 * List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list. 80 */ 81 listStatements(params: RedshiftData.Types.ListStatementsRequest, callback?: (err: AWSError, data: RedshiftData.Types.ListStatementsResponse) => void): Request<RedshiftData.Types.ListStatementsResponse, AWSError>; 82 /** 83 * List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list. 84 */ 85 listStatements(callback?: (err: AWSError, data: RedshiftData.Types.ListStatementsResponse) => void): Request<RedshiftData.Types.ListStatementsResponse, AWSError>; 86 /** 87 * List the tables in a database. If neither SchemaPattern nor TablePattern are specified, then all tables in the database are returned. A token is returned to page through the table list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 88 */ 89 listTables(params: RedshiftData.Types.ListTablesRequest, callback?: (err: AWSError, data: RedshiftData.Types.ListTablesResponse) => void): Request<RedshiftData.Types.ListTablesResponse, AWSError>; 90 /** 91 * List the tables in a database. If neither SchemaPattern nor TablePattern are specified, then all tables in the database are returned. A token is returned to page through the table list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method. 92 */ 93 listTables(callback?: (err: AWSError, data: RedshiftData.Types.ListTablesResponse) => void): Request<RedshiftData.Types.ListTablesResponse, AWSError>; 94 } 95 declare namespace RedshiftData { 96 export interface BatchExecuteStatementInput { 97 /** 98 * The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. 99 */ 100 ClusterIdentifier: Location; 101 /** 102 * The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials. 103 */ 104 Database: String; 105 /** 106 * The database user name. This parameter is required when authenticating using temporary credentials. 107 */ 108 DbUser?: String; 109 /** 110 * The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. 111 */ 112 SecretArn?: SecretArn; 113 /** 114 * One or more SQL statements to run. 115 */ 116 Sqls: SqlList; 117 /** 118 * The name of the SQL statements. You can name the SQL statements when you create them to identify the query. 119 */ 120 StatementName?: StatementNameString; 121 /** 122 * A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run. 123 */ 124 WithEvent?: Boolean; 125 } 126 export interface BatchExecuteStatementOutput { 127 /** 128 * The cluster identifier. 129 */ 130 ClusterIdentifier?: Location; 131 /** 132 * The date and time (UTC) the statement was created. 133 */ 134 CreatedAt?: Timestamp; 135 /** 136 * The name of the database. 137 */ 138 Database?: String; 139 /** 140 * The database user name. 141 */ 142 DbUser?: String; 143 /** 144 * The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. This identifier is returned by BatchExecuteStatment. 145 */ 146 Id?: StatementId; 147 /** 148 * The name or ARN of the secret that enables access to the database. 149 */ 150 SecretArn?: SecretArn; 151 } 152 export type _Blob = Buffer|Uint8Array|Blob|string; 153 export type Boolean = boolean; 154 export type BoxedBoolean = boolean; 155 export type BoxedDouble = number; 156 export type BoxedLong = number; 157 export interface CancelStatementRequest { 158 /** 159 * The identifier of the SQL statement to cancel. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements. 160 */ 161 Id: StatementId; 162 } 163 export interface CancelStatementResponse { 164 /** 165 * A value that indicates whether the cancel statement succeeded (true). 166 */ 167 Status?: Boolean; 168 } 169 export type ColumnList = ColumnMetadata[]; 170 export interface ColumnMetadata { 171 /** 172 * The default value of the column. 173 */ 174 columnDefault?: String; 175 /** 176 * A value that indicates whether the column is case-sensitive. 177 */ 178 isCaseSensitive?: bool; 179 /** 180 * A value that indicates whether the column contains currency values. 181 */ 182 isCurrency?: bool; 183 /** 184 * A value that indicates whether an integer column is signed. 185 */ 186 isSigned?: bool; 187 /** 188 * The label for the column. 189 */ 190 label?: String; 191 /** 192 * The length of the column. 193 */ 194 length?: Integer; 195 /** 196 * The name of the column. 197 */ 198 name?: String; 199 /** 200 * A value that indicates whether the column is nullable. 201 */ 202 nullable?: Integer; 203 /** 204 * The precision value of a decimal number column. 205 */ 206 precision?: Integer; 207 /** 208 * The scale value of a decimal number column. 209 */ 210 scale?: Integer; 211 /** 212 * The name of the schema that contains the table that includes the column. 213 */ 214 schemaName?: String; 215 /** 216 * The name of the table that includes the column. 217 */ 218 tableName?: String; 219 /** 220 * The database-specific data type of the column. 221 */ 222 typeName?: String; 223 } 224 export type ColumnMetadataList = ColumnMetadata[]; 225 export type DatabaseList = String[]; 226 export interface DescribeStatementRequest { 227 /** 228 * The identifier of the SQL statement to describe. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatement, and ListStatements. 229 */ 230 Id: StatementId; 231 } 232 export interface DescribeStatementResponse { 233 /** 234 * The cluster identifier. 235 */ 236 ClusterIdentifier?: String; 237 /** 238 * The date and time (UTC) when the SQL statement was submitted to run. 239 */ 240 CreatedAt?: Timestamp; 241 /** 242 * The name of the database. 243 */ 244 Database?: String; 245 /** 246 * The database user name. 247 */ 248 DbUser?: String; 249 /** 250 * The amount of time in nanoseconds that the statement ran. 251 */ 252 Duration?: Long; 253 /** 254 * The error message from the cluster if the SQL statement encountered an error while running. 255 */ 256 Error?: String; 257 /** 258 * A value that indicates whether the statement has a result set. The result set can be empty. 259 */ 260 HasResultSet?: Boolean; 261 /** 262 * The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. 263 */ 264 Id: StatementId; 265 /** 266 * The parameters for the SQL statement. 267 */ 268 QueryParameters?: SqlParametersList; 269 /** 270 * The SQL statement text. 271 */ 272 QueryString?: StatementString; 273 /** 274 * The process identifier from Amazon Redshift. 275 */ 276 RedshiftPid?: Long; 277 /** 278 * The identifier of the query generated by Amazon Redshift. These identifiers are also available in the query column of the STL_QUERY system view. 279 */ 280 RedshiftQueryId?: Long; 281 /** 282 * Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A -1 indicates the value is null. 283 */ 284 ResultRows?: Long; 285 /** 286 * The size in bytes of the returned results. A -1 indicates the value is null. 287 */ 288 ResultSize?: Long; 289 /** 290 * The name or Amazon Resource Name (ARN) of the secret that enables access to the database. 291 */ 292 SecretArn?: SecretArn; 293 /** 294 * The status of the SQL statement being described. Status values are defined as follows: ABORTED - The query run was stopped by the user. ALL - A status value that includes all query statuses. This value can be used to filter results. FAILED - The query run failed. FINISHED - The query has finished running. PICKED - The query has been chosen to be run. STARTED - The query run has started. SUBMITTED - The query was submitted, but not yet processed. 295 */ 296 Status?: StatusString; 297 /** 298 * The SQL statements from a multiple statement run. 299 */ 300 SubStatements?: SubStatementList; 301 /** 302 * The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the status last changed. 303 */ 304 UpdatedAt?: Timestamp; 305 } 306 export interface DescribeTableRequest { 307 /** 308 * The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. 309 */ 310 ClusterIdentifier: Location; 311 /** 312 * A database name. The connected database is specified when you connect with your authentication credentials. 313 */ 314 ConnectedDatabase?: String; 315 /** 316 * The name of the database that contains the tables to be described. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials. 317 */ 318 Database: String; 319 /** 320 * The database user name. This parameter is required when authenticating using temporary credentials. 321 */ 322 DbUser?: String; 323 /** 324 * The maximum number of tables to return in the response. If more tables exist than fit in one response, then NextToken is returned to page through the results. 325 */ 326 MaxResults?: PageSize; 327 /** 328 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 329 */ 330 NextToken?: String; 331 /** 332 * The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned. 333 */ 334 Schema?: String; 335 /** 336 * The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. 337 */ 338 SecretArn?: SecretArn; 339 /** 340 * The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned 341 */ 342 Table?: String; 343 } 344 export interface DescribeTableResponse { 345 /** 346 * A list of columns in the table. 347 */ 348 ColumnList?: ColumnList; 349 /** 350 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 351 */ 352 NextToken?: String; 353 /** 354 * The table name. 355 */ 356 TableName?: String; 357 } 358 export interface ExecuteStatementInput { 359 /** 360 * The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. 361 */ 362 ClusterIdentifier: Location; 363 /** 364 * The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials. 365 */ 366 Database: String; 367 /** 368 * The database user name. This parameter is required when authenticating using temporary credentials. 369 */ 370 DbUser?: String; 371 /** 372 * The parameters for the SQL statement. 373 */ 374 Parameters?: SqlParametersList; 375 /** 376 * The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. 377 */ 378 SecretArn?: SecretArn; 379 /** 380 * The SQL statement text to run. 381 */ 382 Sql: StatementString; 383 /** 384 * The name of the SQL statement. You can name the SQL statement when you create it to identify the query. 385 */ 386 StatementName?: StatementNameString; 387 /** 388 * A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs. 389 */ 390 WithEvent?: Boolean; 391 } 392 export interface ExecuteStatementOutput { 393 /** 394 * The cluster identifier. 395 */ 396 ClusterIdentifier?: Location; 397 /** 398 * The date and time (UTC) the statement was created. 399 */ 400 CreatedAt?: Timestamp; 401 /** 402 * The name of the database. 403 */ 404 Database?: String; 405 /** 406 * The database user name. 407 */ 408 DbUser?: String; 409 /** 410 * The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. 411 */ 412 Id?: StatementId; 413 /** 414 * The name or ARN of the secret that enables access to the database. 415 */ 416 SecretArn?: SecretArn; 417 } 418 export interface Field { 419 /** 420 * A value of the BLOB data type. 421 */ 422 blobValue?: _Blob; 423 /** 424 * A value of the Boolean data type. 425 */ 426 booleanValue?: BoxedBoolean; 427 /** 428 * A value of the double data type. 429 */ 430 doubleValue?: BoxedDouble; 431 /** 432 * A value that indicates whether the data is NULL. 433 */ 434 isNull?: BoxedBoolean; 435 /** 436 * A value of the long data type. 437 */ 438 longValue?: BoxedLong; 439 /** 440 * A value of the string data type. 441 */ 442 stringValue?: String; 443 } 444 export type FieldList = Field[]; 445 export interface GetStatementResultRequest { 446 /** 447 * The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates then number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements. 448 */ 449 Id: StatementId; 450 /** 451 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 452 */ 453 NextToken?: String; 454 } 455 export interface GetStatementResultResponse { 456 /** 457 * The properties (metadata) of a column. 458 */ 459 ColumnMetadata?: ColumnMetadataList; 460 /** 461 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 462 */ 463 NextToken?: String; 464 /** 465 * The results of the SQL statement. 466 */ 467 Records: SqlRecords; 468 /** 469 * The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the GetStatementResult operation needed to page through the results. 470 */ 471 TotalNumRows?: Long; 472 } 473 export type Integer = number; 474 export interface ListDatabasesRequest { 475 /** 476 * The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. 477 */ 478 ClusterIdentifier: Location; 479 /** 480 * The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials. 481 */ 482 Database: String; 483 /** 484 * The database user name. This parameter is required when authenticating using temporary credentials. 485 */ 486 DbUser?: String; 487 /** 488 * The maximum number of databases to return in the response. If more databases exist than fit in one response, then NextToken is returned to page through the results. 489 */ 490 MaxResults?: PageSize; 491 /** 492 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 493 */ 494 NextToken?: String; 495 /** 496 * The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. 497 */ 498 SecretArn?: SecretArn; 499 } 500 export interface ListDatabasesResponse { 501 /** 502 * The names of databases. 503 */ 504 Databases?: DatabaseList; 505 /** 506 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 507 */ 508 NextToken?: String; 509 } 510 export interface ListSchemasRequest { 511 /** 512 * The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. 513 */ 514 ClusterIdentifier: Location; 515 /** 516 * A database name. The connected database is specified when you connect with your authentication credentials. 517 */ 518 ConnectedDatabase?: String; 519 /** 520 * The name of the database that contains the schemas to list. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials. 521 */ 522 Database: String; 523 /** 524 * The database user name. This parameter is required when authenticating using temporary credentials. 525 */ 526 DbUser?: String; 527 /** 528 * The maximum number of schemas to return in the response. If more schemas exist than fit in one response, then NextToken is returned to page through the results. 529 */ 530 MaxResults?: PageSize; 531 /** 532 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 533 */ 534 NextToken?: String; 535 /** 536 * A pattern to filter results by schema name. Within a schema pattern, "%" means match any substring of 0 or more characters and "_" means match any one character. Only schema name entries matching the search pattern are returned. 537 */ 538 SchemaPattern?: String; 539 /** 540 * The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. 541 */ 542 SecretArn?: SecretArn; 543 } 544 export interface ListSchemasResponse { 545 /** 546 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 547 */ 548 NextToken?: String; 549 /** 550 * The schemas that match the request pattern. 551 */ 552 Schemas?: SchemaList; 553 } 554 export type ListStatementsLimit = number; 555 export interface ListStatementsRequest { 556 /** 557 * The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in one response, then NextToken is returned to page through the results. 558 */ 559 MaxResults?: ListStatementsLimit; 560 /** 561 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 562 */ 563 NextToken?: String; 564 /** 565 * A value that filters which statements to return in the response. If true, all statements run by the caller's IAM role are returned. If false, only statements run by the caller's IAM role in the current IAM session are returned. The default is true. 566 */ 567 RoleLevel?: Boolean; 568 /** 569 * The name of the SQL statement specified as input to BatchExecuteStatement or ExecuteStatement to identify the query. You can list multiple statements by providing a prefix that matches the beginning of the statement name. For example, to list myStatement1, myStatement2, myStatement3, and so on, then provide the a value of myStatement. Data API does a case-sensitive match of SQL statement names to the prefix value you provide. 570 */ 571 StatementName?: StatementNameString; 572 /** 573 * The status of the SQL statement to list. Status values are defined as follows: ABORTED - The query run was stopped by the user. ALL - A status value that includes all query statuses. This value can be used to filter results. FAILED - The query run failed. FINISHED - The query has finished running. PICKED - The query has been chosen to be run. STARTED - The query run has started. SUBMITTED - The query was submitted, but not yet processed. 574 */ 575 Status?: StatusString; 576 } 577 export interface ListStatementsResponse { 578 /** 579 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 580 */ 581 NextToken?: String; 582 /** 583 * The SQL statements. 584 */ 585 Statements: StatementList; 586 } 587 export interface ListTablesRequest { 588 /** 589 * The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. 590 */ 591 ClusterIdentifier: Location; 592 /** 593 * A database name. The connected database is specified when you connect with your authentication credentials. 594 */ 595 ConnectedDatabase?: String; 596 /** 597 * The name of the database that contains the tables to list. If ConnectedDatabase is not specified, this is also the database to connect to with your authentication credentials. 598 */ 599 Database: String; 600 /** 601 * The database user name. This parameter is required when authenticating using temporary credentials. 602 */ 603 DbUser?: String; 604 /** 605 * The maximum number of tables to return in the response. If more tables exist than fit in one response, then NextToken is returned to page through the results. 606 */ 607 MaxResults?: PageSize; 608 /** 609 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 610 */ 611 NextToken?: String; 612 /** 613 * A pattern to filter results by schema name. Within a schema pattern, "%" means match any substring of 0 or more characters and "_" means match any one character. Only schema name entries matching the search pattern are returned. If SchemaPattern is not specified, then all tables that match TablePattern are returned. If neither SchemaPattern or TablePattern are specified, then all tables are returned. 614 */ 615 SchemaPattern?: String; 616 /** 617 * The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. 618 */ 619 SecretArn?: SecretArn; 620 /** 621 * A pattern to filter results by table name. Within a table pattern, "%" means match any substring of 0 or more characters and "_" means match any one character. Only table name entries matching the search pattern are returned. If TablePattern is not specified, then all tables that match SchemaPatternare returned. If neither SchemaPattern or TablePattern are specified, then all tables are returned. 622 */ 623 TablePattern?: String; 624 } 625 export interface ListTablesResponse { 626 /** 627 * A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. 628 */ 629 NextToken?: String; 630 /** 631 * The tables that match the request pattern. 632 */ 633 Tables?: TableList; 634 } 635 export type Location = string; 636 export type Long = number; 637 export type PageSize = number; 638 export type ParameterName = string; 639 export type ParameterValue = string; 640 export type SchemaList = String[]; 641 export type SecretArn = string; 642 export type SqlList = StatementString[]; 643 export interface SqlParameter { 644 /** 645 * The name of the parameter. 646 */ 647 name: ParameterName; 648 /** 649 * The value of the parameter. Amazon Redshift implicitly converts to the proper data type. For more inforation, see Data types in the Amazon Redshift Database Developer Guide. 650 */ 651 value: ParameterValue; 652 } 653 export type SqlParametersList = SqlParameter[]; 654 export type SqlRecords = FieldList[]; 655 export interface StatementData { 656 /** 657 * The date and time (UTC) the statement was created. 658 */ 659 CreatedAt?: Timestamp; 660 /** 661 * The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. 662 */ 663 Id: StatementId; 664 /** 665 * A value that indicates whether the statement is a batch query request. 666 */ 667 IsBatchStatement?: Boolean; 668 /** 669 * The parameters used in a SQL statement. 670 */ 671 QueryParameters?: SqlParametersList; 672 /** 673 * The SQL statement. 674 */ 675 QueryString?: StatementString; 676 /** 677 * One or more SQL statements. Each query string in the array corresponds to one of the queries in a batch query request. 678 */ 679 QueryStrings?: StatementStringList; 680 /** 681 * The name or Amazon Resource Name (ARN) of the secret that enables access to the database. 682 */ 683 SecretArn?: SecretArn; 684 /** 685 * The name of the SQL statement. 686 */ 687 StatementName?: StatementNameString; 688 /** 689 * The status of the SQL statement. An example is the that the SQL statement finished. 690 */ 691 Status?: StatusString; 692 /** 693 * The date and time (UTC) that the statement metadata was last updated. 694 */ 695 UpdatedAt?: Timestamp; 696 } 697 export type StatementId = string; 698 export type StatementList = StatementData[]; 699 export type StatementNameString = string; 700 export type StatementStatusString = "SUBMITTED"|"PICKED"|"STARTED"|"FINISHED"|"ABORTED"|"FAILED"|string; 701 export type StatementString = string; 702 export type StatementStringList = StatementString[]; 703 export type StatusString = "SUBMITTED"|"PICKED"|"STARTED"|"FINISHED"|"ABORTED"|"FAILED"|"ALL"|string; 704 export type String = string; 705 export interface SubStatementData { 706 /** 707 * The date and time (UTC) the statement was created. 708 */ 709 CreatedAt?: Timestamp; 710 /** 711 * The amount of time in nanoseconds that the statement ran. 712 */ 713 Duration?: Long; 714 /** 715 * The error message from the cluster if the SQL statement encountered an error while running. 716 */ 717 Error?: String; 718 /** 719 * A value that indicates whether the statement has a result set. The result set can be empty. 720 */ 721 HasResultSet?: Boolean; 722 /** 723 * The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query. 724 */ 725 Id: StatementId; 726 /** 727 * The SQL statement text. 728 */ 729 QueryString?: StatementString; 730 /** 731 * The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. 732 */ 733 RedshiftQueryId?: Long; 734 /** 735 * Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A -1 indicates the value is null. 736 */ 737 ResultRows?: Long; 738 /** 739 * The size in bytes of the returned results. A -1 indicates the value is null. 740 */ 741 ResultSize?: Long; 742 /** 743 * The status of the SQL statement. An example is the that the SQL statement finished. 744 */ 745 Status?: StatementStatusString; 746 /** 747 * The date and time (UTC) that the statement metadata was last updated. 748 */ 749 UpdatedAt?: Timestamp; 750 } 751 export type SubStatementList = SubStatementData[]; 752 export type TableList = TableMember[]; 753 export interface TableMember { 754 /** 755 * The name of the table. 756 */ 757 name?: String; 758 /** 759 * The schema containing the table. 760 */ 761 schema?: String; 762 /** 763 * The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM. 764 */ 765 type?: String; 766 } 767 export type Timestamp = Date; 768 export type bool = boolean; 769 /** 770 * 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. 771 */ 772 export type apiVersion = "2019-12-20"|"latest"|string; 773 export interface ClientApiVersions { 774 /** 775 * 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. 776 */ 777 apiVersion?: apiVersion; 778 } 779 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions; 780 /** 781 * Contains interfaces for use with the RedshiftData client. 782 */ 783 export import Types = RedshiftData; 784 } 785 export = RedshiftData;