aws-sdk-redshiftdataapiservice 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50680d0f6a8493a460814387779900f4653e90fe4b67933bf10a87a7407651ee
4
- data.tar.gz: 138c67b4bb6a7007de2e4b48a5b4dc65be3395de60ebae768e96eddee86bf119
3
+ metadata.gz: 95f5a8eb84f9a717be80d744402a85fc7eb7575159b9f63740a16a1ac39b2561
4
+ data.tar.gz: 74755a63ba379a7034a6a436862c4faa5d06a58fdf805f82d6e010ff09df93bd
5
5
  SHA512:
6
- metadata.gz: 1a2b4a13ac7803f56e16cbb8289156814e4b033f84841868b2a34e45a2d7ac1c5ea89aa31e96a438ae052d66e7ca25ddc2cbf99a65d488748d9fa64094f2adde
7
- data.tar.gz: 0be5e35c8cfc3756f2c6b4ba676615c1b8101ecf50d060f495d4a0f500c4522f0a813d33481cf0b5d64d66d343e897343ce37552506a6e6a0d9a870bbe10ed60
6
+ metadata.gz: 4c0948ac150c078013ce123dafc76a56648f9c41767f77f7a5547b32c0a3b624a9737bf5654ea4c022df707624694286840749b2abe9aba29a23cb197d042850
7
+ data.tar.gz: 1032d98a6c10ee8f4551cb82f26365c884a55df9393507dd8cdb42c81cf3e120982669bf9a1c34d1ccee7878e2239bfd9f4fd5d26fe4a5c83fa06c920d5733b0
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.8.0 (2021-07-27)
5
+ ------------------
6
+
7
+ * Feature - Added structures to support new Data API operation BatchExecuteStatement, used to execute multiple SQL statements within a single transaction.
8
+
4
9
  1.7.0 (2021-06-15)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.0
1
+ 1.8.0
@@ -28,7 +28,7 @@ require_relative 'aws-sdk-redshiftdataapiservice/customizations'
28
28
  # structure.
29
29
  #
30
30
  # redshift_data_api_service = Aws::RedshiftDataAPIService::Client.new
31
- # resp = redshift_data_api_service.cancel_statement(params)
31
+ # resp = redshift_data_api_service.batch_execute_statement(params)
32
32
  #
33
33
  # See {Client} for more information.
34
34
  #
@@ -48,6 +48,6 @@ require_relative 'aws-sdk-redshiftdataapiservice/customizations'
48
48
  # @!group service
49
49
  module Aws::RedshiftDataAPIService
50
50
 
51
- GEM_VERSION = '1.7.0'
51
+ GEM_VERSION = '1.8.0'
52
52
 
53
53
  end
@@ -337,13 +337,93 @@ module Aws::RedshiftDataAPIService
337
337
 
338
338
  # @!group API Operations
339
339
 
340
+ # Runs one or more SQL statements, which can be data manipulation
341
+ # language (DML) or data definition language (DDL). Depending on the
342
+ # authorization method, use one of the following combinations of request
343
+ # parameters:
344
+ #
345
+ # * Secrets Manager - specify the Amazon Resource Name (ARN) of the
346
+ # secret, the database name, and the cluster identifier that matches
347
+ # the cluster in the secret.
348
+ #
349
+ # * Temporary credentials - specify the cluster identifier, the database
350
+ # name, and the database user name. Permission to call the
351
+ # `redshift:GetClusterCredentials` operation is required to use this
352
+ # method.
353
+ #
354
+ # @option params [required, String] :cluster_identifier
355
+ # The cluster identifier. This parameter is required when authenticating
356
+ # using either Secrets Manager or temporary credentials.
357
+ #
358
+ # @option params [required, String] :database
359
+ # The name of the database. This parameter is required when
360
+ # authenticating using either Secrets Manager or temporary credentials.
361
+ #
362
+ # @option params [String] :db_user
363
+ # The database user name. This parameter is required when authenticating
364
+ # using temporary credentials.
365
+ #
366
+ # @option params [String] :secret_arn
367
+ # The name or ARN of the secret that enables access to the database.
368
+ # This parameter is required when authenticating using Secrets Manager.
369
+ #
370
+ # @option params [required, Array<String>] :sqls
371
+ # One or more SQL statements to run.
372
+ #
373
+ # @option params [String] :statement_name
374
+ # The name of the SQL statements. You can name the SQL statements when
375
+ # you create them to identify the query.
376
+ #
377
+ # @option params [Boolean] :with_event
378
+ # A value that indicates whether to send an event to the Amazon
379
+ # EventBridge event bus after the SQL statements run.
380
+ #
381
+ # @return [Types::BatchExecuteStatementOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
382
+ #
383
+ # * {Types::BatchExecuteStatementOutput#cluster_identifier #cluster_identifier} => String
384
+ # * {Types::BatchExecuteStatementOutput#created_at #created_at} => Time
385
+ # * {Types::BatchExecuteStatementOutput#database #database} => String
386
+ # * {Types::BatchExecuteStatementOutput#db_user #db_user} => String
387
+ # * {Types::BatchExecuteStatementOutput#id #id} => String
388
+ # * {Types::BatchExecuteStatementOutput#secret_arn #secret_arn} => String
389
+ #
390
+ # @example Request syntax with placeholder values
391
+ #
392
+ # resp = client.batch_execute_statement({
393
+ # cluster_identifier: "Location", # required
394
+ # database: "String", # required
395
+ # db_user: "String",
396
+ # secret_arn: "SecretArn",
397
+ # sqls: ["StatementString"], # required
398
+ # statement_name: "StatementNameString",
399
+ # with_event: false,
400
+ # })
401
+ #
402
+ # @example Response structure
403
+ #
404
+ # resp.cluster_identifier #=> String
405
+ # resp.created_at #=> Time
406
+ # resp.database #=> String
407
+ # resp.db_user #=> String
408
+ # resp.id #=> String
409
+ # resp.secret_arn #=> String
410
+ #
411
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/BatchExecuteStatement AWS API Documentation
412
+ #
413
+ # @overload batch_execute_statement(params = {})
414
+ # @param [Hash] params ({})
415
+ def batch_execute_statement(params = {}, options = {})
416
+ req = build_request(:batch_execute_statement, params)
417
+ req.send_request(options)
418
+ end
419
+
340
420
  # Cancels a running query. To be canceled, a query must be running.
341
421
  #
342
422
  # @option params [required, String] :id
343
423
  # The identifier of the SQL statement to cancel. This value is a
344
424
  # universally unique identifier (UUID) generated by Amazon Redshift Data
345
- # API. This identifier is returned by `ExecuteStatment` and
346
- # `ListStatements`.
425
+ # API. This identifier is returned by `BatchExecuteStatment`,
426
+ # `ExecuteStatment`, and `ListStatements`.
347
427
  #
348
428
  # @return [Types::CancelStatementResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
349
429
  #
@@ -352,7 +432,7 @@ module Aws::RedshiftDataAPIService
352
432
  # @example Request syntax with placeholder values
353
433
  #
354
434
  # resp = client.cancel_statement({
355
- # id: "UUID", # required
435
+ # id: "StatementId", # required
356
436
  # })
357
437
  #
358
438
  # @example Response structure
@@ -376,7 +456,10 @@ module Aws::RedshiftDataAPIService
376
456
  # @option params [required, String] :id
377
457
  # The identifier of the SQL statement to describe. This value is a
378
458
  # universally unique identifier (UUID) generated by Amazon Redshift Data
379
- # API. This identifier is returned by `ExecuteStatment` and
459
+ # API. A suffix indicates the number of the SQL statement. For example,
460
+ # `d9b6c0c9-0747-4bf4-b142-e8883122f766:2` has a suffix of `:2` that
461
+ # indicates the second SQL statement of a batch query. This identifier
462
+ # is returned by `BatchExecuteStatment`, `ExecuteStatement`, and
380
463
  # `ListStatements`.
381
464
  #
382
465
  # @return [Types::DescribeStatementResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
@@ -397,12 +480,13 @@ module Aws::RedshiftDataAPIService
397
480
  # * {Types::DescribeStatementResponse#result_size #result_size} => Integer
398
481
  # * {Types::DescribeStatementResponse#secret_arn #secret_arn} => String
399
482
  # * {Types::DescribeStatementResponse#status #status} => String
483
+ # * {Types::DescribeStatementResponse#sub_statements #sub_statements} => Array&lt;Types::SubStatementData&gt;
400
484
  # * {Types::DescribeStatementResponse#updated_at #updated_at} => Time
401
485
  #
402
486
  # @example Request syntax with placeholder values
403
487
  #
404
488
  # resp = client.describe_statement({
405
- # id: "UUID", # required
489
+ # id: "StatementId", # required
406
490
  # })
407
491
  #
408
492
  # @example Response structure
@@ -425,6 +509,18 @@ module Aws::RedshiftDataAPIService
425
509
  # resp.result_size #=> Integer
426
510
  # resp.secret_arn #=> String
427
511
  # resp.status #=> String, one of "SUBMITTED", "PICKED", "STARTED", "FINISHED", "ABORTED", "FAILED", "ALL"
512
+ # resp.sub_statements #=> Array
513
+ # resp.sub_statements[0].created_at #=> Time
514
+ # resp.sub_statements[0].duration #=> Integer
515
+ # resp.sub_statements[0].error #=> String
516
+ # resp.sub_statements[0].has_result_set #=> Boolean
517
+ # resp.sub_statements[0].id #=> String
518
+ # resp.sub_statements[0].query_string #=> String
519
+ # resp.sub_statements[0].redshift_query_id #=> Integer
520
+ # resp.sub_statements[0].result_rows #=> Integer
521
+ # resp.sub_statements[0].result_size #=> Integer
522
+ # resp.sub_statements[0].status #=> String, one of "SUBMITTED", "PICKED", "STARTED", "FINISHED", "ABORTED", "FAILED"
523
+ # resp.sub_statements[0].updated_at #=> Time
428
524
  # resp.updated_at #=> Time
429
525
  #
430
526
  # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeStatement AWS API Documentation
@@ -441,9 +537,9 @@ module Aws::RedshiftDataAPIService
441
537
  # page through the column list. Depending on the authorization method,
442
538
  # use one of the following combinations of request parameters:
443
539
  #
444
- # * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the
445
- # secret and the cluster identifier that matches the cluster in the
446
- # secret.
540
+ # * Secrets Manager - specify the Amazon Resource Name (ARN) of the
541
+ # secret, the database name, and the cluster identifier that matches
542
+ # the cluster in the secret.
447
543
  #
448
544
  # * Temporary credentials - specify the cluster identifier, the database
449
545
  # name, and the database user name. Permission to call the
@@ -452,7 +548,7 @@ module Aws::RedshiftDataAPIService
452
548
  #
453
549
  # @option params [required, String] :cluster_identifier
454
550
  # The cluster identifier. This parameter is required when authenticating
455
- # using either AWS Secrets Manager or temporary credentials.
551
+ # using either Secrets Manager or temporary credentials.
456
552
  #
457
553
  # @option params [String] :connected_database
458
554
  # A database name. The connected database is specified when you connect
@@ -486,8 +582,7 @@ module Aws::RedshiftDataAPIService
486
582
  #
487
583
  # @option params [String] :secret_arn
488
584
  # The name or ARN of the secret that enables access to the database.
489
- # This parameter is required when authenticating using AWS Secrets
490
- # Manager.
585
+ # This parameter is required when authenticating using Secrets Manager.
491
586
  #
492
587
  # @option params [String] :table
493
588
  # The table name. If no table is specified, then all tables for all
@@ -549,9 +644,9 @@ module Aws::RedshiftDataAPIService
549
644
  # statement. Depending on the authorization method, use one of the
550
645
  # following combinations of request parameters:
551
646
  #
552
- # * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the
553
- # secret and the cluster identifier that matches the cluster in the
554
- # secret.
647
+ # * Secrets Manager - specify the Amazon Resource Name (ARN) of the
648
+ # secret, the database name, and the cluster identifier that matches
649
+ # the cluster in the secret.
555
650
  #
556
651
  # * Temporary credentials - specify the cluster identifier, the database
557
652
  # name, and the database user name. Permission to call the
@@ -560,11 +655,11 @@ module Aws::RedshiftDataAPIService
560
655
  #
561
656
  # @option params [required, String] :cluster_identifier
562
657
  # The cluster identifier. This parameter is required when authenticating
563
- # using either AWS Secrets Manager or temporary credentials.
658
+ # using either Secrets Manager or temporary credentials.
564
659
  #
565
- # @option params [String] :database
660
+ # @option params [required, String] :database
566
661
  # The name of the database. This parameter is required when
567
- # authenticating using temporary credentials.
662
+ # authenticating using either Secrets Manager or temporary credentials.
568
663
  #
569
664
  # @option params [String] :db_user
570
665
  # The database user name. This parameter is required when authenticating
@@ -575,8 +670,7 @@ module Aws::RedshiftDataAPIService
575
670
  #
576
671
  # @option params [String] :secret_arn
577
672
  # The name or ARN of the secret that enables access to the database.
578
- # This parameter is required when authenticating using AWS Secrets
579
- # Manager.
673
+ # This parameter is required when authenticating using Secrets Manager.
580
674
  #
581
675
  # @option params [required, String] :sql
582
676
  # The SQL statement text to run.
@@ -602,7 +696,7 @@ module Aws::RedshiftDataAPIService
602
696
  #
603
697
  # resp = client.execute_statement({
604
698
  # cluster_identifier: "Location", # required
605
- # database: "String",
699
+ # database: "String", # required
606
700
  # db_user: "String",
607
701
  # parameters: [
608
702
  # {
@@ -640,8 +734,11 @@ module Aws::RedshiftDataAPIService
640
734
  # @option params [required, String] :id
641
735
  # The identifier of the SQL statement whose results are to be fetched.
642
736
  # This value is a universally unique identifier (UUID) generated by
643
- # Amazon Redshift Data API. This identifier is returned by
644
- # `ExecuteStatment` and `ListStatements`.
737
+ # Amazon Redshift Data API. A suffix indicates then number of the SQL
738
+ # statement. For example, `d9b6c0c9-0747-4bf4-b142-e8883122f766:2` has a
739
+ # suffix of `:2` that indicates the second SQL statement of a batch
740
+ # query. This identifier is returned by `BatchExecuteStatment`,
741
+ # `ExecuteStatment`, and `ListStatements`.
645
742
  #
646
743
  # @option params [String] :next_token
647
744
  # A value that indicates the starting point for the next set of response
@@ -663,7 +760,7 @@ module Aws::RedshiftDataAPIService
663
760
  # @example Request syntax with placeholder values
664
761
  #
665
762
  # resp = client.get_statement_result({
666
- # id: "UUID", # required
763
+ # id: "StatementId", # required
667
764
  # next_token: "String",
668
765
  # })
669
766
  #
