aws-sdk-redshiftdataapiservice 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
+ SHA256:
3
+ metadata.gz: f9231e470d1c85e4b70814a9160aed5fa2be8b8e5751c1a6283b371ebfdd188a
4
+ data.tar.gz: 908a4710fb9b9ab9d3dd4865ab1a63d5d7cdbd2d36ce10c3500aafc06c5cd810
5
+ SHA512:
6
+ metadata.gz: 82a51fdb547d2ae27ca6564372538788c2c685ea70ce60ee7668c1fe1ba2bd36fca75862fd0790d8b0526e918925eb4129dbf41ddbb901bf7cd5fffd9aaaef3e
7
+ data.tar.gz: 249cae930467adf202b8eec623efbcdd898da17e93a99e2a8f39a15b7df56e8c2f1540d5ce37ede793ce4d72f2afa1e3215fd9979b0854b90c7d0d6920c3d27e
@@ -0,0 +1,52 @@
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
+ require 'aws-sdk-core'
11
+ require 'aws-sigv4'
12
+
13
+ require_relative 'aws-sdk-redshiftdataapiservice/types'
14
+ require_relative 'aws-sdk-redshiftdataapiservice/client_api'
15
+ require_relative 'aws-sdk-redshiftdataapiservice/client'
16
+ require_relative 'aws-sdk-redshiftdataapiservice/errors'
17
+ require_relative 'aws-sdk-redshiftdataapiservice/resource'
18
+ require_relative 'aws-sdk-redshiftdataapiservice/customizations'
19
+
20
+ # This module provides support for Redshift Data API Service. This module is available in the
21
+ # `aws-sdk-redshiftdataapiservice` gem.
22
+ #
23
+ # # Client
24
+ #
25
+ # The {Client} class provides one method for each API operation. Operation
26
+ # methods each accept a hash of request parameters and return a response
27
+ # structure.
28
+ #
29
+ # redshift_data_api_service = Aws::RedshiftDataAPIService::Client.new
30
+ # resp = redshift_data_api_service.cancel_statement(params)
31
+ #
32
+ # See {Client} for more information.
33
+ #
34
+ # # Errors
35
+ #
36
+ # Errors returned from Redshift Data API Service are defined in the
37
+ # {Errors} module and all extend {Errors::ServiceError}.
38
+ #
39
+ # begin
40
+ # # do stuff
41
+ # rescue Aws::RedshiftDataAPIService::Errors::ServiceError
42
+ # # rescues all Redshift Data API Service API errors
43
+ # end
44
+ #
45
+ # See {Errors} for more information.
46
+ #
47
+ # @!group service
48
+ module Aws::RedshiftDataAPIService
49
+
50
+ GEM_VERSION = '1.0.0'
51
+
52
+ end
@@ -0,0 +1,1059 @@
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
+ require 'seahorse/client/plugins/content_length.rb'
11
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
+ require 'aws-sdk-core/plugins/logging.rb'
13
+ require 'aws-sdk-core/plugins/param_converter.rb'
14
+ require 'aws-sdk-core/plugins/param_validator.rb'
15
+ require 'aws-sdk-core/plugins/user_agent.rb'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
+ require 'aws-sdk-core/plugins/retry_errors.rb'
18
+ require 'aws-sdk-core/plugins/global_configuration.rb'
19
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
+ require 'aws-sdk-core/plugins/response_paging.rb'
23
+ require 'aws-sdk-core/plugins/stub_responses.rb'
24
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/signature_v4.rb'
31
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
32
+
33
+ Aws::Plugins::GlobalConfiguration.add_identifier(:redshiftdataapiservice)
34
+
35
+ module Aws::RedshiftDataAPIService
36
+ # An API client for RedshiftDataAPIService. To construct a client, you need to configure a `:region` and `:credentials`.
37
+ #
38
+ # client = Aws::RedshiftDataAPIService::Client.new(
39
+ # region: region_name,
40
+ # credentials: credentials,
41
+ # # ...
42
+ # )
43
+ #
44
+ # For details on configuring region and credentials see
45
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
46
+ #
47
+ # See {#initialize} for a full list of supported configuration options.
48
+ class Client < Seahorse::Client::Base
49
+
50
+ include Aws::ClientStubs
51
+
52
+ @identifier = :redshiftdataapiservice
53
+
54
+ set_api(ClientApi::API)
55
+
56
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
57
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
58
+ add_plugin(Aws::Plugins::Logging)
59
+ add_plugin(Aws::Plugins::ParamConverter)
60
+ add_plugin(Aws::Plugins::ParamValidator)
61
+ add_plugin(Aws::Plugins::UserAgent)
62
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
63
+ add_plugin(Aws::Plugins::RetryErrors)
64
+ add_plugin(Aws::Plugins::GlobalConfiguration)
65
+ add_plugin(Aws::Plugins::RegionalEndpoint)
66
+ add_plugin(Aws::Plugins::EndpointDiscovery)
67
+ add_plugin(Aws::Plugins::EndpointPattern)
68
+ add_plugin(Aws::Plugins::ResponsePaging)
69
+ add_plugin(Aws::Plugins::StubResponses)
70
+ add_plugin(Aws::Plugins::IdempotencyToken)
71
+ add_plugin(Aws::Plugins::JsonvalueConverter)
72
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
73
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
74
+ add_plugin(Aws::Plugins::TransferEncoding)
75
+ add_plugin(Aws::Plugins::HttpChecksum)
76
+ add_plugin(Aws::Plugins::SignatureV4)
77
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
78
+
79
+ # @overload initialize(options)
80
+ # @param [Hash] options
81
+ # @option options [required, Aws::CredentialProvider] :credentials
82
+ # Your AWS credentials. This can be an instance of any one of the
83
+ # following classes:
84
+ #
85
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
86
+ # credentials.
87
+ #
88
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
89
+ # shared file, such as `~/.aws/config`.
90
+ #
91
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
92
+ #
93
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
94
+ # assume a role after providing credentials via the web.
95
+ #
96
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
97
+ # access token generated from `aws login`.
98
+ #
99
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
100
+ # process that outputs to stdout.
101
+ #
102
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
103
+ # from an EC2 IMDS on an EC2 instance.
104
+ #
105
+ # * `Aws::ECSCredentials` - Used for loading credentials from
106
+ # instances running in ECS.
107
+ #
108
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
109
+ # from the Cognito Identity service.
110
+ #
111
+ # When `:credentials` are not configured directly, the following
112
+ # locations will be searched for credentials:
113
+ #
114
+ # * `Aws.config[:credentials]`
115
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
116
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
117
+ # * `~/.aws/credentials`
118
+ # * `~/.aws/config`
119
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
+ # are very aggressive. Construct and pass an instance of
121
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
+ # enable retries and extended timeouts.
123
+ #
124
+ # @option options [required, String] :region
125
+ # The AWS region to connect to. The configured `:region` is
126
+ # used to determine the service `:endpoint`. When not passed,
127
+ # a default `:region` is searched for in the following locations:
128
+ #
129
+ # * `Aws.config[:region]`
130
+ # * `ENV['AWS_REGION']`
131
+ # * `ENV['AMAZON_REGION']`
132
+ # * `ENV['AWS_DEFAULT_REGION']`
133
+ # * `~/.aws/credentials`
134
+ # * `~/.aws/config`
135
+ #
136
+ # @option options [String] :access_key_id
137
+ #
138
+ # @option options [Boolean] :active_endpoint_cache (false)
139
+ # When set to `true`, a thread polling for endpoints will be running in
140
+ # the background every 60 secs (default). Defaults to `false`.
141
+ #
142
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
143
+ # Used only in `adaptive` retry mode. When true, the request will sleep
144
+ # until there is sufficent client side capacity to retry the request.
145
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
146
+ # not retry instead of sleeping.
147
+ #
148
+ # @option options [Boolean] :client_side_monitoring (false)
149
+ # When `true`, client-side metrics will be collected for all API requests from
150
+ # this client.
151
+ #
152
+ # @option options [String] :client_side_monitoring_client_id ("")
153
+ # Allows you to provide an identifier for this client which will be attached to
154
+ # all generated client side metrics. Defaults to an empty string.
155
+ #
156
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
157
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
158
+ # side monitoring agent is running on, where client metrics will be published via UDP.
159
+ #
160
+ # @option options [Integer] :client_side_monitoring_port (31000)
161
+ # Required for publishing client metrics. The port that the client side monitoring
162
+ # agent is running on, where client metrics will be published via UDP.
163
+ #
164
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
165
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
166
+ # will use the Client Side Monitoring Agent Publisher.
167
+ #
168
+ # @option options [Boolean] :convert_params (true)
169
+ # When `true`, an attempt is made to coerce request parameters into
170
+ # the required types.
171
+ #
172
+ # @option options [Boolean] :correct_clock_skew (true)
173
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
174
+ # a clock skew correction and retry requests with skewed client clocks.
175
+ #
176
+ # @option options [Boolean] :disable_host_prefix_injection (false)
177
+ # Set to true to disable SDK automatically adding host prefix
178
+ # to default service endpoint when available.
179
+ #
180
+ # @option options [String] :endpoint
181
+ # The client endpoint is normally constructed from the `:region`
182
+ # option. You should only configure an `:endpoint` when connecting
183
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
184
+ #
185
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
186
+ # Used for the maximum size limit of the LRU cache storing endpoints data
187
+ # for endpoint discovery enabled operations. Defaults to 1000.
188
+ #
189
+ # @option options [Integer] :endpoint_cache_max_threads (10)
190
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
191
+ #
192
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
193
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
194
+ # Use this option to config the time interval in seconds for making
195
+ # requests fetching endpoints information. Defaults to 60 sec.
196
+ #
197
+ # @option options [Boolean] :endpoint_discovery (false)
198
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
199
+ #
200
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
201
+ # The log formatter.
202
+ #
203
+ # @option options [Symbol] :log_level (:info)
204
+ # The log level to send messages to the `:logger` at.
205
+ #
206
+ # @option options [Logger] :logger
207
+ # The Logger instance to send log messages to. If this option
208
+ # is not set, logging will be disabled.
209
+ #
210
+ # @option options [Integer] :max_attempts (3)
211
+ # An integer representing the maximum number attempts that will be made for
212
+ # a single request, including the initial attempt. For example,
213
+ # setting this value to 5 will result in a request being retried up to
214
+ # 4 times. Used in `standard` and `adaptive` retry modes.
215
+ #
216
+ # @option options [String] :profile ("default")
217
+ # Used when loading credentials from the shared credentials file
218
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
219
+ #
220
+ # @option options [Proc] :retry_backoff
221
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
222
+ # This option is only used in the `legacy` retry mode.
223
+ #
224
+ # @option options [Float] :retry_base_delay (0.3)
225
+ # The base delay in seconds used by the default backoff function. This option
226
+ # is only used in the `legacy` retry mode.
227
+ #
228
+ # @option options [Symbol] :retry_jitter (:none)
229
+ # A delay randomiser function used by the default backoff function.
230
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
231
+ # otherwise a Proc that takes and returns a number. This option is only used
232
+ # in the `legacy` retry mode.
233
+ #
234
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
235
+ #
236
+ # @option options [Integer] :retry_limit (3)
237
+ # The maximum number of times to retry failed requests. Only
238
+ # ~ 500 level server errors and certain ~ 400 level client errors
239
+ # are retried. Generally, these are throttling errors, data
240
+ # checksum errors, networking errors, timeout errors, auth errors,
241
+ # endpoint discovery, and errors from expired credentials.
242
+ # This option is only used in the `legacy` retry mode.
243
+ #
244
+ # @option options [Integer] :retry_max_delay (0)
245
+ # The maximum number of seconds to delay between retries (0 for no limit)
246
+ # used by the default backoff function. This option is only used in the
247
+ # `legacy` retry mode.
248
+ #
249
+ # @option options [String] :retry_mode ("legacy")
250
+ # Specifies which retry algorithm to use. Values are:
251
+ #
252
+ # * `legacy` - The pre-existing retry behavior. This is default value if
253
+ # no retry mode is provided.
254
+ #
255
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
256
+ # This includes support for retry quotas, which limit the number of
257
+ # unsuccessful retries a client can make.
258
+ #
259
+ # * `adaptive` - An experimental retry mode that includes all the
260
+ # functionality of `standard` mode along with automatic client side
261
+ # throttling. This is a provisional mode that may change behavior
262
+ # in the future.
263
+ #
264
+ #
265
+ # @option options [String] :secret_access_key
266
+ #
267
+ # @option options [String] :session_token
268
+ #
269
+ # @option options [Boolean] :simple_json (false)
270
+ # Disables request parameter conversion, validation, and formatting.
271
+ # Also disable response data type conversions. This option is useful
272
+ # when you want to ensure the highest level of performance by
273
+ # avoiding overhead of walking request parameters and response data
274
+ # structures.
275
+ #
276
+ # When `:simple_json` is enabled, the request parameters hash must
277
+ # be formatted exactly as the DynamoDB API expects.
278
+ #
279
+ # @option options [Boolean] :stub_responses (false)
280
+ # Causes the client to return stubbed responses. By default
281
+ # fake responses are generated and returned. You can specify
282
+ # the response data to return or errors to raise by calling
283
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
284
+ #
285
+ # ** Please note ** When response stubbing is enabled, no HTTP
286
+ # requests are made, and retries are disabled.
287
+ #
288
+ # @option options [Boolean] :validate_params (true)
289
+ # When `true`, request parameters are validated before
290
+ # sending the request.
291
+ #
292
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
293
+ # requests through. Formatted like 'http://proxy.com:123'.
294
+ #
295
+ # @option options [Float] :http_open_timeout (15) The number of
296
+ # seconds to wait when opening a HTTP session before raising a
297
+ # `Timeout::Error`.
298
+ #
299
+ # @option options [Integer] :http_read_timeout (60) The default
300
+ # number of seconds to wait for response data. This value can
301
+ # safely be set per-request on the session.
302
+ #
303
+ # @option options [Float] :http_idle_timeout (5) The number of
304
+ # seconds a connection is allowed to sit idle before it is
305
+ # considered stale. Stale connections are closed and removed
306
+ # from the pool before making a request.
307
+ #
308
+ # @option options [Float] :http_continue_timeout (1) The number of
309
+ # seconds to wait for a 100-continue response before sending the
310
+ # request body. This option has no effect unless the request has
311
+ # "Expect" header set to "100-continue". Defaults to `nil` which
312
+ # disables this behaviour. This value can safely be set per
313
+ # request on the session.
314
+ #
315
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
316
+ # HTTP debug output will be sent to the `:logger`.
317
+ #
318
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
319
+ # SSL peer certificates are verified when establishing a
320
+ # connection.
321
+ #
322
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
323
+ # certificate authority bundle file that should be used when
324
+ # verifying peer certificates. If you do not pass
325
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
326
+ # will be used if available.
327
+ #
328
+ # @option options [String] :ssl_ca_directory Full path of the
329
+ # directory that contains the unbundled SSL certificate
330
+ # authority files for verifying peer certificates. If you do
331
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
332
+ # system default will be used if available.
333
+ #
334
+ def initialize(*args)
335
+ super
336
+ end
337
+
338
+ # @!group API Operations
339
+
340
+ # Cancels a running query. To be canceled, a query must be running.
341
+ #
342
+ # @option params [required, String] :id
343
+ # The identifier of the SQL statement to cancel. This value is a
344
+ # universally unique identifier (UUID) generated by Amazon Redshift Data
345
+ # API. This identifier is returned by `ExecuteStatment` and
346
+ # `ListStatements`.
347
+ #
348
+ # @return [Types::CancelStatementResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
349
+ #
350
+ # * {Types::CancelStatementResponse#status #status} => Boolean
351
+ #
352
+ # @example Request syntax with placeholder values
353
+ #
354
+ # resp = client.cancel_statement({
355
+ # id: "UUID", # required
356
+ # })
357
+ #
358
+ # @example Response structure
359
+ #
360
+ # resp.status #=> Boolean
361
+ #
362
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/CancelStatement AWS API Documentation
363
+ #
364
+ # @overload cancel_statement(params = {})
365
+ # @param [Hash] params ({})
366
+ def cancel_statement(params = {}, options = {})
367
+ req = build_request(:cancel_statement, params)
368
+ req.send_request(options)
369
+ end
370
+
371
+ # Describes the details about a specific instance when a query was run
372
+ # by the Amazon Redshift Data API. The information includes when the
373
+ # query started, when it finished, the query status, the number of rows
374
+ # returned, and the SQL statement.
375
+ #
376
+ # @option params [required, String] :id
377
+ # The identifier of the SQL statement to describe. This value is a
378
+ # universally unique identifier (UUID) generated by Amazon Redshift Data
379
+ # API. This identifier is returned by `ExecuteStatment` and
380
+ # `ListStatements`.
381
+ #
382
+ # @return [Types::DescribeStatementResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
383
+ #
384
+ # * {Types::DescribeStatementResponse#cluster_identifier #cluster_identifier} => String
385
+ # * {Types::DescribeStatementResponse#created_at #created_at} => Time
386
+ # * {Types::DescribeStatementResponse#database #database} => String
387
+ # * {Types::DescribeStatementResponse#db_user #db_user} => String
388
+ # * {Types::DescribeStatementResponse#duration #duration} => Integer
389
+ # * {Types::DescribeStatementResponse#error #error} => String
390
+ # * {Types::DescribeStatementResponse#id #id} => String
391
+ # * {Types::DescribeStatementResponse#query_string #query_string} => String
392
+ # * {Types::DescribeStatementResponse#redshift_pid #redshift_pid} => Integer
393
+ # * {Types::DescribeStatementResponse#redshift_query_id #redshift_query_id} => Integer
394
+ # * {Types::DescribeStatementResponse#result_rows #result_rows} => Integer
395
+ # * {Types::DescribeStatementResponse#result_size #result_size} => Integer
396
+ # * {Types::DescribeStatementResponse#secret_arn #secret_arn} => String
397
+ # * {Types::DescribeStatementResponse#status #status} => String
398
+ # * {Types::DescribeStatementResponse#updated_at #updated_at} => Time
399
+ #
400
+ # @example Request syntax with placeholder values
401
+ #
402
+ # resp = client.describe_statement({
403
+ # id: "UUID", # required
404
+ # })
405
+ #
406
+ # @example Response structure
407
+ #
408
+ # resp.cluster_identifier #=> String
409
+ # resp.created_at #=> Time
410
+ # resp.database #=> String
411
+ # resp.db_user #=> String
412
+ # resp.duration #=> Integer
413
+ # resp.error #=> String
414
+ # resp.id #=> String
415
+ # resp.query_string #=> String
416
+ # resp.redshift_pid #=> Integer
417
+ # resp.redshift_query_id #=> Integer
418
+ # resp.result_rows #=> Integer
419
+ # resp.result_size #=> Integer
420
+ # resp.secret_arn #=> String
421
+ # resp.status #=> String, one of "ABORTED", "ALL", "FAILED", "FINISHED", "PICKED", "STARTED", "SUBMITTED"
422
+ # resp.updated_at #=> Time
423
+ #
424
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeStatement AWS API Documentation
425
+ #
426
+ # @overload describe_statement(params = {})
427
+ # @param [Hash] params ({})
428
+ def describe_statement(params = {}, options = {})
429
+ req = build_request(:describe_statement, params)
430
+ req.send_request(options)
431
+ end
432
+
433
+ # Describes the detailed information about a table from metadata in the
434
+ # cluster. The information includes its columns. A token is returned to
435
+ # page through the column list. Depending on the authorization method,
436
+ # use one of the following combinations of request parameters:
437
+ #
438
+ # * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the
439
+ # secret and the cluster identifier that matches the cluster in the
440
+ # secret.
441
+ #
442
+ # * Temporary credentials - specify the cluster identifier, the database
443
+ # name, and the database user name. Permission to call the
444
+ # `redshift:GetClusterCredentials` operation is required to use this
445
+ # method.
446
+ #
447
+ # @option params [required, String] :cluster_identifier
448
+ # The cluster identifier. This parameter is required when authenticating
449
+ # using either AWS Secrets Manager or temporary credentials.
450
+ #
451
+ # @option params [String] :database
452
+ # The name of the database. This parameter is required when
453
+ # authenticating using temporary credentials.
454
+ #
455
+ # @option params [String] :db_user
456
+ # The database user name. This parameter is required when authenticating
457
+ # using temporary credentials.
458
+ #
459
+ # @option params [Integer] :max_results
460
+ # The maximum number of tables to return in the response. If more tables
461
+ # exist than fit in one response, then `NextToken` is returned to page
462
+ # through the results.
463
+ #
464
+ # @option params [String] :next_token
465
+ # A value that indicates the starting point for the next set of response
466
+ # records in a subsequent request. If a value is returned in a response,
467
+ # you can retrieve the next set of records by providing this returned
468
+ # NextToken value in the next NextToken parameter and retrying the
469
+ # command. If the NextToken field is empty, all response records have
470
+ # been retrieved for the request.
471
+ #
472
+ # @option params [String] :schema
473
+ # The schema that contains the table. If no schema is specified, then
474
+ # matching tables for all schemas are returned.
475
+ #
476
+ # @option params [String] :secret_arn
477
+ # The name or ARN of the secret that enables access to the database.
478
+ # This parameter is required when authenticating using AWS Secrets
479
+ # Manager.
480
+ #
481
+ # @option params [String] :table
482
+ # The table name. If no table is specified, then all tables for all
483
+ # matching schemas are returned. If no table and no schema is specified,
484
+ # then all tables for all schemas in the database are returned
485
+ #
486
+ # @return [Types::DescribeTableResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
487
+ #
488
+ # * {Types::DescribeTableResponse#column_list #column_list} => Array&lt;Types::ColumnMetadata&gt;
489
+ # * {Types::DescribeTableResponse#next_token #next_token} => String
490
+ # * {Types::DescribeTableResponse#table_name #table_name} => String
491
+ #
492
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
493
+ #
494
+ # @example Request syntax with placeholder values
495
+ #
496
+ # resp = client.describe_table({
497
+ # cluster_identifier: "Location", # required
498
+ # database: "String",
499
+ # db_user: "String",
500
+ # max_results: 1,
501
+ # next_token: "String",
502
+ # schema: "String",
503
+ # secret_arn: "SecretArn",
504
+ # table: "String",
505
+ # })
506
+ #
507
+ # @example Response structure
508
+ #
509
+ # resp.column_list #=> Array
510
+ # resp.column_list[0].column_default #=> String
511
+ # resp.column_list[0].is_case_sensitive #=> Boolean
512
+ # resp.column_list[0].is_currency #=> Boolean
513
+ # resp.column_list[0].is_signed #=> Boolean
514
+ # resp.column_list[0].label #=> String
515
+ # resp.column_list[0].length #=> Integer
516
+ # resp.column_list[0].name #=> String
517
+ # resp.column_list[0].nullable #=> Integer
518
+ # resp.column_list[0].precision #=> Integer
519
+ # resp.column_list[0].scale #=> Integer
520
+ # resp.column_list[0].schema_name #=> String
521
+ # resp.column_list[0].table_name #=> String
522
+ # resp.column_list[0].type_name #=> String
523
+ # resp.next_token #=> String
524
+ # resp.table_name #=> String
525
+ #
526
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/DescribeTable AWS API Documentation
527
+ #
528
+ # @overload describe_table(params = {})
529
+ # @param [Hash] params ({})
530
+ def describe_table(params = {}, options = {})
531
+ req = build_request(:describe_table, params)
532
+ req.send_request(options)
533
+ end
534
+
535
+ # Runs an SQL statement, which can be data manipulation language (DML)
536
+ # or data definition language (DDL). This statement must be a single SQL
537
+ # statement. Depending on the authorization method, use one of the
538
+ # following combinations of request parameters:
539
+ #
540
+ # * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the
541
+ # secret and the cluster identifier that matches the cluster in the
542
+ # secret.
543
+ #
544
+ # * Temporary credentials - specify the cluster identifier, the database
545
+ # name, and the database user name. Permission to call the
546
+ # `redshift:GetClusterCredentials` operation is required to use this
547
+ # method.
548
+ #
549
+ # @option params [required, String] :cluster_identifier
550
+ # The cluster identifier. This parameter is required when authenticating
551
+ # using either AWS Secrets Manager or temporary credentials.
552
+ #
553
+ # @option params [String] :database
554
+ # The name of the database. This parameter is required when
555
+ # authenticating using temporary credentials.
556
+ #
557
+ # @option params [String] :db_user
558
+ # The database user name. This parameter is required when authenticating
559
+ # using temporary credentials.
560
+ #
561
+ # @option params [String] :secret_arn
562
+ # The name or ARN of the secret that enables access to the database.
563
+ # This parameter is required when authenticating using AWS Secrets
564
+ # Manager.
565
+ #
566
+ # @option params [required, String] :sql
567
+ # The SQL statement text to run.
568
+ #
569
+ # @option params [String] :statement_name
570
+ # The name of the SQL statement. You can name the SQL statement when you
571
+ # create it to identify the query.
572
+ #
573
+ # @option params [Boolean] :with_event
574
+ # A value that indicates whether to send an event to the Amazon
575
+ # EventBridge event bus after the SQL statement runs.
576
+ #
577
+ # @return [Types::ExecuteStatementOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
578
+ #
579
+ # * {Types::ExecuteStatementOutput#cluster_identifier #cluster_identifier} => String
580
+ # * {Types::ExecuteStatementOutput#created_at #created_at} => Time
581
+ # * {Types::ExecuteStatementOutput#database #database} => String
582
+ # * {Types::ExecuteStatementOutput#db_user #db_user} => String
583
+ # * {Types::ExecuteStatementOutput#id #id} => String
584
+ # * {Types::ExecuteStatementOutput#secret_arn #secret_arn} => String
585
+ #
586
+ # @example Request syntax with placeholder values
587
+ #
588
+ # resp = client.execute_statement({
589
+ # cluster_identifier: "Location", # required
590
+ # database: "String",
591
+ # db_user: "String",
592
+ # secret_arn: "SecretArn",
593
+ # sql: "StatementString", # required
594
+ # statement_name: "StatementNameString",
595
+ # with_event: false,
596
+ # })
597
+ #
598
+ # @example Response structure
599
+ #
600
+ # resp.cluster_identifier #=> String
601
+ # resp.created_at #=> Time
602
+ # resp.database #=> String
603
+ # resp.db_user #=> String
604
+ # resp.id #=> String
605
+ # resp.secret_arn #=> String
606
+ #
607
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ExecuteStatement AWS API Documentation
608
+ #
609
+ # @overload execute_statement(params = {})
610
+ # @param [Hash] params ({})
611
+ def execute_statement(params = {}, options = {})
612
+ req = build_request(:execute_statement, params)
613
+ req.send_request(options)
614
+ end
615
+
616
+ # Fetches the temporarily cached result of an SQL statement. A token is
617
+ # returned to page through the statement results.
618
+ #
619
+ # @option params [required, String] :id
620
+ # The identifier of the SQL statement whose results are to be fetched.
621
+ # This value is a universally unique identifier (UUID) generated by
622
+ # Amazon Redshift Data API. This identifier is returned by
623
+ # `ExecuteStatment` and `ListStatements`.
624
+ #
625
+ # @option params [String] :next_token
626
+ # A value that indicates the starting point for the next set of response
627
+ # records in a subsequent request. If a value is returned in a response,
628
+ # you can retrieve the next set of records by providing this returned
629
+ # NextToken value in the next NextToken parameter and retrying the
630
+ # command. If the NextToken field is empty, all response records have
631
+ # been retrieved for the request.
632
+ #
633
+ # @return [Types::GetStatementResultResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
634
+ #
635
+ # * {Types::GetStatementResultResponse#column_metadata #column_metadata} => Array&lt;Types::ColumnMetadata&gt;
636
+ # * {Types::GetStatementResultResponse#next_token #next_token} => String
637
+ # * {Types::GetStatementResultResponse#records #records} => Array&lt;Array&lt;Types::Field&gt;&gt;
638
+ # * {Types::GetStatementResultResponse#total_num_rows #total_num_rows} => Integer
639
+ #
640
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
641
+ #
642
+ # @example Request syntax with placeholder values
643
+ #
644
+ # resp = client.get_statement_result({
645
+ # id: "UUID", # required
646
+ # next_token: "String",
647
+ # })
648
+ #
649
+ # @example Response structure
650
+ #
651
+ # resp.column_metadata #=> Array
652
+ # resp.column_metadata[0].column_default #=> String
653
+ # resp.column_metadata[0].is_case_sensitive #=> Boolean
654
+ # resp.column_metadata[0].is_currency #=> Boolean
655
+ # resp.column_metadata[0].is_signed #=> Boolean
656
+ # resp.column_metadata[0].label #=> String
657
+ # resp.column_metadata[0].length #=> Integer
658
+ # resp.column_metadata[0].name #=> String
659
+ # resp.column_metadata[0].nullable #=> Integer
660
+ # resp.column_metadata[0].precision #=> Integer
661
+ # resp.column_metadata[0].scale #=> Integer
662
+ # resp.column_metadata[0].schema_name #=> String
663
+ # resp.column_metadata[0].table_name #=> String
664
+ # resp.column_metadata[0].type_name #=> String
665
+ # resp.next_token #=> String
666
+ # resp.records #=> Array
667
+ # resp.records[0] #=> Array
668
+ # resp.records[0][0].blob_value #=> String
669
+ # resp.records[0][0].boolean_value #=> Boolean
670
+ # resp.records[0][0].double_value #=> Float
671
+ # resp.records[0][0].is_null #=> Boolean
672
+ # resp.records[0][0].long_value #=> Integer
673
+ # resp.records[0][0].string_value #=> String
674
+ # resp.total_num_rows #=> Integer
675
+ #
676
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/GetStatementResult AWS API Documentation
677
+ #
678
+ # @overload get_statement_result(params = {})
679
+ # @param [Hash] params ({})
680
+ def get_statement_result(params = {}, options = {})
681
+ req = build_request(:get_statement_result, params)
682
+ req.send_request(options)
683
+ end
684
+
685
+ # List the databases in a cluster. A token is returned to page through
686
+ # the database list. Depending on the authorization method, use one of
687
+ # the following combinations of request parameters:
688
+ #
689
+ # * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the
690
+ # secret and the cluster identifier that matches the cluster in the
691
+ # secret.
692
+ #
693
+ # * Temporary credentials - specify the cluster identifier, the database
694
+ # name, and the database user name. Permission to call the
695
+ # `redshift:GetClusterCredentials` operation is required to use this
696
+ # method.
697
+ #
698
+ # @option params [required, String] :cluster_identifier
699
+ # The cluster identifier. This parameter is required when authenticating
700
+ # using either AWS Secrets Manager or temporary credentials.
701
+ #
702
+ # @option params [String] :database
703
+ # The name of the database. This parameter is required when
704
+ # authenticating using temporary credentials.
705
+ #
706
+ # @option params [String] :db_user
707
+ # The database user name. This parameter is required when authenticating
708
+ # using temporary credentials.
709
+ #
710
+ # @option params [Integer] :max_results
711
+ # The maximum number of databases to return in the response. If more
712
+ # databases exist than fit in one response, then `NextToken` is returned
713
+ # to page through the results.
714
+ #
715
+ # @option params [String] :next_token
716
+ # A value that indicates the starting point for the next set of response
717
+ # records in a subsequent request. If a value is returned in a response,
718
+ # you can retrieve the next set of records by providing this returned
719
+ # NextToken value in the next NextToken parameter and retrying the
720
+ # command. If the NextToken field is empty, all response records have
721
+ # been retrieved for the request.
722
+ #
723
+ # @option params [String] :secret_arn
724
+ # The name or ARN of the secret that enables access to the database.
725
+ # This parameter is required when authenticating using AWS Secrets
726
+ # Manager.
727
+ #
728
+ # @return [Types::ListDatabasesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
729
+ #
730
+ # * {Types::ListDatabasesResponse#databases #databases} => Array&lt;String&gt;
731
+ # * {Types::ListDatabasesResponse#next_token #next_token} => String
732
+ #
733
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
734
+ #
735
+ # @example Request syntax with placeholder values
736
+ #
737
+ # resp = client.list_databases({
738
+ # cluster_identifier: "Location", # required
739
+ # database: "String",
740
+ # db_user: "String",
741
+ # max_results: 1,
742
+ # next_token: "String",
743
+ # secret_arn: "SecretArn",
744
+ # })
745
+ #
746
+ # @example Response structure
747
+ #
748
+ # resp.databases #=> Array
749
+ # resp.databases[0] #=> String
750
+ # resp.next_token #=> String
751
+ #
752
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListDatabases AWS API Documentation
753
+ #
754
+ # @overload list_databases(params = {})
755
+ # @param [Hash] params ({})
756
+ def list_databases(params = {}, options = {})
757
+ req = build_request(:list_databases, params)
758
+ req.send_request(options)
759
+ end
760
+
761
+ # Lists the schemas in a database. A token is returned to page through
762
+ # the schema list. Depending on the authorization method, use one of the
763
+ # following combinations of request parameters:
764
+ #
765
+ # * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the
766
+ # secret and the cluster identifier that matches the cluster in the
767
+ # secret.
768
+ #
769
+ # * Temporary credentials - specify the cluster identifier, the database
770
+ # name, and the database user name. Permission to call the
771
+ # `redshift:GetClusterCredentials` operation is required to use this
772
+ # method.
773
+ #
774
+ # @option params [required, String] :cluster_identifier
775
+ # The cluster identifier. This parameter is required when authenticating
776
+ # using either AWS Secrets Manager or temporary credentials.
777
+ #
778
+ # @option params [required, String] :database
779
+ # The name of the database. This parameter is required when
780
+ # authenticating using temporary credentials.
781
+ #
782
+ # @option params [String] :db_user
783
+ # The database user name. This parameter is required when authenticating
784
+ # using temporary credentials.
785
+ #
786
+ # @option params [Integer] :max_results
787
+ # The maximum number of schemas to return in the response. If more
788
+ # schemas exist than fit in one response, then `NextToken` is returned
789
+ # to page through the results.
790
+ #
791
+ # @option params [String] :next_token
792
+ # A value that indicates the starting point for the next set of response
793
+ # records in a subsequent request. If a value is returned in a response,
794
+ # you can retrieve the next set of records by providing this returned
795
+ # NextToken value in the next NextToken parameter and retrying the
796
+ # command. If the NextToken field is empty, all response records have
797
+ # been retrieved for the request.
798
+ #
799
+ # @option params [String] :schema_pattern
800
+ # A pattern to filter results by schema name. Within a schema pattern,
801
+ # "%" means match any substring of 0 or more characters and "\_"
802
+ # means match any one character. Only schema name entries matching the
803
+ # search pattern are returned.
804
+ #
805
+ # @option params [String] :secret_arn
806
+ # The name or ARN of the secret that enables access to the database.
807
+ # This parameter is required when authenticating using AWS Secrets
808
+ # Manager.
809
+ #
810
+ # @return [Types::ListSchemasResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
811
+ #
812
+ # * {Types::ListSchemasResponse#next_token #next_token} => String
813
+ # * {Types::ListSchemasResponse#schemas #schemas} => Array&lt;String&gt;
814
+ #
815
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
816
+ #
817
+ # @example Request syntax with placeholder values
818
+ #
819
+ # resp = client.list_schemas({
820
+ # cluster_identifier: "Location", # required
821
+ # database: "String", # required
822
+ # db_user: "String",
823
+ # max_results: 1,
824
+ # next_token: "String",
825
+ # schema_pattern: "String",
826
+ # secret_arn: "SecretArn",
827
+ # })
828
+ #
829
+ # @example Response structure
830
+ #
831
+ # resp.next_token #=> String
832
+ # resp.schemas #=> Array
833
+ # resp.schemas[0] #=> String
834
+ #
835
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListSchemas AWS API Documentation
836
+ #
837
+ # @overload list_schemas(params = {})
838
+ # @param [Hash] params ({})
839
+ def list_schemas(params = {}, options = {})
840
+ req = build_request(:list_schemas, params)
841
+ req.send_request(options)
842
+ end
843
+
844
+ # List of SQL statements. By default, only finished statements are
845
+ # shown. A token is returned to page through the statement list.
846
+ #
847
+ # @option params [Integer] :max_results
848
+ # The maximum number of SQL statements to return in the response. If
849
+ # more SQL statements exist than fit in one response, then `NextToken`
850
+ # is returned to page through the results.
851
+ #
852
+ # @option params [String] :next_token
853
+ # A value that indicates the starting point for the next set of response
854
+ # records in a subsequent request. If a value is returned in a response,
855
+ # you can retrieve the next set of records by providing this returned
856
+ # NextToken value in the next NextToken parameter and retrying the
857
+ # command. If the NextToken field is empty, all response records have
858
+ # been retrieved for the request.
859
+ #
860
+ # @option params [String] :statement_name
861
+ # The name of the SQL statement specified as input to `ExecuteStatement`
862
+ # to identify the query. You can list multiple statements by providing a
863
+ # prefix that matches the beginning of the statement name. For example,
864
+ # to list myStatement1, myStatement2, myStatement3, and so on, then
865
+ # provide the a value of `myStatement`. Data API does a case-sensitive
866
+ # match of SQL statement names to the prefix value you provide.
867
+ #
868
+ # @option params [String] :status
869
+ # The status of the SQL statement to list. Status values are defined as
870
+ # follows:
871
+ #
872
+ # * ABORTED - The query run was stopped by the user.
873
+ #
874
+ # * ALL - A status value that includes all query statuses. This value
875
+ # can be used to filter results.
876
+ #
877
+ # * FAILED - The query run failed.
878
+ #
879
+ # * FINISHED - The query has finished running.
880
+ #
881
+ # * PICKED - The query has been chosen to be run.
882
+ #
883
+ # * STARTED - The query run has started.
884
+ #
885
+ # * SUBMITTED - The query was submitted, but not yet processed.
886
+ #
887
+ # @return [Types::ListStatementsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
888
+ #
889
+ # * {Types::ListStatementsResponse#next_token #next_token} => String
890
+ # * {Types::ListStatementsResponse#statements #statements} => Array&lt;Types::StatementData&gt;
891
+ #
892
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
893
+ #
894
+ # @example Request syntax with placeholder values
895
+ #
896
+ # resp = client.list_statements({
897
+ # max_results: 1,
898
+ # next_token: "String",
899
+ # statement_name: "StatementNameString",
900
+ # status: "ABORTED", # accepts ABORTED, ALL, FAILED, FINISHED, PICKED, STARTED, SUBMITTED
901
+ # })
902
+ #
903
+ # @example Response structure
904
+ #
905
+ # resp.next_token #=> String
906
+ # resp.statements #=> Array
907
+ # resp.statements[0].created_at #=> Time
908
+ # resp.statements[0].id #=> String
909
+ # resp.statements[0].query_string #=> String
910
+ # resp.statements[0].secret_arn #=> String
911
+ # resp.statements[0].statement_name #=> String
912
+ # resp.statements[0].status #=> String, one of "ABORTED", "ALL", "FAILED", "FINISHED", "PICKED", "STARTED", "SUBMITTED"
913
+ # resp.statements[0].updated_at #=> Time
914
+ #
915
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListStatements AWS API Documentation
916
+ #
917
+ # @overload list_statements(params = {})
918
+ # @param [Hash] params ({})
919
+ def list_statements(params = {}, options = {})
920
+ req = build_request(:list_statements, params)
921
+ req.send_request(options)
922
+ end
923
+
924
+ # List the tables in a database. If neither `SchemaPattern` nor
925
+ # `TablePattern` are specified, then all tables in the database are
926
+ # returned. A token is returned to page through the table list.
927
+ # Depending on the authorization method, use one of the following
928
+ # combinations of request parameters:
929
+ #
930
+ # * AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the
931
+ # secret and the cluster identifier that matches the cluster in the
932
+ # secret.
933
+ #
934
+ # * Temporary credentials - specify the cluster identifier, the database
935
+ # name, and the database user name. Permission to call the
936
+ # `redshift:GetClusterCredentials` operation is required to use this
937
+ # method.
938
+ #
939
+ # @option params [required, String] :cluster_identifier
940
+ # The cluster identifier. This parameter is required when authenticating
941
+ # using either AWS Secrets Manager or temporary credentials.
942
+ #
943
+ # @option params [required, String] :database
944
+ # The name of the database. This parameter is required when
945
+ # authenticating using temporary credentials.
946
+ #
947
+ # @option params [String] :db_user
948
+ # The database user name. This parameter is required when authenticating
949
+ # using temporary credentials.
950
+ #
951
+ # @option params [Integer] :max_results
952
+ # The maximum number of tables to return in the response. If more tables
953
+ # exist than fit in one response, then `NextToken` is returned to page
954
+ # through the results.
955
+ #
956
+ # @option params [String] :next_token
957
+ # A value that indicates the starting point for the next set of response
958
+ # records in a subsequent request. If a value is returned in a response,
959
+ # you can retrieve the next set of records by providing this returned
960
+ # NextToken value in the next NextToken parameter and retrying the
961
+ # command. If the NextToken field is empty, all response records have
962
+ # been retrieved for the request.
963
+ #
964
+ # @option params [String] :schema_pattern
965
+ # A pattern to filter results by schema name. Within a schema pattern,
966
+ # "%" means match any substring of 0 or more characters and "\_"
967
+ # means match any one character. Only schema name entries matching the
968
+ # search pattern are returned. If `SchemaPattern` is not specified, then
969
+ # all tables that match `TablePattern` are returned. If neither
970
+ # `SchemaPattern` or `TablePattern` are specified, then all tables are
971
+ # returned.
972
+ #
973
+ # @option params [String] :secret_arn
974
+ # The name or ARN of the secret that enables access to the database.
975
+ # This parameter is required when authenticating using AWS Secrets
976
+ # Manager.
977
+ #
978
+ # @option params [String] :table_pattern
979
+ # A pattern to filter results by table name. Within a table pattern,
980
+ # "%" means match any substring of 0 or more characters and "\_"
981
+ # means match any one character. Only table name entries matching the
982
+ # search pattern are returned. If `TablePattern` is not specified, then
983
+ # all tables that match `SchemaPattern`are returned. If neither
984
+ # `SchemaPattern` or `TablePattern` are specified, then all tables are
985
+ # returned.
986
+ #
987
+ # @return [Types::ListTablesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
988
+ #
989
+ # * {Types::ListTablesResponse#next_token #next_token} => String
990
+ # * {Types::ListTablesResponse#tables #tables} => Array&lt;Types::TableMember&gt;
991
+ #
992
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
993
+ #
994
+ # @example Request syntax with placeholder values
995
+ #
996
+ # resp = client.list_tables({
997
+ # cluster_identifier: "Location", # required
998
+ # database: "String", # required
999
+ # db_user: "String",
1000
+ # max_results: 1,
1001
+ # next_token: "String",
1002
+ # schema_pattern: "String",
1003
+ # secret_arn: "SecretArn",
1004
+ # table_pattern: "String",
1005
+ # })
1006
+ #
1007
+ # @example Response structure
1008
+ #
1009
+ # resp.next_token #=> String
1010
+ # resp.tables #=> Array
1011
+ # resp.tables[0].name #=> String
1012
+ # resp.tables[0].schema #=> String
1013
+ # resp.tables[0].type #=> String
1014
+ #
1015
+ # @see http://docs.aws.amazon.com/goto/WebAPI/redshift-data-2019-12-20/ListTables AWS API Documentation
1016
+ #
1017
+ # @overload list_tables(params = {})
1018
+ # @param [Hash] params ({})
1019
+ def list_tables(params = {}, options = {})
1020
+ req = build_request(:list_tables, params)
1021
+ req.send_request(options)
1022
+ end
1023
+
1024
+ # @!endgroup
1025
+
1026
+ # @param params ({})
1027
+ # @api private
1028
+ def build_request(operation_name, params = {})
1029
+ handlers = @handlers.for(operation_name)
1030
+ context = Seahorse::Client::RequestContext.new(
1031
+ operation_name: operation_name,
1032
+ operation: config.api.operation(operation_name),
1033
+ client: self,
1034
+ params: params,
1035
+ config: config)
1036
+ context[:gem_name] = 'aws-sdk-redshiftdataapiservice'
1037
+ context[:gem_version] = '1.0.0'
1038
+ Seahorse::Client::Request.new(handlers, context)
1039
+ end
1040
+
1041
+ # @api private
1042
+ # @deprecated
1043
+ def waiter_names
1044
+ []
1045
+ end
1046
+
1047
+ class << self
1048
+
1049
+ # @api private
1050
+ attr_reader :identifier
1051
+
1052
+ # @api private
1053
+ def errors_module
1054
+ Errors
1055
+ end
1056
+
1057
+ end
1058
+ end
1059
+ end