aws-sdk-dsql 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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +9 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-dsql/client.rb +1143 -0
- data/lib/aws-sdk-dsql/client_api.rb +377 -0
- data/lib/aws-sdk-dsql/customizations/auth_token_generator.rb +70 -0
- data/lib/aws-sdk-dsql/customizations.rb +3 -0
- data/lib/aws-sdk-dsql/endpoint_parameters.rb +59 -0
- data/lib/aws-sdk-dsql/endpoint_provider.rb +35 -0
- data/lib/aws-sdk-dsql/endpoints.rb +20 -0
- data/lib/aws-sdk-dsql/errors.rb +232 -0
- data/lib/aws-sdk-dsql/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-dsql/resource.rb +26 -0
- data/lib/aws-sdk-dsql/types.rb +682 -0
- data/lib/aws-sdk-dsql/waiters.rb +150 -0
- data/lib/aws-sdk-dsql.rb +62 -0
- data/sig/client.rbs +214 -0
- data/sig/errors.rbs +51 -0
- data/sig/resource.rbs +82 -0
- data/sig/types.rbs +196 -0
- data/sig/waiters.rbs +33 -0
- metadata +101 -0
@@ -0,0 +1,1143 @@
|
|
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/version-3/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/invocation_id.rb'
|
26
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
27
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
28
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
29
|
+
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
30
|
+
require 'aws-sdk-core/plugins/http_checksum.rb'
|
31
|
+
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
32
|
+
require 'aws-sdk-core/plugins/request_compression.rb'
|
33
|
+
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
34
|
+
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
35
|
+
require 'aws-sdk-core/plugins/telemetry.rb'
|
36
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
37
|
+
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
38
|
+
|
39
|
+
module Aws::DSQL
|
40
|
+
# An API client for DSQL. To construct a client, you need to configure a `:region` and `:credentials`.
|
41
|
+
#
|
42
|
+
# client = Aws::DSQL::Client.new(
|
43
|
+
# region: region_name,
|
44
|
+
# credentials: credentials,
|
45
|
+
# # ...
|
46
|
+
# )
|
47
|
+
#
|
48
|
+
# For details on configuring region and credentials see
|
49
|
+
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
50
|
+
#
|
51
|
+
# See {#initialize} for a full list of supported configuration options.
|
52
|
+
class Client < Seahorse::Client::Base
|
53
|
+
|
54
|
+
include Aws::ClientStubs
|
55
|
+
|
56
|
+
@identifier = :dsql
|
57
|
+
|
58
|
+
set_api(ClientApi::API)
|
59
|
+
|
60
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
61
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
62
|
+
add_plugin(Aws::Plugins::Logging)
|
63
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
64
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
65
|
+
add_plugin(Aws::Plugins::UserAgent)
|
66
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
67
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
68
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
69
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
70
|
+
add_plugin(Aws::Plugins::EndpointDiscovery)
|
71
|
+
add_plugin(Aws::Plugins::EndpointPattern)
|
72
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
73
|
+
add_plugin(Aws::Plugins::StubResponses)
|
74
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
75
|
+
add_plugin(Aws::Plugins::InvocationId)
|
76
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
77
|
+
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
78
|
+
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
79
|
+
add_plugin(Aws::Plugins::TransferEncoding)
|
80
|
+
add_plugin(Aws::Plugins::HttpChecksum)
|
81
|
+
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
82
|
+
add_plugin(Aws::Plugins::RequestCompression)
|
83
|
+
add_plugin(Aws::Plugins::DefaultsMode)
|
84
|
+
add_plugin(Aws::Plugins::RecursionDetection)
|
85
|
+
add_plugin(Aws::Plugins::Telemetry)
|
86
|
+
add_plugin(Aws::Plugins::Sign)
|
87
|
+
add_plugin(Aws::Plugins::Protocols::RestJson)
|
88
|
+
add_plugin(Aws::DSQL::Plugins::Endpoints)
|
89
|
+
|
90
|
+
# @overload initialize(options)
|
91
|
+
# @param [Hash] options
|
92
|
+
#
|
93
|
+
# @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
|
94
|
+
# A list of plugins to apply to the client. Each plugin is either a
|
95
|
+
# class name or an instance of a plugin class.
|
96
|
+
#
|
97
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
98
|
+
# Your AWS credentials. This can be an instance of any one of the
|
99
|
+
# following classes:
|
100
|
+
#
|
101
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
102
|
+
# credentials.
|
103
|
+
#
|
104
|
+
# * `Aws::SharedCredentials` - Used for loading static credentials from a
|
105
|
+
# shared file, such as `~/.aws/config`.
|
106
|
+
#
|
107
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
108
|
+
#
|
109
|
+
# * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
|
110
|
+
# assume a role after providing credentials via the web.
|
111
|
+
#
|
112
|
+
# * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
|
113
|
+
# access token generated from `aws login`.
|
114
|
+
#
|
115
|
+
# * `Aws::ProcessCredentials` - Used for loading credentials from a
|
116
|
+
# process that outputs to stdout.
|
117
|
+
#
|
118
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
119
|
+
# from an EC2 IMDS on an EC2 instance.
|
120
|
+
#
|
121
|
+
# * `Aws::ECSCredentials` - Used for loading credentials from
|
122
|
+
# instances running in ECS.
|
123
|
+
#
|
124
|
+
# * `Aws::CognitoIdentityCredentials` - Used for loading credentials
|
125
|
+
# from the Cognito Identity service.
|
126
|
+
#
|
127
|
+
# When `:credentials` are not configured directly, the following
|
128
|
+
# locations will be searched for credentials:
|
129
|
+
#
|
130
|
+
# * `Aws.config[:credentials]`
|
131
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
132
|
+
# `:account_id` options.
|
133
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
|
134
|
+
# ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
|
135
|
+
# * `~/.aws/credentials`
|
136
|
+
# * `~/.aws/config`
|
137
|
+
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
138
|
+
# are very aggressive. Construct and pass an instance of
|
139
|
+
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
140
|
+
# enable retries and extended timeouts. Instance profile credential
|
141
|
+
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
142
|
+
# to true.
|
143
|
+
#
|
144
|
+
# @option options [required, String] :region
|
145
|
+
# The AWS region to connect to. The configured `:region` is
|
146
|
+
# used to determine the service `:endpoint`. When not passed,
|
147
|
+
# a default `:region` is searched for in the following locations:
|
148
|
+
#
|
149
|
+
# * `Aws.config[:region]`
|
150
|
+
# * `ENV['AWS_REGION']`
|
151
|
+
# * `ENV['AMAZON_REGION']`
|
152
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
153
|
+
# * `~/.aws/credentials`
|
154
|
+
# * `~/.aws/config`
|
155
|
+
#
|
156
|
+
# @option options [String] :access_key_id
|
157
|
+
#
|
158
|
+
# @option options [String] :account_id
|
159
|
+
#
|
160
|
+
# @option options [Boolean] :active_endpoint_cache (false)
|
161
|
+
# When set to `true`, a thread polling for endpoints will be running in
|
162
|
+
# the background every 60 secs (default). Defaults to `false`.
|
163
|
+
#
|
164
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
165
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
166
|
+
# until there is sufficent client side capacity to retry the request.
|
167
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
168
|
+
# not retry instead of sleeping.
|
169
|
+
#
|
170
|
+
# @option options [Boolean] :client_side_monitoring (false)
|
171
|
+
# When `true`, client-side metrics will be collected for all API requests from
|
172
|
+
# this client.
|
173
|
+
#
|
174
|
+
# @option options [String] :client_side_monitoring_client_id ("")
|
175
|
+
# Allows you to provide an identifier for this client which will be attached to
|
176
|
+
# all generated client side metrics. Defaults to an empty string.
|
177
|
+
#
|
178
|
+
# @option options [String] :client_side_monitoring_host ("127.0.0.1")
|
179
|
+
# Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
|
180
|
+
# side monitoring agent is running on, where client metrics will be published via UDP.
|
181
|
+
#
|
182
|
+
# @option options [Integer] :client_side_monitoring_port (31000)
|
183
|
+
# Required for publishing client metrics. The port that the client side monitoring
|
184
|
+
# agent is running on, where client metrics will be published via UDP.
|
185
|
+
#
|
186
|
+
# @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
|
187
|
+
# Allows you to provide a custom client-side monitoring publisher class. By default,
|
188
|
+
# will use the Client Side Monitoring Agent Publisher.
|
189
|
+
#
|
190
|
+
# @option options [Boolean] :convert_params (true)
|
191
|
+
# When `true`, an attempt is made to coerce request parameters into
|
192
|
+
# the required types.
|
193
|
+
#
|
194
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
195
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
196
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
197
|
+
#
|
198
|
+
# @option options [String] :defaults_mode ("legacy")
|
199
|
+
# See {Aws::DefaultsModeConfiguration} for a list of the
|
200
|
+
# accepted modes and the configuration defaults that are included.
|
201
|
+
#
|
202
|
+
# @option options [Boolean] :disable_host_prefix_injection (false)
|
203
|
+
# Set to true to disable SDK automatically adding host prefix
|
204
|
+
# to default service endpoint when available.
|
205
|
+
#
|
206
|
+
# @option options [Boolean] :disable_request_compression (false)
|
207
|
+
# When set to 'true' the request body will not be compressed
|
208
|
+
# for supported operations.
|
209
|
+
#
|
210
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
211
|
+
# Normally you should not configure the `:endpoint` option
|
212
|
+
# directly. This is normally constructed from the `:region`
|
213
|
+
# option. Configuring `:endpoint` is normally reserved for
|
214
|
+
# connecting to test or custom endpoints. The endpoint should
|
215
|
+
# be a URI formatted like:
|
216
|
+
#
|
217
|
+
# 'http://example.com'
|
218
|
+
# 'https://example.com'
|
219
|
+
# 'http://example.com:123'
|
220
|
+
#
|
221
|
+
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
222
|
+
# Used for the maximum size limit of the LRU cache storing endpoints data
|
223
|
+
# for endpoint discovery enabled operations. Defaults to 1000.
|
224
|
+
#
|
225
|
+
# @option options [Integer] :endpoint_cache_max_threads (10)
|
226
|
+
# Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
|
227
|
+
#
|
228
|
+
# @option options [Integer] :endpoint_cache_poll_interval (60)
|
229
|
+
# When :endpoint_discovery and :active_endpoint_cache is enabled,
|
230
|
+
# Use this option to config the time interval in seconds for making
|
231
|
+
# requests fetching endpoints information. Defaults to 60 sec.
|
232
|
+
#
|
233
|
+
# @option options [Boolean] :endpoint_discovery (false)
|
234
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
235
|
+
#
|
236
|
+
# @option options [Boolean] :ignore_configured_endpoint_urls
|
237
|
+
# Setting to true disables use of endpoint URLs provided via environment
|
238
|
+
# variables and the shared configuration file.
|
239
|
+
#
|
240
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
241
|
+
# The log formatter.
|
242
|
+
#
|
243
|
+
# @option options [Symbol] :log_level (:info)
|
244
|
+
# The log level to send messages to the `:logger` at.
|
245
|
+
#
|
246
|
+
# @option options [Logger] :logger
|
247
|
+
# The Logger instance to send log messages to. If this option
|
248
|
+
# is not set, logging will be disabled.
|
249
|
+
#
|
250
|
+
# @option options [Integer] :max_attempts (3)
|
251
|
+
# An integer representing the maximum number attempts that will be made for
|
252
|
+
# a single request, including the initial attempt. For example,
|
253
|
+
# setting this value to 5 will result in a request being retried up to
|
254
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
255
|
+
#
|
256
|
+
# @option options [String] :profile ("default")
|
257
|
+
# Used when loading credentials from the shared credentials file
|
258
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
259
|
+
#
|
260
|
+
# @option options [Integer] :request_min_compression_size_bytes (10240)
|
261
|
+
# The minimum size in bytes that triggers compression for request
|
262
|
+
# bodies. The value must be non-negative integer value between 0
|
263
|
+
# and 10485780 bytes inclusive.
|
264
|
+
#
|
265
|
+
# @option options [Proc] :retry_backoff
|
266
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
267
|
+
# This option is only used in the `legacy` retry mode.
|
268
|
+
#
|
269
|
+
# @option options [Float] :retry_base_delay (0.3)
|
270
|
+
# The base delay in seconds used by the default backoff function. This option
|
271
|
+
# is only used in the `legacy` retry mode.
|
272
|
+
#
|
273
|
+
# @option options [Symbol] :retry_jitter (:none)
|
274
|
+
# A delay randomiser function used by the default backoff function.
|
275
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
276
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
277
|
+
# in the `legacy` retry mode.
|
278
|
+
#
|
279
|
+
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
280
|
+
#
|
281
|
+
# @option options [Integer] :retry_limit (3)
|
282
|
+
# The maximum number of times to retry failed requests. Only
|
283
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
284
|
+
# are retried. Generally, these are throttling errors, data
|
285
|
+
# checksum errors, networking errors, timeout errors, auth errors,
|
286
|
+
# endpoint discovery, and errors from expired credentials.
|
287
|
+
# This option is only used in the `legacy` retry mode.
|
288
|
+
#
|
289
|
+
# @option options [Integer] :retry_max_delay (0)
|
290
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
291
|
+
# used by the default backoff function. This option is only used in the
|
292
|
+
# `legacy` retry mode.
|
293
|
+
#
|
294
|
+
# @option options [String] :retry_mode ("legacy")
|
295
|
+
# Specifies which retry algorithm to use. Values are:
|
296
|
+
#
|
297
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
298
|
+
# no retry mode is provided.
|
299
|
+
#
|
300
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
301
|
+
# This includes support for retry quotas, which limit the number of
|
302
|
+
# unsuccessful retries a client can make.
|
303
|
+
#
|
304
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
305
|
+
# functionality of `standard` mode along with automatic client side
|
306
|
+
# throttling. This is a provisional mode that may change behavior
|
307
|
+
# in the future.
|
308
|
+
#
|
309
|
+
# @option options [String] :sdk_ua_app_id
|
310
|
+
# A unique and opaque application ID that is appended to the
|
311
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
312
|
+
# maximum length of 50. This variable is sourced from environment
|
313
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
314
|
+
#
|
315
|
+
# @option options [String] :secret_access_key
|
316
|
+
#
|
317
|
+
# @option options [String] :session_token
|
318
|
+
#
|
319
|
+
# @option options [Array] :sigv4a_signing_region_set
|
320
|
+
# A list of regions that should be signed with SigV4a signing. When
|
321
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
322
|
+
# in the following locations:
|
323
|
+
#
|
324
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
325
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
326
|
+
# * `~/.aws/config`
|
327
|
+
#
|
328
|
+
# @option options [Boolean] :stub_responses (false)
|
329
|
+
# Causes the client to return stubbed responses. By default
|
330
|
+
# fake responses are generated and returned. You can specify
|
331
|
+
# the response data to return or errors to raise by calling
|
332
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
333
|
+
#
|
334
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
335
|
+
# requests are made, and retries are disabled.
|
336
|
+
#
|
337
|
+
# @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
|
338
|
+
# Allows you to provide a telemetry provider, which is used to
|
339
|
+
# emit telemetry data. By default, uses `NoOpTelemetryProvider` which
|
340
|
+
# will not record or emit any telemetry data. The SDK supports the
|
341
|
+
# following telemetry providers:
|
342
|
+
#
|
343
|
+
# * OpenTelemetry (OTel) - To use the OTel provider, install and require the
|
344
|
+
# `opentelemetry-sdk` gem and then, pass in an instance of a
|
345
|
+
# `Aws::Telemetry::OTelProvider` for telemetry provider.
|
346
|
+
#
|
347
|
+
# @option options [Aws::TokenProvider] :token_provider
|
348
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
349
|
+
# following classes:
|
350
|
+
#
|
351
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
352
|
+
# tokens.
|
353
|
+
#
|
354
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
355
|
+
# access token generated from `aws login`.
|
356
|
+
#
|
357
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
358
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
359
|
+
#
|
360
|
+
# @option options [Boolean] :use_dualstack_endpoint
|
361
|
+
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
362
|
+
# will be used if available.
|
363
|
+
#
|
364
|
+
# @option options [Boolean] :use_fips_endpoint
|
365
|
+
# When set to `true`, fips compatible endpoints will be used if available.
|
366
|
+
# When a `fips` region is used, the region is normalized and this config
|
367
|
+
# is set to `true`.
|
368
|
+
#
|
369
|
+
# @option options [Boolean] :validate_params (true)
|
370
|
+
# When `true`, request parameters are validated before
|
371
|
+
# sending the request.
|
372
|
+
#
|
373
|
+
# @option options [Aws::DSQL::EndpointProvider] :endpoint_provider
|
374
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
375
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
376
|
+
# `Aws::DSQL::EndpointParameters`.
|
377
|
+
#
|
378
|
+
# @option options [Float] :http_continue_timeout (1)
|
379
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
380
|
+
# request body. This option has no effect unless the request has "Expect"
|
381
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
382
|
+
# behaviour. This value can safely be set per request on the session.
|
383
|
+
#
|
384
|
+
# @option options [Float] :http_idle_timeout (5)
|
385
|
+
# The number of seconds a connection is allowed to sit idle before it
|
386
|
+
# is considered stale. Stale connections are closed and removed from the
|
387
|
+
# pool before making a request.
|
388
|
+
#
|
389
|
+
# @option options [Float] :http_open_timeout (15)
|
390
|
+
# The default number of seconds to wait for response data.
|
391
|
+
# This value can safely be set per-request on the session.
|
392
|
+
#
|
393
|
+
# @option options [URI::HTTP,String] :http_proxy
|
394
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
395
|
+
#
|
396
|
+
# @option options [Float] :http_read_timeout (60)
|
397
|
+
# The default number of seconds to wait for response data.
|
398
|
+
# This value can safely be set per-request on the session.
|
399
|
+
#
|
400
|
+
# @option options [Boolean] :http_wire_trace (false)
|
401
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
402
|
+
#
|
403
|
+
# @option options [Proc] :on_chunk_received
|
404
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
405
|
+
# of the response body is received. It provides three arguments: the chunk,
|
406
|
+
# the number of bytes received, and the total number of
|
407
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
408
|
+
#
|
409
|
+
# @option options [Proc] :on_chunk_sent
|
410
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
411
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
412
|
+
# the number of bytes read from the body, and the total number of
|
413
|
+
# bytes in the body.
|
414
|
+
#
|
415
|
+
# @option options [Boolean] :raise_response_errors (true)
|
416
|
+
# When `true`, response errors are raised.
|
417
|
+
#
|
418
|
+
# @option options [String] :ssl_ca_bundle
|
419
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
420
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
421
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
422
|
+
#
|
423
|
+
# @option options [String] :ssl_ca_directory
|
424
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
425
|
+
# authority files for verifying peer certificates. If you do
|
426
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
427
|
+
# default will be used if available.
|
428
|
+
#
|
429
|
+
# @option options [String] :ssl_ca_store
|
430
|
+
# Sets the X509::Store to verify peer certificate.
|
431
|
+
#
|
432
|
+
# @option options [OpenSSL::X509::Certificate] :ssl_cert
|
433
|
+
# Sets a client certificate when creating http connections.
|
434
|
+
#
|
435
|
+
# @option options [OpenSSL::PKey] :ssl_key
|
436
|
+
# Sets a client key when creating http connections.
|
437
|
+
#
|
438
|
+
# @option options [Float] :ssl_timeout
|
439
|
+
# Sets the SSL timeout in seconds
|
440
|
+
#
|
441
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
442
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
443
|
+
#
|
444
|
+
def initialize(*args)
|
445
|
+
super
|
446
|
+
end
|
447
|
+
|
448
|
+
# @!group API Operations
|
449
|
+
|
450
|
+
# Creates a cluster in Amazon Aurora DSQL.
|
451
|
+
#
|
452
|
+
# @option params [Boolean] :deletion_protection_enabled
|
453
|
+
# If enabled, you can't delete your cluster. You must first disable
|
454
|
+
# this property before you can delete your cluster.
|
455
|
+
#
|
456
|
+
# @option params [Hash<String,String>] :tags
|
457
|
+
# A map of key and value pairs to use to tag your cluster.
|
458
|
+
#
|
459
|
+
# @option params [String] :client_token
|
460
|
+
# A unique, case-sensitive identifier that you provide to ensure the
|
461
|
+
# idempotency of the request. Idempotency ensures that an API request
|
462
|
+
# completes only once. With an idempotent request, if the original
|
463
|
+
# request completes successfully, the subsequent retries with the same
|
464
|
+
# client token return the result from the original successful request
|
465
|
+
# and they have no additional effect.
|
466
|
+
#
|
467
|
+
# If you don't specify a client token, the Amazon Web Services SDK
|
468
|
+
# automatically generates one.
|
469
|
+
#
|
470
|
+
# **A suitable default value is auto-generated.** You should normally
|
471
|
+
# not need to pass this option.**
|
472
|
+
#
|
473
|
+
# @return [Types::CreateClusterOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
474
|
+
#
|
475
|
+
# * {Types::CreateClusterOutput#identifier #identifier} => String
|
476
|
+
# * {Types::CreateClusterOutput#arn #arn} => String
|
477
|
+
# * {Types::CreateClusterOutput#status #status} => String
|
478
|
+
# * {Types::CreateClusterOutput#creation_time #creation_time} => Time
|
479
|
+
# * {Types::CreateClusterOutput#deletion_protection_enabled #deletion_protection_enabled} => Boolean
|
480
|
+
#
|
481
|
+
#
|
482
|
+
# @example Example: Create Cluster
|
483
|
+
#
|
484
|
+
# resp = client.create_cluster({
|
485
|
+
# deletion_protection_enabled: false,
|
486
|
+
# tags: {
|
487
|
+
# "MyKey" => "MyValue",
|
488
|
+
# },
|
489
|
+
# })
|
490
|
+
#
|
491
|
+
# @example Request syntax with placeholder values
|
492
|
+
#
|
493
|
+
# resp = client.create_cluster({
|
494
|
+
# deletion_protection_enabled: false,
|
495
|
+
# tags: {
|
496
|
+
# "TagKey" => "TagValue",
|
497
|
+
# },
|
498
|
+
# client_token: "ClientToken",
|
499
|
+
# })
|
500
|
+
#
|
501
|
+
# @example Response structure
|
502
|
+
#
|
503
|
+
# resp.identifier #=> String
|
504
|
+
# resp.arn #=> String
|
505
|
+
# resp.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
|
506
|
+
# resp.creation_time #=> Time
|
507
|
+
# resp.deletion_protection_enabled #=> Boolean
|
508
|
+
#
|
509
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/dsql-2018-05-10/CreateCluster AWS API Documentation
|
510
|
+
#
|
511
|
+
# @overload create_cluster(params = {})
|
512
|
+
# @param [Hash] params ({})
|
513
|
+
def create_cluster(params = {}, options = {})
|
514
|
+
req = build_request(:create_cluster, params)
|
515
|
+
req.send_request(options)
|
516
|
+
end
|
517
|
+
|
518
|
+
# Creates multi-Region clusters in Amazon Aurora DSQL. Multi-Region
|
519
|
+
# clusters require a linked Region list, which is an array of the
|
520
|
+
# Regions in which you want to create linked clusters. Multi-Region
|
521
|
+
# clusters require a witness Region, which participates in quorum in
|
522
|
+
# failure scenarios.
|
523
|
+
#
|
524
|
+
# @option params [required, Array<String>] :linked_region_list
|
525
|
+
# An array of the Regions in which you want to create additional
|
526
|
+
# clusters.
|
527
|
+
#
|
528
|
+
# @option params [Hash<String,Types::LinkedClusterProperties>] :cluster_properties
|
529
|
+
# A mapping of properties to use when creating linked clusters.
|
530
|
+
#
|
531
|
+
# @option params [required, String] :witness_region
|
532
|
+
# The witness Region of multi-Region clusters.
|
533
|
+
#
|
534
|
+
# @option params [String] :client_token
|
535
|
+
# A unique, case-sensitive identifier that you provide to ensure the
|
536
|
+
# idempotency of the request. Idempotency ensures that an API request
|
537
|
+
# completes only once. With an idempotent request, if the original
|
538
|
+
# request completes successfully. The subsequent retries with the same
|
539
|
+
# client token return the result from the original successful request
|
540
|
+
# and they have no additional effect.
|
541
|
+
#
|
542
|
+
# If you don't specify a client token, the Amazon Web Services SDK
|
543
|
+
# automatically generates one.
|
544
|
+
#
|
545
|
+
# **A suitable default value is auto-generated.** You should normally
|
546
|
+
# not need to pass this option.**
|
547
|
+
#
|
548
|
+
# @return [Types::CreateMultiRegionClustersOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
549
|
+
#
|
550
|
+
# * {Types::CreateMultiRegionClustersOutput#linked_cluster_arns #linked_cluster_arns} => Array<String>
|
551
|
+
#
|
552
|
+
#
|
553
|
+
# @example Example: Create Multi Region Clusters
|
554
|
+
#
|
555
|
+
# resp = client.create_multi_region_clusters({
|
556
|
+
# linked_region_list: [
|
557
|
+
# "us-east-1",
|
558
|
+
# "us-east-2",
|
559
|
+
# ],
|
560
|
+
# witness_region: "us-west-2",
|
561
|
+
# })
|
562
|
+
#
|
563
|
+
# resp.to_h outputs the following:
|
564
|
+
# {
|
565
|
+
# linked_cluster_arns: [
|
566
|
+
# "arn:aws:xanadu:us-east-1:111122223333:cluster/abcdefghijklmnopqrst12345",
|
567
|
+
# "arn:aws:xanadu:us-east-2:111122223333:cluster/klmnopqrstuvwxyzabcd54321",
|
568
|
+
# ],
|
569
|
+
# }
|
570
|
+
#
|
571
|
+
# @example Request syntax with placeholder values
|
572
|
+
#
|
573
|
+
# resp = client.create_multi_region_clusters({
|
574
|
+
# linked_region_list: ["Region"], # required
|
575
|
+
# cluster_properties: {
|
576
|
+
# "Region" => {
|
577
|
+
# deletion_protection_enabled: false,
|
578
|
+
# tags: {
|
579
|
+
# "TagKey" => "TagValue",
|
580
|
+
# },
|
581
|
+
# },
|
582
|
+
# },
|
583
|
+
# witness_region: "Region", # required
|
584
|
+
# client_token: "ClientToken",
|
585
|
+
# })
|
586
|
+
#
|
587
|
+
# @example Response structure
|
588
|
+
#
|
589
|
+
# resp.linked_cluster_arns #=> Array
|
590
|
+
# resp.linked_cluster_arns[0] #=> String
|
591
|
+
#
|
592
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/dsql-2018-05-10/CreateMultiRegionClusters AWS API Documentation
|
593
|
+
#
|
594
|
+
# @overload create_multi_region_clusters(params = {})
|
595
|
+
# @param [Hash] params ({})
|
596
|
+
def create_multi_region_clusters(params = {}, options = {})
|
597
|
+
req = build_request(:create_multi_region_clusters, params)
|
598
|
+
req.send_request(options)
|
599
|
+
end
|
600
|
+
|
601
|
+
# Deletes a cluster in Amazon Aurora DSQL.
|
602
|
+
#
|
603
|
+
# @option params [required, String] :identifier
|
604
|
+
# The ID of the cluster to delete.
|
605
|
+
#
|
606
|
+
# @option params [String] :client_token
|
607
|
+
# A unique, case-sensitive identifier that you provide to ensure the
|
608
|
+
# idempotency of the request. Idempotency ensures that an API request
|
609
|
+
# completes only once. With an idempotent request, if the original
|
610
|
+
# request completes successfully. The subsequent retries with the same
|
611
|
+
# client token return the result from the original successful request
|
612
|
+
# and they have no additional effect.
|
613
|
+
#
|
614
|
+
# If you don't specify a client token, the Amazon Web Services SDK
|
615
|
+
# automatically generates one.
|
616
|
+
#
|
617
|
+
# **A suitable default value is auto-generated.** You should normally
|
618
|
+
# not need to pass this option.**
|
619
|
+
#
|
620
|
+
# @return [Types::DeleteClusterOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
621
|
+
#
|
622
|
+
# * {Types::DeleteClusterOutput#identifier #identifier} => String
|
623
|
+
# * {Types::DeleteClusterOutput#arn #arn} => String
|
624
|
+
# * {Types::DeleteClusterOutput#status #status} => String
|
625
|
+
# * {Types::DeleteClusterOutput#creation_time #creation_time} => Time
|
626
|
+
# * {Types::DeleteClusterOutput#deletion_protection_enabled #deletion_protection_enabled} => Boolean
|
627
|
+
#
|
628
|
+
#
|
629
|
+
# @example Example: Delete Cluster
|
630
|
+
#
|
631
|
+
# resp = client.delete_cluster({
|
632
|
+
# identifier: "kiqenqglxyl2snyvkvnj2c3s2e",
|
633
|
+
# })
|
634
|
+
#
|
635
|
+
# @example Request syntax with placeholder values
|
636
|
+
#
|
637
|
+
# resp = client.delete_cluster({
|
638
|
+
# identifier: "ClusterId", # required
|
639
|
+
# client_token: "ClientToken",
|
640
|
+
# })
|
641
|
+
#
|
642
|
+
# @example Response structure
|
643
|
+
#
|
644
|
+
# resp.identifier #=> String
|
645
|
+
# resp.arn #=> String
|
646
|
+
# resp.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
|
647
|
+
# resp.creation_time #=> Time
|
648
|
+
# resp.deletion_protection_enabled #=> Boolean
|
649
|
+
#
|
650
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/dsql-2018-05-10/DeleteCluster AWS API Documentation
|
651
|
+
#
|
652
|
+
# @overload delete_cluster(params = {})
|
653
|
+
# @param [Hash] params ({})
|
654
|
+
def delete_cluster(params = {}, options = {})
|
655
|
+
req = build_request(:delete_cluster, params)
|
656
|
+
req.send_request(options)
|
657
|
+
end
|
658
|
+
|
659
|
+
# Deletes a multi-Region cluster in Amazon Aurora DSQL.
|
660
|
+
#
|
661
|
+
# @option params [required, Array<String>] :linked_cluster_arns
|
662
|
+
# The ARNs of the clusters linked to the cluster you want to delete.
|
663
|
+
# also deletes these clusters as part of the operation.
|
664
|
+
#
|
665
|
+
# @option params [String] :client_token
|
666
|
+
# A unique, case-sensitive identifier that you provide to ensure the
|
667
|
+
# idempotency of the request. Idempotency ensures that an API request
|
668
|
+
# completes only once. With an idempotent request, if the original
|
669
|
+
# request completes successfully. The subsequent retries with the same
|
670
|
+
# client token return the result from the original successful request
|
671
|
+
# and they have no additional effect.
|
672
|
+
#
|
673
|
+
# If you don't specify a client token, the Amazon Web Services SDK
|
674
|
+
# automatically generates one.
|
675
|
+
#
|
676
|
+
# **A suitable default value is auto-generated.** You should normally
|
677
|
+
# not need to pass this option.**
|
678
|
+
#
|
679
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
680
|
+
#
|
681
|
+
#
|
682
|
+
# @example Example: Delete Multi Region Clusters
|
683
|
+
#
|
684
|
+
# resp = client.delete_multi_region_clusters({
|
685
|
+
# linked_cluster_arns: [
|
686
|
+
# "arn:aws:xanadu:us-east-1:111122223333:cluster/abcdefghijklmnopqrst12345",
|
687
|
+
# "arn:aws:xanadu:us-east-2:111122223333:cluster/klmnopqrstuvwxyzabcd54321",
|
688
|
+
# ],
|
689
|
+
# })
|
690
|
+
#
|
691
|
+
# @example Request syntax with placeholder values
|
692
|
+
#
|
693
|
+
# resp = client.delete_multi_region_clusters({
|
694
|
+
# linked_cluster_arns: ["ClusterArn"], # required
|
695
|
+
# client_token: "ClientToken",
|
696
|
+
# })
|
697
|
+
#
|
698
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/dsql-2018-05-10/DeleteMultiRegionClusters AWS API Documentation
|
699
|
+
#
|
700
|
+
# @overload delete_multi_region_clusters(params = {})
|
701
|
+
# @param [Hash] params ({})
|
702
|
+
def delete_multi_region_clusters(params = {}, options = {})
|
703
|
+
req = build_request(:delete_multi_region_clusters, params)
|
704
|
+
req.send_request(options)
|
705
|
+
end
|
706
|
+
|
707
|
+
# Retrieves information about a cluster.
|
708
|
+
#
|
709
|
+
# @option params [required, String] :identifier
|
710
|
+
# The ID of the cluster to retrieve.
|
711
|
+
#
|
712
|
+
# @return [Types::GetClusterOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
713
|
+
#
|
714
|
+
# * {Types::GetClusterOutput#identifier #identifier} => String
|
715
|
+
# * {Types::GetClusterOutput#arn #arn} => String
|
716
|
+
# * {Types::GetClusterOutput#status #status} => String
|
717
|
+
# * {Types::GetClusterOutput#creation_time #creation_time} => Time
|
718
|
+
# * {Types::GetClusterOutput#deletion_protection_enabled #deletion_protection_enabled} => Boolean
|
719
|
+
# * {Types::GetClusterOutput#witness_region #witness_region} => String
|
720
|
+
# * {Types::GetClusterOutput#linked_cluster_arns #linked_cluster_arns} => Array<String>
|
721
|
+
#
|
722
|
+
#
|
723
|
+
# @example Example: Get Cluster
|
724
|
+
#
|
725
|
+
# resp = client.get_cluster({
|
726
|
+
# identifier: "kiqenqglxyl2snyvkvnj2c3s2e",
|
727
|
+
# })
|
728
|
+
#
|
729
|
+
# @example Request syntax with placeholder values
|
730
|
+
#
|
731
|
+
# resp = client.get_cluster({
|
732
|
+
# identifier: "ClusterId", # required
|
733
|
+
# })
|
734
|
+
#
|
735
|
+
# @example Response structure
|
736
|
+
#
|
737
|
+
# resp.identifier #=> String
|
738
|
+
# resp.arn #=> String
|
739
|
+
# resp.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
|
740
|
+
# resp.creation_time #=> Time
|
741
|
+
# resp.deletion_protection_enabled #=> Boolean
|
742
|
+
# resp.witness_region #=> String
|
743
|
+
# resp.linked_cluster_arns #=> Array
|
744
|
+
# resp.linked_cluster_arns[0] #=> String
|
745
|
+
#
|
746
|
+
#
|
747
|
+
# The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
|
748
|
+
#
|
749
|
+
# * cluster_active
|
750
|
+
# * cluster_not_exists
|
751
|
+
#
|
752
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/dsql-2018-05-10/GetCluster AWS API Documentation
|
753
|
+
#
|
754
|
+
# @overload get_cluster(params = {})
|
755
|
+
# @param [Hash] params ({})
|
756
|
+
def get_cluster(params = {}, options = {})
|
757
|
+
req = build_request(:get_cluster, params)
|
758
|
+
req.send_request(options)
|
759
|
+
end
|
760
|
+
|
761
|
+
# Retrieves information about a list of clusters.
|
762
|
+
#
|
763
|
+
# @option params [Integer] :max_results
|
764
|
+
# An optional parameter that specifies the maximum number of results to
|
765
|
+
# return. You can use nextToken to display the next page of results.
|
766
|
+
#
|
767
|
+
# @option params [String] :next_token
|
768
|
+
# If your initial ListClusters operation returns a nextToken, you can
|
769
|
+
# include the returned nextToken in following ListClusters operations,
|
770
|
+
# which returns results in the next page.
|
771
|
+
#
|
772
|
+
# @return [Types::ListClustersOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
773
|
+
#
|
774
|
+
# * {Types::ListClustersOutput#next_token #next_token} => String
|
775
|
+
# * {Types::ListClustersOutput#clusters #clusters} => Array<Types::ClusterSummary>
|
776
|
+
#
|
777
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
778
|
+
#
|
779
|
+
#
|
780
|
+
# @example Example: List Clusters
|
781
|
+
#
|
782
|
+
# resp = client.list_clusters({
|
783
|
+
# max_results: 20,
|
784
|
+
# })
|
785
|
+
#
|
786
|
+
# @example Request syntax with placeholder values
|
787
|
+
#
|
788
|
+
# resp = client.list_clusters({
|
789
|
+
# max_results: 1,
|
790
|
+
# next_token: "NextToken",
|
791
|
+
# })
|
792
|
+
#
|
793
|
+
# @example Response structure
|
794
|
+
#
|
795
|
+
# resp.next_token #=> String
|
796
|
+
# resp.clusters #=> Array
|
797
|
+
# resp.clusters[0].identifier #=> String
|
798
|
+
# resp.clusters[0].arn #=> String
|
799
|
+
#
|
800
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/dsql-2018-05-10/ListClusters AWS API Documentation
|
801
|
+
#
|
802
|
+
# @overload list_clusters(params = {})
|
803
|
+
# @param [Hash] params ({})
|
804
|
+
def list_clusters(params = {}, options = {})
|
805
|
+
req = build_request(:list_clusters, params)
|
806
|
+
req.send_request(options)
|
807
|
+
end
|
808
|
+
|
809
|
+
# Lists all of the tags for a resource.
|
810
|
+
#
|
811
|
+
# @option params [required, String] :resource_arn
|
812
|
+
# The ARN of the resource for which you want to list the tags.
|
813
|
+
#
|
814
|
+
# @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
815
|
+
#
|
816
|
+
# * {Types::ListTagsForResourceOutput#tags #tags} => Hash<String,String>
|
817
|
+
#
|
818
|
+
#
|
819
|
+
# @example Example: List Tags For Resource
|
820
|
+
#
|
821
|
+
# resp = client.list_tags_for_resource({
|
822
|
+
# resource_arn: "arn:aws:dsql:us-east-1:111111222222:cluster/kiqenqglxyl2snyvkvnj2c3s2e",
|
823
|
+
# })
|
824
|
+
#
|
825
|
+
# @example Request syntax with placeholder values
|
826
|
+
#
|
827
|
+
# resp = client.list_tags_for_resource({
|
828
|
+
# resource_arn: "Arn", # required
|
829
|
+
# })
|
830
|
+
#
|
831
|
+
# @example Response structure
|
832
|
+
#
|
833
|
+
# resp.tags #=> Hash
|
834
|
+
# resp.tags["TagKey"] #=> String
|
835
|
+
#
|
836
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/dsql-2018-05-10/ListTagsForResource AWS API Documentation
|
837
|
+
#
|
838
|
+
# @overload list_tags_for_resource(params = {})
|
839
|
+
# @param [Hash] params ({})
|
840
|
+
def list_tags_for_resource(params = {}, options = {})
|
841
|
+
req = build_request(:list_tags_for_resource, params)
|
842
|
+
req.send_request(options)
|
843
|
+
end
|
844
|
+
|
845
|
+
# Tags a resource with a map of key and value pairs.
|
846
|
+
#
|
847
|
+
# @option params [required, String] :resource_arn
|
848
|
+
# The ARN of the resource that you want to tag.
|
849
|
+
#
|
850
|
+
# @option params [required, Hash<String,String>] :tags
|
851
|
+
# A map of key and value pairs to use to tag your resource.
|
852
|
+
#
|
853
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
854
|
+
#
|
855
|
+
#
|
856
|
+
# @example Example: Tag Resource
|
857
|
+
#
|
858
|
+
# resp = client.tag_resource({
|
859
|
+
# resource_arn: "arn:aws:dsql:us-east-1:111111222222:cluster/kiqenqglxyl2snyvkvnj2c3s2e",
|
860
|
+
# tags: {
|
861
|
+
# "MyKey" => "MyValue",
|
862
|
+
# },
|
863
|
+
# })
|
864
|
+
#
|
865
|
+
# @example Request syntax with placeholder values
|
866
|
+
#
|
867
|
+
# resp = client.tag_resource({
|
868
|
+
# resource_arn: "Arn", # required
|
869
|
+
# tags: { # required
|
870
|
+
# "TagKey" => "TagValue",
|
871
|
+
# },
|
872
|
+
# })
|
873
|
+
#
|
874
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/dsql-2018-05-10/TagResource AWS API Documentation
|
875
|
+
#
|
876
|
+
# @overload tag_resource(params = {})
|
877
|
+
# @param [Hash] params ({})
|
878
|
+
def tag_resource(params = {}, options = {})
|
879
|
+
req = build_request(:tag_resource, params)
|
880
|
+
req.send_request(options)
|
881
|
+
end
|
882
|
+
|
883
|
+
# Removes a tag from a resource.
|
884
|
+
#
|
885
|
+
# @option params [required, String] :resource_arn
|
886
|
+
# The ARN of the resource from which to remove tags.
|
887
|
+
#
|
888
|
+
# @option params [required, Array<String>] :tag_keys
|
889
|
+
# The array of keys of the tags that you want to remove.
|
890
|
+
#
|
891
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
892
|
+
#
|
893
|
+
#
|
894
|
+
# @example Example: Untag Resource
|
895
|
+
#
|
896
|
+
# resp = client.untag_resource({
|
897
|
+
# resource_arn: "arn:aws:dsql:us-east-1:111111222222:cluster/kiqenqglxyl2snyvkvnj2c3s2e",
|
898
|
+
# tag_keys: [
|
899
|
+
# "MyKeyA",
|
900
|
+
# "MyKeyB",
|
901
|
+
# ],
|
902
|
+
# })
|
903
|
+
#
|
904
|
+
# @example Request syntax with placeholder values
|
905
|
+
#
|
906
|
+
# resp = client.untag_resource({
|
907
|
+
# resource_arn: "Arn", # required
|
908
|
+
# tag_keys: ["TagKey"], # required
|
909
|
+
# })
|
910
|
+
#
|
911
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/dsql-2018-05-10/UntagResource AWS API Documentation
|
912
|
+
#
|
913
|
+
# @overload untag_resource(params = {})
|
914
|
+
# @param [Hash] params ({})
|
915
|
+
def untag_resource(params = {}, options = {})
|
916
|
+
req = build_request(:untag_resource, params)
|
917
|
+
req.send_request(options)
|
918
|
+
end
|
919
|
+
|
920
|
+
# Updates a cluster.
|
921
|
+
#
|
922
|
+
# @option params [required, String] :identifier
|
923
|
+
# The ID of the cluster you want to update.
|
924
|
+
#
|
925
|
+
# @option params [Boolean] :deletion_protection_enabled
|
926
|
+
# Specifies whether to enable deletion protection in your cluster.
|
927
|
+
#
|
928
|
+
# @option params [String] :client_token
|
929
|
+
# A unique, case-sensitive identifier that you provide to ensure the
|
930
|
+
# idempotency of the request. Idempotency ensures that an API request
|
931
|
+
# completes only once. With an idempotent request, if the original
|
932
|
+
# request completes successfully. The subsequent retries with the same
|
933
|
+
# client token return the result from the original successful request
|
934
|
+
# and they have no additional effect.
|
935
|
+
#
|
936
|
+
# If you don't specify a client token, the Amazon Web Services SDK
|
937
|
+
# automatically generates one.
|
938
|
+
#
|
939
|
+
# **A suitable default value is auto-generated.** You should normally
|
940
|
+
# not need to pass this option.**
|
941
|
+
#
|
942
|
+
# @return [Types::UpdateClusterOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
943
|
+
#
|
944
|
+
# * {Types::UpdateClusterOutput#identifier #identifier} => String
|
945
|
+
# * {Types::UpdateClusterOutput#arn #arn} => String
|
946
|
+
# * {Types::UpdateClusterOutput#status #status} => String
|
947
|
+
# * {Types::UpdateClusterOutput#creation_time #creation_time} => Time
|
948
|
+
# * {Types::UpdateClusterOutput#deletion_protection_enabled #deletion_protection_enabled} => Boolean
|
949
|
+
# * {Types::UpdateClusterOutput#witness_region #witness_region} => String
|
950
|
+
# * {Types::UpdateClusterOutput#linked_cluster_arns #linked_cluster_arns} => Array<String>
|
951
|
+
#
|
952
|
+
#
|
953
|
+
# @example Example: Update Cluster
|
954
|
+
#
|
955
|
+
# resp = client.update_cluster({
|
956
|
+
# deletion_protection_enabled: false,
|
957
|
+
# identifier: "kiqenqglxyl2snyvkvnj2c3s2e",
|
958
|
+
# })
|
959
|
+
#
|
960
|
+
# @example Request syntax with placeholder values
|
961
|
+
#
|
962
|
+
# resp = client.update_cluster({
|
963
|
+
# identifier: "ClusterId", # required
|
964
|
+
# deletion_protection_enabled: false,
|
965
|
+
# client_token: "ClientToken",
|
966
|
+
# })
|
967
|
+
#
|
968
|
+
# @example Response structure
|
969
|
+
#
|
970
|
+
# resp.identifier #=> String
|
971
|
+
# resp.arn #=> String
|
972
|
+
# resp.status #=> String, one of "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
|
973
|
+
# resp.creation_time #=> Time
|
974
|
+
# resp.deletion_protection_enabled #=> Boolean
|
975
|
+
# resp.witness_region #=> String
|
976
|
+
# resp.linked_cluster_arns #=> Array
|
977
|
+
# resp.linked_cluster_arns[0] #=> String
|
978
|
+
#
|
979
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/dsql-2018-05-10/UpdateCluster AWS API Documentation
|
980
|
+
#
|
981
|
+
# @overload update_cluster(params = {})
|
982
|
+
# @param [Hash] params ({})
|
983
|
+
def update_cluster(params = {}, options = {})
|
984
|
+
req = build_request(:update_cluster, params)
|
985
|
+
req.send_request(options)
|
986
|
+
end
|
987
|
+
|
988
|
+
# @!endgroup
|
989
|
+
|
990
|
+
# @param params ({})
|
991
|
+
# @api private
|
992
|
+
def build_request(operation_name, params = {})
|
993
|
+
handlers = @handlers.for(operation_name)
|
994
|
+
tracer = config.telemetry_provider.tracer_provider.tracer(
|
995
|
+
Aws::Telemetry.module_to_tracer_name('Aws::DSQL')
|
996
|
+
)
|
997
|
+
context = Seahorse::Client::RequestContext.new(
|
998
|
+
operation_name: operation_name,
|
999
|
+
operation: config.api.operation(operation_name),
|
1000
|
+
client: self,
|
1001
|
+
params: params,
|
1002
|
+
config: config,
|
1003
|
+
tracer: tracer
|
1004
|
+
)
|
1005
|
+
context[:gem_name] = 'aws-sdk-dsql'
|
1006
|
+
context[:gem_version] = '1.0.0'
|
1007
|
+
Seahorse::Client::Request.new(handlers, context)
|
1008
|
+
end
|
1009
|
+
|
1010
|
+
# Polls an API operation until a resource enters a desired state.
|
1011
|
+
#
|
1012
|
+
# ## Basic Usage
|
1013
|
+
#
|
1014
|
+
# A waiter will call an API operation until:
|
1015
|
+
#
|
1016
|
+
# * It is successful
|
1017
|
+
# * It enters a terminal state
|
1018
|
+
# * It makes the maximum number of attempts
|
1019
|
+
#
|
1020
|
+
# In between attempts, the waiter will sleep.
|
1021
|
+
#
|
1022
|
+
# # polls in a loop, sleeping between attempts
|
1023
|
+
# client.wait_until(waiter_name, params)
|
1024
|
+
#
|
1025
|
+
# ## Configuration
|
1026
|
+
#
|
1027
|
+
# You can configure the maximum number of polling attempts, and the
|
1028
|
+
# delay (in seconds) between each polling attempt. You can pass
|
1029
|
+
# configuration as the final arguments hash.
|
1030
|
+
#
|
1031
|
+
# # poll for ~25 seconds
|
1032
|
+
# client.wait_until(waiter_name, params, {
|
1033
|
+
# max_attempts: 5,
|
1034
|
+
# delay: 5,
|
1035
|
+
# })
|
1036
|
+
#
|
1037
|
+
# ## Callbacks
|
1038
|
+
#
|
1039
|
+
# You can be notified before each polling attempt and before each
|
1040
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
1041
|
+
# it will terminate the waiter.
|
1042
|
+
#
|
1043
|
+
# started_at = Time.now
|
1044
|
+
# client.wait_until(waiter_name, params, {
|
1045
|
+
#
|
1046
|
+
# # disable max attempts
|
1047
|
+
# max_attempts: nil,
|
1048
|
+
#
|
1049
|
+
# # poll for 1 hour, instead of a number of attempts
|
1050
|
+
# before_wait: -> (attempts, response) do
|
1051
|
+
# throw :failure if Time.now - started_at > 3600
|
1052
|
+
# end
|
1053
|
+
# })
|
1054
|
+
#
|
1055
|
+
# ## Handling Errors
|
1056
|
+
#
|
1057
|
+
# When a waiter is unsuccessful, it will raise an error.
|
1058
|
+
# All of the failure errors extend from
|
1059
|
+
# {Aws::Waiters::Errors::WaiterFailed}.
|
1060
|
+
#
|
1061
|
+
# begin
|
1062
|
+
# client.wait_until(...)
|
1063
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
1064
|
+
# # resource did not enter the desired state in time
|
1065
|
+
# end
|
1066
|
+
#
|
1067
|
+
# ## Valid Waiters
|
1068
|
+
#
|
1069
|
+
# The following table lists the valid waiter names, the operations they call,
|
1070
|
+
# and the default `:delay` and `:max_attempts` values.
|
1071
|
+
#
|
1072
|
+
# | waiter_name | params | :delay | :max_attempts |
|
1073
|
+
# | ------------------ | -------------------- | -------- | ------------- |
|
1074
|
+
# | cluster_active | {Client#get_cluster} | 2 | 60 |
|
1075
|
+
# | cluster_not_exists | {Client#get_cluster} | 2 | 60 |
|
1076
|
+
#
|
1077
|
+
# @raise [Errors::FailureStateError] Raised when the waiter terminates
|
1078
|
+
# because the waiter has entered a state that it will not transition
|
1079
|
+
# out of, preventing success.
|
1080
|
+
#
|
1081
|
+
# @raise [Errors::TooManyAttemptsError] Raised when the configured
|
1082
|
+
# maximum number of attempts have been made, and the waiter is not
|
1083
|
+
# yet successful.
|
1084
|
+
#
|
1085
|
+
# @raise [Errors::UnexpectedError] Raised when an error is encounted
|
1086
|
+
# while polling for a resource that is not expected.
|
1087
|
+
#
|
1088
|
+
# @raise [Errors::NoSuchWaiterError] Raised when you request to wait
|
1089
|
+
# for an unknown state.
|
1090
|
+
#
|
1091
|
+
# @return [Boolean] Returns `true` if the waiter was successful.
|
1092
|
+
# @param [Symbol] waiter_name
|
1093
|
+
# @param [Hash] params ({})
|
1094
|
+
# @param [Hash] options ({})
|
1095
|
+
# @option options [Integer] :max_attempts
|
1096
|
+
# @option options [Integer] :delay
|
1097
|
+
# @option options [Proc] :before_attempt
|
1098
|
+
# @option options [Proc] :before_wait
|
1099
|
+
def wait_until(waiter_name, params = {}, options = {})
|
1100
|
+
w = waiter(waiter_name, options)
|
1101
|
+
yield(w.waiter) if block_given? # deprecated
|
1102
|
+
w.wait(params)
|
1103
|
+
end
|
1104
|
+
|
1105
|
+
# @api private
|
1106
|
+
# @deprecated
|
1107
|
+
def waiter_names
|
1108
|
+
waiters.keys
|
1109
|
+
end
|
1110
|
+
|
1111
|
+
private
|
1112
|
+
|
1113
|
+
# @param [Symbol] waiter_name
|
1114
|
+
# @param [Hash] options ({})
|
1115
|
+
def waiter(waiter_name, options = {})
|
1116
|
+
waiter_class = waiters[waiter_name]
|
1117
|
+
if waiter_class
|
1118
|
+
waiter_class.new(options.merge(client: self))
|
1119
|
+
else
|
1120
|
+
raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
|
1121
|
+
end
|
1122
|
+
end
|
1123
|
+
|
1124
|
+
def waiters
|
1125
|
+
{
|
1126
|
+
cluster_active: Waiters::ClusterActive,
|
1127
|
+
cluster_not_exists: Waiters::ClusterNotExists
|
1128
|
+
}
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
class << self
|
1132
|
+
|
1133
|
+
# @api private
|
1134
|
+
attr_reader :identifier
|
1135
|
+
|
1136
|
+
# @api private
|
1137
|
+
def errors_module
|
1138
|
+
Errors
|
1139
|
+
end
|
1140
|
+
|
1141
|
+
end
|
1142
|
+
end
|
1143
|
+
end
|