@@ -707,9 +804,9 @@ module Aws::RedshiftDataAPIService
707
804
  # the database list. Depending on the authorization method, use one of
708
805
  # the following combinations of request parameters:
709
806
  #
710
- # * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the
711
- # secret and the cluster identifier that matches the cluster in the
712
- # secret.
807
+ # * Secrets Manager - specify the Amazon Resource Name (ARN) of the
808
+ # secret, the database name, and the cluster identifier that matches
809
+ # the cluster in the secret.
713
810
  #
714
811
  # * Temporary credentials - specify the cluster identifier, the database
715
812
  # name, and the database user name. Permission to call the
@@ -718,11 +815,11 @@ module Aws::RedshiftDataAPIService
718
815
  #
719
816
  # @option params [required, String] :cluster_identifier
720
817
  # The cluster identifier. This parameter is required when authenticating
721
- # using either AWS Secrets Manager or temporary credentials.
818
+ # using either Secrets Manager or temporary credentials.
722
819
  #
723
- # @option params [String] :database
820
+ # @option params [required, String] :database
724
821
  # The name of the database. This parameter is required when
725
- # authenticating using temporary credentials.
822
+ # authenticating using either Secrets Manager or temporary credentials.
726
823
  #
727
824
  # @option params [String] :db_user
728
825
  # The database user name. This parameter is required when authenticating
@@ -743,8 +840,7 @@ module Aws::RedshiftDataAPIService
743
840
  #
744
841
  # @option params [String] :secret_arn
745
842
  # The name or ARN of the secret that enables access to the database.
746
- # This parameter is required when authenticating using AWS Secrets
747
- # Manager.
843
+ # This parameter is required when authenticating using Secrets Manager.
748
844
  #
749
845
  # @return [Types::ListDatabasesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
750
846
  #
@@ -757,7 +853,7 @@ module Aws::RedshiftDataAPIService
757
853
  #
758
854
  # resp = client.list_databases({
759
855
  # cluster_identifier: "Location", # required
760
- # database: "String",
856
+ # database: "String", # required
761
857
  # db_user: "String",
762
858
  # max_results: 1,
763
859
  # next_token: "String",
@@ -783,9 +879,9 @@ module Aws::RedshiftDataAPIService
783
879
  # the schema list. Depending on the authorization method, use one of the
784
880
  # following combinations of request parameters:
785
881
  #
786
- # * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the
787
- # secret and the cluster identifier that matches the cluster in the
788
- # secret.
882
+ # * Secrets Manager - specify the Amazon Resource Name (ARN) of the
883
+ # secret, the database name, and the cluster identifier that matches
884
+ # the cluster in the secret.
789
885
  #
790
886
  # * Temporary credentials - specify the cluster identifier, the database
791
887
  # name, and the database user name. Permission to call the
@@ -794,7 +890,7 @@ module Aws::RedshiftDataAPIService
794
890
  #
795
891
  # @option params [required, String] :cluster_identifier
796
892
  # The cluster identifier. This parameter is required when authenticating
797
- # using either AWS Secrets Manager or temporary credentials.
893
+ # using either Secrets Manager or temporary credentials.
798
894
  #
799
895
  # @option params [String] :connected_database
800
896
  # A database name. The connected database is specified when you connect
@@ -830,8 +926,7 @@ module Aws::RedshiftDataAPIService
830
926
  #
831
927
  # @option params [String] :secret_arn
832
928
  # The name or ARN of the secret that enables access to the database.
833
- # This parameter is required when authenticating using AWS Secrets
834
- # Manager.
929
+ # This parameter is required when authenticating using Secrets Manager.
835
930
  #
836
931
  # @return [Types::ListSchemasResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
837
932
  #
@@ -891,12 +986,13 @@ module Aws::RedshiftDataAPIService
891
986
  # IAM session are returned. The default is true.
892
987
  #
893
988
  # @option params [String] :statement_name
894
- # The name of the SQL statement specified as input to `ExecuteStatement`
895
- # to identify the query. You can list multiple statements by providing a
896
- # prefix that matches the beginning of the statement name. For example,
897
- # to list myStatement1, myStatement2, myStatement3, and so on, then
898
- # provide the a value of `myStatement`. Data API does a case-sensitive
899
- # match of SQL statement names to the prefix value you provide.
989
+ # The name of the SQL statement specified as input to
990
+ # `BatchExecuteStatement` or `ExecuteStatement` to identify the query.
991
+ # You can list multiple statements by providing a prefix that matches
992
+ # the beginning of the statement name. For example, to list
993
+ # myStatement1, myStatement2, myStatement3, and so on, then provide the
994
+ # a value of `myStatement`. Data API does a case-sensitive match of SQL
995
+ # statement names to the prefix value you provide.
900
996
  #
901
997
  # @option params [String] :status
902
998
  # The status of the SQL statement to list. Status values are defined as
@@ -940,10 +1036,13 @@ module Aws::RedshiftDataAPIService
940
1036
  # resp.statements #=> Array
941
1037
  # resp.statements[0].created_at #=> Time
942
1038
  # resp.statements[0].id #=> String
1039
+ # resp.statements[0].is_batch_statement #=> Boolean
943
1040
  # resp.statements[0].query_parameters #=> Array
944
1041
  # resp.statements[0].query_parameters[0].name #=> String
945
1042
  # resp.statements[0].query_parameters[0].value #=> String
946
1043
  # resp.statements[0].query_string #=> String
1044
+ # resp.statements[0].query_strings #=> Array
1045
+ # resp.statements[0].query_strings[0] #=> String
947
1046
  # resp.statements[0].secret_arn #=> String
948
1047
  # resp.statements[0].statement_name #=> String
949
1048
  # resp.statements[0].status #=> String, one of "SUBMITTED", "PICKED", "STARTED", "FINISHED", "ABORTED", "FAILED", "ALL"
@@ -964,9 +1063,9 @@ module Aws::RedshiftDataAPIService
964
1063
  # Depending on the authorization method, use one of the following
965
1064
  # combinations of request parameters:
966
1065
  #
967
- # * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the
968
- # secret and the cluster identifier that matches the cluster in the
969
- # secret.
1066
+ # * Secrets Manager - specify the Amazon Resource Name (ARN) of the
1067
+ # secret, the database name, and the cluster identifier that matches
1068
+ # the cluster in the secret.
970
1069
  #
971
1070
  # * Temporary credentials - specify the cluster identifier, the database
972
1071
  # name, and the database user name. Permission to call the
@@ -975,7 +1074,7 @@ module Aws::RedshiftDataAPIService
975
1074
  #
976
1075
  # @option params [required, String] :cluster_identifier
977
1076
  # The cluster identifier. This parameter is required when authenticating
978
- # using either AWS Secrets Manager or temporary credentials.
1077
+ # using either Secrets Manager or temporary credentials.
979
1078
  #
980
1079
  # @option params [String] :connected_database
981
1080
  # A database name. The connected database is specified when you connect
@@ -1014,8 +1113,7 @@ module Aws::RedshiftDataAPIService
1014
1113
  #
1015
1114
  # @option params [String] :secret_arn
1016
1115
  # The name or ARN of the secret that enables access to the database.
1017
- # This parameter is required when authenticating using AWS Secrets
1018
- # Manager.
1116
+ # This parameter is required when authenticating using Secrets Manager.
1019
1117
  #
1020
1118
  # @option params [String] :table_pattern
1021
1119
  # A pattern to filter results by table name. Within a table pattern,
@@ -1077,7 +1175,7 @@ module Aws::RedshiftDataAPIService
1077
1175
  params: params,
1078
1176
  config: config)
1079
1177
  context[:gem_name] = 'aws-sdk-redshiftdataapiservice'
1080
- context[:gem_version] = '1.7.0'
1178
+ context[:gem_version] = '1.8.0'
1081
1179
  Seahorse::Client::Request.new(handlers, context)
1082
1180
  end
1083
1181
 
@@ -14,6 +14,9 @@ module Aws::RedshiftDataAPIService
14
14
  include Seahorse::Model
15
15
 
16
16
  ActiveStatementsExceededException = Shapes::StructureShape.new(name: 'ActiveStatementsExceededException')
17
+ BatchExecuteStatementException = Shapes::StructureShape.new(name: 'BatchExecuteStatementException')
18
+ BatchExecuteStatementInput = Shapes::StructureShape.new(name: 'BatchExecuteStatementInput')
19
+ BatchExecuteStatementOutput = Shapes::StructureShape.new(name: 'BatchExecuteStatementOutput')
17
20
  Blob = Shapes::BlobShape.new(name: 'Blob')
18
21
  Boolean = Shapes::BooleanShape.new(name: 'Boolean')
19
22
  BoxedBoolean = Shapes::BooleanShape.new(name: 'BoxedBoolean')
@@ -55,26 +58,52 @@ module Aws::RedshiftDataAPIService
55
58
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
56
59
  SchemaList = Shapes::ListShape.new(name: 'SchemaList')
57
60
  SecretArn = Shapes::StringShape.new(name: 'SecretArn')
61
+ SqlList = Shapes::ListShape.new(name: 'SqlList')
58
62
  SqlParameter = Shapes::StructureShape.new(name: 'SqlParameter')
59
63
  SqlParametersList = Shapes::ListShape.new(name: 'SqlParametersList')
60
64
  SqlRecords = Shapes::ListShape.new(name: 'SqlRecords')
61
65
  StatementData = Shapes::StructureShape.new(name: 'StatementData')
66
+ StatementId = Shapes::StringShape.new(name: 'StatementId')
62
67
  StatementList = Shapes::ListShape.new(name: 'StatementList')
63
68
  StatementNameString = Shapes::StringShape.new(name: 'StatementNameString')
69
+ StatementStatusString = Shapes::StringShape.new(name: 'StatementStatusString')
64
70
  StatementString = Shapes::StringShape.new(name: 'StatementString')
71
+ StatementStringList = Shapes::ListShape.new(name: 'StatementStringList')
65
72
  StatusString = Shapes::StringShape.new(name: 'StatusString')
66
73
  String = Shapes::StringShape.new(name: 'String')
74
+ SubStatementData = Shapes::StructureShape.new(name: 'SubStatementData')
75
+ SubStatementList = Shapes::ListShape.new(name: 'SubStatementList')
67
76
  TableList = Shapes::ListShape.new(name: 'TableList')
68
77
  TableMember = Shapes::StructureShape.new(name: 'TableMember')
69
78
  Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
70
- UUID = Shapes::StringShape.new(name: 'UUID')
71
79
  ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
72
80
  bool = Shapes::BooleanShape.new(name: 'bool')
73
81
 
74
82
  ActiveStatementsExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
75
83
  ActiveStatementsExceededException.struct_class = Types::ActiveStatementsExceededException
76
84
 
77
- CancelStatementRequest.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
85
+ BatchExecuteStatementException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Message"))
86
+ BatchExecuteStatementException.add_member(:statement_id, Shapes::ShapeRef.new(shape: String, required: true, location_name: "StatementId"))
87
+ BatchExecuteStatementException.struct_class = Types::BatchExecuteStatementException
88
+
89
+ BatchExecuteStatementInput.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: Location, required: true, location_name: "ClusterIdentifier"))
90
+ BatchExecuteStatementInput.add_member(:database, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Database"))
91
+ BatchExecuteStatementInput.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
92
+ BatchExecuteStatementInput.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
93
+ BatchExecuteStatementInput.add_member(:sqls, Shapes::ShapeRef.new(shape: SqlList, required: true, location_name: "Sqls"))
94
+ BatchExecuteStatementInput.add_member(:statement_name, Shapes::ShapeRef.new(shape: StatementNameString, location_name: "StatementName"))
95
+ BatchExecuteStatementInput.add_member(:with_event, Shapes::ShapeRef.new(shape: Boolean, location_name: "WithEvent"))
96
+ BatchExecuteStatementInput.struct_class = Types::BatchExecuteStatementInput
97
+
98
+ BatchExecuteStatementOutput.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: Location, location_name: "ClusterIdentifier"))
99
+ BatchExecuteStatementOutput.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "CreatedAt"))
100
+ BatchExecuteStatementOutput.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
101
+ BatchExecuteStatementOutput.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
102
+ BatchExecuteStatementOutput.add_member(:id, Shapes::ShapeRef.new(shape: StatementId, location_name: "Id"))
103
+ BatchExecuteStatementOutput.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
104
+ BatchExecuteStatementOutput.struct_class = Types::BatchExecuteStatementOutput
105
+
106
+ CancelStatementRequest.add_member(:id, Shapes::ShapeRef.new(shape: StatementId, required: true, location_name: "Id"))
78
107
  CancelStatementRequest.struct_class = Types::CancelStatementRequest
79
108
 
80
109
  CancelStatementResponse.add_member(:status, Shapes::ShapeRef.new(shape: Boolean, location_name: "Status"))
@@ -101,7 +130,7 @@ module Aws::RedshiftDataAPIService
101
130
 
102
131
  DatabaseList.member = Shapes::ShapeRef.new(shape: String)
103
132
 
104
- DescribeStatementRequest.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
133
+ DescribeStatementRequest.add_member(:id, Shapes::ShapeRef.new(shape: StatementId, required: true, location_name: "Id"))
105
134
  DescribeStatementRequest.struct_class = Types::DescribeStatementRequest
106
135
 
107
136
  DescribeStatementResponse.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ClusterIdentifier"))
@@ -111,7 +140,7 @@ module Aws::RedshiftDataAPIService
111
140
  DescribeStatementResponse.add_member(:duration, Shapes::ShapeRef.new(shape: Long, location_name: "Duration"))
112
141
  DescribeStatementResponse.add_member(:error, Shapes::ShapeRef.new(shape: String, location_name: "Error"))
113
142
  DescribeStatementResponse.add_member(:has_result_set, Shapes::ShapeRef.new(shape: Boolean, location_name: "HasResultSet"))
114
- DescribeStatementResponse.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
143
+ DescribeStatementResponse.add_member(:id, Shapes::ShapeRef.new(shape: StatementId, required: true, location_name: "Id"))
115
144
  DescribeStatementResponse.add_member(:query_parameters, Shapes::ShapeRef.new(shape: SqlParametersList, location_name: "QueryParameters"))
116
145
  DescribeStatementResponse.add_member(:query_string, Shapes::ShapeRef.new(shape: StatementString, location_name: "QueryString"))
117
146
  DescribeStatementResponse.add_member(:redshift_pid, Shapes::ShapeRef.new(shape: Long, location_name: "RedshiftPid"))
@@ -120,6 +149,7 @@ module Aws::RedshiftDataAPIService
120
149
  DescribeStatementResponse.add_member(:result_size, Shapes::ShapeRef.new(shape: Long, location_name: "ResultSize"))
121
150
  DescribeStatementResponse.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
122
151
  DescribeStatementResponse.add_member(:status, Shapes::ShapeRef.new(shape: StatusString, location_name: "Status"))
152
+ DescribeStatementResponse.add_member(:sub_statements, Shapes::ShapeRef.new(shape: SubStatementList, location_name: "SubStatements"))
123
153
  DescribeStatementResponse.add_member(:updated_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "UpdatedAt"))
124
154
  DescribeStatementResponse.struct_class = Types::DescribeStatementResponse
125
155
 
@@ -144,7 +174,7 @@ module Aws::RedshiftDataAPIService
144
174
  ExecuteStatementException.struct_class = Types::ExecuteStatementException
145
175
 
146
176
  ExecuteStatementInput.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: Location, required: true, location_name: "ClusterIdentifier"))
147
- ExecuteStatementInput.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
177
+ ExecuteStatementInput.add_member(:database, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Database"))
148
178
  ExecuteStatementInput.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
149
179
  ExecuteStatementInput.add_member(:parameters, Shapes::ShapeRef.new(shape: SqlParametersList, location_name: "Parameters"))
150
180
  ExecuteStatementInput.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
@@ -157,7 +187,7 @@ module Aws::RedshiftDataAPIService
157
187
  ExecuteStatementOutput.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "CreatedAt"))
158
188
  ExecuteStatementOutput.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
159
189
  ExecuteStatementOutput.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
160
- ExecuteStatementOutput.add_member(:id, Shapes::ShapeRef.new(shape: UUID, location_name: "Id"))
190
+ ExecuteStatementOutput.add_member(:id, Shapes::ShapeRef.new(shape: StatementId, location_name: "Id"))
161
191
  ExecuteStatementOutput.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
162
192
  ExecuteStatementOutput.struct_class = Types::ExecuteStatementOutput
163
193
 
@@ -171,7 +201,7 @@ module Aws::RedshiftDataAPIService
171
201
 
172
202
  FieldList.member = Shapes::ShapeRef.new(shape: Field)
173
203
 
174
- GetStatementResultRequest.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
204
+ GetStatementResultRequest.add_member(:id, Shapes::ShapeRef.new(shape: StatementId, required: true, location_name: "Id"))
175
205
  GetStatementResultRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
176
206
  GetStatementResultRequest.struct_class = Types::GetStatementResultRequest
177
207
 
@@ -185,7 +215,7 @@ module Aws::RedshiftDataAPIService
185
215
  InternalServerException.struct_class = Types::InternalServerException
186
216
 
187
217
  ListDatabasesRequest.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: Location, required: true, location_name: "ClusterIdentifier"))
188
- ListDatabasesRequest.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
218
+ ListDatabasesRequest.add_member(:database, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Database"))
189
219
  ListDatabasesRequest.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
190
220
  ListDatabasesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: PageSize, location_name: "MaxResults"))
191
221
  ListDatabasesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
@@ -242,6 +272,8 @@ module Aws::RedshiftDataAPIService
242
272
 
243
273
  SchemaList.member = Shapes::ShapeRef.new(shape: String)
244
274
 
275
+ SqlList.member = Shapes::ShapeRef.new(shape: StatementString)
276
+
245
277
  SqlParameter.add_member(:name, Shapes::ShapeRef.new(shape: ParameterName, required: true, location_name: "name"))
246
278
  SqlParameter.add_member(:value, Shapes::ShapeRef.new(shape: ParameterValue, required: true, location_name: "value"))
247
279
  SqlParameter.struct_class = Types::SqlParameter
@@ -251,9 +283,11 @@ module Aws::RedshiftDataAPIService
251
283
  SqlRecords.member = Shapes::ShapeRef.new(shape: FieldList)
252
284
 
253
285
  StatementData.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "CreatedAt"))
254
- StatementData.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
286
+ StatementData.add_member(:id, Shapes::ShapeRef.new(shape: StatementId, required: true, location_name: "Id"))
287
+ StatementData.add_member(:is_batch_statement, Shapes::ShapeRef.new(shape: Boolean, location_name: "IsBatchStatement"))
255
288
  StatementData.add_member(:query_parameters, Shapes::ShapeRef.new(shape: SqlParametersList, location_name: "QueryParameters"))
256
289
  StatementData.add_member(:query_string, Shapes::ShapeRef.new(shape: StatementString, location_name: "QueryString"))
290
+ StatementData.add_member(:query_strings, Shapes::ShapeRef.new(shape: StatementStringList, location_name: "QueryStrings"))
257
291
  StatementData.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
258
292
  StatementData.add_member(:statement_name, Shapes::ShapeRef.new(shape: StatementNameString, location_name: "StatementName"))
259
293
  StatementData.add_member(:status, Shapes::ShapeRef.new(shape: StatusString, location_name: "Status"))
@@ -262,6 +296,23 @@ module Aws::RedshiftDataAPIService
262
296
 
263
297
  StatementList.member = Shapes::ShapeRef.new(shape: StatementData)
264
298
 
299
+ StatementStringList.member = Shapes::ShapeRef.new(shape: StatementString)
300
+
301
+ SubStatementData.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "CreatedAt"))
302
+ SubStatementData.add_member(:duration, Shapes::ShapeRef.new(shape: Long, location_name: "Duration"))
303
+ SubStatementData.add_member(:error, Shapes::ShapeRef.new(shape: String, location_name: "Error"))
304
+ SubStatementData.add_member(:has_result_set, Shapes::ShapeRef.new(shape: Boolean, location_name: "HasResultSet"))
305
+ SubStatementData.add_member(:id, Shapes::ShapeRef.new(shape: StatementId, required: true, location_name: "Id"))
306
+ SubStatementData.add_member(:query_string, Shapes::ShapeRef.new(shape: StatementString, location_name: "QueryString"))
307
+ SubStatementData.add_member(:redshift_query_id, Shapes::ShapeRef.new(shape: Long, location_name: "RedshiftQueryId"))
308
+ SubStatementData.add_member(:result_rows, Shapes::ShapeRef.new(shape: Long, location_name: "ResultRows"))
309
+ SubStatementData.add_member(:result_size, Shapes::ShapeRef.new(shape: Long, location_name: "ResultSize"))
310
+ SubStatementData.add_member(:status, Shapes::ShapeRef.new(shape: StatementStatusString, location_name: "Status"))
311
+ SubStatementData.add_member(:updated_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "UpdatedAt"))
312
+ SubStatementData.struct_class = Types::SubStatementData
313
+
314
+ SubStatementList.member = Shapes::ShapeRef.new(shape: SubStatementData)
315
+
265
316
  TableList.member = Shapes::ShapeRef.new(shape: TableMember)
266
317
 
267
318
  TableMember.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "name"))
@@ -291,12 +342,24 @@ module Aws::RedshiftDataAPIService
291
342
  "uid" => "redshift-data-2019-12-20",
292
343
  }
293
344
 
345
+ api.add_operation(:batch_execute_statement, Seahorse::Model::Operation.new.tap do |o|
346
+ o.name = "BatchExecuteStatement"
347
+ o.http_method = "POST"
348
+ o.http_request_uri = "/"
349
+ o.input = Shapes::ShapeRef.new(shape: BatchExecuteStatementInput)
350
+ o.output = Shapes::ShapeRef.new(shape: BatchExecuteStatementOutput)
351
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
352
+ o.errors << Shapes::ShapeRef.new(shape: ActiveStatementsExceededException)
353
+ o.errors << Shapes::ShapeRef.new(shape: BatchExecuteStatementException)
354
+ end)
355
+
294
356
  api.add_operation(:cancel_statement, Seahorse::Model::Operation.new.tap do |o|
295
357
  o.name = "CancelStatement"
296
358
  o.http_method = "POST"
297
359
  o.http_request_uri = "/"
298
360
  o.input = Shapes::ShapeRef.new(shape: CancelStatementRequest)
299
361
  o.output = Shapes::ShapeRef.new(shape: CancelStatementResponse)
362
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
300
363
  o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
301
364
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
302
365
  end)
@@ -28,6 +28,7 @@ module Aws::RedshiftDataAPIService
28
28
  #
29
29
  # ## Error Classes
30
30
  # * {ActiveStatementsExceededException}
31
+ # * {BatchExecuteStatementException}
31
32
  # * {ExecuteStatementException}
32
33
  # * {InternalServerException}
33
34
  # * {ResourceNotFoundException}
@@ -54,6 +55,26 @@ module Aws::RedshiftDataAPIService
54
55
  end
55
56
  end
56
57
 
58
+ class BatchExecuteStatementException < ServiceError
59
+
60
+ # @param [Seahorse::Client::RequestContext] context
61
+ # @param [String] message
62
+ # @param [Aws::RedshiftDataAPIService::Types::BatchExecuteStatementException] data
63
+ def initialize(context, message, data = Aws::EmptyStructure.new)
64
+ super(context, message, data)
65
+ end
66
+
67
+ # @return [String]
68
+ def message
69
+ @message || @data[:message]
70
+ end
71
+
72
+ # @return [String]
73
+ def statement_id
74
+ @data[:statement_id]
75
+ end
76
+ end
77
+
57
78
  class ExecuteStatementException < ServiceError
58
79
 
59
80
  # @param [Seahorse::Client::RequestContext] context
@@ -23,18 +23,140 @@ module Aws::RedshiftDataAPIService
23
23
  include Aws::Structure
24
24
  end
25
25
 
26
+ # An SQL statement encountered an environmental error while running.
27
+ #
28
+ # @!attribute [rw] message
29
+ # @return [String]
30
+ #
31
+ # @!attribute [rw] statement_id
32
+ # Statement identifier of the exception.
33
+ # @return [String]
34
+ #
35
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/BatchExecuteStatementException AWS API Documentation
36
+ #
37
+ class BatchExecuteStatementException < Struct.new(
38
+ :message,
39
+ :statement_id)
40
+ SENSITIVE = []
41
+ include Aws::Structure
42
+ end
43
+
44
+ # @note When making an API call, you may pass BatchExecuteStatementInput
45
+ # data as a hash:
46
+ #
47
+ # {
48
+ # cluster_identifier: "Location", # required
49
+ # database: "String", # required
50
+ # db_user: "String",
51
+ # secret_arn: "SecretArn",
52
+ # sqls: ["StatementString"], # required
53
+ # statement_name: "StatementNameString",
54
+ # with_event: false,
55
+ # }
56
+ #
57
+ # @!attribute [rw] cluster_identifier
58
+ # The cluster identifier. This parameter is required when
59
+ # authenticating using either Secrets Manager or temporary
60
+ # credentials.
61
+ # @return [String]
62
+ #
63
+ # @!attribute [rw] database
64
+ # The name of the database. This parameter is required when
65
+ # authenticating using either Secrets Manager or temporary
66
+ # credentials.
67
+ # @return [String]
68
+ #
69
+ # @!attribute [rw] db_user
70
+ # The database user name. This parameter is required when
71
+ # authenticating using temporary credentials.
72
+ # @return [String]
73
+ #
74
+ # @!attribute [rw] secret_arn
75
+ # The name or ARN of the secret that enables access to the database.
76
+ # This parameter is required when authenticating using Secrets
77
+ # Manager.
78
+ # @return [String]
79
+ #
80
+ # @!attribute [rw] sqls
81
+ # One or more SQL statements to run.
82
+ # @return [Array<String>]
83
+ #
84
+ # @!attribute [rw] statement_name
85
+ # The name of the SQL statements. You can name the SQL statements when
86
+ # you create them to identify the query.
87
+ # @return [String]
88
+ #
89
+ # @!attribute [rw] with_event
90
+ # A value that indicates whether to send an event to the Amazon
91
+ # EventBridge event bus after the SQL statements run.
92
+ # @return [Boolean]
93
+ #
94
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/BatchExecuteStatementInput AWS API Documentation
95
+ #
96
+ class BatchExecuteStatementInput < Struct.new(
97
+ :cluster_identifier,
98
+ :database,
99
+ :db_user,
100
+ :secret_arn,
101
+ :sqls,
102
+ :statement_name,
103
+ :with_event)
104
+ SENSITIVE = []
105
+ include Aws::Structure
106
+ end
107
+
108
+ # @!attribute [rw] cluster_identifier
109
+ # The cluster identifier.
110
+ # @return [String]
111
+ #
112
+ # @!attribute [rw] created_at
113
+ # The date and time (UTC) the statement was created.
114
+ # @return [Time]
115
+ #
116
+ # @!attribute [rw] database
117
+ # The name of the database.
118
+ # @return [String]
119
+ #
120
+ # @!attribute [rw] db_user
121
+ # The database user name.
122
+ # @return [String]
123
+ #
124
+ # @!attribute [rw] id
125
+ # The identifier of the SQL statement whose results are to be fetched.
126
+ # This value is a universally unique identifier (UUID) generated by
127
+ # Amazon Redshift Data API. This identifier is returned by
128
+ # `BatchExecuteStatment`.
129
+ # @return [String]
130
+ #
131
+ # @!attribute [rw] secret_arn
132
+ # The name or ARN of the secret that enables access to the database.
133
+ # @return [String]
134
+ #
135
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/BatchExecuteStatementOutput AWS API Documentation
136
+ #
137
+ class BatchExecuteStatementOutput < Struct.new(
138
+ :cluster_identifier,
139
+ :created_at,
140
+ :database,
141
+ :db_user,
142
+ :id,
143
+ :secret_arn)
144
+ SENSITIVE = []
145
+ include Aws::Structure
146
+ end
147
+
26
148
  # @note When making an API call, you may pass CancelStatementRequest
27
149
  # data as a hash:
28
150
  #
29
151
  # {
30
- # id: "UUID", # required
152
+ # id: "StatementId", # required
31
153
  # }
32
154
  #
33
155
  # @!attribute [rw] id
34
156
  # The identifier of the SQL statement to cancel. This value is a
35
157
  # universally unique identifier (UUID) generated by Amazon Redshift
36
- # Data API. This identifier is returned by `ExecuteStatment` and
37
- # `ListStatements`.
158
+ # Data API. This identifier is returned by `BatchExecuteStatment`,
159
+ # `ExecuteStatment`, and `ListStatements`.
38
160
  # @return [String]
39
161
  #
40
162
  # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/CancelStatementRequest AWS API Documentation
@@ -137,14 +259,17 @@ module Aws::RedshiftDataAPIService
137
259
  # data as a hash:
138
260
  #
139
261
  # {
140
- # id: "UUID", # required
262
+ # id: "StatementId", # required
141
263
  # }
142
264
  #
143
265
  # @!attribute [rw] id
144
266
  # The identifier of the SQL statement to describe. This value is a
145
267
  # universally unique identifier (UUID) generated by Amazon Redshift
146
- # Data API. This identifier is returned by `ExecuteStatment` and
147
- # `ListStatements`.
268
+ # Data API. A suffix indicates the number of the SQL statement. For
269
+ # example, `d9b6c0c9-0747-4bf4-b142-e8883122f766:2` has a suffix of
270
+ # `:2` that indicates the second SQL statement of a batch query. This
271
+ # identifier is returned by `BatchExecuteStatment`,
272
+ # `ExecuteStatement`, and `ListStatements`.
148
273
  # @return [String]
149
274
  #
150
275
  # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeStatementRequest AWS API Documentation
@@ -213,11 +338,13 @@ module Aws::RedshiftDataAPIService
213
338
  # Either the number of rows returned from the SQL statement or the
214
339
  # number of rows affected. If result size is greater than zero, the
215
340
  # result rows can be the number of rows affected by SQL statements
216
- # such as INSERT, UPDATE, DELETE, COPY, and others.
341
+ # such as INSERT, UPDATE, DELETE, COPY, and others. A `-1` indicates
342
+ # the value is null.
217
343
  # @return [Integer]
218
344
  #
219
345
  # @!attribute [rw] result_size
220
- # The size in bytes of the returned results.
346
+ # The size in bytes of the returned results. A `-1` indicates the
347
+ # value is null.
221
348
  # @return [Integer]
222
349
  #
223
350
  # @!attribute [rw] secret_arn
@@ -245,6 +372,10 @@ module Aws::RedshiftDataAPIService
245
372
  # * SUBMITTED - The query was submitted, but not yet processed.
246
373
  # @return [String]
247
374
  #
375
+ # @!attribute [rw] sub_statements
376
+ # The SQL statements from a multiple statement run.
377
+ # @return [Array<Types::SubStatementData>]
378
+ #
248
379
  # @!attribute [rw] updated_at
249
380
  # The date and time (UTC) that the metadata for the SQL statement was
250
381
  # last updated. An example is the time the status last changed.
@@ -269,6 +400,7 @@ module Aws::RedshiftDataAPIService
269
400
  :result_size,
270
401
  :secret_arn,
271
402
  :status,
403
+ :sub_statements,
272
404
  :updated_at)
273
405
  SENSITIVE = []
274
406
  include Aws::Structure
@@ -291,7 +423,7 @@ module Aws::RedshiftDataAPIService
291
423
  #
292
424
  # @!attribute [rw] cluster_identifier
293
425
  # The cluster identifier. This parameter is required when
294
- # authenticating using either AWS Secrets Manager or temporary
426
+ # authenticating using either Secrets Manager or temporary
295
427
  # credentials.
296
428
  # @return [String]
297
429
  #
@@ -333,7 +465,7 @@ module Aws::RedshiftDataAPIService
333
465
  #
334
466
  # @!attribute [rw] secret_arn
335
467
  # The name or ARN of the secret that enables access to the database.
336
- # This parameter is required when authenticating using AWS Secrets
468
+ # This parameter is required when authenticating using Secrets
337
469
  # Manager.
338
470
  # @return [String]
339
471
  #
@@ -411,7 +543,7 @@ module Aws::RedshiftDataAPIService
411
543
  #
412
544
  # {
413
545
  # cluster_identifier: "Location", # required
414
- # database: "String",
546
+ # database: "String", # required
415
547
  # db_user: "String",
416
548
  # parameters: [
417
549
  # {
@@ -427,13 +559,14 @@ module Aws::RedshiftDataAPIService
427
559
  #
428
560
  # @!attribute [rw] cluster_identifier
429
561
  # The cluster identifier. This parameter is required when
430
- # authenticating using either AWS Secrets Manager or temporary
562
+ # authenticating using either Secrets Manager or temporary
431
563
  # credentials.
432
564
  # @return [String]
433
565
  #
434
566
  # @!attribute [rw] database
435
567
  # The name of the database. This parameter is required when
436
- # authenticating using temporary credentials.
568
+ # authenticating using either Secrets Manager or temporary
569
+ # credentials.
437
570
  # @return [String]
438
571
  #
439
572
  # @!attribute [rw] db_user
@@ -447,7 +580,7 @@ module Aws::RedshiftDataAPIService
447
580
  #
448
581
  # @!attribute [rw] secret_arn
449
582
  # The name or ARN of the secret that enables access to the database.
450
- # This parameter is required when authenticating using AWS Secrets
583
+ # This parameter is required when authenticating using Secrets
451
584
  # Manager.
452
585
  # @return [String]
453
586
  #
@@ -497,9 +630,9 @@ module Aws::RedshiftDataAPIService
497
630
  # @return [String]
498
631
  #
499
632
  # @!attribute [rw] id
500
- # The identifier of the statement to be run. This value is a
501
- # universally unique identifier (UUID) generated by Amazon Redshift
502
- # Data API.
633
+ # The identifier of the SQL statement whose results are to be fetched.
634
+ # This value is a universally unique identifier (UUID) generated by
635
+ # Amazon Redshift Data API.
503
636
  # @return [String]
504
637
  #
505
638
  # @!attribute [rw] secret_arn
@@ -562,15 +695,18 @@ module Aws::RedshiftDataAPIService
562
695
  # data as a hash:
563
696
  #
564
697
  # {
565
- # id: "UUID", # required
698
+ # id: "StatementId", # required
566
699
  # next_token: "String",
567
700
  # }
568
701
  #
569
702
  # @!attribute [rw] id
570
703
  # The identifier of the SQL statement whose results are to be fetched.
571
704
  # This value is a universally unique identifier (UUID) generated by
572
- # Amazon Redshift Data API. This identifier is returned by
573
- # `ExecuteStatment` and `ListStatements`.
705
+ # Amazon Redshift Data API. A suffix indicates then number of the SQL
706
+ # statement. For example, `d9b6c0c9-0747-4bf4-b142-e8883122f766:2` has
707
+ # a suffix of `:2` that indicates the second SQL statement of a batch
708
+ # query. This identifier is returned by `BatchExecuteStatment`,
709
+ # `ExecuteStatment`, and `ListStatements`.
574
710
  # @return [String]
575
711
  #
576
712
  # @!attribute [rw] next_token
@@ -644,7 +780,7 @@ module Aws::RedshiftDataAPIService
644
780
  #
645
781
  # {
646
782
  # cluster_identifier: "Location", # required
647
- # database: "String",
783
+ # database: "String", # required
648
784
  # db_user: "String",
649
785
  # max_results: 1,
650
786
  # next_token: "String",
@@ -653,13 +789,14 @@ module Aws::RedshiftDataAPIService
653
789
  #
654
790
  # @!attribute [rw] cluster_identifier
655
791
  # The cluster identifier. This parameter is required when
656
- # authenticating using either AWS Secrets Manager or temporary
792
+ # authenticating using either Secrets Manager or temporary
657
793
  # credentials.
658
794
  # @return [String]
659
795
  #
660
796
  # @!attribute [rw] database
661
797
  # The name of the database. This parameter is required when
662
- # authenticating using temporary credentials.
798
+ # authenticating using either Secrets Manager or temporary
799
+ # credentials.
663
800
  # @return [String]
664
801
  #
665
802
  # @!attribute [rw] db_user
@@ -684,7 +821,7 @@ module Aws::RedshiftDataAPIService
684
821
  #
685
822
  # @!attribute [rw] secret_arn
686
823
  # The name or ARN of the secret that enables access to the database.
687
- # This parameter is required when authenticating using AWS Secrets
824
+ # This parameter is required when authenticating using Secrets
688
825
  # Manager.
689
826
  # @return [String]
690
827
  #
@@ -739,7 +876,7 @@ module Aws::RedshiftDataAPIService
739
876
  #
740
877
  # @!attribute [rw] cluster_identifier
741
878
  # The cluster identifier. This parameter is required when
742
- # authenticating using either AWS Secrets Manager or temporary
879
+ # authenticating using either Secrets Manager or temporary
743
880
  # credentials.
744
881
  # @return [String]
745
882
  #
@@ -783,7 +920,7 @@ module Aws::RedshiftDataAPIService
783
920
  #
784
921
  # @!attribute [rw] secret_arn
785
922
  # The name or ARN of the secret that enables access to the database.
786
- # This parameter is required when authenticating using AWS Secrets
923
+ # This parameter is required when authenticating using Secrets
787
924
  # Manager.
788
925
  # @return [String]
789
926
  #
@@ -859,12 +996,12 @@ module Aws::RedshiftDataAPIService
859
996
  #
860
997
  # @!attribute [rw] statement_name
861
998
  # The name of the SQL statement specified as input to
862
- # `ExecuteStatement` to identify the query. You can list multiple
863
- # statements by providing a prefix that matches the beginning of the
864
- # statement name. For example, to list myStatement1, myStatement2,
865
- # myStatement3, and so on, then provide the a value of `myStatement`.
866
- # Data API does a case-sensitive match of SQL statement names to the
867
- # prefix value you provide.
999
+ # `BatchExecuteStatement` or `ExecuteStatement` to identify the query.
1000
+ # You can list multiple statements by providing a prefix that matches
1001
+ # the beginning of the statement name. For example, to list
1002
+ # myStatement1, myStatement2, myStatement3, and so on, then provide
1003
+ # the a value of `myStatement`. Data API does a case-sensitive match
1004
+ # of SQL statement names to the prefix value you provide.
868
1005
  # @return [String]
869
1006
  #
870
1007
  # @!attribute [rw] status
@@ -938,7 +1075,7 @@ module Aws::RedshiftDataAPIService
938
1075
  #
939
1076
  # @!attribute [rw] cluster_identifier
940
1077
  # The cluster identifier. This parameter is required when
941
- # authenticating using either AWS Secrets Manager or temporary
1078
+ # authenticating using either Secrets Manager or temporary
942
1079
  # credentials.
943
1080
  # @return [String]
944
1081
  #
@@ -985,7 +1122,7 @@ module Aws::RedshiftDataAPIService
985
1122
  #
986
1123
  # @!attribute [rw] secret_arn
987
1124
  # The name or ARN of the secret that enables access to the database.
988
- # This parameter is required when authenticating using AWS Secrets
1125
+ # This parameter is required when authenticating using Secrets
989
1126
  # Manager.
990
1127
  # @return [String]
991
1128
  #
@@ -1101,6 +1238,11 @@ module Aws::RedshiftDataAPIService
1101
1238
  # identifier (UUID) generated by Amazon Redshift Data API.
1102
1239
  # @return [String]
1103
1240
  #
1241
+ # @!attribute [rw] is_batch_statement
1242
+ # A value that indicates whether the statement is a batch query
1243
+ # request.
1244
+ # @return [Boolean]
1245
+ #
1104
1246
  # @!attribute [rw] query_parameters
1105
1247
  # The parameters used in a SQL statement.
1106
1248
  # @return [Array<Types::SqlParameter>]
@@ -1109,6 +1251,11 @@ module Aws::RedshiftDataAPIService
1109
1251
  # The SQL statement.
1110
1252
  # @return [String]
1111
1253
  #
1254
+ # @!attribute [rw] query_strings
1255
+ # One or more SQL statements. Each query string in the array
1256
+ # corresponds to one of the queries in a batch query request.
1257
+ # @return [Array<String>]
1258
+ #
1112
1259
  # @!attribute [rw] secret_arn
1113
1260
  # The name or Amazon Resource Name (ARN) of the secret that enables
1114
1261
  # access to the database.
@@ -1133,8 +1280,10 @@ module Aws::RedshiftDataAPIService
1133
1280
  class StatementData < Struct.new(
1134
1281
  :created_at,
1135
1282
  :id,
1283
+ :is_batch_statement,
1136
1284
  :query_parameters,
1137
1285
  :query_string,
1286
+ :query_strings,
1138
1287
  :secret_arn,
1139
1288
  :statement_name,
1140
1289
  :status,
@@ -1143,6 +1292,84 @@ module Aws::RedshiftDataAPIService
1143
1292
  include Aws::Structure
1144
1293
  end
1145
1294
 
1295
+ # Information about an SQL statement.
1296
+ #
1297
+ # @!attribute [rw] created_at
1298
+ # The date and time (UTC) the statement was created.
1299
+ # @return [Time]
1300
+ #
1301
+ # @!attribute [rw] duration
1302
+ # The amount of time in nanoseconds that the statement ran.
1303
+ # @return [Integer]
1304
+ #
1305
+ # @!attribute [rw] error
1306
+ # The error message from the cluster if the SQL statement encountered
1307
+ # an error while running.
1308
+ # @return [String]
1309
+ #
1310
+ # @!attribute [rw] has_result_set
1311
+ # A value that indicates whether the statement has a result set. The
1312
+ # result set can be empty.
1313
+ # @return [Boolean]
1314
+ #
1315
+ # @!attribute [rw] id
1316
+ # The identifier of the SQL statement. This value is a universally
1317
+ # unique identifier (UUID) generated by Amazon Redshift Data API. A
1318
+ # suffix indicates the number of the SQL statement. For example,
1319
+ # `d9b6c0c9-0747-4bf4-b142-e8883122f766:2` has a suffix of `:2` that
1320
+ # indicates the second SQL statement of a batch query.
1321
+ # @return [String]
1322
+ #
1323
+ # @!attribute [rw] query_string
1324
+ # The SQL statement text.
1325
+ # @return [String]
1326
+ #
1327
+ # @!attribute [rw] redshift_query_id
1328
+ # The SQL statement identifier. This value is a universally unique
1329
+ # identifier (UUID) generated by Amazon Redshift Data API.
1330
+ # @return [Integer]
1331
+ #
1332
+ # @!attribute [rw] result_rows
1333
+ # Either the number of rows returned from the SQL statement or the
1334
+ # number of rows affected. If result size is greater than zero, the
1335
+ # result rows can be the number of rows affected by SQL statements
1336
+ # such as INSERT, UPDATE, DELETE, COPY, and others. A `-1` indicates
1337
+ # the value is null.
1338
+ # @return [Integer]
1339
+ #
1340
+ # @!attribute [rw] result_size
1341
+ # The size in bytes of the returned results. A `-1` indicates the
1342
+ # value is null.
1343
+ # @return [Integer]
1344
+ #
1345
+ # @!attribute [rw] status
1346
+ # The status of the SQL statement. An example is the that the SQL
1347
+ # statement finished.
1348
+ # @return [String]
1349
+ #
1350
+ # @!attribute [rw] updated_at
1351
+ # The date and time (UTC) that the statement metadata was last
1352
+ # updated.
1353
+ # @return [Time]
1354
+ #
1355
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/SubStatementData AWS API Documentation
1356
+ #
1357
+ class SubStatementData < Struct.new(
1358
+ :created_at,
1359
+ :duration,
1360
+ :error,
1361
+ :has_result_set,
1362
+ :id,
1363
+ :query_string,
1364
+ :redshift_query_id,
1365
+ :result_rows,
1366
+ :result_size,
1367
+ :status,
1368
+ :updated_at)
1369
+ SENSITIVE = []
1370
+ include Aws::Structure
1371
+ end
1372
+
1146
1373
  # The properties of a table.
1147
1374
  #
1148
1375
  # @!attribute [rw] name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-redshiftdataapiservice
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-15 00:00:00.000000000 Z
11
+ date: 2021-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core