aws-sdk-redshiftdataapiservice 1.49.0 → 1.50.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6831e104286b1d71a71266a8c52f44fc019a83f61e1b0e7eb2563d4b32532988
4
- data.tar.gz: c3b0ae48092b9a3d661555dff97adf3badc9a8f34e866b3c7ced643641c5f27f
3
+ metadata.gz: 7fd23c41311ad97cc826a966ec137c69536bf734d68cf84fe6b35e70ec40252d
4
+ data.tar.gz: e2d843226036ae6642cf07e672a12c13cd6dbdbbf46c9c6a2b55ce29a9c458ae
5
5
  SHA512:
6
- metadata.gz: e037b889a3d2691b461064201b6087f79d053d606b543ecedf694712e96a56722103a592a1772df9e2b053fba2a8e55b234c9017649ef7c6827e9c868b82cdb3
7
- data.tar.gz: 2197a89c234696514ddc4383dbc9c0a2293ed8dfe188c6cfd420c5ba73be1b8d1a3a03be0e4f03210d60b2a24652487f438a408e634fc57beb5eca184f62ac1a
6
+ metadata.gz: 210db61d786655c1405af71c5fcf45d5852bd5bd40403642574c1d966c45941a0ed9e43cf852d12f590653b31e0c814175c18f1d98822776e22a98331aae4d25
7
+ data.tar.gz: 0e807f962e59b98b3db1398620dc67e18de96982171d78075eee6773f81f9dc85ea35152edbaeaf2a79b5c2af55799dd033d54ca46da52c411e9c5cad6106fe6
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.50.0 (2024-10-29)
5
+ ------------------
6
+
7
+ * Feature - Adding a new API GetStatementResultV2 that supports CSV formatted results from ExecuteStatement and BatchExecuteStatement calls.
8
+
4
9
  1.49.0 (2024-10-18)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.49.0
1
+ 1.50.0
@@ -518,6 +518,10 @@ module Aws::RedshiftDataAPIService
518
518
  # a cluster as a database user and authenticating using temporary
519
519
  # credentials.
520
520
  #
521
+ # @option params [String] :result_format
522
+ # The data format of the result of the SQL statement. If no format is
523
+ # specified, the default is JSON.
524
+ #
521
525
  # @option params [String] :secret_arn
522
526
  # The name or ARN of the secret that enables access to the database.
523
527
  # This parameter is required when authenticating using Secrets Manager.
@@ -569,6 +573,7 @@ module Aws::RedshiftDataAPIService
569
573
  # cluster_identifier: "ClusterIdentifierString",
570
574
  # database: "String",
571
575
  # db_user: "String",
576
+ # result_format: "JSON", # accepts JSON, CSV
572
577
  # secret_arn: "SecretArn",
573
578
  # session_id: "UUID",
574
579
  # session_keep_alive_seconds: 1,
@@ -675,6 +680,7 @@ module Aws::RedshiftDataAPIService
675
680
  # * {Types::DescribeStatementResponse#query_string #query_string} => String
676
681
  # * {Types::DescribeStatementResponse#redshift_pid #redshift_pid} => Integer
677
682
  # * {Types::DescribeStatementResponse#redshift_query_id #redshift_query_id} => Integer
683
+ # * {Types::DescribeStatementResponse#result_format #result_format} => String
678
684
  # * {Types::DescribeStatementResponse#result_rows #result_rows} => Integer
679
685
  # * {Types::DescribeStatementResponse#result_size #result_size} => Integer
680
686
  # * {Types::DescribeStatementResponse#secret_arn #secret_arn} => String
@@ -706,6 +712,7 @@ module Aws::RedshiftDataAPIService
706
712
  # resp.query_string #=> String
707
713
  # resp.redshift_pid #=> Integer
708
714
  # resp.redshift_query_id #=> Integer
715
+ # resp.result_format #=> String, one of "JSON", "CSV"
709
716
  # resp.result_rows #=> Integer
710
717
  # resp.result_size #=> Integer
711
718
  # resp.secret_arn #=> String
@@ -946,6 +953,10 @@ module Aws::RedshiftDataAPIService
946
953
  # @option params [Array<Types::SqlParameter>] :parameters
947
954
  # The parameters for the SQL statement.
948
955
  #
956
+ # @option params [String] :result_format
957
+ # The data format of the result of the SQL statement. If no format is
958
+ # specified, the default is JSON.
959
+ #
949
960
  # @option params [String] :secret_arn
950
961
  # The name or ARN of the secret that enables access to the database.
