aws-sdk-redshiftdataapiservice 1.49.0 → 1.51.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: 6831e104286b1d71a71266a8c52f44fc019a83f61e1b0e7eb2563d4b32532988
4
- data.tar.gz: c3b0ae48092b9a3d661555dff97adf3badc9a8f34e866b3c7ced643641c5f27f
3
+ metadata.gz: faa8e7b1f83bf804d57f72a36bbfaee687a2be592696d71edb9bc8a5bb4caf03
4
+ data.tar.gz: a21b1e2c0ad42c6465ed7eadb93737280f8c767b4591a6b6926011c0e6275389
5
5
  SHA512:
6
- metadata.gz: e037b889a3d2691b461064201b6087f79d053d606b543ecedf694712e96a56722103a592a1772df9e2b053fba2a8e55b234c9017649ef7c6827e9c868b82cdb3
7
- data.tar.gz: 2197a89c234696514ddc4383dbc9c0a2293ed8dfe188c6cfd420c5ba73be1b8d1a3a03be0e4f03210d60b2a24652487f438a408e634fc57beb5eca184f62ac1a
6
+ metadata.gz: a79ff2a43052aab6e1633eb142514e4aa3cb4be7a887488a111dcc96d950cdb4274b9b7c3b1182635f4335c5c4c865a50208363e3ef6048a956d61247ee4015c
7
+ data.tar.gz: 07fa88ebd24166e268932bdbb49a1413e615eceb9e6f33641b1d73f5da005bbda3cd4279befff2d6db7bbb5fde3be492c39716cbf8557f88e4e27b916759458b
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.51.0 (2025-01-15)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.50.0 (2024-10-29)
10
+ ------------------
11
+
12
+ * Feature - Adding a new API GetStatementResultV2 that supports CSV formatted results from ExecuteStatement and BatchExecuteStatement calls.
13
+
4
14
  1.49.0 (2024-10-18)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.49.0
1
+ 1.51.0
@@ -257,11 +257,34 @@ module Aws::RedshiftDataAPIService
257
257
  # Used when loading credentials from the shared credentials file
258
258
  # at HOME/.aws/credentials. When not specified, 'default' is used.
259
259
  #
260
+ # @option options [String] :request_checksum_calculation ("when_supported")
261
+ # Determines when a checksum will be calculated for request payloads. Values are:
262
+ #
263
+ # * `when_supported` - (default) When set, a checksum will be
264
+ # calculated for all request payloads of operations modeled with the
265
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
266
+ # `requestAlgorithmMember` is modeled.
267
+ # * `when_required` - When set, a checksum will only be calculated for
268
+ # request payloads of operations modeled with the `httpChecksum` trait where
269
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
270
+ # is modeled and supplied.
271
+ #
260
272
  # @option options [Integer] :request_min_compression_size_bytes (10240)
261
273
  # The minimum size in bytes that triggers compression for request
262
274
  # bodies. The value must be non-negative integer value between 0
263
275
  # and 10485780 bytes inclusive.
264
276
  #
277
+ # @option options [String] :response_checksum_validation ("when_supported")
278
+ # Determines when checksum validation will be performed on response payloads. Values are:
279
+ #
280
+ # * `when_supported` - (default) When set, checksum validation is performed on all
281
+ # response payloads of operations modeled with the `httpChecksum` trait where
282
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
283
+ # are supported.
284
+ # * `when_required` - When set, checksum validation is not performed on
285
+ # response payloads of operations unless the checksum algorithm is supported and
286
+ # the `requestValidationModeMember` member is set to `ENABLED`.
287
+ #
265
288
  # @option options [Proc] :retry_backoff
266
289
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
267
290
  # This option is only used in the `legacy` retry mode.
@@ -518,6 +541,10 @@ module Aws::RedshiftDataAPIService
518
541
  # a cluster as a database user and authenticating using temporary
519
542
  # credentials.
520
543
  #
544
+ # @option params [String] :result_format
545
+ # The data format of the result of the SQL statement. If no format is
546
+ # specified, the default is JSON.
547
+ #
521
548
  # @option params [String] :secret_arn
522
549
  # The name or ARN of the secret that enables access to the database.
523
550
  # This parameter is required when authenticating using Secrets Manager.
@@ -569,6 +596,7 @@ module Aws::RedshiftDataAPIService
569
596
  # cluster_identifier: "ClusterIdentifierString",
570
597
  # database: "String",
571
598
  # db_user: "String",
599
+ # result_format: "JSON", # accepts JSON, CSV
572
600
  # secret_arn: "SecretArn",
573
601
  # session_id: "UUID",
574
602
  # session_keep_alive_seconds: 1,
@@ -675,6 +703,7 @@ module Aws::RedshiftDataAPIService
675
703
  # * {Types::DescribeStatementResponse#query_string #query_string} => String
676
704
  # * {Types::DescribeStatementResponse#redshift_pid #redshift_pid} => Integer
677
705
  # * {Types::DescribeStatementResponse#redshift_query_id #redshift_query_id} => Integer
706
+ # * {Types::DescribeStatementResponse#result_format #result_format} => String
678
707
  # * {Types::DescribeStatementResponse#result_rows #result_rows} => Integer
679
708
  # * {Types::DescribeStatementResponse#result_size #result_size} => Integer
680
709
  # * {Types::DescribeStatementResponse#secret_arn #secret_arn} => String
@@ -706,6 +735,7 @@ module Aws::RedshiftDataAPIService
706
735
  # resp.query_string #=> String
707
736
  # resp.redshift_pid #=> Integer
708
737
  # resp.redshift_query_id #=> Integer
738
+ # resp.result_format #=> String, one of "JSON", "CSV"
709
739
  # resp.result_rows #=> Integer
710
740
  # resp.result_size #=> Integer
711
741
  # resp.secret_arn #=> String
@@ -946,6 +976,10 @@ module Aws::RedshiftDataAPIService
946
976
  # @option params [Array<Types::SqlParameter>] :parameters
947
977
  # The parameters for the SQL statement.
948
978
  #
979
+ # @option params [String] :result_format
980
+ # The data format of the result of the SQL statement. If no format is
981
+ # specified, the default is JSON.
982
+ #
949
983
  # @option params [String] :secret_arn
950
984
  # The name or ARN of the secret that enables access to the database.
951
985
  # This parameter is required when authenticating using Secrets Manager.
@@ -999,6 +1033,7 @@ module Aws::RedshiftDataAPIService
999
1033
  # value: "ParameterValue", # required
1000
1034
  # },
1001
1035
  # ],
1036
+ # result_format: "JSON", # accepts JSON, CSV
1002
1037
  # secret_arn: "SecretArn",
1003
1038
  # session_id: "UUID",
1004
1039
  # session_keep_alive_seconds: 1,
@@ -1030,8 +1065,11 @@ module Aws::RedshiftDataAPIService
1030
1065
  req.send_request(options)
1031
1066
  end
1032
1067
 
1033
- # Fetches the temporarily cached result of an SQL statement. A token is
1034
- # returned to page through the statement results.
1068
+ # Fetches the temporarily cached result of an SQL statement in JSON
1069
+ # format. The `ExecuteStatement` or `BatchExecuteStatement` operation
1070
+ # that ran the SQL statement must have specified `ResultFormat` as
1071
+ # `JSON` , or let the format default to JSON. A token is returned to
1072
+ # page through the statement results.
1035
1073
  #
1036
1074
  # For more information about the Amazon Redshift Data API and CLI usage
1037
1075
  # examples, see [Using the Amazon Redshift Data API][1] in the *Amazon
@@ -1110,6 +1148,84 @@ module Aws::RedshiftDataAPIService
1110
1148
  req.send_request(options)
1111
1149
  end
1112
1150
 
1151
+ # Fetches the temporarily cached result of an SQL statement in CSV
1152
+ # format. The `ExecuteStatement` or `BatchExecuteStatement` operation
1153
+ # that ran the SQL statement must have specified `ResultFormat` as
1154
+ # `CSV`. A token is returned to page through the statement results.
1155
+ #
1156
+ # For more information about the Amazon Redshift Data API and CLI usage
1157
+ # examples, see [Using the Amazon Redshift Data API][1] in the *Amazon
1158
+ # Redshift Management Guide*.
1159
+ #
1160
+ #
1161
+ #
1162
+ # [1]: https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html
1163
+ #
1164
+ # @option params [required, String] :id
1165
+ # The identifier of the SQL statement whose results are to be fetched.
1166
+ # This value is a universally unique identifier (UUID) generated by
1167
+ # Amazon Redshift Data API. A suffix indicates then number of the SQL
1168
+ # statement. For example, `d9b6c0c9-0747-4bf4-b142-e8883122f766:2` has a
1169
+ # suffix of `:2` that indicates the second SQL statement of a batch
1170
+ # query. This identifier is returned by `BatchExecuteStatment`,
1171
+ # `ExecuteStatment`, and `ListStatements`.
1172
+ #
1173
+ # @option params [String] :next_token
1174
+ # A value that indicates the starting point for the next set of response
1175
+ # records in a subsequent request. If a value is returned in a response,
1176
+ # you can retrieve the next set of records by providing this returned
1177
+ # NextToken value in the next NextToken parameter and retrying the
1178
+ # command. If the NextToken field is empty, all response records have
1179
+ # been retrieved for the request.
1180
+ #
1181
+ # @return [Types::GetStatementResultV2Response] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1182
+ #
1183
+ # * {Types::GetStatementResultV2Response#column_metadata #column_metadata} => Array&lt;Types::ColumnMetadata&gt;
1184
+ # * {Types::GetStatementResultV2Response#next_token #next_token} => String
1185
+ # * {Types::GetStatementResultV2Response#records #records} => Array&lt;Types::QueryRecords&gt;
1186
+ # * {Types::GetStatementResultV2Response#result_format #result_format} => String
1187
+ # * {Types::GetStatementResultV2Response#total_num_rows #total_num_rows} => Integer
1188
+ #
1189
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1190
+ #
1191
+ # @example Request syntax with placeholder values
1192
+ #
1193
+ # resp = client.get_statement_result_v2({
1194
+ # id: "UUID", # required
1195
+ # next_token: "String",
1196
+ # })
1197
+ #
1198
+ # @example Response structure
1199
+ #
1200
+ # resp.column_metadata #=> Array
1201
+ # resp.column_metadata[0].column_default #=> String
1202
+ # resp.column_metadata[0].is_case_sensitive #=> Boolean
1203
+ # resp.column_metadata[0].is_currency #=> Boolean
1204
+ # resp.column_metadata[0].is_signed #=> Boolean
1205
+ # resp.column_metadata[0].label #=> String
1206
+ # resp.column_metadata[0].length #=> Integer
1207
+ # resp.column_metadata[0].name #=> String
1208
+ # resp.column_metadata[0].nullable #=> Integer
1209
+ # resp.column_metadata[0].precision #=> Integer
1210
+ # resp.column_metadata[0].scale #=> Integer
1211
+ # resp.column_metadata[0].schema_name #=> String
1212
+ # resp.column_metadata[0].table_name #=> String
1213
+ # resp.column_metadata[0].type_name #=> String
1214
+ # resp.next_token #=> String
1215
+ # resp.records #=> Array
1216
+ # resp.records[0].csv_records #=> String
1217
+ # resp.result_format #=> String, one of "JSON", "CSV"
1218
+ # resp.total_num_rows #=> Integer
1219
+ #
1220
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/GetStatementResultV2 AWS API Documentation
1221
+ #
1222
+ # @overload get_statement_result_v2(params = {})
1223
+ # @param [Hash] params ({})
1224
+ def get_statement_result_v2(params = {}, options = {})
1225
+ req = build_request(:get_statement_result_v2, params)
1226
+ req.send_request(options)
1227
+ end
1228
+
1113
1229
  # List the databases in a cluster. A token is returned to page through
1114
1230
  # the database list. Depending on the authorization method, use one of
1115
1231
  # the following combinations of request parameters:
@@ -1435,6 +1551,7 @@ module Aws::RedshiftDataAPIService
1435
1551
  # resp.statements[0].query_string #=> String
1436
1552
  # resp.statements[0].query_strings #=> Array
1437
1553
  # resp.statements[0].query_strings[0] #=> String
1554
+ # resp.statements[0].result_format #=> String, one of "JSON", "CSV"
1438
1555
  # resp.statements[0].secret_arn #=> String
1439
1556
  # resp.statements[0].session_id #=> String
1440
1557
  # resp.statements[0].statement_name #=> String
@@ -1610,7 +1727,7 @@ module Aws::RedshiftDataAPIService
1610
1727
  tracer: tracer
1611
1728
  )
1612
1729
  context[:gem_name] = 'aws-sdk-redshiftdataapiservice'
1613
- context[:gem_version] = '1.49.0'
1730
+ context[:gem_version] = '1.51.0'
1614
1731
  Seahorse::Client::Request.new(handlers, context)
1615
1732
  end
1616
1733
 
@@ -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.51.0'
58
58
 
59
59
  end
60
60
 
data/sig/client.rbs CHANGED
@@ -39,7 +39,9 @@ module Aws
39
39
  ?logger: untyped,
40
40
  ?max_attempts: Integer,
41
41
  ?profile: String,
42
+ ?request_checksum_calculation: String,
42
43
  ?request_min_compression_size_bytes: Integer,
44
+ ?response_checksum_validation: String,
43
45
  ?retry_backoff: Proc,
44
46
  ?retry_base_delay: Float,
45
47
  ?retry_jitter: (:none | :equal | :full | ^(Integer) -> Integer),
@@ -94,6 +96,7 @@ module Aws
94
96
  ?cluster_identifier: ::String,
95
97
  ?database: ::String,
96
98
  ?db_user: ::String,
99
+ ?result_format: ("JSON" | "CSV"),
97
100
  ?secret_arn: ::String,
98
101
  ?session_id: ::String,
99
102
  ?session_keep_alive_seconds: ::Integer,
@@ -127,6 +130,7 @@ module Aws
127
130
  def query_string: () -> ::String
128
131
  def redshift_pid: () -> ::Integer
129
132
  def redshift_query_id: () -> ::Integer
133
+ def result_format: () -> ("JSON" | "CSV")
130
134
  def result_rows: () -> ::Integer
131
135
  def result_size: () -> ::Integer
132
136
  def secret_arn: () -> ::String
@@ -187,6 +191,7 @@ module Aws
187
191
  value: ::String
188
192
  },
189
193
  ],
194
+ ?result_format: ("JSON" | "CSV"),
190
195
  ?secret_arn: ::String,
191
196
  ?session_id: ::String,
192
197
  ?session_keep_alive_seconds: ::Integer,
@@ -211,6 +216,21 @@ module Aws
211
216
  ) -> _GetStatementResultResponseSuccess
212
217
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetStatementResultResponseSuccess
213
218
 
219
+ interface _GetStatementResultV2ResponseSuccess
220
+ include ::Seahorse::Client::_ResponseSuccess[Types::GetStatementResultV2Response]
221
+ def column_metadata: () -> ::Array[Types::ColumnMetadata]
222
+ def next_token: () -> ::String
223
+ def records: () -> ::Array[Types::QueryRecords]
224
+ def result_format: () -> ("JSON" | "CSV")
225
+ def total_num_rows: () -> ::Integer
226
+ end
227
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/RedshiftDataAPIService/Client.html#get_statement_result_v2-instance_method
228
+ def get_statement_result_v2: (
229
+ id: ::String,
230
+ ?next_token: ::String
231
+ ) -> _GetStatementResultV2ResponseSuccess
232
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetStatementResultV2ResponseSuccess
233
+
214
234
  interface _ListDatabasesResponseSuccess
215
235
  include ::Seahorse::Client::_ResponseSuccess[Types::ListDatabasesResponse]
216
236
  def databases: () -> ::Array[::String]
data/sig/resource.rbs CHANGED
@@ -39,7 +39,9 @@ module Aws
39
39
  ?logger: untyped,
40
40
  ?max_attempts: Integer,
41
41
  ?profile: String,
42
+ ?request_checksum_calculation: String,
42
43
  ?request_min_compression_size_bytes: Integer,
44
+ ?response_checksum_validation: String,
43
45
  ?retry_backoff: Proc,
44
46
  ?retry_base_delay: Float,
45
47
  ?retry_jitter: (:none | :equal | :full | ^(Integer) -> Integer),
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.51.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: 2025-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.210.0
22
+ version: 3.216.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,21 +29,21 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.210.0
32
+ version: 3.216.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
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: