aws-sdk-redshiftdataapiservice 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,401 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::RedshiftDataAPIService
11
+ # @api private
12
+ module ClientApi
13
+
14
+ include Seahorse::Model
15
+
16
+ Blob = Shapes::BlobShape.new(name: 'Blob')
17
+ Boolean = Shapes::BooleanShape.new(name: 'Boolean')
18
+ BoxedBoolean = Shapes::BooleanShape.new(name: 'BoxedBoolean')
19
+ BoxedDouble = Shapes::FloatShape.new(name: 'BoxedDouble')
20
+ BoxedLong = Shapes::IntegerShape.new(name: 'BoxedLong')
21
+ CancelStatementRequest = Shapes::StructureShape.new(name: 'CancelStatementRequest')
22
+ CancelStatementResponse = Shapes::StructureShape.new(name: 'CancelStatementResponse')
23
+ ColumnList = Shapes::ListShape.new(name: 'ColumnList')
24
+ ColumnMetadata = Shapes::StructureShape.new(name: 'ColumnMetadata')
25
+ ColumnMetadataList = Shapes::ListShape.new(name: 'ColumnMetadataList')
26
+ DatabaseList = Shapes::ListShape.new(name: 'DatabaseList')
27
+ DescribeStatementRequest = Shapes::StructureShape.new(name: 'DescribeStatementRequest')
28
+ DescribeStatementResponse = Shapes::StructureShape.new(name: 'DescribeStatementResponse')
29
+ DescribeTableRequest = Shapes::StructureShape.new(name: 'DescribeTableRequest')
30
+ DescribeTableResponse = Shapes::StructureShape.new(name: 'DescribeTableResponse')
31
+ ExecuteStatementException = Shapes::StructureShape.new(name: 'ExecuteStatementException')
32
+ ExecuteStatementInput = Shapes::StructureShape.new(name: 'ExecuteStatementInput')
33
+ ExecuteStatementOutput = Shapes::StructureShape.new(name: 'ExecuteStatementOutput')
34
+ Field = Shapes::StructureShape.new(name: 'Field')
35
+ FieldList = Shapes::ListShape.new(name: 'FieldList')
36
+ GetStatementResultRequest = Shapes::StructureShape.new(name: 'GetStatementResultRequest')
37
+ GetStatementResultResponse = Shapes::StructureShape.new(name: 'GetStatementResultResponse')
38
+ Integer = Shapes::IntegerShape.new(name: 'Integer')
39
+ InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
40
+ ListDatabasesRequest = Shapes::StructureShape.new(name: 'ListDatabasesRequest')
41
+ ListDatabasesResponse = Shapes::StructureShape.new(name: 'ListDatabasesResponse')
42
+ ListSchemasRequest = Shapes::StructureShape.new(name: 'ListSchemasRequest')
43
+ ListSchemasResponse = Shapes::StructureShape.new(name: 'ListSchemasResponse')
44
+ ListStatementsLimit = Shapes::IntegerShape.new(name: 'ListStatementsLimit')
45
+ ListStatementsRequest = Shapes::StructureShape.new(name: 'ListStatementsRequest')
46
+ ListStatementsResponse = Shapes::StructureShape.new(name: 'ListStatementsResponse')
47
+ ListTablesRequest = Shapes::StructureShape.new(name: 'ListTablesRequest')
48
+ ListTablesResponse = Shapes::StructureShape.new(name: 'ListTablesResponse')
49
+ Location = Shapes::StringShape.new(name: 'Location')
50
+ Long = Shapes::IntegerShape.new(name: 'Long')
51
+ PageSize = Shapes::IntegerShape.new(name: 'PageSize')
52
+ ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
53
+ SchemaList = Shapes::ListShape.new(name: 'SchemaList')
54
+ SecretArn = Shapes::StringShape.new(name: 'SecretArn')
55
+ SqlRecords = Shapes::ListShape.new(name: 'SqlRecords')
56
+ StatementData = Shapes::StructureShape.new(name: 'StatementData')
57
+ StatementList = Shapes::ListShape.new(name: 'StatementList')
58
+ StatementNameString = Shapes::StringShape.new(name: 'StatementNameString')
59
+ StatementString = Shapes::StringShape.new(name: 'StatementString')
60
+ StatusString = Shapes::StringShape.new(name: 'StatusString')
61
+ String = Shapes::StringShape.new(name: 'String')
62
+ TableList = Shapes::ListShape.new(name: 'TableList')
63
+ TableMember = Shapes::StructureShape.new(name: 'TableMember')
64
+ Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
65
+ UUID = Shapes::StringShape.new(name: 'UUID')
66
+ ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
67
+ bool = Shapes::BooleanShape.new(name: 'bool')
68
+
69
+ CancelStatementRequest.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
70
+ CancelStatementRequest.struct_class = Types::CancelStatementRequest
71
+
72
+ CancelStatementResponse.add_member(:status, Shapes::ShapeRef.new(shape: Boolean, location_name: "Status"))
73
+ CancelStatementResponse.struct_class = Types::CancelStatementResponse
74
+
75
+ ColumnList.member = Shapes::ShapeRef.new(shape: ColumnMetadata)
76
+
77
+ ColumnMetadata.add_member(:column_default, Shapes::ShapeRef.new(shape: String, location_name: "columnDefault"))
78
+ ColumnMetadata.add_member(:is_case_sensitive, Shapes::ShapeRef.new(shape: bool, location_name: "isCaseSensitive"))
79
+ ColumnMetadata.add_member(:is_currency, Shapes::ShapeRef.new(shape: bool, location_name: "isCurrency"))
80
+ ColumnMetadata.add_member(:is_signed, Shapes::ShapeRef.new(shape: bool, location_name: "isSigned"))
81
+ ColumnMetadata.add_member(:label, Shapes::ShapeRef.new(shape: String, location_name: "label"))
82
+ ColumnMetadata.add_member(:length, Shapes::ShapeRef.new(shape: Integer, location_name: "length"))
83
+ ColumnMetadata.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "name"))
84
+ ColumnMetadata.add_member(:nullable, Shapes::ShapeRef.new(shape: Integer, location_name: "nullable"))
85
+ ColumnMetadata.add_member(:precision, Shapes::ShapeRef.new(shape: Integer, location_name: "precision"))
86
+ ColumnMetadata.add_member(:scale, Shapes::ShapeRef.new(shape: Integer, location_name: "scale"))
87
+ ColumnMetadata.add_member(:schema_name, Shapes::ShapeRef.new(shape: String, location_name: "schemaName"))
88
+ ColumnMetadata.add_member(:table_name, Shapes::ShapeRef.new(shape: String, location_name: "tableName"))
89
+ ColumnMetadata.add_member(:type_name, Shapes::ShapeRef.new(shape: String, location_name: "typeName"))
90
+ ColumnMetadata.struct_class = Types::ColumnMetadata
91
+
92
+ ColumnMetadataList.member = Shapes::ShapeRef.new(shape: ColumnMetadata)
93
+
94
+ DatabaseList.member = Shapes::ShapeRef.new(shape: String)
95
+
96
+ DescribeStatementRequest.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
97
+ DescribeStatementRequest.struct_class = Types::DescribeStatementRequest
98
+
99
+ DescribeStatementResponse.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: String, location_name: "ClusterIdentifier"))
100
+ DescribeStatementResponse.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "CreatedAt"))
101
+ DescribeStatementResponse.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
102
+ DescribeStatementResponse.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
103
+ DescribeStatementResponse.add_member(:duration, Shapes::ShapeRef.new(shape: Long, location_name: "Duration"))
104
+ DescribeStatementResponse.add_member(:error, Shapes::ShapeRef.new(shape: String, location_name: "Error"))
105
+ DescribeStatementResponse.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
106
+ DescribeStatementResponse.add_member(:query_string, Shapes::ShapeRef.new(shape: StatementString, location_name: "QueryString"))
107
+ DescribeStatementResponse.add_member(:redshift_pid, Shapes::ShapeRef.new(shape: Long, location_name: "RedshiftPid"))
108
+ DescribeStatementResponse.add_member(:redshift_query_id, Shapes::ShapeRef.new(shape: Long, location_name: "RedshiftQueryId"))
109
+ DescribeStatementResponse.add_member(:result_rows, Shapes::ShapeRef.new(shape: Long, location_name: "ResultRows"))
110
+ DescribeStatementResponse.add_member(:result_size, Shapes::ShapeRef.new(shape: Long, location_name: "ResultSize"))
111
+ DescribeStatementResponse.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
112
+ DescribeStatementResponse.add_member(:status, Shapes::ShapeRef.new(shape: StatusString, location_name: "Status"))
113
+ DescribeStatementResponse.add_member(:updated_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "UpdatedAt"))
114
+ DescribeStatementResponse.struct_class = Types::DescribeStatementResponse
115
+
116
+ DescribeTableRequest.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: Location, required: true, location_name: "ClusterIdentifier"))
117
+ DescribeTableRequest.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
118
+ DescribeTableRequest.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
119
+ DescribeTableRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: PageSize, location_name: "MaxResults"))
120
+ DescribeTableRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
121
+ DescribeTableRequest.add_member(:schema, Shapes::ShapeRef.new(shape: String, location_name: "Schema"))
122
+ DescribeTableRequest.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
123
+ DescribeTableRequest.add_member(:table, Shapes::ShapeRef.new(shape: String, location_name: "Table"))
124
+ DescribeTableRequest.struct_class = Types::DescribeTableRequest
125
+
126
+ DescribeTableResponse.add_member(:column_list, Shapes::ShapeRef.new(shape: ColumnList, location_name: "ColumnList"))
127
+ DescribeTableResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
128
+ DescribeTableResponse.add_member(:table_name, Shapes::ShapeRef.new(shape: String, location_name: "TableName"))
129
+ DescribeTableResponse.struct_class = Types::DescribeTableResponse
130
+
131
+ ExecuteStatementException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Message"))
132
+ ExecuteStatementException.add_member(:statement_id, Shapes::ShapeRef.new(shape: String, required: true, location_name: "StatementId"))
133
+ ExecuteStatementException.struct_class = Types::ExecuteStatementException
134
+
135
+ ExecuteStatementInput.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: Location, required: true, location_name: "ClusterIdentifier"))
136
+ ExecuteStatementInput.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
137
+ ExecuteStatementInput.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
138
+ ExecuteStatementInput.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
139
+ ExecuteStatementInput.add_member(:sql, Shapes::ShapeRef.new(shape: StatementString, required: true, location_name: "Sql"))
140
+ ExecuteStatementInput.add_member(:statement_name, Shapes::ShapeRef.new(shape: StatementNameString, location_name: "StatementName"))
141
+ ExecuteStatementInput.add_member(:with_event, Shapes::ShapeRef.new(shape: Boolean, location_name: "WithEvent"))
142
+ ExecuteStatementInput.struct_class = Types::ExecuteStatementInput
143
+
144
+ ExecuteStatementOutput.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: Location, location_name: "ClusterIdentifier"))
145
+ ExecuteStatementOutput.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "CreatedAt"))
146
+ ExecuteStatementOutput.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
147
+ ExecuteStatementOutput.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
148
+ ExecuteStatementOutput.add_member(:id, Shapes::ShapeRef.new(shape: UUID, location_name: "Id"))
149
+ ExecuteStatementOutput.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
150
+ ExecuteStatementOutput.struct_class = Types::ExecuteStatementOutput
151
+
152
+ Field.add_member(:blob_value, Shapes::ShapeRef.new(shape: Blob, location_name: "blobValue"))
153
+ Field.add_member(:boolean_value, Shapes::ShapeRef.new(shape: BoxedBoolean, location_name: "booleanValue"))
154
+ Field.add_member(:double_value, Shapes::ShapeRef.new(shape: BoxedDouble, location_name: "doubleValue"))
155
+ Field.add_member(:is_null, Shapes::ShapeRef.new(shape: BoxedBoolean, location_name: "isNull"))
156
+ Field.add_member(:long_value, Shapes::ShapeRef.new(shape: BoxedLong, location_name: "longValue"))
157
+ Field.add_member(:string_value, Shapes::ShapeRef.new(shape: String, location_name: "stringValue"))
158
+ Field.struct_class = Types::Field
159
+
160
+ FieldList.member = Shapes::ShapeRef.new(shape: Field)
161
+
162
+ GetStatementResultRequest.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
163
+ GetStatementResultRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
164
+ GetStatementResultRequest.struct_class = Types::GetStatementResultRequest
165
+
166
+ GetStatementResultResponse.add_member(:column_metadata, Shapes::ShapeRef.new(shape: ColumnMetadataList, location_name: "ColumnMetadata"))
167
+ GetStatementResultResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
168
+ GetStatementResultResponse.add_member(:records, Shapes::ShapeRef.new(shape: SqlRecords, required: true, location_name: "Records"))
169
+ GetStatementResultResponse.add_member(:total_num_rows, Shapes::ShapeRef.new(shape: Long, location_name: "TotalNumRows"))
170
+ GetStatementResultResponse.struct_class = Types::GetStatementResultResponse
171
+
172
+ InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Message"))
173
+ InternalServerException.struct_class = Types::InternalServerException
174
+
175
+ ListDatabasesRequest.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: Location, required: true, location_name: "ClusterIdentifier"))
176
+ ListDatabasesRequest.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "Database"))
177
+ ListDatabasesRequest.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
178
+ ListDatabasesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: PageSize, location_name: "MaxResults"))
179
+ ListDatabasesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
180
+ ListDatabasesRequest.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
181
+ ListDatabasesRequest.struct_class = Types::ListDatabasesRequest
182
+
183
+ ListDatabasesResponse.add_member(:databases, Shapes::ShapeRef.new(shape: DatabaseList, location_name: "Databases"))
184
+ ListDatabasesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
185
+ ListDatabasesResponse.struct_class = Types::ListDatabasesResponse
186
+
187
+ ListSchemasRequest.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: Location, required: true, location_name: "ClusterIdentifier"))
188
+ ListSchemasRequest.add_member(:database, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Database"))
189
+ ListSchemasRequest.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
190
+ ListSchemasRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: PageSize, location_name: "MaxResults"))
191
+ ListSchemasRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
192
+ ListSchemasRequest.add_member(:schema_pattern, Shapes::ShapeRef.new(shape: String, location_name: "SchemaPattern"))
193
+ ListSchemasRequest.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
194
+ ListSchemasRequest.struct_class = Types::ListSchemasRequest
195
+
196
+ ListSchemasResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
197
+ ListSchemasResponse.add_member(:schemas, Shapes::ShapeRef.new(shape: SchemaList, location_name: "Schemas"))
198
+ ListSchemasResponse.struct_class = Types::ListSchemasResponse
199
+
200
+ ListStatementsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: ListStatementsLimit, location_name: "MaxResults"))
201
+ ListStatementsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
202
+ ListStatementsRequest.add_member(:statement_name, Shapes::ShapeRef.new(shape: StatementNameString, location_name: "StatementName"))
203
+ ListStatementsRequest.add_member(:status, Shapes::ShapeRef.new(shape: StatusString, location_name: "Status"))
204
+ ListStatementsRequest.struct_class = Types::ListStatementsRequest
205
+
206
+ ListStatementsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
207
+ ListStatementsResponse.add_member(:statements, Shapes::ShapeRef.new(shape: StatementList, required: true, location_name: "Statements"))
208
+ ListStatementsResponse.struct_class = Types::ListStatementsResponse
209
+
210
+ ListTablesRequest.add_member(:cluster_identifier, Shapes::ShapeRef.new(shape: Location, required: true, location_name: "ClusterIdentifier"))
211
+ ListTablesRequest.add_member(:database, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Database"))
212
+ ListTablesRequest.add_member(:db_user, Shapes::ShapeRef.new(shape: String, location_name: "DbUser"))
213
+ ListTablesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: PageSize, location_name: "MaxResults"))
214
+ ListTablesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
215
+ ListTablesRequest.add_member(:schema_pattern, Shapes::ShapeRef.new(shape: String, location_name: "SchemaPattern"))
216
+ ListTablesRequest.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
217
+ ListTablesRequest.add_member(:table_pattern, Shapes::ShapeRef.new(shape: String, location_name: "TablePattern"))
218
+ ListTablesRequest.struct_class = Types::ListTablesRequest
219
+
220
+ ListTablesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
221
+ ListTablesResponse.add_member(:tables, Shapes::ShapeRef.new(shape: TableList, location_name: "Tables"))
222
+ ListTablesResponse.struct_class = Types::ListTablesResponse
223
+
224
+ ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Message"))
225
+ ResourceNotFoundException.add_member(:resource_id, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ResourceId"))
226
+ ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
227
+
228
+ SchemaList.member = Shapes::ShapeRef.new(shape: String)
229
+
230
+ SqlRecords.member = Shapes::ShapeRef.new(shape: FieldList)
231
+
232
+ StatementData.add_member(:created_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "CreatedAt"))
233
+ StatementData.add_member(:id, Shapes::ShapeRef.new(shape: UUID, required: true, location_name: "Id"))
234
+ StatementData.add_member(:query_string, Shapes::ShapeRef.new(shape: StatementString, location_name: "QueryString"))
235
+ StatementData.add_member(:secret_arn, Shapes::ShapeRef.new(shape: SecretArn, location_name: "SecretArn"))
236
+ StatementData.add_member(:statement_name, Shapes::ShapeRef.new(shape: StatementNameString, location_name: "StatementName"))
237
+ StatementData.add_member(:status, Shapes::ShapeRef.new(shape: StatusString, location_name: "Status"))
238
+ StatementData.add_member(:updated_at, Shapes::ShapeRef.new(shape: Timestamp, location_name: "UpdatedAt"))
239
+ StatementData.struct_class = Types::StatementData
240
+
241
+ StatementList.member = Shapes::ShapeRef.new(shape: StatementData)
242
+
243
+ TableList.member = Shapes::ShapeRef.new(shape: TableMember)
244
+
245
+ TableMember.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "name"))
246
+ TableMember.add_member(:schema, Shapes::ShapeRef.new(shape: String, location_name: "schema"))
247
+ TableMember.add_member(:type, Shapes::ShapeRef.new(shape: String, location_name: "type"))
248
+ TableMember.struct_class = Types::TableMember
249
+
250
+ ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
251
+ ValidationException.struct_class = Types::ValidationException
252
+
253
+
254
+ # @api private
255
+ API = Seahorse::Model::Api.new.tap do |api|
256
+
257
+ api.version = "2019-12-20"
258
+
259
+ api.metadata = {
260
+ "apiVersion" => "2019-12-20",
261
+ "endpointPrefix" => "redshift-data",
262
+ "jsonVersion" => "1.1",
263
+ "protocol" => "json",
264
+ "serviceFullName" => "Redshift Data API Service",
265
+ "serviceId" => "Redshift Data",
266
+ "signatureVersion" => "v4",
267
+ "signingName" => "redshift-data",
268
+ "targetPrefix" => "RedshiftData",
269
+ "uid" => "redshift-data-2019-12-20",
270
+ }
271
+
272
+ api.add_operation(:cancel_statement, Seahorse::Model::Operation.new.tap do |o|
273
+ o.name = "CancelStatement"
274
+ o.http_method = "POST"
275
+ o.http_request_uri = "/"
276
+ o.input = Shapes::ShapeRef.new(shape: CancelStatementRequest)
277
+ o.output = Shapes::ShapeRef.new(shape: CancelStatementResponse)
278
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
279
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
280
+ end)
281
+
282
+ api.add_operation(:describe_statement, Seahorse::Model::Operation.new.tap do |o|
283
+ o.name = "DescribeStatement"
284
+ o.http_method = "POST"
285
+ o.http_request_uri = "/"
286
+ o.input = Shapes::ShapeRef.new(shape: DescribeStatementRequest)
287
+ o.output = Shapes::ShapeRef.new(shape: DescribeStatementResponse)
288
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
289
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
290
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
291
+ end)
292
+
293
+ api.add_operation(:describe_table, Seahorse::Model::Operation.new.tap do |o|
294
+ o.name = "DescribeTable"
295
+ o.http_method = "POST"
296
+ o.http_request_uri = "/"
297
+ o.input = Shapes::ShapeRef.new(shape: DescribeTableRequest)
298
+ o.output = Shapes::ShapeRef.new(shape: DescribeTableResponse)
299
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
300
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
301
+ o[:pager] = Aws::Pager.new(
302
+ limit_key: "max_results",
303
+ tokens: {
304
+ "next_token" => "next_token"
305
+ }
306
+ )
307
+ end)
308
+
309
+ api.add_operation(:execute_statement, Seahorse::Model::Operation.new.tap do |o|
310
+ o.name = "ExecuteStatement"
311
+ o.http_method = "POST"
312
+ o.http_request_uri = "/"
313
+ o.input = Shapes::ShapeRef.new(shape: ExecuteStatementInput)
314
+ o.output = Shapes::ShapeRef.new(shape: ExecuteStatementOutput)
315
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
316
+ o.errors << Shapes::ShapeRef.new(shape: ExecuteStatementException)
317
+ end)
318
+
319
+ api.add_operation(:get_statement_result, Seahorse::Model::Operation.new.tap do |o|
320
+ o.name = "GetStatementResult"
321
+ o.http_method = "POST"
322
+ o.http_request_uri = "/"
323
+ o.input = Shapes::ShapeRef.new(shape: GetStatementResultRequest)
324
+ o.output = Shapes::ShapeRef.new(shape: GetStatementResultResponse)
325
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
326
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
327
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
328
+ o[:pager] = Aws::Pager.new(
329
+ tokens: {
330
+ "next_token" => "next_token"
331
+ }
332
+ )
333
+ end)
334
+
335
+ api.add_operation(:list_databases, Seahorse::Model::Operation.new.tap do |o|
336
+ o.name = "ListDatabases"
337
+ o.http_method = "POST"
338
+ o.http_request_uri = "/"
339
+ o.input = Shapes::ShapeRef.new(shape: ListDatabasesRequest)
340
+ o.output = Shapes::ShapeRef.new(shape: ListDatabasesResponse)
341
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
342
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
343
+ o[:pager] = Aws::Pager.new(
344
+ limit_key: "max_results",
345
+ tokens: {
346
+ "next_token" => "next_token"
347
+ }
348
+ )
349
+ end)
350
+
351
+ api.add_operation(:list_schemas, Seahorse::Model::Operation.new.tap do |o|
352
+ o.name = "ListSchemas"
353
+ o.http_method = "POST"
354
+ o.http_request_uri = "/"
355
+ o.input = Shapes::ShapeRef.new(shape: ListSchemasRequest)
356
+ o.output = Shapes::ShapeRef.new(shape: ListSchemasResponse)
357
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
358
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
359
+ o[:pager] = Aws::Pager.new(
360
+ limit_key: "max_results",
361
+ tokens: {
362
+ "next_token" => "next_token"
363
+ }
364
+ )
365
+ end)
366
+
367
+ api.add_operation(:list_statements, Seahorse::Model::Operation.new.tap do |o|
368
+ o.name = "ListStatements"
369
+ o.http_method = "POST"
370
+ o.http_request_uri = "/"
371
+ o.input = Shapes::ShapeRef.new(shape: ListStatementsRequest)
372
+ o.output = Shapes::ShapeRef.new(shape: ListStatementsResponse)
373
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
374
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
375
+ o[:pager] = Aws::Pager.new(
376
+ limit_key: "max_results",
377
+ tokens: {
378
+ "next_token" => "next_token"
379
+ }
380
+ )
381
+ end)
382
+
383
+ api.add_operation(:list_tables, Seahorse::Model::Operation.new.tap do |o|
384
+ o.name = "ListTables"
385
+ o.http_method = "POST"
386
+ o.http_request_uri = "/"
387
+ o.input = Shapes::ShapeRef.new(shape: ListTablesRequest)
388
+ o.output = Shapes::ShapeRef.new(shape: ListTablesResponse)
389
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
390
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
391
+ o[:pager] = Aws::Pager.new(
392
+ limit_key: "max_results",
393
+ tokens: {
394
+ "next_token" => "next_token"
395
+ }
396
+ )
397
+ end)
398
+ end
399
+
400
+ end
401
+ end
@@ -0,0 +1,112 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::RedshiftDataAPIService
11
+
12
+ # When RedshiftDataAPIService returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::RedshiftDataAPIService::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all RedshiftDataAPIService errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::RedshiftDataAPIService::Errors::ServiceError
20
+ # # rescues all RedshiftDataAPIService API errors
21
+ # end
22
+ #
23
+ #
24
+ # ## Request Context
25
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
26
+ # information about the request that generated the error.
27
+ # See {Seahorse::Client::RequestContext} for more information.
28
+ #
29
+ # ## Error Classes
30
+ # * {ExecuteStatementException}
31
+ # * {InternalServerException}
32
+ # * {ResourceNotFoundException}
33
+ # * {ValidationException}
34
+ #
35
+ # Additionally, error classes are dynamically generated for service errors based on the error code
36
+ # if they are not defined above.
37
+ module Errors
38
+
39
+ extend Aws::Errors::DynamicErrors
40
+
41
+ class ExecuteStatementException < ServiceError
42
+
43
+ # @param [Seahorse::Client::RequestContext] context
44
+ # @param [String] message
45
+ # @param [Aws::RedshiftDataAPIService::Types::ExecuteStatementException] data
46
+ def initialize(context, message, data = Aws::EmptyStructure.new)
47
+ super(context, message, data)
48
+ end
49
+
50
+ # @return [String]
51
+ def message
52
+ @message || @data[:message]
53
+ end
54
+
55
+ # @return [String]
56
+ def statement_id
57
+ @data[:statement_id]
58
+ end
59
+ end
60
+
61
+ class InternalServerException < ServiceError
62
+
63
+ # @param [Seahorse::Client::RequestContext] context
64
+ # @param [String] message
65
+ # @param [Aws::RedshiftDataAPIService::Types::InternalServerException] data
66
+ def initialize(context, message, data = Aws::EmptyStructure.new)
67
+ super(context, message, data)
68
+ end
69
+
70
+ # @return [String]
71
+ def message
72
+ @message || @data[:message]
73
+ end
74
+ end
75
+
76
+ class ResourceNotFoundException < ServiceError
77
+
78
+ # @param [Seahorse::Client::RequestContext] context
79
+ # @param [String] message
80
+ # @param [Aws::RedshiftDataAPIService::Types::ResourceNotFoundException] data
81
+ def initialize(context, message, data = Aws::EmptyStructure.new)
82
+ super(context, message, data)
83
+ end
84
+
85
+ # @return [String]
86
+ def message
87
+ @message || @data[:message]
88
+ end
89
+
90
+ # @return [String]
91
+ def resource_id
92
+ @data[:resource_id]
93
+ end
94
+ end
95
+
96
+ class ValidationException < ServiceError
97
+
98
+ # @param [Seahorse::Client::RequestContext] context
99
+ # @param [String] message
100
+ # @param [Aws::RedshiftDataAPIService::Types::ValidationException] data
101
+ def initialize(context, message, data = Aws::EmptyStructure.new)
102
+ super(context, message, data)
103
+ end
104
+
105
+ # @return [String]
106
+ def message
107
+ @message || @data[:message]
108
+ end
109
+ end
110
+
111
+ end
112
+ end