951
962
  # This parameter is required when authenticating using Secrets Manager.
@@ -999,6 +1010,7 @@ module Aws::RedshiftDataAPIService
999
1010
  # value: "ParameterValue", # required
1000
1011
  # },
1001
1012
  # ],
1013
+ # result_format: "JSON", # accepts JSON, CSV
1002
1014
  # secret_arn: "SecretArn",
1003
1015
  # session_id: "UUID",
1004
1016
  # session_keep_alive_seconds: 1,
@@ -1030,8 +1042,11 @@ module Aws::RedshiftDataAPIService
1030
1042
  req.send_request(options)
1031
1043
  end
1032
1044
 
1033
- # Fetches the temporarily cached result of an SQL statement. A token is
1034
- # returned to page through the statement results.
1045
+ # Fetches the temporarily cached result of an SQL statement in JSON
1046
+ # format. The `ExecuteStatement` or `BatchExecuteStatement` operation
1047
+ # that ran the SQL statement must have specified `ResultFormat` as
1048
+ # `JSON` , or let the format default to JSON. A token is returned to
1049
+ # page through the statement results.
1035
1050
  #
1036
1051
  # For more information about the Amazon Redshift Data API and CLI usage
1037
1052
  # examples, see [Using the Amazon Redshift Data API][1] in the *Amazon
@@ -1110,6 +1125,84 @@ module Aws::RedshiftDataAPIService
1110
1125
  req.send_request(options)
1111
1126
  end
1112
1127
 
1128
+ # Fetches the temporarily cached result of an SQL statement in CSV
1129
+ # format. The `ExecuteStatement` or `BatchExecuteStatement` operation
1130
+ # that ran the SQL statement must have specified `ResultFormat` as
1131
+ # `CSV`. A token is returned to page through the statement results.
1132
+ #
1133
+ # For more information about the Amazon Redshift Data API and CLI usage
1134
+ # examples, see [Using the Amazon Redshift Data API][1] in the *Amazon
1135
+ # Redshift Management Guide*.
1136
+ #
1137
+ #
1138
+ #
1139
+ # [1]: https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html
1140
+ #
1141
+ # @option params [required, String] :id
1142
+ # The identifier of the SQL statement whose results are to be fetched.
1143
+ # This value is a universally unique identifier (UUID) generated by
1144
+ # Amazon Redshift Data API. A suffix indicates then number of the SQL
1145
+ # statement. For example, `d9b6c0c9-0747-4bf4-b142-e8883122f766:2` has a
1146
+ # suffix of `:2` that indicates the second SQL statement of a batch
1147
+ # query. This identifier is returned by `BatchExecuteStatment`,
1148
+ # `ExecuteStatment`, and `ListStatements`.
1149
+ #
1150
+ # @option params [String] :next_token
1151
+ # A value that indicates the starting point for the next set of response
1152
+ # records in a subsequent request. If a value is returned in a response,
1153
+ # you can retrieve the next set of records by providing this returned
1154
+ # NextToken value in the next NextToken parameter and retrying the
1155
+ # command. If the NextToken field is empty, all response records have
1156
+ # been retrieved for the request.
1157
+ #
1158
+ # @return [Types::GetStatementResultV2Response] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1159
+ #
1160
+ # * {Types::GetStatementResultV2Response#column_metadata #column_metadata} => Array&lt;Types::ColumnMetadata&gt;
1161
+ # * {Types::GetStatementResultV2Response#next_token #next_token} => String
1162
+ # * {Types::GetStatementResultV2Response#records #records} => Array&lt;Types::QueryRecords&gt;
1163
+ # * {Types::GetStatementResultV2Response#result_format #result_format} => String
1164
+ # * {Types::GetStatementResultV2Response#total_num_rows #total_num_rows} => Integer
1165
+ #
1166
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1167
+ #
1168
+ # @example Request syntax with placeholder values
1169
+ #
1170
+ # resp = client.get_statement_result_v2({
1171
+ # id: "UUID", # required
1172
+ # next_token: "String",
1173
+ # })
1174
+ #
1175
+ # @example Response structure
1176
+ #
1177
+ # resp.column_metadata #=> Array
1178
+ # resp.column_metadata[0].column_default #=> String
1179
+ # resp.column_metadata[0].is_case_sensitive #=> Boolean
1180
+ # resp.column_metadata[0].is_currency #=> Boolean
1181
+ # resp.column_metadata[0].is_signed #=> Boolean
1182
+ # resp.column_metadata[0].label #=> String
1183
+ # resp.column_metadata[0].length #=> Integer
1184
+ # resp.column_metadata[0].name #=> String
1185
+ # resp.column_metadata[0].nullable #=> Integer
1186
+ # resp.column_metadata[0].precision #=> Integer
1187
+ # resp.column_metadata[0].scale #=> Integer
1188
+ # resp.column_metadata[0].schema_name #=> String
1189
+ # resp.column_metadata[0].table_name #=> String
1190
+ # resp.column_metadata[0].type_name #=> String
1191
+ # resp.next_token #=> String
1192
+ # resp.records #=> Array
1193
+ # resp.records[0].csv_records #=> String
1194
+ # resp.result_format #=> String, one of "JSON", "CSV"
1195
+ # resp.total_num_rows #=> Integer
1196
+ #
1197
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/GetStatementResultV2 AWS API Documentation
1198
+ #
1199
+ # @overload get_statement_result_v2(params = {})
1200
+ # @param [Hash] params ({})
1201
+ def get_statement_result_v2(params = {}, options = {})
1202
+ req = build_request(:get_statement_result_v2, params)
1203
+ req.send_request(options)
1204
+ end
1205
+
1113
1206
  # List the databases in a cluster. A token is returned to page through
1114
1207
  # the database list. Depending on the authorization method, use one of
1115
1208
  # the following combinations of request parameters:
@@ -1435,6 +1528,7 @@ module Aws::RedshiftDataAPIService
1435
1528
  # resp.statements[0].query_string #=> String
1436
1529
  # resp.statements[0].query_strings #=> Array
1437
1530
  # resp.statements[0].query_strings[0] #=> String
1531
+ # resp.statements[0].result_format #=> String, one of "JSON", "CSV"
1438
1532
  # resp.statements[0].secret_arn #=> String
1439
1533
  # resp.statements[0].session_id #=> String
1440
1534
  # resp.statements[0].statement_name #=> String
@@ -1610,7 +1704,7 @@ module Aws::RedshiftDataAPIService
1610
1704
  tracer: tracer
1611
1705
  )
1612
1706
  context[:gem_name] = 'aws-sdk-redshiftdataapiservice'
1613
- context[:gem_version] = '1.49.0'
1707
+ context[:gem_version] = '1.50.0'
1614
1708
  Seahorse::Client::Request.new(handlers, context)
1615
1709
  end
1616
1710
 
@@ -43,8 +43,11 @@ module Aws::RedshiftDataAPIService
43
43
  ExecuteStatementOutput = Shapes::StructureShape.new(name: 'ExecuteStatementOutput')
44
44
  Field = Shapes::UnionShape.new(name: 'Field')
45
45
  FieldList = Shapes::ListShape.new(name: 'FieldList')
46
+ FormattedSqlRecords = Shapes::ListShape.new(name: 'FormattedSqlRecords')
46
47
  GetStatementResultRequest = Shapes::StructureShape.new(name: 'GetStatementResultRequest')
47
48
  GetStatementResultResponse = Shapes::StructureShape.new(name: 'GetStatementResultResponse')
49
+ GetStatementResultV2Request = Shapes::StructureShape.new(name: 'GetStatementResultV2Request')
50
+ GetStatementResultV2Response = Shapes::StructureShape.new(name: 'GetStatementResultV2Response')
48
51
  Integer = Shapes::IntegerShape.new(name: 'Integer')
49
52
  InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
50
53
  ListDatabasesRequest = Shapes::StructureShape.new(name: 'ListDatabasesRequest')
@@ -60,8 +63,10 @@ module Aws::RedshiftDataAPIService
60
63
  PageSize = Shapes::IntegerShape.new(name: 'PageSize')
61
64
  ParameterName = Shapes::StringShape.new(name: 'ParameterName')
62
65
  ParameterValue = Shapes::StringShape.new(name: 'ParameterValue')
66
+ QueryRecords = Shapes::UnionShape.new(name: 'QueryRecords')
63
67
  QueryTimeoutException = Shapes::StructureShape.new(name: 'QueryTimeoutException')
64
68
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
69
+ ResultFormatString = Shapes::StringShape.new(name: 'ResultFormatString')
65
70
  SchemaList = Shapes::ListShape.new(name: 'SchemaList')
66
71
  SecretArn = Shapes::StringShape.new(name: 'SecretArn')
67
72
  SessionAliveSeconds = Shapes::IntegerShape.new(name: 'SessionAliveSeconds')
@@ -101,6 +106,7 @@ module Aws::RedshiftDataAPIService
101
106
  BatchExecuteStatementInput.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: ClusterIdentifierString, location_name: "ClusterIdentifier"))
102
107
  BatchExecuteStatementInput.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
103
108
  BatchExecuteStatementInput.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
109
+ BatchExecuteStatementInput.add_member(:result_format, Shapes::ShapeRef.new(shape: ResultFormatString, location_name: "ResultFormat"))
104
110
  BatchExecuteStatementInput.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
105
111
  BatchExecuteStatementInput.add_member(:session_id, Shapes::ShapeRef.new(shape: UUID, location_name: "SessionId"))
106
112
  BatchExecuteStatementInput.add_member(:session_keep_alive_seconds, Shapes::ShapeRef.new(shape: SessionAliveSeconds, location_name: "SessionKeepAliveSeconds"))
@@ -168,6 +174,7 @@ module Aws::RedshiftDataAPIService
168
174
  DescribeStatementResponse.add_member(:query_string, Shapes::ShapeRef.new(shape: StatementString, location_name: "QueryString"))
169
175
  DescribeStatementResponse.add_member(:redshift_pid, Shapes::ShapeRef.new(shape: Long, location_name: "RedshiftPid"))
170
176
  DescribeStatementResponse.add_member(:redshift_query_id, Shapes::ShapeRef.new(shape: Long, location_name: "RedshiftQueryId"))
177
+ DescribeStatementResponse.add_member(:result_format, Shapes::ShapeRef.new(shape: ResultFormatString, location_name: "ResultFormat"))
171
178
  DescribeStatementResponse.add_member(:result_rows, Shapes::ShapeRef.new(shape: Long, location_name: "ResultRows"))
172
179
  DescribeStatementResponse.add_member(:result_size, Shapes::ShapeRef.new(shape: Long, location_name: "ResultSize"))
173
180
  DescribeStatementResponse.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
@@ -204,6 +211,7 @@ module Aws::RedshiftDataAPIService
204
211
  ExecuteStatementInput.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
205
212
  ExecuteStatementInput.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
206
213
  ExecuteStatementInput.add_member(:parameters, Shapes::ShapeRef.new(shape: SqlParametersList, location_name: "Parameters"))
214
+ ExecuteStatementInput.add_member(:result_format, Shapes::ShapeRef.new(shape: ResultFormatString, location_name: "ResultFormat"))
207
215
  ExecuteStatementInput.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
208
216
  ExecuteStatementInput.add_member(:session_id, Shapes::ShapeRef.new(shape: UUID, location_name: "SessionId"))
209
217
  ExecuteStatementInput.add_member(:session_keep_alive_seconds, Shapes::ShapeRef.new(shape: SessionAliveSeconds, location_name: "SessionKeepAliveSeconds"))
@@ -242,6 +250,8 @@ module Aws::RedshiftDataAPIService
242
250
 
243
251
  FieldList.member = Shapes::ShapeRef.new(shape: Field)
244
252
 
253
+ FormattedSqlRecords.member = Shapes::ShapeRef.new(shape: QueryRecords)
254
+
245
255
  GetStatementResultRequest.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
246
256
  GetStatementResultRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
247
257
  GetStatementResultRequest.struct_class = Types::GetStatementResultRequest
@@ -252,6 +262,17 @@ module Aws::RedshiftDataAPIService
252
262
  GetStatementResultResponse.add_member(:total_num_rows, Shapes::ShapeRef.new(shape: Long, location_name: "TotalNumRows"))
253
263
  GetStatementResultResponse.struct_class = Types::GetStatementResultResponse
254
264
 
265
+ GetStatementResultV2Request.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
266
+ GetStatementResultV2Request.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
267
+ GetStatementResultV2Request.struct_class = Types::GetStatementResultV2Request
268
+
269
+ GetStatementResultV2Response.add_member(:column_metadata, Shapes::ShapeRef.new(shape: ColumnMetadataList, location_name: "ColumnMetadata"))
270
+ GetStatementResultV2Response.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
271
+ GetStatementResultV2Response.add_member(:records, Shapes::ShapeRef.new(shape: FormattedSqlRecords, required: true, location_name: "Records"))
272
+ GetStatementResultV2Response.add_member(:result_format, Shapes::ShapeRef.new(shape: ResultFormatString, location_name: "ResultFormat"))
273
+ GetStatementResultV2Response.add_member(:total_num_rows, Shapes::ShapeRef.new(shape: Long, location_name: "TotalNumRows"))
274
+ GetStatementResultV2Response.struct_class = Types::GetStatementResultV2Response
275
+
255
276
  InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Message"))
256
277
  InternalServerException.struct_class = Types::InternalServerException
257
278
 
@@ -310,6 +331,12 @@ module Aws::RedshiftDataAPIService
310
331
  ListTablesResponse.add_member(:tables, Shapes::ShapeRef.new(shape: TableList, location_name: "Tables"))
311
332
  ListTablesResponse.struct_class = Types::ListTablesResponse
312
333
 
334
+ QueryRecords.add_member(:csv_records, Shapes::ShapeRef.new(shape: String, location_name: "CSVRecords"))
335
+ QueryRecords.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
336
+ QueryRecords.add_member_subclass(:csv_records, Types::QueryRecords::CsvRecords)
337
+ QueryRecords.add_member_subclass(:unknown, Types::QueryRecords::Unknown)
338
+ QueryRecords.struct_class = Types::QueryRecords
339
+
313
340
  QueryTimeoutException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
314
341
  QueryTimeoutException.struct_class = Types::QueryTimeoutException
315
342
 
@@ -335,6 +362,7 @@ module Aws::RedshiftDataAPIService
335
362
  StatementData.add_member(:query_parameters, Shapes::ShapeRef.new(shape: SqlParametersList, location_name: "QueryParameters"))
336
363
  StatementData.add_member(:query_string, Shapes::ShapeRef.new(shape: StatementString, location_name: "QueryString"))
337
364
  StatementData.add_member(:query_strings, Shapes::ShapeRef.new(shape: StatementStringList, location_name: "QueryStrings"))
365
+ StatementData.add_member(:result_format, Shapes::ShapeRef.new(shape: ResultFormatString, location_name: "ResultFormat"))
338
366
  StatementData.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
339
367
  StatementData.add_member(:session_id, Shapes::ShapeRef.new(shape: UUID, location_name: "SessionId"))
340
368
  StatementData.add_member(:statement_name, Shapes::ShapeRef.new(shape: StatementNameString, location_name: "StatementName"))
@@ -379,6 +407,7 @@ module Aws::RedshiftDataAPIService
379
407
 
380
408
  api.metadata = {
381
409
  "apiVersion" => "2019-12-20",
410
+ "auth" => ["aws.auth#sigv4"],
382
411
  "endpointPrefix" => "redshift-data",
383
412
  "jsonVersion" => "1.1",
384
413
  "protocol" => "json",
@@ -474,6 +503,22 @@ module Aws::RedshiftDataAPIService
474
503
  )
475
504
  end)
476
505
 
506
+ api.add_operation(:get_statement_result_v2, Seahorse::Model::Operation.new.tap do |o|
507
+ o.name = "GetStatementResultV2"
508
+ o.http_method = "POST"
509
+ o.http_request_uri = "/"
510
+ o.input = Shapes::ShapeRef.new(shape: GetStatementResultV2Request)
511
+ o.output = Shapes::ShapeRef.new(shape: GetStatementResultV2Response)
512
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
513
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
514
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
515
+ o[:pager] = Aws::Pager.new(
516
+ tokens: {
517
+ "next_token" => "next_token"
518
+ }
519
+ )
520
+ end)
521
+
477
522
  api.add_operation(:list_databases, Seahorse::Model::Operation.new.tap do |o|
478
523
  o.name = "ListDatabases"
479
524
  o.http_method = "POST"
@@ -81,6 +81,11 @@ module Aws::RedshiftDataAPIService
81
81
  # credentials.
82
82
  # @return [String]
83
83
  #
84
+ # @!attribute [rw] result_format
85
+ # The data format of the result of the SQL statement. If no format is
86
+ # specified, the default is JSON.
87
+ # @return [String]
88
+ #
84
89
  # @!attribute [rw] secret_arn
85
90
  # The name or ARN of the secret that enables access to the database.
86
91
  # This parameter is required when authenticating using Secrets
@@ -131,6 +136,7 @@ module Aws::RedshiftDataAPIService
131
136
  :cluster_identifier,
132
137
  :database,
133
138
  :db_user,
139
+ :result_format,
134
140
  :secret_arn,
135
141
  :session_id,
136
142
  :session_keep_alive_seconds,
@@ -388,6 +394,10 @@ module Aws::RedshiftDataAPIService
388
394
  # `STL_QUERY` system view.
389
395
  # @return [Integer]
390
396
  #
397
+ # @!attribute [rw] result_format
398
+ # The data format of the result of the SQL statement.
399
+ # @return [String]
400
+ #
391
401
  # @!attribute [rw] result_rows
392
402
  # Either the number of rows returned from the SQL statement or the
393
403
  # number of rows affected. If result size is greater than zero, the
@@ -458,6 +468,7 @@ module Aws::RedshiftDataAPIService
458
468
  :query_string,
459
469
  :redshift_pid,
460
470
  :redshift_query_id,
471
+ :result_format,
461
472
  :result_rows,
462
473
  :result_size,
463
474
  :secret_arn,
@@ -626,6 +637,11 @@ module Aws::RedshiftDataAPIService
626
637
  # The parameters for the SQL statement.
627
638
  # @return [Array<Types::SqlParameter>]
628
639
  #
640
+ # @!attribute [rw] result_format
641
+ # The data format of the result of the SQL statement. If no format is
642
+ # specified, the default is JSON.
643
+ # @return [String]
644
+ #
629
645
  # @!attribute [rw] secret_arn
630
646
  # The name or ARN of the secret that enables access to the database.
631
647
  # This parameter is required when authenticating using Secrets
@@ -672,6 +688,7 @@ module Aws::RedshiftDataAPIService
672
688
  :database,
673
689
  :db_user,
674
690
  :parameters,
691
+ :result_format,
675
692
  :secret_arn,
676
693
  :session_id,
677
694
  :session_keep_alive_seconds,
@@ -832,7 +849,7 @@ module Aws::RedshiftDataAPIService
832
849
  # @return [String]
833
850
  #
834
851
  # @!attribute [rw] records
835
- # The results of the SQL statement.
852
+ # The results of the SQL statement in JSON format.
836
853
  # @return [Array<Array<Types::Field>>]
837
854
  #
838
855
  # @!attribute [rw] total_num_rows
@@ -852,6 +869,73 @@ module Aws::RedshiftDataAPIService
852
869
  include Aws::Structure
853
870
  end
854
871
 
872
+ # @!attribute [rw] id
873
+ # The identifier of the SQL statement whose results are to be fetched.
874
+ # This value is a universally unique identifier (UUID) generated by
875
+ # Amazon Redshift Data API. A suffix indicates then number of the SQL
876
+ # statement. For example, `d9b6c0c9-0747-4bf4-b142-e8883122f766:2` has
877
+ # a suffix of `:2` that indicates the second SQL statement of a batch
878
+ # query. This identifier is returned by `BatchExecuteStatment`,
879
+ # `ExecuteStatment`, and `ListStatements`.
880
+ # @return [String]
881
+ #
882
+ # @!attribute [rw] next_token
883
+ # A value that indicates the starting point for the next set of
884
+ # response records in a subsequent request. If a value is returned in
885
+ # a response, you can retrieve the next set of records by providing
886
+ # this returned NextToken value in the next NextToken parameter and
887
+ # retrying the command. If the NextToken field is empty, all response
888
+ # records have been retrieved for the request.
889
+ # @return [String]
890
+ #
891
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/GetStatementResultV2Request AWS API Documentation
892
+ #
893
+ class GetStatementResultV2Request < Struct.new(
894
+ :id,
895
+ :next_token)
896
+ SENSITIVE = []
897
+ include Aws::Structure
898
+ end
899
+
900
+ # @!attribute [rw] column_metadata
901
+ # The properties (metadata) of a column.
902
+ # @return [Array<Types::ColumnMetadata>]
903
+ #
904
+ # @!attribute [rw] next_token
905
+ # A value that indicates the starting point for the next set of
906
+ # response records in a subsequent request. If a value is returned in
907
+ # a response, you can retrieve the next set of records by providing
908
+ # this returned NextToken value in the next NextToken parameter and
909
+ # retrying the command. If the NextToken field is empty, all response
910
+ # records have been retrieved for the request.
911
+ # @return [String]
912
+ #
913
+ # @!attribute [rw] records
914
+ # The results of the SQL statement in CSV format.
915
+ # @return [Array<Types::QueryRecords>]
916
+ #
917
+ # @!attribute [rw] result_format
918
+ # The data format of the result of the SQL statement.
919
+ # @return [String]
920
+ #
921
+ # @!attribute [rw] total_num_rows
922
+ # The total number of rows in the result set returned from a query.
923
+ # You can use this number to estimate the number of calls to the
924
+ # `GetStatementResultV2` operation needed to page through the results.
925
+ # @return [Integer]
926
+ #
927
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/GetStatementResultV2Response AWS API Documentation
928
+ #
929
+ class GetStatementResultV2Response < Struct.new(
930
+ :column_metadata,
931
+ :next_token,
932
+ :records,
933
+ :result_format,
934
+ :total_num_rows)
935
+ SENSITIVE = []
936
+ include Aws::Structure
937
+ end
938
+
855
939
  # The Amazon Redshift Data API operation failed due to invalid input.
856
940
  #
857
941
  # @!attribute [rw] message
@@ -1240,6 +1324,27 @@ module Aws::RedshiftDataAPIService
1240
1324
  include Aws::Structure
1241
1325
  end
1242
1326
 
1327
+ # The results of the SQL statement.
1328
+ #
1329
+ # @note QueryRecords is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of QueryRecords corresponding to the set member.
1330
+ #
1331
+ # @!attribute [rw] csv_records
1332
+ # The results of the SQL statement in CSV format.
1333
+ # @return [String]
1334
+ #
1335
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/QueryRecords AWS API Documentation
1336
+ #
1337
+ class QueryRecords < Struct.new(
1338
+ :csv_records,
1339
+ :unknown)
1340
+ SENSITIVE = []
1341
+ include Aws::Structure
1342
+ include Aws::Structure::Union
1343
+
1344
+ class CsvRecords < QueryRecords; end
1345
+ class Unknown < QueryRecords; end
1346
+ end
1347
+
1243
1348
  # The Amazon Redshift Data API operation failed due to timeout.
1244
1349
  #
1245
1350
  # @!attribute [rw] message
@@ -1327,6 +1432,10 @@ module Aws::RedshiftDataAPIService
1327
1432
  # corresponds to one of the queries in a batch query request.
1328
1433
  # @return [Array<String>]
1329
1434
  #
1435
+ # @!attribute [rw] result_format
1436
+ # The data format of the result of the SQL statement.
1437
+ # @return [String]
1438
+ #
1330
1439
  # @!attribute [rw] secret_arn
1331
1440
  # The name or Amazon Resource Name (ARN) of the secret that enables
1332
1441
  # access to the database.
@@ -1359,6 +1468,7 @@ module Aws::RedshiftDataAPIService
1359
1468
  :query_parameters,
1360
1469
  :query_string,
1361
1470
  :query_strings,
1471
+ :result_format,
1362
1472
  :secret_arn,
1363
1473
  :session_id,
1364
1474
  :statement_name,
@@ -54,7 +54,7 @@ module Aws::RedshiftDataAPIService
54
54
  autoload :EndpointProvider, 'aws-sdk-redshiftdataapiservice/endpoint_provider'
55
55
  autoload :Endpoints, 'aws-sdk-redshiftdataapiservice/endpoints'
56
56
 
57
- GEM_VERSION = '1.49.0'
57
+ GEM_VERSION = '1.50.0'
58
58
 
59
59
  end
60
60
 
data/sig/client.rbs CHANGED
@@ -94,6 +94,7 @@ module Aws
94
94
  ?cluster_identifier: ::String,
95
95
  ?database: ::String,
96
96
  ?db_user: ::String,
97
+ ?result_format: ("JSON" | "CSV"),
97
98
  ?secret_arn: ::String,
98
99
  ?session_id: ::String,
99
100
  ?session_keep_alive_seconds: ::Integer,
@@ -127,6 +128,7 @@ module Aws
127
128
  def query_string: () -> ::String
128
129
  def redshift_pid: () -> ::Integer
129
130
  def redshift_query_id: () -> ::Integer
131
+ def result_format: () -> ("JSON" | "CSV")
130
132
  def result_rows: () -> ::Integer
131
133
  def result_size: () -> ::Integer
132
134
  def secret_arn: () -> ::String
@@ -187,6 +189,7 @@ module Aws
187
189
  value: ::String
188
190
  },
189
191
  ],
192
+ ?result_format: ("JSON" | "CSV"),
190
193
  ?secret_arn: ::String,
191
194
  ?session_id: ::String,
192
195
  ?session_keep_alive_seconds: ::Integer,
@@ -211,6 +214,21 @@ module Aws
211
214
  ) -> _GetStatementResultResponseSuccess
212
215
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetStatementResultResponseSuccess
213
216
 
217
+ interface _GetStatementResultV2ResponseSuccess
218
+ include ::Seahorse::Client::_ResponseSuccess[Types::GetStatementResultV2Response]
219
+ def column_metadata: () -> ::Array[Types::ColumnMetadata]
220
+ def next_token: () -> ::String
221
+ def records: () -> ::Array[Types::QueryRecords]
222
+ def result_format: () -> ("JSON" | "CSV")
223
+ def total_num_rows: () -> ::Integer
224
+ end
225
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/RedshiftDataAPIService/Client.html#get_statement_result_v2-instance_method
226
+ def get_statement_result_v2: (
227
+ id: ::String,
228
+ ?next_token: ::String
229
+ ) -> _GetStatementResultV2ResponseSuccess
230
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetStatementResultV2ResponseSuccess
231
+
214
232
  interface _ListDatabasesResponseSuccess
215
233
  include ::Seahorse::Client::_ResponseSuccess[Types::ListDatabasesResponse]
216
234
  def databases: () -> ::Array[::String]
data/sig/types.rbs CHANGED
@@ -29,6 +29,7 @@ module Aws::RedshiftDataAPIService
29
29
  attr_accessor cluster_identifier: ::String
30
30
  attr_accessor database: ::String
31
31
  attr_accessor db_user: ::String
32
+ attr_accessor result_format: ("JSON" | "CSV")
32
33
  attr_accessor secret_arn: ::String
33
34
  attr_accessor session_id: ::String
34
35
  attr_accessor session_keep_alive_seconds: ::Integer
@@ -102,6 +103,7 @@ module Aws::RedshiftDataAPIService
102
103
  attr_accessor query_string: ::String
103
104
  attr_accessor redshift_pid: ::Integer
104
105
  attr_accessor redshift_query_id: ::Integer
106
+ attr_accessor result_format: ("JSON" | "CSV")
105
107
  attr_accessor result_rows: ::Integer
106
108
  attr_accessor result_size: ::Integer
107
109
  attr_accessor secret_arn: ::String
@@ -146,6 +148,7 @@ module Aws::RedshiftDataAPIService
146
148
  attr_accessor database: ::String
147
149
  attr_accessor db_user: ::String
148
150
  attr_accessor parameters: ::Array[Types::SqlParameter]
151
+ attr_accessor result_format: ("JSON" | "CSV")
149
152
  attr_accessor secret_arn: ::String
150
153
  attr_accessor session_id: ::String
151
154
  attr_accessor session_keep_alive_seconds: ::Integer
@@ -209,6 +212,21 @@ module Aws::RedshiftDataAPIService
209
212
  SENSITIVE: []
210
213
  end
211
214
 
215
+ class GetStatementResultV2Request
216
+ attr_accessor id: ::String
217
+ attr_accessor next_token: ::String
218
+ SENSITIVE: []
219
+ end
220
+
221
+ class GetStatementResultV2Response
222
+ attr_accessor column_metadata: ::Array[Types::ColumnMetadata]
223
+ attr_accessor next_token: ::String
224
+ attr_accessor records: ::Array[Types::QueryRecords]
225
+ attr_accessor result_format: ("JSON" | "CSV")
226
+ attr_accessor total_num_rows: ::Integer
227
+ SENSITIVE: []
228
+ end
229
+
212
230
  class InternalServerException
213
231
  attr_accessor message: ::String
214
232
  SENSITIVE: []
@@ -285,6 +303,17 @@ module Aws::RedshiftDataAPIService
285
303
  SENSITIVE: []
286
304
  end
287
305
 
306
+ class QueryRecords
307
+ attr_accessor csv_records: ::String
308
+ attr_accessor unknown: untyped
309
+ SENSITIVE: []
310
+
311
+ class CsvRecords < QueryRecords
312
+ end
313
+ class Unknown < QueryRecords
314
+ end
315
+ end
316
+
288
317
  class QueryTimeoutException
289
318
  attr_accessor message: ::String
290
319
  SENSITIVE: []
@@ -309,6 +338,7 @@ module Aws::RedshiftDataAPIService
309
338
  attr_accessor query_parameters: ::Array[Types::SqlParameter]
310
339
  attr_accessor query_string: ::String
311
340
  attr_accessor query_strings: ::Array[::String]
341
+ attr_accessor result_format: ("JSON" | "CSV")
312
342
  attr_accessor secret_arn: ::String
313
343
  attr_accessor session_id: ::String
314
344
  attr_accessor statement_name: ::String
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.49.0
4
+ version: 1.50.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: 2024-10-18 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '1.1'
39
+ version: '1.5'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '1.1'
46
+ version: '1.5'
47
47
  description: Official AWS Ruby gem for Redshift Data API Service. This gem is part
48
48
  of the AWS SDK for Ruby.
49
49
  email: