aws-sdk-redshiftdataapiservice 1.48.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: dbbb773a5c968cca3872339358fc2beb85ff34449f7a8d8ac5872d6518c45e76
4
- data.tar.gz: 2673be3205f516a0d1332faf05eab919b945c81ead80ff7378fd451fb5acfdb9
3
+ metadata.gz: 7fd23c41311ad97cc826a966ec137c69536bf734d68cf84fe6b35e70ec40252d
4
+ data.tar.gz: e2d843226036ae6642cf07e672a12c13cd6dbdbbf46c9c6a2b55ce29a9c458ae
5
5
  SHA512:
6
- metadata.gz: a8a34f4a1cc1d80dcce74a011eed11581cc6d3b727c7dc5091960a7d4a9f724af700c773deedc2b3a7c115e8a09d652d1f41f98bf323adf52699afabc775eaa2
7
- data.tar.gz: 72bf36838d682945a30f2292355ca0f15ce3acd8205edc84a4c98c580cf521b0bcc60a72fc7e840658f021d0f58e43a3c29e6133c05f8daa242a825f4f50fb9d
6
+ metadata.gz: 210db61d786655c1405af71c5fcf45d5852bd5bd40403642574c1d966c45941a0ed9e43cf852d12f590653b31e0c814175c18f1d98822776e22a98331aae4d25
7
+ data.tar.gz: 0e807f962e59b98b3db1398620dc67e18de96982171d78075eee6773f81f9dc85ea35152edbaeaf2a79b5c2af55799dd033d54ca46da52c411e9c5cad6106fe6
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
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
+
9
+ 1.49.0 (2024-10-18)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
4
14
  1.48.0 (2024-09-24)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.48.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.48.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"
@@ -52,15 +52,18 @@ module Aws::RedshiftDataAPIService
52
52
  self[:region] = options[:region]
53
53
  self[:use_dual_stack] = options[:use_dual_stack]
54
54
  self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
- if self[:use_dual_stack].nil?
56
- raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
57
- end
58
55
  self[:use_fips] = options[:use_fips]
59
56
  self[:use_fips] = false if self[:use_fips].nil?
60
- if self[:use_fips].nil?
61
- raise ArgumentError, "Missing required EndpointParameter: :use_fips"
62
- end
63
57
  self[:endpoint] = options[:endpoint]
64
58
  end
59
+
60
+ def self.create(config, options={})
61
+ new({
62
+ region: config.region,
63
+ use_dual_stack: config.use_dualstack_endpoint,
64
+ use_fips: config.use_fips_endpoint,
65
+ endpoint: (config.endpoint.to_s unless config.regional_endpoint),
66
+ }.merge(options))
67
+ end
65
68
  end
66
69
  end
@@ -12,115 +12,9 @@ module Aws::RedshiftDataAPIService
12
12
  # @api private
13
13
  module Endpoints
14
14
 
15
- class BatchExecuteStatement
16
- def self.build(context)
17
- Aws::RedshiftDataAPIService::EndpointParameters.new(
18
- region: context.config.region,
19
- use_dual_stack: context.config.use_dualstack_endpoint,
20
- use_fips: context.config.use_fips_endpoint,
21
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
22
- )
23
- end
24
- end
25
-
26
- class CancelStatement
27
- def self.build(context)
28
- Aws::RedshiftDataAPIService::EndpointParameters.new(
29
- region: context.config.region,
30
- use_dual_stack: context.config.use_dualstack_endpoint,
31
- use_fips: context.config.use_fips_endpoint,
32
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
33
- )
34
- end
35
- end
36
-
37
- class DescribeStatement
38
- def self.build(context)
39
- Aws::RedshiftDataAPIService::EndpointParameters.new(
40
- region: context.config.region,
41
- use_dual_stack: context.config.use_dualstack_endpoint,
42
- use_fips: context.config.use_fips_endpoint,
43
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
44
- )
45
- end
46
- end
47
-
48
- class DescribeTable
49
- def self.build(context)
50
- Aws::RedshiftDataAPIService::EndpointParameters.new(
51
- region: context.config.region,
52
- use_dual_stack: context.config.use_dualstack_endpoint,
53
- use_fips: context.config.use_fips_endpoint,
54
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
55
- )
56
- end
57
- end
58
-
59
- class ExecuteStatement
60
- def self.build(context)
61
- Aws::RedshiftDataAPIService::EndpointParameters.new(
62
- region: context.config.region,
63
- use_dual_stack: context.config.use_dualstack_endpoint,
64
- use_fips: context.config.use_fips_endpoint,
65
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
66
- )
67
- end
68
- end
69
15
 
70
- class GetStatementResult
71
- def self.build(context)
72
- Aws::RedshiftDataAPIService::EndpointParameters.new(
73
- region: context.config.region,
74
- use_dual_stack: context.config.use_dualstack_endpoint,
75
- use_fips: context.config.use_fips_endpoint,
76
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
77
- )
78
- end
16
+ def self.parameters_for_operation(context)
17
+ Aws::RedshiftDataAPIService::EndpointParameters.create(context.config)
79
18
  end
80
-
81
- class ListDatabases
82
- def self.build(context)
83
- Aws::RedshiftDataAPIService::EndpointParameters.new(
84
- region: context.config.region,
85
- use_dual_stack: context.config.use_dualstack_endpoint,
86
- use_fips: context.config.use_fips_endpoint,
87
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
88
- )
89
- end
90
- end
91
-
92
- class ListSchemas
93
- def self.build(context)
94
- Aws::RedshiftDataAPIService::EndpointParameters.new(
95
- region: context.config.region,
96
- use_dual_stack: context.config.use_dualstack_endpoint,
97
- use_fips: context.config.use_fips_endpoint,
98
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
99
- )
100
- end
101
- end
102
-
103
- class ListStatements
104
- def self.build(context)
105
- Aws::RedshiftDataAPIService::EndpointParameters.new(
106
- region: context.config.region,
107
- use_dual_stack: context.config.use_dualstack_endpoint,
108
- use_fips: context.config.use_fips_endpoint,
109
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
110
- )
111
- end
112
- end
113
-
114
- class ListTables
115
- def self.build(context)
116
- Aws::RedshiftDataAPIService::EndpointParameters.new(
117
- region: context.config.region,
118
- use_dual_stack: context.config.use_dualstack_endpoint,
119
- use_fips: context.config.use_fips_endpoint,
120
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
121
- )
122
- end
123
- end
124
-
125
19
  end
126
20
  end
@@ -27,7 +27,7 @@ The endpoint provider used to resolve endpoints. Any object that responds to
27
27
  class Handler < Seahorse::Client::Handler
28
28
  def call(context)
29
29
  unless context[:discovered_endpoint]
30
- params = parameters_for_operation(context)
30
+ params = Aws::RedshiftDataAPIService::Endpoints.parameters_for_operation(context)
31
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
32
 
33
33
  context.http_request.endpoint = endpoint.url
@@ -67,31 +67,6 @@ The endpoint provider used to resolve endpoints. Any object that responds to
67
67
  context.http_request.headers[key] = value
68
68
  end
69
69
  end
70
-
71
- def parameters_for_operation(context)
72
- case context.operation_name
73
- when :batch_execute_statement
74
- Aws::RedshiftDataAPIService::Endpoints::BatchExecuteStatement.build(context)
75
- when :cancel_statement
76
- Aws::RedshiftDataAPIService::Endpoints::CancelStatement.build(context)
77
- when :describe_statement
78
- Aws::RedshiftDataAPIService::Endpoints::DescribeStatement.build(context)
79
- when :describe_table
80
- Aws::RedshiftDataAPIService::Endpoints::DescribeTable.build(context)
81
- when :execute_statement
82
- Aws::RedshiftDataAPIService::Endpoints::ExecuteStatement.build(context)
83
- when :get_statement_result
84
- Aws::RedshiftDataAPIService::Endpoints::GetStatementResult.build(context)
85
- when :list_databases
86
- Aws::RedshiftDataAPIService::Endpoints::ListDatabases.build(context)
87
- when :list_schemas
88
- Aws::RedshiftDataAPIService::Endpoints::ListSchemas.build(context)
89
- when :list_statements
90
- Aws::RedshiftDataAPIService::Endpoints::ListStatements.build(context)
91
- when :list_tables
92
- Aws::RedshiftDataAPIService::Endpoints::ListTables.build(context)
93
- end
94
- end
95
70
  end
96
71
 
97
72
  def add_handlers(handlers, _config)
@@ -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.48.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.48.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-09-24 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
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.207.0
22
+ version: 3.210.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.207.0
32
+ version: 3.210.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: