aws-sdk-rdsdataservice 1.0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 732b735ede0016f2704111fc3be54bdabddc5aa2
4
+ data.tar.gz: 4853f64a960c4dc5c686463e65529d5adc919034
5
+ SHA512:
6
+ metadata.gz: d7e875b9eb55943da67ddb4786457d2cde1b43be79c2de16d0be774d3a84c2b163beb30fb1a852bce8b57f7f703e94d1681150e548e0225938e06f709e5aa1a8
7
+ data.tar.gz: 1b63d580babb9875d407f1fc222855c18611918ba15d66ae2f8311c4525dfa96ec6f152a0da3200bec33f79ea01ce091f8d86546d505ddc171eaa46fbe11f804
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-rdsdataservice/types'
12
+ require_relative 'aws-sdk-rdsdataservice/client_api'
13
+ require_relative 'aws-sdk-rdsdataservice/client'
14
+ require_relative 'aws-sdk-rdsdataservice/errors'
15
+ require_relative 'aws-sdk-rdsdataservice/resource'
16
+ require_relative 'aws-sdk-rdsdataservice/customizations'
17
+
18
+ # This module provides support for AWS RDS DataService. This module is available in the
19
+ # `aws-sdk-rdsdataservice` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from AWS RDS DataService all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::RDSDataService::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::RDSDataService
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,320 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
19
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
20
+ require 'aws-sdk-core/plugins/response_paging.rb'
21
+ require 'aws-sdk-core/plugins/stub_responses.rb'
22
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
23
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
+ require 'aws-sdk-core/plugins/signature_v4.rb'
27
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
28
+
29
+ Aws::Plugins::GlobalConfiguration.add_identifier(:rdsdataservice)
30
+
31
+ module Aws::RDSDataService
32
+ class Client < Seahorse::Client::Base
33
+
34
+ include Aws::ClientStubs
35
+
36
+ @identifier = :rdsdataservice
37
+
38
+ set_api(ClientApi::API)
39
+
40
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
41
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
42
+ add_plugin(Aws::Plugins::Logging)
43
+ add_plugin(Aws::Plugins::ParamConverter)
44
+ add_plugin(Aws::Plugins::ParamValidator)
45
+ add_plugin(Aws::Plugins::UserAgent)
46
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
47
+ add_plugin(Aws::Plugins::RetryErrors)
48
+ add_plugin(Aws::Plugins::GlobalConfiguration)
49
+ add_plugin(Aws::Plugins::RegionalEndpoint)
50
+ add_plugin(Aws::Plugins::EndpointDiscovery)
51
+ add_plugin(Aws::Plugins::EndpointPattern)
52
+ add_plugin(Aws::Plugins::ResponsePaging)
53
+ add_plugin(Aws::Plugins::StubResponses)
54
+ add_plugin(Aws::Plugins::IdempotencyToken)
55
+ add_plugin(Aws::Plugins::JsonvalueConverter)
56
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
57
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
58
+ add_plugin(Aws::Plugins::SignatureV4)
59
+ add_plugin(Aws::Plugins::Protocols::RestJson)
60
+
61
+ # @overload initialize(options)
62
+ # @param [Hash] options
63
+ # @option options [required, Aws::CredentialProvider] :credentials
64
+ # Your AWS credentials. This can be an instance of any one of the
65
+ # following classes:
66
+ #
67
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
68
+ # credentials.
69
+ #
70
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
71
+ # from an EC2 IMDS on an EC2 instance.
72
+ #
73
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
74
+ # shared file, such as `~/.aws/config`.
75
+ #
76
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
77
+ #
78
+ # When `:credentials` are not configured directly, the following
79
+ # locations will be searched for credentials:
80
+ #
81
+ # * `Aws.config[:credentials]`
82
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
83
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
84
+ # * `~/.aws/credentials`
85
+ # * `~/.aws/config`
86
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
87
+ # very aggressive. Construct and pass an instance of
88
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
89
+ # timeouts.
90
+ #
91
+ # @option options [required, String] :region
92
+ # The AWS region to connect to. The configured `:region` is
93
+ # used to determine the service `:endpoint`. When not passed,
94
+ # a default `:region` is search for in the following locations:
95
+ #
96
+ # * `Aws.config[:region]`
97
+ # * `ENV['AWS_REGION']`
98
+ # * `ENV['AMAZON_REGION']`
99
+ # * `ENV['AWS_DEFAULT_REGION']`
100
+ # * `~/.aws/credentials`
101
+ # * `~/.aws/config`
102
+ #
103
+ # @option options [String] :access_key_id
104
+ #
105
+ # @option options [Boolean] :active_endpoint_cache (false)
106
+ # When set to `true`, a thread polling for endpoints will be running in
107
+ # the background every 60 secs (default). Defaults to `false`.
108
+ #
109
+ # @option options [Boolean] :client_side_monitoring (false)
110
+ # When `true`, client-side metrics will be collected for all API requests from
111
+ # this client.
112
+ #
113
+ # @option options [String] :client_side_monitoring_client_id ("")
114
+ # Allows you to provide an identifier for this client which will be attached to
115
+ # all generated client side metrics. Defaults to an empty string.
116
+ #
117
+ # @option options [Integer] :client_side_monitoring_port (31000)
118
+ # Required for publishing client metrics. The port that the client side monitoring
119
+ # agent is running on, where client metrics will be published via UDP.
120
+ #
121
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
122
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
123
+ # will use the Client Side Monitoring Agent Publisher.
124
+ #
125
+ # @option options [Boolean] :convert_params (true)
126
+ # When `true`, an attempt is made to coerce request parameters into
127
+ # the required types.
128
+ #
129
+ # @option options [Boolean] :disable_host_prefix_injection (false)
130
+ # Set to true to disable SDK automatically adding host prefix
131
+ # to default service endpoint when available.
132
+ #
133
+ # @option options [String] :endpoint
134
+ # The client endpoint is normally constructed from the `:region`
135
+ # option. You should only configure an `:endpoint` when connecting
136
+ # to test endpoints. This should be avalid HTTP(S) URI.
137
+ #
138
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
139
+ # Used for the maximum size limit of the LRU cache storing endpoints data
140
+ # for endpoint discovery enabled operations. Defaults to 1000.
141
+ #
142
+ # @option options [Integer] :endpoint_cache_max_threads (10)
143
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
144
+ #
145
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
146
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
147
+ # Use this option to config the time interval in seconds for making
148
+ # requests fetching endpoints information. Defaults to 60 sec.
149
+ #
150
+ # @option options [Boolean] :endpoint_discovery (false)
151
+ # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
152
+ #
153
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
154
+ # The log formatter.
155
+ #
156
+ # @option options [Symbol] :log_level (:info)
157
+ # The log level to send messages to the `:logger` at.
158
+ #
159
+ # @option options [Logger] :logger
160
+ # The Logger instance to send log messages to. If this option
161
+ # is not set, logging will be disabled.
162
+ #
163
+ # @option options [String] :profile ("default")
164
+ # Used when loading credentials from the shared credentials file
165
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
166
+ #
167
+ # @option options [Float] :retry_base_delay (0.3)
168
+ # The base delay in seconds used by the default backoff function.
169
+ #
170
+ # @option options [Symbol] :retry_jitter (:none)
171
+ # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
172
+ #
173
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
174
+ #
175
+ # @option options [Integer] :retry_limit (3)
176
+ # The maximum number of times to retry failed requests. Only
177
+ # ~ 500 level server errors and certain ~ 400 level client errors
178
+ # are retried. Generally, these are throttling errors, data
179
+ # checksum errors, networking errors, timeout errors and auth
180
+ # errors from expired credentials.
181
+ #
182
+ # @option options [Integer] :retry_max_delay (0)
183
+ # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
184
+ #
185
+ # @option options [String] :secret_access_key
186
+ #
187
+ # @option options [String] :session_token
188
+ #
189
+ # @option options [Boolean] :stub_responses (false)
190
+ # Causes the client to return stubbed responses. By default
191
+ # fake responses are generated and returned. You can specify
192
+ # the response data to return or errors to raise by calling
193
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
194
+ #
195
+ # ** Please note ** When response stubbing is enabled, no HTTP
196
+ # requests are made, and retries are disabled.
197
+ #
198
+ # @option options [Boolean] :validate_params (true)
199
+ # When `true`, request parameters are validated before
200
+ # sending the request.
201
+ #
202
+ def initialize(*args)
203
+ super
204
+ end
205
+
206
+ # @!group API Operations
207
+
208
+ # Executes any SQL statement on the target database synchronously
209
+ #
210
+ # @option params [required, String] :aws_secret_store_arn
211
+ # ARN of the db credentials in AWS Secret Store or the friendly secret
212
+ # name
213
+ #
214
+ # @option params [String] :database
215
+ # Target DB name
216
+ #
217
+ # @option params [required, String] :db_cluster_or_instance_arn
218
+ # ARN of the target db cluster or instance
219
+ #
220
+ # @option params [String] :schema
221
+ # Target Schema name
222
+ #
223
+ # @option params [required, String] :sql_statements
224
+ # SQL statement(s) to be executed. Statements can be chained by using
225
+ # semicolons
226
+ #
227
+ # @return [Types::ExecuteSqlResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
228
+ #
229
+ # * {Types::ExecuteSqlResponse#sql_statement_results #sql_statement_results} => Array&lt;Types::SqlStatementResult&gt;
230
+ #
231
+ # @example Request syntax with placeholder values
232
+ #
233
+ # resp = client.execute_sql({
234
+ # aws_secret_store_arn: "String", # required
235
+ # database: "String",
236
+ # db_cluster_or_instance_arn: "String", # required
237
+ # schema: "String",
238
+ # sql_statements: "String", # required
239
+ # })
240
+ #
241
+ # @example Response structure
242
+ #
243
+ # resp.sql_statement_results #=> Array
244
+ # resp.sql_statement_results[0].number_of_records_updated #=> Integer
245
+ # resp.sql_statement_results[0].result_frame.records #=> Array
246
+ # resp.sql_statement_results[0].result_frame.records[0].values #=> Array
247
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].array_values #=> Array
248
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].array_values[0] #=> Types::Value
249
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].big_int_value #=> Integer
250
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].bit_value #=> Boolean
251
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].blob_value #=> String
252
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].double_value #=> Float
253
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].int_value #=> Integer
254
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].is_null #=> Boolean
255
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].real_value #=> Float
256
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].string_value #=> String
257
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].struct_value.attributes #=> Array
258
+ # resp.sql_statement_results[0].result_frame.records[0].values[0].struct_value.attributes[0] #=> Types::Value
259
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_count #=> Integer
260
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata #=> Array
261
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].array_base_column_type #=> Integer
262
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].is_auto_increment #=> Boolean
263
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].is_case_sensitive #=> Boolean
264
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].is_currency #=> Boolean
265
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].is_signed #=> Boolean
266
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].label #=> String
267
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].name #=> String
268
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].nullable #=> Integer
269
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].precision #=> Integer
270
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].scale #=> Integer
271
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].schema_name #=> String
272
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].table_name #=> String
273
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].type #=> Integer
274
+ # resp.sql_statement_results[0].result_frame.result_set_metadata.column_metadata[0].type_name #=> String
275
+ #
276
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSql AWS API Documentation
277
+ #
278
+ # @overload execute_sql(params = {})
279
+ # @param [Hash] params ({})
280
+ def execute_sql(params = {}, options = {})
281
+ req = build_request(:execute_sql, params)
282
+ req.send_request(options)
283
+ end
284
+
285
+ # @!endgroup
286
+
287
+ # @param params ({})
288
+ # @api private
289
+ def build_request(operation_name, params = {})
290
+ handlers = @handlers.for(operation_name)
291
+ context = Seahorse::Client::RequestContext.new(
292
+ operation_name: operation_name,
293
+ operation: config.api.operation(operation_name),
294
+ client: self,
295
+ params: params,
296
+ config: config)
297
+ context[:gem_name] = 'aws-sdk-rdsdataservice'
298
+ context[:gem_version] = '1.0.0'
299
+ Seahorse::Client::Request.new(handlers, context)
300
+ end
301
+
302
+ # @api private
303
+ # @deprecated
304
+ def waiter_names
305
+ []
306
+ end
307
+
308
+ class << self
309
+
310
+ # @api private
311
+ attr_reader :identifier
312
+
313
+ # @api private
314
+ def errors_module
315
+ Errors
316
+ end
317
+
318
+ end
319
+ end
320
+ end
@@ -0,0 +1,138 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::RDSDataService
9
+ # @api private
10
+ module ClientApi
11
+
12
+ include Seahorse::Model
13
+
14
+ ArrayValues = Shapes::ListShape.new(name: 'ArrayValues')
15
+ BadRequestException = Shapes::StructureShape.new(name: 'BadRequestException')
16
+ Blob = Shapes::BlobShape.new(name: 'Blob')
17
+ Boolean = Shapes::BooleanShape.new(name: 'Boolean')
18
+ ColumnMetadata = Shapes::StructureShape.new(name: 'ColumnMetadata')
19
+ ColumnMetadataList = Shapes::ListShape.new(name: 'ColumnMetadataList')
20
+ Double = Shapes::FloatShape.new(name: 'Double')
21
+ ExecuteSqlRequest = Shapes::StructureShape.new(name: 'ExecuteSqlRequest')
22
+ ExecuteSqlResponse = Shapes::StructureShape.new(name: 'ExecuteSqlResponse')
23
+ Float = Shapes::FloatShape.new(name: 'Float')
24
+ ForbiddenException = Shapes::StructureShape.new(name: 'ForbiddenException')
25
+ Integer = Shapes::IntegerShape.new(name: 'Integer')
26
+ InternalServerErrorException = Shapes::StructureShape.new(name: 'InternalServerErrorException')
27
+ Long = Shapes::IntegerShape.new(name: 'Long')
28
+ Record = Shapes::StructureShape.new(name: 'Record')
29
+ Records = Shapes::ListShape.new(name: 'Records')
30
+ ResultFrame = Shapes::StructureShape.new(name: 'ResultFrame')
31
+ ResultSetMetadata = Shapes::StructureShape.new(name: 'ResultSetMetadata')
32
+ Row = Shapes::ListShape.new(name: 'Row')
33
+ ServiceUnavailableError = Shapes::StructureShape.new(name: 'ServiceUnavailableError')
34
+ SqlStatementResult = Shapes::StructureShape.new(name: 'SqlStatementResult')
35
+ SqlStatementResults = Shapes::ListShape.new(name: 'SqlStatementResults')
36
+ String = Shapes::StringShape.new(name: 'String')
37
+ StructValue = Shapes::StructureShape.new(name: 'StructValue')
38
+ Value = Shapes::StructureShape.new(name: 'Value')
39
+
40
+ ArrayValues.member = Shapes::ShapeRef.new(shape: Value)
41
+
42
+ ColumnMetadata.add_member(:array_base_column_type, Shapes::ShapeRef.new(shape: Integer, location_name: "arrayBaseColumnType"))
43
+ ColumnMetadata.add_member(:is_auto_increment, Shapes::ShapeRef.new(shape: Boolean, location_name: "isAutoIncrement"))
44
+ ColumnMetadata.add_member(:is_case_sensitive, Shapes::ShapeRef.new(shape: Boolean, location_name: "isCaseSensitive"))
45
+ ColumnMetadata.add_member(:is_currency, Shapes::ShapeRef.new(shape: Boolean, location_name: "isCurrency"))
46
+ ColumnMetadata.add_member(:is_signed, Shapes::ShapeRef.new(shape: Boolean, location_name: "isSigned"))
47
+ ColumnMetadata.add_member(:label, Shapes::ShapeRef.new(shape: String, location_name: "label"))
48
+ ColumnMetadata.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "name"))
49
+ ColumnMetadata.add_member(:nullable, Shapes::ShapeRef.new(shape: Integer, location_name: "nullable"))
50
+ ColumnMetadata.add_member(:precision, Shapes::ShapeRef.new(shape: Integer, location_name: "precision"))
51
+ ColumnMetadata.add_member(:scale, Shapes::ShapeRef.new(shape: Integer, location_name: "scale"))
52
+ ColumnMetadata.add_member(:schema_name, Shapes::ShapeRef.new(shape: String, location_name: "schemaName"))
53
+ ColumnMetadata.add_member(:table_name, Shapes::ShapeRef.new(shape: String, location_name: "tableName"))
54
+ ColumnMetadata.add_member(:type, Shapes::ShapeRef.new(shape: Integer, location_name: "type"))
55
+ ColumnMetadata.add_member(:type_name, Shapes::ShapeRef.new(shape: String, location_name: "typeName"))
56
+ ColumnMetadata.struct_class = Types::ColumnMetadata
57
+
58
+ ColumnMetadataList.member = Shapes::ShapeRef.new(shape: ColumnMetadata)
59
+
60
+ ExecuteSqlRequest.add_member(:aws_secret_store_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "awsSecretStoreArn"))
61
+ ExecuteSqlRequest.add_member(:database, Shapes::ShapeRef.new(shape: String, location_name: "database"))
62
+ ExecuteSqlRequest.add_member(:db_cluster_or_instance_arn, Shapes::ShapeRef.new(shape: String, required: true, location_name: "dbClusterOrInstanceArn"))
63
+ ExecuteSqlRequest.add_member(:schema, Shapes::ShapeRef.new(shape: String, location_name: "schema"))
64
+ ExecuteSqlRequest.add_member(:sql_statements, Shapes::ShapeRef.new(shape: String, required: true, location_name: "sqlStatements"))
65
+ ExecuteSqlRequest.struct_class = Types::ExecuteSqlRequest
66
+
67
+ ExecuteSqlResponse.add_member(:sql_statement_results, Shapes::ShapeRef.new(shape: SqlStatementResults, required: true, location_name: "sqlStatementResults"))
68
+ ExecuteSqlResponse.struct_class = Types::ExecuteSqlResponse
69
+
70
+ Record.add_member(:values, Shapes::ShapeRef.new(shape: Row, location_name: "values"))
71
+ Record.struct_class = Types::Record
72
+
73
+ Records.member = Shapes::ShapeRef.new(shape: Record)
74
+
75
+ ResultFrame.add_member(:records, Shapes::ShapeRef.new(shape: Records, location_name: "records"))
76
+ ResultFrame.add_member(:result_set_metadata, Shapes::ShapeRef.new(shape: ResultSetMetadata, location_name: "resultSetMetadata"))
77
+ ResultFrame.struct_class = Types::ResultFrame
78
+
79
+ ResultSetMetadata.add_member(:column_count, Shapes::ShapeRef.new(shape: Long, location_name: "columnCount"))
80
+ ResultSetMetadata.add_member(:column_metadata, Shapes::ShapeRef.new(shape: ColumnMetadataList, location_name: "columnMetadata"))
81
+ ResultSetMetadata.struct_class = Types::ResultSetMetadata
82
+
83
+ Row.member = Shapes::ShapeRef.new(shape: Value)
84
+
85
+ SqlStatementResult.add_member(:number_of_records_updated, Shapes::ShapeRef.new(shape: Long, location_name: "numberOfRecordsUpdated"))
86
+ SqlStatementResult.add_member(:result_frame, Shapes::ShapeRef.new(shape: ResultFrame, location_name: "resultFrame"))
87
+ SqlStatementResult.struct_class = Types::SqlStatementResult
88
+
89
+ SqlStatementResults.member = Shapes::ShapeRef.new(shape: SqlStatementResult)
90
+
91
+ StructValue.add_member(:attributes, Shapes::ShapeRef.new(shape: ArrayValues, location_name: "attributes"))
92
+ StructValue.struct_class = Types::StructValue
93
+
94
+ Value.add_member(:array_values, Shapes::ShapeRef.new(shape: ArrayValues, location_name: "arrayValues"))
95
+ Value.add_member(:big_int_value, Shapes::ShapeRef.new(shape: Long, location_name: "bigIntValue"))
96
+ Value.add_member(:bit_value, Shapes::ShapeRef.new(shape: Boolean, location_name: "bitValue"))
97
+ Value.add_member(:blob_value, Shapes::ShapeRef.new(shape: Blob, location_name: "blobValue"))
98
+ Value.add_member(:double_value, Shapes::ShapeRef.new(shape: Double, location_name: "doubleValue"))
99
+ Value.add_member(:int_value, Shapes::ShapeRef.new(shape: Integer, location_name: "intValue"))
100
+ Value.add_member(:is_null, Shapes::ShapeRef.new(shape: Boolean, location_name: "isNull"))
101
+ Value.add_member(:real_value, Shapes::ShapeRef.new(shape: Float, location_name: "realValue"))
102
+ Value.add_member(:string_value, Shapes::ShapeRef.new(shape: String, location_name: "stringValue"))
103
+ Value.add_member(:struct_value, Shapes::ShapeRef.new(shape: StructValue, location_name: "structValue"))
104
+ Value.struct_class = Types::Value
105
+
106
+
107
+ # @api private
108
+ API = Seahorse::Model::Api.new.tap do |api|
109
+
110
+ api.version = "2018-08-01"
111
+
112
+ api.metadata = {
113
+ "apiVersion" => "2018-08-01",
114
+ "endpointPrefix" => "rds-data",
115
+ "jsonVersion" => "1.1",
116
+ "protocol" => "rest-json",
117
+ "serviceFullName" => "AWS RDS DataService",
118
+ "serviceId" => "RDS Data",
119
+ "signatureVersion" => "v4",
120
+ "signingName" => "rds-data",
121
+ "uid" => "rds-data-2018-08-01",
122
+ }
123
+
124
+ api.add_operation(:execute_sql, Seahorse::Model::Operation.new.tap do |o|
125
+ o.name = "ExecuteSql"
126
+ o.http_method = "POST"
127
+ o.http_request_uri = "/ExecuteSql"
128
+ o.input = Shapes::ShapeRef.new(shape: ExecuteSqlRequest)
129
+ o.output = Shapes::ShapeRef.new(shape: ExecuteSqlResponse)
130
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
131
+ o.errors << Shapes::ShapeRef.new(shape: ForbiddenException)
132
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerErrorException)
133
+ o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableError)
134
+ end)
135
+ end
136
+
137
+ end
138
+ end
@@ -0,0 +1,14 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::RDSDataService
9
+ module Errors
10
+
11
+ extend Aws::Errors::DynamicErrors
12
+
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::RDSDataService
9
+ class Resource
10
+
11
+ # @param options ({})
12
+ # @option options [Client] :client
13
+ def initialize(options = {})
14
+ @client = options[:client] || Client.new(options)
15
+ end
16
+
17
+ # @return [Client]
18
+ def client
19
+ @client
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,297 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::RDSDataService
9
+ module Types
10
+
11
+ # SQL statement execution result
12
+ #
13
+ # @!attribute [rw] number_of_records_updated
14
+ # Number of rows updated.
15
+ # @return [Integer]
16
+ #
17
+ # @!attribute [rw] result_frame
18
+ # ResultFrame returned by executing the sql statement
19
+ # @return [Types::ResultFrame]
20
+ #
21
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/SqlStatementResult AWS API Documentation
22
+ #
23
+ class SqlStatementResult < Struct.new(
24
+ :number_of_records_updated,
25
+ :result_frame)
26
+ include Aws::Structure
27
+ end
28
+
29
+ # Column value
30
+ #
31
+ # @!attribute [rw] array_values
32
+ # Arbitrarily nested arrays
33
+ # @return [Array<Types::Value>]
34
+ #
35
+ # @!attribute [rw] big_int_value
36
+ # Long value
37
+ # @return [Integer]
38
+ #
39
+ # @!attribute [rw] bit_value
40
+ # Bit value
41
+ # @return [Boolean]
42
+ #
43
+ # @!attribute [rw] blob_value
44
+ # Blob value
45
+ # @return [String]
46
+ #
47
+ # @!attribute [rw] double_value
48
+ # Double value
49
+ # @return [Float]
50
+ #
51
+ # @!attribute [rw] int_value
52
+ # Integer value
53
+ # @return [Integer]
54
+ #
55
+ # @!attribute [rw] is_null
56
+ # Is column null
57
+ # @return [Boolean]
58
+ #
59
+ # @!attribute [rw] real_value
60
+ # Float value
61
+ # @return [Float]
62
+ #
63
+ # @!attribute [rw] string_value
64
+ # String value
65
+ # @return [String]
66
+ #
67
+ # @!attribute [rw] struct_value
68
+ # Struct or UDT
69
+ # @return [Types::StructValue]
70
+ #
71
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/Value AWS API Documentation
72
+ #
73
+ class Value < Struct.new(
74
+ :array_values,
75
+ :big_int_value,
76
+ :bit_value,
77
+ :blob_value,
78
+ :double_value,
79
+ :int_value,
80
+ :is_null,
81
+ :real_value,
82
+ :string_value,
83
+ :struct_value)
84
+ include Aws::Structure
85
+ end
86
+
87
+ # List of columns and their types.
88
+ #
89
+ # @!attribute [rw] column_count
90
+ # Number of columns
91
+ # @return [Integer]
92
+ #
93
+ # @!attribute [rw] column_metadata
94
+ # List of columns and their types
95
+ # @return [Array<Types::ColumnMetadata>]
96
+ #
97
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ResultSetMetadata AWS API Documentation
98
+ #
99
+ class ResultSetMetadata < Struct.new(
100
+ :column_count,
101
+ :column_metadata)
102
+ include Aws::Structure
103
+ end
104
+
105
+ # Result Frame
106
+ #
107
+ # @!attribute [rw] records
108
+ # ResultSet Metadata.
109
+ # @return [Array<Types::Record>]
110
+ #
111
+ # @!attribute [rw] result_set_metadata
112
+ # ResultSet Metadata.
113
+ # @return [Types::ResultSetMetadata]
114
+ #
115
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ResultFrame AWS API Documentation
116
+ #
117
+ class ResultFrame < Struct.new(
118
+ :records,
119
+ :result_set_metadata)
120
+ include Aws::Structure
121
+ end
122
+
123
+ # Execute SQL Request
124
+ #
125
+ # @note When making an API call, you may pass ExecuteSqlRequest
126
+ # data as a hash:
127
+ #
128
+ # {
129
+ # aws_secret_store_arn: "String", # required
130
+ # database: "String",
131
+ # db_cluster_or_instance_arn: "String", # required
132
+ # schema: "String",
133
+ # sql_statements: "String", # required
134
+ # }
135
+ #
136
+ # @!attribute [rw] aws_secret_store_arn
137
+ # ARN of the db credentials in AWS Secret Store or the friendly secret
138
+ # name
139
+ # @return [String]
140
+ #
141
+ # @!attribute [rw] database
142
+ # Target DB name
143
+ # @return [String]
144
+ #
145
+ # @!attribute [rw] db_cluster_or_instance_arn
146
+ # ARN of the target db cluster or instance
147
+ # @return [String]
148
+ #
149
+ # @!attribute [rw] schema
150
+ # Target Schema name
151
+ # @return [String]
152
+ #
153
+ # @!attribute [rw] sql_statements
154
+ # SQL statement(s) to be executed. Statements can be chained by using
155
+ # semicolons
156
+ # @return [String]
157
+ #
158
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSqlRequest AWS API Documentation
159
+ #
160
+ class ExecuteSqlRequest < Struct.new(
161
+ :aws_secret_store_arn,
162
+ :database,
163
+ :db_cluster_or_instance_arn,
164
+ :schema,
165
+ :sql_statements)
166
+ include Aws::Structure
167
+ end
168
+
169
+ # User Defined Type
170
+ #
171
+ # @!attribute [rw] attributes
172
+ # Struct or UDT
173
+ # @return [Array<Types::Value>]
174
+ #
175
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/StructValue AWS API Documentation
176
+ #
177
+ class StructValue < Struct.new(
178
+ :attributes)
179
+ include Aws::Structure
180
+ end
181
+
182
+ # Column Metadata
183
+ #
184
+ # @!attribute [rw] array_base_column_type
185
+ # Homogenous array base SQL type from java.sql.Types.
186
+ # @return [Integer]
187
+ #
188
+ # @!attribute [rw] is_auto_increment
189
+ # Whether the designated column is automatically numbered
190
+ # @return [Boolean]
191
+ #
192
+ # @!attribute [rw] is_case_sensitive
193
+ # Whether values in the designated column's case matters
194
+ # @return [Boolean]
195
+ #
196
+ # @!attribute [rw] is_currency
197
+ # Whether values in the designated column is a cash value
198
+ # @return [Boolean]
199
+ #
200
+ # @!attribute [rw] is_signed
201
+ # Whether values in the designated column are signed numbers
202
+ # @return [Boolean]
203
+ #
204
+ # @!attribute [rw] label
205
+ # Usually specified by the SQL AS. If not specified, return column
206
+ # name.
207
+ # @return [String]
208
+ #
209
+ # @!attribute [rw] name
210
+ # Name of the column.
211
+ # @return [String]
212
+ #
213
+ # @!attribute [rw] nullable
214
+ # Indicates the nullability of values in the designated column. One of
215
+ # columnNoNulls (0), columnNullable (1), columnNullableUnknown (2)
216
+ # @return [Integer]
217
+ #
218
+ # @!attribute [rw] precision
219
+ # Get the designated column's specified column size.For numeric data,
220
+ # this is the maximum precision. For character data, this is the
221
+ # length in characters. For datetime datatypes, this is the length in
222
+ # characters of the String representation (assuming the maximum
223
+ # allowed precision of the fractional seconds component). For binary
224
+ # data, this is the length in bytes. For the ROWID datatype, this is
225
+ # the length in bytes. 0 is returned for data types where the column
226
+ # size is not applicable.
227
+ # @return [Integer]
228
+ #
229
+ # @!attribute [rw] scale
230
+ # Designated column's number of digits to right of the decimal point.
231
+ # 0 is returned for data types where the scale is not applicable.
232
+ # @return [Integer]
233
+ #
234
+ # @!attribute [rw] schema_name
235
+ # Designated column's table's schema
236
+ # @return [String]
237
+ #
238
+ # @!attribute [rw] table_name
239
+ # Designated column's table name
240
+ # @return [String]
241
+ #
242
+ # @!attribute [rw] type
243
+ # SQL type from java.sql.Types.
244
+ # @return [Integer]
245
+ #
246
+ # @!attribute [rw] type_name
247
+ # Database-specific type name.
248
+ # @return [String]
249
+ #
250
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ColumnMetadata AWS API Documentation
251
+ #
252
+ class ColumnMetadata < Struct.new(
253
+ :array_base_column_type,
254
+ :is_auto_increment,
255
+ :is_case_sensitive,
256
+ :is_currency,
257
+ :is_signed,
258
+ :label,
259
+ :name,
260
+ :nullable,
261
+ :precision,
262
+ :scale,
263
+ :schema_name,
264
+ :table_name,
265
+ :type,
266
+ :type_name)
267
+ include Aws::Structure
268
+ end
269
+
270
+ # Row or Record
271
+ #
272
+ # @!attribute [rw] values
273
+ # Record
274
+ # @return [Array<Types::Value>]
275
+ #
276
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/Record AWS API Documentation
277
+ #
278
+ class Record < Struct.new(
279
+ :values)
280
+ include Aws::Structure
281
+ end
282
+
283
+ # Execute SQL response
284
+ #
285
+ # @!attribute [rw] sql_statement_results
286
+ # Results returned by executing the sql statement(s)
287
+ # @return [Array<Types::SqlStatementResult>]
288
+ #
289
+ # @see http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSqlResponse AWS API Documentation
290
+ #
291
+ class ExecuteSqlResponse < Struct.new(
292
+ :sql_statement_results)
293
+ include Aws::Structure
294
+ end
295
+
296
+ end
297
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aws-sdk-rdsdataservice
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Amazon Web Services
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-11-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: aws-sdk-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.39.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '3'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.39.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: aws-sigv4
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.0'
47
+ description: Official AWS Ruby gem for AWS RDS DataService. This gem is part of the
48
+ AWS SDK for Ruby.
49
+ email:
50
+ - trevrowe@amazon.com
51
+ executables: []
52
+ extensions: []
53
+ extra_rdoc_files: []
54
+ files:
55
+ - lib/aws-sdk-rdsdataservice.rb
56
+ - lib/aws-sdk-rdsdataservice/client.rb
57
+ - lib/aws-sdk-rdsdataservice/client_api.rb
58
+ - lib/aws-sdk-rdsdataservice/customizations.rb
59
+ - lib/aws-sdk-rdsdataservice/errors.rb
60
+ - lib/aws-sdk-rdsdataservice/resource.rb
61
+ - lib/aws-sdk-rdsdataservice/types.rb
62
+ homepage: http://github.com/aws/aws-sdk-ruby
63
+ licenses:
64
+ - Apache-2.0
65
+ metadata:
66
+ source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-rdsdataservice
67
+ changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-rdsdataservice/CHANGELOG.md
68
+ post_install_message:
69
+ rdoc_options: []
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ requirements: []
83
+ rubyforge_project:
84
+ rubygems_version: 2.5.2.3
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: AWS SDK for Ruby - AWS RDS DataService
88
+ test_files: []