aws-sdk-keyspaces 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,1314 @@
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/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/checksum_algorithm.rb'
31
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
32
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
33
+ require 'aws-sdk-core/plugins/signature_v4.rb'
34
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
35
+
36
+ Aws::Plugins::GlobalConfiguration.add_identifier(:keyspaces)
37
+
38
+ module Aws::Keyspaces
39
+ # An API client for Keyspaces. To construct a client, you need to configure a `:region` and `:credentials`.
40
+ #
41
+ # client = Aws::Keyspaces::Client.new(
42
+ # region: region_name,
43
+ # credentials: credentials,
44
+ # # ...
45
+ # )
46
+ #
47
+ # For details on configuring region and credentials see
48
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
49
+ #
50
+ # See {#initialize} for a full list of supported configuration options.
51
+ class Client < Seahorse::Client::Base
52
+
53
+ include Aws::ClientStubs
54
+
55
+ @identifier = :keyspaces
56
+
57
+ set_api(ClientApi::API)
58
+
59
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
60
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
61
+ add_plugin(Aws::Plugins::Logging)
62
+ add_plugin(Aws::Plugins::ParamConverter)
63
+ add_plugin(Aws::Plugins::ParamValidator)
64
+ add_plugin(Aws::Plugins::UserAgent)
65
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
66
+ add_plugin(Aws::Plugins::RetryErrors)
67
+ add_plugin(Aws::Plugins::GlobalConfiguration)
68
+ add_plugin(Aws::Plugins::RegionalEndpoint)
69
+ add_plugin(Aws::Plugins::EndpointDiscovery)
70
+ add_plugin(Aws::Plugins::EndpointPattern)
71
+ add_plugin(Aws::Plugins::ResponsePaging)
72
+ add_plugin(Aws::Plugins::StubResponses)
73
+ add_plugin(Aws::Plugins::IdempotencyToken)
74
+ add_plugin(Aws::Plugins::JsonvalueConverter)
75
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
76
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
77
+ add_plugin(Aws::Plugins::TransferEncoding)
78
+ add_plugin(Aws::Plugins::HttpChecksum)
79
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
80
+ add_plugin(Aws::Plugins::DefaultsMode)
81
+ add_plugin(Aws::Plugins::RecursionDetection)
82
+ add_plugin(Aws::Plugins::SignatureV4)
83
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
84
+
85
+ # @overload initialize(options)
86
+ # @param [Hash] options
87
+ # @option options [required, Aws::CredentialProvider] :credentials
88
+ # Your AWS credentials. This can be an instance of any one of the
89
+ # following classes:
90
+ #
91
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
92
+ # credentials.
93
+ #
94
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
95
+ # shared file, such as `~/.aws/config`.
96
+ #
97
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
98
+ #
99
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
100
+ # assume a role after providing credentials via the web.
101
+ #
102
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
103
+ # access token generated from `aws login`.
104
+ #
105
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
106
+ # process that outputs to stdout.
107
+ #
108
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
109
+ # from an EC2 IMDS on an EC2 instance.
110
+ #
111
+ # * `Aws::ECSCredentials` - Used for loading credentials from
112
+ # instances running in ECS.
113
+ #
114
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
115
+ # from the Cognito Identity service.
116
+ #
117
+ # When `:credentials` are not configured directly, the following
118
+ # locations will be searched for credentials:
119
+ #
120
+ # * `Aws.config[:credentials]`
121
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
122
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
123
+ # * `~/.aws/credentials`
124
+ # * `~/.aws/config`
125
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
126
+ # are very aggressive. Construct and pass an instance of
127
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
128
+ # enable retries and extended timeouts. Instance profile credential
129
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
130
+ # to true.
131
+ #
132
+ # @option options [required, String] :region
133
+ # The AWS region to connect to. The configured `:region` is
134
+ # used to determine the service `:endpoint`. When not passed,
135
+ # a default `:region` is searched for in the following locations:
136
+ #
137
+ # * `Aws.config[:region]`
138
+ # * `ENV['AWS_REGION']`
139
+ # * `ENV['AMAZON_REGION']`
140
+ # * `ENV['AWS_DEFAULT_REGION']`
141
+ # * `~/.aws/credentials`
142
+ # * `~/.aws/config`
143
+ #
144
+ # @option options [String] :access_key_id
145
+ #
146
+ # @option options [Boolean] :active_endpoint_cache (false)
147
+ # When set to `true`, a thread polling for endpoints will be running in
148
+ # the background every 60 secs (default). Defaults to `false`.
149
+ #
150
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
151
+ # Used only in `adaptive` retry mode. When true, the request will sleep
152
+ # until there is sufficent client side capacity to retry the request.
153
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
154
+ # not retry instead of sleeping.
155
+ #
156
+ # @option options [Boolean] :client_side_monitoring (false)
157
+ # When `true`, client-side metrics will be collected for all API requests from
158
+ # this client.
159
+ #
160
+ # @option options [String] :client_side_monitoring_client_id ("")
161
+ # Allows you to provide an identifier for this client which will be attached to
162
+ # all generated client side metrics. Defaults to an empty string.
163
+ #
164
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
165
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
166
+ # side monitoring agent is running on, where client metrics will be published via UDP.
167
+ #
168
+ # @option options [Integer] :client_side_monitoring_port (31000)
169
+ # Required for publishing client metrics. The port that the client side monitoring
170
+ # agent is running on, where client metrics will be published via UDP.
171
+ #
172
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
173
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
174
+ # will use the Client Side Monitoring Agent Publisher.
175
+ #
176
+ # @option options [Boolean] :convert_params (true)
177
+ # When `true`, an attempt is made to coerce request parameters into
178
+ # the required types.
179
+ #
180
+ # @option options [Boolean] :correct_clock_skew (true)
181
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
182
+ # a clock skew correction and retry requests with skewed client clocks.
183
+ #
184
+ # @option options [String] :defaults_mode ("legacy")
185
+ # See {Aws::DefaultsModeConfiguration} for a list of the
186
+ # accepted modes and the configuration defaults that are included.
187
+ #
188
+ # @option options [Boolean] :disable_host_prefix_injection (false)
189
+ # Set to true to disable SDK automatically adding host prefix
190
+ # to default service endpoint when available.
191
+ #
192
+ # @option options [String] :endpoint
193
+ # The client endpoint is normally constructed from the `:region`
194
+ # option. You should only configure an `:endpoint` when connecting
195
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
196
+ #
197
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
198
+ # Used for the maximum size limit of the LRU cache storing endpoints data
199
+ # for endpoint discovery enabled operations. Defaults to 1000.
200
+ #
201
+ # @option options [Integer] :endpoint_cache_max_threads (10)
202
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
203
+ #
204
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
205
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
206
+ # Use this option to config the time interval in seconds for making
207
+ # requests fetching endpoints information. Defaults to 60 sec.
208
+ #
209
+ # @option options [Boolean] :endpoint_discovery (false)
210
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
211
+ #
212
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
213
+ # The log formatter.
214
+ #
215
+ # @option options [Symbol] :log_level (:info)
216
+ # The log level to send messages to the `:logger` at.
217
+ #
218
+ # @option options [Logger] :logger
219
+ # The Logger instance to send log messages to. If this option
220
+ # is not set, logging will be disabled.
221
+ #
222
+ # @option options [Integer] :max_attempts (3)
223
+ # An integer representing the maximum number attempts that will be made for
224
+ # a single request, including the initial attempt. For example,
225
+ # setting this value to 5 will result in a request being retried up to
226
+ # 4 times. Used in `standard` and `adaptive` retry modes.
227
+ #
228
+ # @option options [String] :profile ("default")
229
+ # Used when loading credentials from the shared credentials file
230
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
231
+ #
232
+ # @option options [Proc] :retry_backoff
233
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
234
+ # This option is only used in the `legacy` retry mode.
235
+ #
236
+ # @option options [Float] :retry_base_delay (0.3)
237
+ # The base delay in seconds used by the default backoff function. This option
238
+ # is only used in the `legacy` retry mode.
239
+ #
240
+ # @option options [Symbol] :retry_jitter (:none)
241
+ # A delay randomiser function used by the default backoff function.
242
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
243
+ # otherwise a Proc that takes and returns a number. This option is only used
244
+ # in the `legacy` retry mode.
245
+ #
246
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
247
+ #
248
+ # @option options [Integer] :retry_limit (3)
249
+ # The maximum number of times to retry failed requests. Only
250
+ # ~ 500 level server errors and certain ~ 400 level client errors
251
+ # are retried. Generally, these are throttling errors, data
252
+ # checksum errors, networking errors, timeout errors, auth errors,
253
+ # endpoint discovery, and errors from expired credentials.
254
+ # This option is only used in the `legacy` retry mode.
255
+ #
256
+ # @option options [Integer] :retry_max_delay (0)
257
+ # The maximum number of seconds to delay between retries (0 for no limit)
258
+ # used by the default backoff function. This option is only used in the
259
+ # `legacy` retry mode.
260
+ #
261
+ # @option options [String] :retry_mode ("legacy")
262
+ # Specifies which retry algorithm to use. Values are:
263
+ #
264
+ # * `legacy` - The pre-existing retry behavior. This is default value if
265
+ # no retry mode is provided.
266
+ #
267
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
268
+ # This includes support for retry quotas, which limit the number of
269
+ # unsuccessful retries a client can make.
270
+ #
271
+ # * `adaptive` - An experimental retry mode that includes all the
272
+ # functionality of `standard` mode along with automatic client side
273
+ # throttling. This is a provisional mode that may change behavior
274
+ # in the future.
275
+ #
276
+ #
277
+ # @option options [String] :secret_access_key
278
+ #
279
+ # @option options [String] :session_token
280
+ #
281
+ # @option options [Boolean] :simple_json (false)
282
+ # Disables request parameter conversion, validation, and formatting.
283
+ # Also disable response data type conversions. This option is useful
284
+ # when you want to ensure the highest level of performance by
285
+ # avoiding overhead of walking request parameters and response data
286
+ # structures.
287
+ #
288
+ # When `:simple_json` is enabled, the request parameters hash must
289
+ # be formatted exactly as the DynamoDB API expects.
290
+ #
291
+ # @option options [Boolean] :stub_responses (false)
292
+ # Causes the client to return stubbed responses. By default
293
+ # fake responses are generated and returned. You can specify
294
+ # the response data to return or errors to raise by calling
295
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
296
+ #
297
+ # ** Please note ** When response stubbing is enabled, no HTTP
298
+ # requests are made, and retries are disabled.
299
+ #
300
+ # @option options [Boolean] :use_dualstack_endpoint
301
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
302
+ # will be used if available.
303
+ #
304
+ # @option options [Boolean] :use_fips_endpoint
305
+ # When set to `true`, fips compatible endpoints will be used if available.
306
+ # When a `fips` region is used, the region is normalized and this config
307
+ # is set to `true`.
308
+ #
309
+ # @option options [Boolean] :validate_params (true)
310
+ # When `true`, request parameters are validated before
311
+ # sending the request.
312
+ #
313
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
314
+ # requests through. Formatted like 'http://proxy.com:123'.
315
+ #
316
+ # @option options [Float] :http_open_timeout (15) The number of
317
+ # seconds to wait when opening a HTTP session before raising a
318
+ # `Timeout::Error`.
319
+ #
320
+ # @option options [Float] :http_read_timeout (60) The default
321
+ # number of seconds to wait for response data. This value can
322
+ # safely be set per-request on the session.
323
+ #
324
+ # @option options [Float] :http_idle_timeout (5) The number of
325
+ # seconds a connection is allowed to sit idle before it is
326
+ # considered stale. Stale connections are closed and removed
327
+ # from the pool before making a request.
328
+ #
329
+ # @option options [Float] :http_continue_timeout (1) The number of
330
+ # seconds to wait for a 100-continue response before sending the
331
+ # request body. This option has no effect unless the request has
332
+ # "Expect" header set to "100-continue". Defaults to `nil` which
333
+ # disables this behaviour. This value can safely be set per
334
+ # request on the session.
335
+ #
336
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
337
+ # in seconds.
338
+ #
339
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
340
+ # HTTP debug output will be sent to the `:logger`.
341
+ #
342
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
343
+ # SSL peer certificates are verified when establishing a
344
+ # connection.
345
+ #
346
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
347
+ # certificate authority bundle file that should be used when
348
+ # verifying peer certificates. If you do not pass
349
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
350
+ # will be used if available.
351
+ #
352
+ # @option options [String] :ssl_ca_directory Full path of the
353
+ # directory that contains the unbundled SSL certificate
354
+ # authority files for verifying peer certificates. If you do
355
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
356
+ # system default will be used if available.
357
+ #
358
+ def initialize(*args)
359
+ super
360
+ end
361
+
362
+ # @!group API Operations
363
+
364
+ # The `CreateKeyspace` operation adds a new keyspace to your account. In
365
+ # an Amazon Web Services account, keyspace names must be unique within
366
+ # each Region.
367
+ #
368
+ # `CreateKeyspace` is an asynchronous operation. You can monitor the
369
+ # creation status of the new keyspace by using the `GetKeyspace`
370
+ # operation.
371
+ #
372
+ # For more information, see [Creating keyspaces][1] in the *Amazon
373
+ # Keyspaces Developer Guide*.
374
+ #
375
+ #
376
+ #
377
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-keyspaces.html#keyspaces-create
378
+ #
379
+ # @option params [required, String] :keyspace_name
380
+ # The name of the keyspace to be created.
381
+ #
382
+ # @option params [Array<Types::Tag>] :tags
383
+ # A list of key-value pair tags to be attached to the keyspace.
384
+ #
385
+ # For more information, see [Adding tags and labels to Amazon Keyspaces
386
+ # resources][1] in the *Amazon Keyspaces Developer Guide*.
387
+ #
388
+ #
389
+ #
390
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html
391
+ #
392
+ # @return [Types::CreateKeyspaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
393
+ #
394
+ # * {Types::CreateKeyspaceResponse#resource_arn #resource_arn} => String
395
+ #
396
+ # @example Request syntax with placeholder values
397
+ #
398
+ # resp = client.create_keyspace({
399
+ # keyspace_name: "KeyspaceName", # required
400
+ # tags: [
401
+ # {
402
+ # key: "TagKey", # required
403
+ # value: "TagValue", # required
404
+ # },
405
+ # ],
406
+ # })
407
+ #
408
+ # @example Response structure
409
+ #
410
+ # resp.resource_arn #=> String
411
+ #
412
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/CreateKeyspace AWS API Documentation
413
+ #
414
+ # @overload create_keyspace(params = {})
415
+ # @param [Hash] params ({})
416
+ def create_keyspace(params = {}, options = {})
417
+ req = build_request(:create_keyspace, params)
418
+ req.send_request(options)
419
+ end
420
+
421
+ # The `CreateTable` operation adds a new table to the specified
422
+ # keyspace. Within a keyspace, table names must be unique.
423
+ #
424
+ # `CreateTable` is an asynchronous operation. When the request is
425
+ # received, the status of the table is set to `CREATING`. You can
426
+ # monitor the creation status of the new table by using the `GetTable`
427
+ # operation, which returns the current `status` of the table. You can
428
+ # start using a table when the status is `ACTIVE`.
429
+ #
430
+ # For more information, see [Creating tables][1] in the *Amazon
431
+ # Keyspaces Developer Guide*.
432
+ #
433
+ #
434
+ #
435
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-tables.html#tables-create
436
+ #
437
+ # @option params [required, String] :keyspace_name
438
+ # The name of the keyspace that the table is going to be created in.
439
+ #
440
+ # @option params [required, String] :table_name
441
+ # The name of the table.
442
+ #
443
+ # @option params [required, Types::SchemaDefinition] :schema_definition
444
+ # The `schemaDefinition` consists of the following parameters.
445
+ #
446
+ # For each column to be created:
447
+ #
448
+ # * <i> <code>name</code> </i> - The name of the column.
449
+ #
450
+ # * ` type ` - An Amazon Keyspaces data type. For more information, see
451
+ # [Data types][1] in the *Amazon Keyspaces Developer Guide*.
452
+ # ^
453
+ #
454
+ # <p>The primary key of the table consists of the following columns:</p> <ul> <li> <p> <code>partitionKeys</code> - The partition key can be a single column, or it can be a compound value composed of two or more columns. The partition key portion of the primary key is required and determines how Amazon Keyspaces stores your data.</p> <ul> <li> <p> <i> <code>name</code> </i> - The name of each partition key column.</p> </li> </ul> </li> <li> <p> <code>clusteringKeys</code> - The optional clustering column portion of your primary key determines how the data is clustered and sorted within each partition.</p> <ul> <li> <p> <i> <code>name</code> </i> - The name of the clustering column. </p> </li> <li> <p> <i> <code>orderBy</code> </i> - Sets the ascendant (<code>ASC</code>) or descendant (<code>DESC</code>) order modifier.</p> </li> </ul> </li> </ul> <p>To define a column as static use <code> <i>staticColumns</i> </code> - Static columns store values that are shared by all rows in the same partition:</p> <ul> <li> <p> <i> <code>name</code> </i> - The name of the column.</p> </li> <li> <p> <code> <i>type</i> </code> - An Amazon Keyspaces data type.</p> </li> </ul>
455
+ #
456
+ #
457
+ #
458
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types
459
+ #
460
+ # @option params [Types::Comment] :comment
461
+ # This parameter allows to enter a description of the table.
462
+ #
463
+ # @option params [Types::CapacitySpecification] :capacity_specification
464
+ # Specifies the read/write throughput capacity mode for the table. The
465
+ # options are:
466
+ #
467
+ # * `throughputMode:PAY_PER_REQUEST` and
468
+ #
469
+ # * `throughputMode:PROVISIONED`. The provisioned capacity mode requires
470
+ # `readCapacityUnits` and `writeCapacityUnits` as inputs.
471
+ #
472
+ # The default is `throughput_mode:PAY_PER_REQUEST`.
473
+ #
474
+ # For more information, see [Read/write capacity modes][1] in the
475
+ # *Amazon Keyspaces Developer Guide*.
476
+ #
477
+ #
478
+ #
479
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html
480
+ #
481
+ # @option params [Types::EncryptionSpecification] :encryption_specification
482
+ # Specifies how the encryption key for encryption at rest is managed for
483
+ # the table. You can choose one of the following KMS key (KMS key):
484
+ #
485
+ # <ul> <li> <p> <code>type:AWS_OWNED_KMS_KEY</code> - This key is owned by Amazon Keyspaces. </p> </li> <li> <p> <code>type:CUSTOMER_MANAGED_KMS_KEY</code> - This key is stored in your account and is created, owned, and managed by you. This option requires the <code>kms_key_identifier</code> of the KMS key in Amazon Resource Name (ARN) format as input. </p> </li> </ul> <p>The default is <code>type:AWS_OWNED_KMS_KEY</code>. </p> <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html">Encryption at rest</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
486
+ #
487
+ # @option params [Types::PointInTimeRecovery] :point_in_time_recovery
488
+ # Specifies if `pointInTimeRecovery` is enabled or disabled for the
489
+ # table. The options are:
490
+ #
491
+ # * `ENABLED`
492
+ #
493
+ # * `DISABLED`
494
+ #
495
+ # If it's not specified, the default is `DISABLED`.
496
+ #
497
+ # For more information, see [Point-in-time recovery][1] in the *Amazon
498
+ # Keyspaces Developer Guide*.
499
+ #
500
+ #
501
+ #
502
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html
503
+ #
504
+ # @option params [Types::TimeToLive] :ttl
505
+ # Enables Time to Live custom settings for the table. The options are:
506
+ #
507
+ # * `status:enabled`
508
+ #
509
+ # * `status:disabled`
510
+ #
511
+ # The default is `status:disabled`. After `ttl` is enabled, you can't
512
+ # disable it for the table.
513
+ #
514
+ # For more information, see [Expiring data by using Amazon Keyspaces
515
+ # Time to Live (TTL)][1] in the *Amazon Keyspaces Developer Guide*.
516
+ #
517
+ #
518
+ #
519
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html
520
+ #
521
+ # @option params [Integer] :default_time_to_live
522
+ # The default Time to Live setting in seconds for the table.
523
+ #
524
+ # For more information, see [Setting the default TTL value for a
525
+ # table][1] in the *Amazon Keyspaces Developer Guide*.
526
+ #
527
+ #
528
+ #
529
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl
530
+ #
531
+ # @option params [Array<Types::Tag>] :tags
532
+ # A list of key-value pair tags to be attached to the resource.
533
+ #
534
+ # For more information, see [Adding tags and labels to Amazon Keyspaces
535
+ # resources][1] in the *Amazon Keyspaces Developer Guide*.
536
+ #
537
+ #
538
+ #
539
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html
540
+ #
541
+ # @return [Types::CreateTableResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
542
+ #
543
+ # * {Types::CreateTableResponse#resource_arn #resource_arn} => String
544
+ #
545
+ # @example Request syntax with placeholder values
546
+ #
547
+ # resp = client.create_table({
548
+ # keyspace_name: "KeyspaceName", # required
549
+ # table_name: "TableName", # required
550
+ # schema_definition: { # required
551
+ # all_columns: [ # required
552
+ # {
553
+ # name: "GenericString", # required
554
+ # type: "GenericString", # required
555
+ # },
556
+ # ],
557
+ # partition_keys: [ # required
558
+ # {
559
+ # name: "GenericString", # required
560
+ # },
561
+ # ],
562
+ # clustering_keys: [
563
+ # {
564
+ # name: "GenericString", # required
565
+ # order_by: "ASC", # required, accepts ASC, DESC
566
+ # },
567
+ # ],
568
+ # static_columns: [
569
+ # {
570
+ # name: "GenericString", # required
571
+ # },
572
+ # ],
573
+ # },
574
+ # comment: {
575
+ # message: "String", # required
576
+ # },
577
+ # capacity_specification: {
578
+ # throughput_mode: "PAY_PER_REQUEST", # required, accepts PAY_PER_REQUEST, PROVISIONED
579
+ # read_capacity_units: 1,
580
+ # write_capacity_units: 1,
581
+ # },
582
+ # encryption_specification: {
583
+ # type: "CUSTOMER_MANAGED_KMS_KEY", # required, accepts CUSTOMER_MANAGED_KMS_KEY, AWS_OWNED_KMS_KEY
584
+ # kms_key_identifier: "kmsKeyARN",
585
+ # },
586
+ # point_in_time_recovery: {
587
+ # status: "ENABLED", # required, accepts ENABLED, DISABLED
588
+ # },
589
+ # ttl: {
590
+ # status: "ENABLED", # required, accepts ENABLED
591
+ # },
592
+ # default_time_to_live: 1,
593
+ # tags: [
594
+ # {
595
+ # key: "TagKey", # required
596
+ # value: "TagValue", # required
597
+ # },
598
+ # ],
599
+ # })
600
+ #
601
+ # @example Response structure
602
+ #
603
+ # resp.resource_arn #=> String
604
+ #
605
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/CreateTable AWS API Documentation
606
+ #
607
+ # @overload create_table(params = {})
608
+ # @param [Hash] params ({})
609
+ def create_table(params = {}, options = {})
610
+ req = build_request(:create_table, params)
611
+ req.send_request(options)
612
+ end
613
+
614
+ # The `DeleteKeyspace` operation deletes a keyspace and all of its
615
+ # tables.
616
+ #
617
+ # @option params [required, String] :keyspace_name
618
+ # The name of the keyspace to be deleted.
619
+ #
620
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
621
+ #
622
+ # @example Request syntax with placeholder values
623
+ #
624
+ # resp = client.delete_keyspace({
625
+ # keyspace_name: "KeyspaceName", # required
626
+ # })
627
+ #
628
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/DeleteKeyspace AWS API Documentation
629
+ #
630
+ # @overload delete_keyspace(params = {})
631
+ # @param [Hash] params ({})
632
+ def delete_keyspace(params = {}, options = {})
633
+ req = build_request(:delete_keyspace, params)
634
+ req.send_request(options)
635
+ end
636
+
637
+ # The `DeleteTable` operation deletes a table and all of its data. After
638
+ # a `DeleteTable` request is received, the specified table is in the
639
+ # `DELETING` state until Amazon Keyspaces completes the deletion. If the
640
+ # table is in the `ACTIVE` state, you can delete it. If a table is
641
+ # either in the `CREATING` or `UPDATING` states, then Amazon Keyspaces
642
+ # returns a `ResourceInUseException`. If the specified table does not
643
+ # exist, Amazon Keyspaces returns a `ResourceNotFoundException`. If the
644
+ # table is already in the `DELETING` state, no error is returned.
645
+ #
646
+ # @option params [required, String] :keyspace_name
647
+ # The name of the keyspace of the to be deleted table.
648
+ #
649
+ # @option params [required, String] :table_name
650
+ # The name of the table to be deleted.
651
+ #
652
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
653
+ #
654
+ # @example Request syntax with placeholder values
655
+ #
656
+ # resp = client.delete_table({
657
+ # keyspace_name: "KeyspaceName", # required
658
+ # table_name: "TableName", # required
659
+ # })
660
+ #
661
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/DeleteTable AWS API Documentation
662
+ #
663
+ # @overload delete_table(params = {})
664
+ # @param [Hash] params ({})
665
+ def delete_table(params = {}, options = {})
666
+ req = build_request(:delete_table, params)
667
+ req.send_request(options)
668
+ end
669
+
670
+ # Returns the name and the Amazon Resource Name (ARN) of the specified
671
+ # table.
672
+ #
673
+ # @option params [required, String] :keyspace_name
674
+ # The name of the keyspace.
675
+ #
676
+ # @return [Types::GetKeyspaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
677
+ #
678
+ # * {Types::GetKeyspaceResponse#keyspace_name #keyspace_name} => String
679
+ # * {Types::GetKeyspaceResponse#resource_arn #resource_arn} => String
680
+ #
681
+ # @example Request syntax with placeholder values
682
+ #
683
+ # resp = client.get_keyspace({
684
+ # keyspace_name: "KeyspaceName", # required
685
+ # })
686
+ #
687
+ # @example Response structure
688
+ #
689
+ # resp.keyspace_name #=> String
690
+ # resp.resource_arn #=> String
691
+ #
692
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/GetKeyspace AWS API Documentation
693
+ #
694
+ # @overload get_keyspace(params = {})
695
+ # @param [Hash] params ({})
696
+ def get_keyspace(params = {}, options = {})
697
+ req = build_request(:get_keyspace, params)
698
+ req.send_request(options)
699
+ end
700
+
701
+ # Returns information about the table, including the table's name and
702
+ # current status, the keyspace name, configuration settings, and
703
+ # metadata.
704
+ #
705
+ # @option params [required, String] :keyspace_name
706
+ # The name of the keyspace that the table is stored in.
707
+ #
708
+ # @option params [required, String] :table_name
709
+ # The name of the table.
710
+ #
711
+ # @return [Types::GetTableResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
712
+ #
713
+ # * {Types::GetTableResponse#keyspace_name #keyspace_name} => String
714
+ # * {Types::GetTableResponse#table_name #table_name} => String
715
+ # * {Types::GetTableResponse#resource_arn #resource_arn} => String
716
+ # * {Types::GetTableResponse#creation_timestamp #creation_timestamp} => Time
717
+ # * {Types::GetTableResponse#status #status} => String
718
+ # * {Types::GetTableResponse#schema_definition #schema_definition} => Types::SchemaDefinition
719
+ # * {Types::GetTableResponse#capacity_specification #capacity_specification} => Types::CapacitySpecificationSummary
720
+ # * {Types::GetTableResponse#encryption_specification #encryption_specification} => Types::EncryptionSpecification
721
+ # * {Types::GetTableResponse#point_in_time_recovery #point_in_time_recovery} => Types::PointInTimeRecoverySummary
722
+ # * {Types::GetTableResponse#ttl #ttl} => Types::TimeToLive
723
+ # * {Types::GetTableResponse#default_time_to_live #default_time_to_live} => Integer
724
+ # * {Types::GetTableResponse#comment #comment} => Types::Comment
725
+ #
726
+ # @example Request syntax with placeholder values
727
+ #
728
+ # resp = client.get_table({
729
+ # keyspace_name: "KeyspaceName", # required
730
+ # table_name: "TableName", # required
731
+ # })
732
+ #
733
+ # @example Response structure
734
+ #
735
+ # resp.keyspace_name #=> String
736
+ # resp.table_name #=> String
737
+ # resp.resource_arn #=> String
738
+ # resp.creation_timestamp #=> Time
739
+ # resp.status #=> String, one of "ACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "RESTORING", "INACCESSIBLE_ENCRYPTION_CREDENTIALS"
740
+ # resp.schema_definition.all_columns #=> Array
741
+ # resp.schema_definition.all_columns[0].name #=> String
742
+ # resp.schema_definition.all_columns[0].type #=> String
743
+ # resp.schema_definition.partition_keys #=> Array
744
+ # resp.schema_definition.partition_keys[0].name #=> String
745
+ # resp.schema_definition.clustering_keys #=> Array
746
+ # resp.schema_definition.clustering_keys[0].name #=> String
747
+ # resp.schema_definition.clustering_keys[0].order_by #=> String, one of "ASC", "DESC"
748
+ # resp.schema_definition.static_columns #=> Array
749
+ # resp.schema_definition.static_columns[0].name #=> String
750
+ # resp.capacity_specification.throughput_mode #=> String, one of "PAY_PER_REQUEST", "PROVISIONED"
751
+ # resp.capacity_specification.read_capacity_units #=> Integer
752
+ # resp.capacity_specification.write_capacity_units #=> Integer
753
+ # resp.capacity_specification.last_update_to_pay_per_request_timestamp #=> Time
754
+ # resp.encryption_specification.type #=> String, one of "CUSTOMER_MANAGED_KMS_KEY", "AWS_OWNED_KMS_KEY"
755
+ # resp.encryption_specification.kms_key_identifier #=> String
756
+ # resp.point_in_time_recovery.status #=> String, one of "ENABLED", "DISABLED"
757
+ # resp.point_in_time_recovery.earliest_restorable_timestamp #=> Time
758
+ # resp.ttl.status #=> String, one of "ENABLED"
759
+ # resp.default_time_to_live #=> Integer
760
+ # resp.comment.message #=> String
761
+ #
762
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/GetTable AWS API Documentation
763
+ #
764
+ # @overload get_table(params = {})
765
+ # @param [Hash] params ({})
766
+ def get_table(params = {}, options = {})
767
+ req = build_request(:get_table, params)
768
+ req.send_request(options)
769
+ end
770
+
771
+ # Returns a list of keyspaces.
772
+ #
773
+ # @option params [String] :next_token
774
+ # The pagination token. To resume pagination, provide the `NextToken`
775
+ # value as argument of a subsequent API invocation.
776
+ #
777
+ # @option params [Integer] :max_results
778
+ # The total number of keyspaces to return in the output. If the total
779
+ # number of keyspaces available is more than the value specified, a
780
+ # `NextToken` is provided in the output. To resume pagination, provide
781
+ # the `NextToken` value as an argument of a subsequent API invocation.
782
+ #
783
+ # @return [Types::ListKeyspacesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
784
+ #
785
+ # * {Types::ListKeyspacesResponse#next_token #next_token} => String
786
+ # * {Types::ListKeyspacesResponse#keyspaces #keyspaces} => Array&lt;Types::KeyspaceSummary&gt;
787
+ #
788
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
789
+ #
790
+ # @example Request syntax with placeholder values
791
+ #
792
+ # resp = client.list_keyspaces({
793
+ # next_token: "NextToken",
794
+ # max_results: 1,
795
+ # })
796
+ #
797
+ # @example Response structure
798
+ #
799
+ # resp.next_token #=> String
800
+ # resp.keyspaces #=> Array
801
+ # resp.keyspaces[0].keyspace_name #=> String
802
+ # resp.keyspaces[0].resource_arn #=> String
803
+ #
804
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/ListKeyspaces AWS API Documentation
805
+ #
806
+ # @overload list_keyspaces(params = {})
807
+ # @param [Hash] params ({})
808
+ def list_keyspaces(params = {}, options = {})
809
+ req = build_request(:list_keyspaces, params)
810
+ req.send_request(options)
811
+ end
812
+
813
+ # Returns a list of tables for a specified keyspace.
814
+ #
815
+ # @option params [String] :next_token
816
+ # The pagination token. To resume pagination, provide the `NextToken`
817
+ # value as an argument of a subsequent API invocation.
818
+ #
819
+ # @option params [Integer] :max_results
820
+ # The total number of tables to return in the output. If the total
821
+ # number of tables available is more than the value specified, a
822
+ # `NextToken` is provided in the output. To resume pagination, provide
823
+ # the `NextToken` value as an argument of a subsequent API invocation.
824
+ #
825
+ # @option params [required, String] :keyspace_name
826
+ # The name of the keyspace.
827
+ #
828
+ # @return [Types::ListTablesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
829
+ #
830
+ # * {Types::ListTablesResponse#next_token #next_token} => String
831
+ # * {Types::ListTablesResponse#tables #tables} => Array&lt;Types::TableSummary&gt;
832
+ #
833
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
834
+ #
835
+ # @example Request syntax with placeholder values
836
+ #
837
+ # resp = client.list_tables({
838
+ # next_token: "NextToken",
839
+ # max_results: 1,
840
+ # keyspace_name: "KeyspaceName", # required
841
+ # })
842
+ #
843
+ # @example Response structure
844
+ #
845
+ # resp.next_token #=> String
846
+ # resp.tables #=> Array
847
+ # resp.tables[0].keyspace_name #=> String
848
+ # resp.tables[0].table_name #=> String
849
+ # resp.tables[0].resource_arn #=> String
850
+ #
851
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/ListTables AWS API Documentation
852
+ #
853
+ # @overload list_tables(params = {})
854
+ # @param [Hash] params ({})
855
+ def list_tables(params = {}, options = {})
856
+ req = build_request(:list_tables, params)
857
+ req.send_request(options)
858
+ end
859
+
860
+ # Returns a list of all tags associated with the specified Amazon
861
+ # Keyspaces resource.
862
+ #
863
+ # @option params [required, String] :resource_arn
864
+ # The Amazon Resource Name (ARN) of the Amazon Keyspaces resource.
865
+ #
866
+ # @option params [String] :next_token
867
+ # The pagination token. To resume pagination, provide the `NextToken`
868
+ # value as argument of a subsequent API invocation.
869
+ #
870
+ # @option params [Integer] :max_results
871
+ # The total number of tags to return in the output. If the total number
872
+ # of tags available is more than the value specified, a `NextToken` is
873
+ # provided in the output. To resume pagination, provide the `NextToken`
874
+ # value as an argument of a subsequent API invocation.
875
+ #
876
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
877
+ #
878
+ # * {Types::ListTagsForResourceResponse#next_token #next_token} => String
879
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Array&lt;Types::Tag&gt;
880
+ #
881
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
882
+ #
883
+ # @example Request syntax with placeholder values
884
+ #
885
+ # resp = client.list_tags_for_resource({
886
+ # resource_arn: "ARN", # required
887
+ # next_token: "NextToken",
888
+ # max_results: 1,
889
+ # })
890
+ #
891
+ # @example Response structure
892
+ #
893
+ # resp.next_token #=> String
894
+ # resp.tags #=> Array
895
+ # resp.tags[0].key #=> String
896
+ # resp.tags[0].value #=> String
897
+ #
898
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/ListTagsForResource AWS API Documentation
899
+ #
900
+ # @overload list_tags_for_resource(params = {})
901
+ # @param [Hash] params ({})
902
+ def list_tags_for_resource(params = {}, options = {})
903
+ req = build_request(:list_tags_for_resource, params)
904
+ req.send_request(options)
905
+ end
906
+
907
+ # Restores the specified table to the specified point in time within the
908
+ # `earliest_restorable_timestamp` and the current time. For more
909
+ # information about restore points, see [ Time window for PITR
910
+ # continuous backups][1] in the *Amazon Keyspaces Developer Guide*.
911
+ #
912
+ # Any number of users can execute up to 4 concurrent restores (any type
913
+ # of restore) in a given account.
914
+ #
915
+ # When you restore using point in time recovery, Amazon Keyspaces
916
+ # restores your source table's schema and data to the state based on
917
+ # the selected timestamp `(day:hour:minute:second)` to a new table. The
918
+ # Time to Live (TTL) settings are also restored to the state based on
919
+ # the selected timestamp.
920
+ #
921
+ # In addition to the table's schema, data, and TTL settings,
922
+ # `RestoreTable` restores the capacity mode, encryption, and
923
+ # point-in-time recovery settings from the source table. Unlike the
924
+ # table's schema data and TTL settings, which are restored based on the
925
+ # selected timestamp, these settings are always restored based on the
926
+ # table's settings as of the current time or when the table was
927
+ # deleted.
928
+ #
929
+ # You can also overwrite these settings during restore:
930
+ #
931
+ # * Read/write capacity mode
932
+ #
933
+ # * Provisioned throughput capacity settings
934
+ #
935
+ # * Point-in-time (PITR) settings
936
+ #
937
+ # * Tags
938
+ #
939
+ # For more information, see [PITR restore settings][2] in the *Amazon
940
+ # Keyspaces Developer Guide*.
941
+ #
942
+ # The following settings are not restored, and you must configure them
943
+ # manually for the new table.
944
+ #
945
+ # * Automatic scaling policies (for tables that use provisioned capacity
946
+ # mode)
947
+ #
948
+ # * Identity and Access Management (IAM) policies
949
+ #
950
+ # * Amazon CloudWatch metrics and alarms
951
+ #
952
+ #
953
+ #
954
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_window
955
+ # [2]: https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_settings
956
+ #
957
+ # @option params [required, String] :source_keyspace_name
958
+ # The keyspace name of the source table.
959
+ #
960
+ # @option params [required, String] :source_table_name
961
+ # The name of the source table.
962
+ #
963
+ # @option params [required, String] :target_keyspace_name
964
+ # The name of the target keyspace.
965
+ #
966
+ # @option params [required, String] :target_table_name
967
+ # The name of the target table.
968
+ #
969
+ # @option params [Time,DateTime,Date,Integer,String] :restore_timestamp
970
+ # The restore timestamp in ISO 8601 format.
971
+ #
972
+ # @option params [Types::CapacitySpecification] :capacity_specification_override
973
+ # Specifies the read/write throughput capacity mode for the target
974
+ # table. The options are:
975
+ #
976
+ # * `throughputMode:PAY_PER_REQUEST` and
977
+ #
978
+ # * `throughputMode:PROVISIONED`. The provisioned capacity mode requires
979
+ # `readCapacityUnits` and `writeCapacityUnits` as inputs.
980
+ #
981
+ # The default is `throughput_mode:PAY_PER_REQUEST`.
982
+ #
983
+ # For more information, see [Read/write capacity modes][1] in the
984
+ # *Amazon Keyspaces Developer Guide*.
985
+ #
986
+ #
987
+ #
988
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html
989
+ #
990
+ # @option params [Types::EncryptionSpecification] :encryption_specification_override
991
+ # Specifies the encryption settings for the target table. You can choose
992
+ # one of the following KMS key (KMS key):
993
+ #
994
+ # <ul> <li> <p> <code>type:AWS_OWNED_KMS_KEY</code> - This key is owned by Amazon Keyspaces. </p> </li> <li> <p> <code>type:CUSTOMER_MANAGED_KMS_KEY</code> - This key is stored in your account and is created, owned, and managed by you. This option requires the <code>kms_key_identifier</code> of the KMS key in Amazon Resource Name (ARN) format as input. </p> </li> </ul> <p>The default is <code>type:AWS_OWNED_KMS_KEY</code>. </p> <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html">Encryption at rest</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
995
+ #
996
+ # @option params [Types::PointInTimeRecovery] :point_in_time_recovery_override
997
+ # Specifies the `pointInTimeRecovery` settings for the target table. The
998
+ # options are:
999
+ #
1000
+ # * `ENABLED`
1001
+ #
1002
+ # * `DISABLED`
1003
+ #
1004
+ # If it's not specified, the default is `DISABLED`.
1005
+ #
1006
+ # For more information, see [Point-in-time recovery][1] in the *Amazon
1007
+ # Keyspaces Developer Guide*.
1008
+ #
1009
+ #
1010
+ #
1011
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html
1012
+ #
1013
+ # @option params [Array<Types::Tag>] :tags_override
1014
+ # A list of key-value pair tags to be attached to the restored table.
1015
+ #
1016
+ # For more information, see [Adding tags and labels to Amazon Keyspaces
1017
+ # resources][1] in the *Amazon Keyspaces Developer Guide*.
1018
+ #
1019
+ #
1020
+ #
1021
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html
1022
+ #
1023
+ # @return [Types::RestoreTableResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1024
+ #
1025
+ # * {Types::RestoreTableResponse#restored_table_arn #restored_table_arn} => String
1026
+ #
1027
+ # @example Request syntax with placeholder values
1028
+ #
1029
+ # resp = client.restore_table({
1030
+ # source_keyspace_name: "KeyspaceName", # required
1031
+ # source_table_name: "TableName", # required
1032
+ # target_keyspace_name: "KeyspaceName", # required
1033
+ # target_table_name: "TableName", # required
1034
+ # restore_timestamp: Time.now,
1035
+ # capacity_specification_override: {
1036
+ # throughput_mode: "PAY_PER_REQUEST", # required, accepts PAY_PER_REQUEST, PROVISIONED
1037
+ # read_capacity_units: 1,
1038
+ # write_capacity_units: 1,
1039
+ # },
1040
+ # encryption_specification_override: {
1041
+ # type: "CUSTOMER_MANAGED_KMS_KEY", # required, accepts CUSTOMER_MANAGED_KMS_KEY, AWS_OWNED_KMS_KEY
1042
+ # kms_key_identifier: "kmsKeyARN",
1043
+ # },
1044
+ # point_in_time_recovery_override: {
1045
+ # status: "ENABLED", # required, accepts ENABLED, DISABLED
1046
+ # },
1047
+ # tags_override: [
1048
+ # {
1049
+ # key: "TagKey", # required
1050
+ # value: "TagValue", # required
1051
+ # },
1052
+ # ],
1053
+ # })
1054
+ #
1055
+ # @example Response structure
1056
+ #
1057
+ # resp.restored_table_arn #=> String
1058
+ #
1059
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/RestoreTable AWS API Documentation
1060
+ #
1061
+ # @overload restore_table(params = {})
1062
+ # @param [Hash] params ({})
1063
+ def restore_table(params = {}, options = {})
1064
+ req = build_request(:restore_table, params)
1065
+ req.send_request(options)
1066
+ end
1067
+
1068
+ # Associates a set of tags with a Amazon Keyspaces resource. You can
1069
+ # then activate these user-defined tags so that they appear on the Cost
1070
+ # Management Console for cost allocation tracking.
1071
+ #
1072
+ # For more information, see [Adding tags and labels to Amazon Keyspaces
1073
+ # resources][1] in the *Amazon Keyspaces Developer Guide*.
1074
+ #
1075
+ #
1076
+ #
1077
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html
1078
+ #
1079
+ # @option params [required, String] :resource_arn
1080
+ # The Amazon Resource Name (ARN) of the Amazon Keyspaces resource to
1081
+ # which to add tags.
1082
+ #
1083
+ # @option params [required, Array<Types::Tag>] :tags
1084
+ # The tags to be assigned to the Amazon Keyspaces resource.
1085
+ #
1086
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1087
+ #
1088
+ # @example Request syntax with placeholder values
1089
+ #
1090
+ # resp = client.tag_resource({
1091
+ # resource_arn: "ARN", # required
1092
+ # tags: [ # required
1093
+ # {
1094
+ # key: "TagKey", # required
1095
+ # value: "TagValue", # required
1096
+ # },
1097
+ # ],
1098
+ # })
1099
+ #
1100
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/TagResource AWS API Documentation
1101
+ #
1102
+ # @overload tag_resource(params = {})
1103
+ # @param [Hash] params ({})
1104
+ def tag_resource(params = {}, options = {})
1105
+ req = build_request(:tag_resource, params)
1106
+ req.send_request(options)
1107
+ end
1108
+
1109
+ # Removes the association of tags from a Amazon Keyspaces resource.
1110
+ #
1111
+ # @option params [required, String] :resource_arn
1112
+ # The Amazon Keyspaces resource that the tags will be removed from. This
1113
+ # value is an Amazon Resource Name (ARN).
1114
+ #
1115
+ # @option params [required, Array<Types::Tag>] :tags
1116
+ # A list of existing tags to be removed from the Amazon Keyspaces
1117
+ # resource.
1118
+ #
1119
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1120
+ #
1121
+ # @example Request syntax with placeholder values
1122
+ #
1123
+ # resp = client.untag_resource({
1124
+ # resource_arn: "ARN", # required
1125
+ # tags: [ # required
1126
+ # {
1127
+ # key: "TagKey", # required
1128
+ # value: "TagValue", # required
1129
+ # },
1130
+ # ],
1131
+ # })
1132
+ #
1133
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/UntagResource AWS API Documentation
1134
+ #
1135
+ # @overload untag_resource(params = {})
1136
+ # @param [Hash] params ({})
1137
+ def untag_resource(params = {}, options = {})
1138
+ req = build_request(:untag_resource, params)
1139
+ req.send_request(options)
1140
+ end
1141
+
1142
+ # Adds new columns to the table or updates one of the table's settings,
1143
+ # for example capacity mode, encryption, point-in-time recovery, or ttl
1144
+ # settings. Note that you can only update one specific table setting per
1145
+ # update operation.
1146
+ #
1147
+ # @option params [required, String] :keyspace_name
1148
+ # The name of the keyspace the specified table is stored in.
1149
+ #
1150
+ # @option params [required, String] :table_name
1151
+ # The name of the table.
1152
+ #
1153
+ # @option params [Array<Types::ColumnDefinition>] :add_columns
1154
+ # For each column to be added to the specified table:
1155
+ #
1156
+ # * <i> <code>name</code> </i> - The name of the column.
1157
+ #
1158
+ # * ` type ` - An Amazon Keyspaces data type. For more information, see
1159
+ # [Data types][1] in the *Amazon Keyspaces Developer Guide*.
1160
+ #
1161
+ #
1162
+ #
1163
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types
1164
+ #
1165
+ # @option params [Types::CapacitySpecification] :capacity_specification
1166
+ # Modifies the read/write throughput capacity mode for the table. The
1167
+ # options are:
1168
+ #
1169
+ # * `throughputMode:PAY_PER_REQUEST` and
1170
+ #
1171
+ # * `throughputMode:PROVISIONED`. The provisioned capacity mode requires
1172
+ # `readCapacityUnits` and `writeCapacityUnits` as inputs.
1173
+ #
1174
+ # The default is `throughput_mode:PAY_PER_REQUEST`.
1175
+ #
1176
+ # For more information, see [Read/write capacity modes][1] in the
1177
+ # *Amazon Keyspaces Developer Guide*.
1178
+ #
1179
+ #
1180
+ #
1181
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html
1182
+ #
1183
+ # @option params [Types::EncryptionSpecification] :encryption_specification
1184
+ # Modifies the encryption settings of the table. You can choose one of
1185
+ # the following KMS key (KMS key):
1186
+ #
1187
+ # <ul> <li> <p> <code>type:AWS_OWNED_KMS_KEY</code> - This key is owned by Amazon Keyspaces. </p> </li> <li> <p> <code>type:CUSTOMER_MANAGED_KMS_KEY</code> - This key is stored in your account and is created, owned, and managed by you. This option requires the <code>kms_key_identifier</code> of the KMS key in Amazon Resource Name (ARN) format as input. </p> </li> </ul> <p>The default is <code>AWS_OWNED_KMS_KEY</code>. </p> <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html">Encryption at rest</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
1188
+ #
1189
+ # @option params [Types::PointInTimeRecovery] :point_in_time_recovery
1190
+ # Modifies the `pointInTimeRecovery` settings of the table. The options
1191
+ # are:
1192
+ #
1193
+ # * `ENABLED`
1194
+ #
1195
+ # * `DISABLED`
1196
+ #
1197
+ # If it's not specified, the default is `DISABLED`.
1198
+ #
1199
+ # For more information, see [Point-in-time recovery][1] in the *Amazon
1200
+ # Keyspaces Developer Guide*.
1201
+ #
1202
+ #
1203
+ #
1204
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html
1205
+ #
1206
+ # @option params [Types::TimeToLive] :ttl
1207
+ # Modifies Time to Live custom settings for the table. The options are:
1208
+ #
1209
+ # * `status:enabled`
1210
+ #
1211
+ # * `status:disabled`
1212
+ #
1213
+ # The default is `status:disabled`. After `ttl` is enabled, you can't
1214
+ # disable it for the table.
1215
+ #
1216
+ # For more information, see [Expiring data by using Amazon Keyspaces
1217
+ # Time to Live (TTL)][1] in the *Amazon Keyspaces Developer Guide*.
1218
+ #
1219
+ #
1220
+ #
1221
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html
1222
+ #
1223
+ # @option params [Integer] :default_time_to_live
1224
+ # The default Time to Live setting in seconds for the table.
1225
+ #
1226
+ # For more information, see [Setting the default TTL value for a
1227
+ # table][1] in the *Amazon Keyspaces Developer Guide*.
1228
+ #
1229
+ #
1230
+ #
1231
+ # [1]: https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl
1232
+ #
1233
+ # @return [Types::UpdateTableResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1234
+ #
1235
+ # * {Types::UpdateTableResponse#resource_arn #resource_arn} => String
1236
+ #
1237
+ # @example Request syntax with placeholder values
1238
+ #
1239
+ # resp = client.update_table({
1240
+ # keyspace_name: "KeyspaceName", # required
1241
+ # table_name: "TableName", # required
1242
+ # add_columns: [
1243
+ # {
1244
+ # name: "GenericString", # required
1245
+ # type: "GenericString", # required
1246
+ # },
1247
+ # ],
1248
+ # capacity_specification: {
1249
+ # throughput_mode: "PAY_PER_REQUEST", # required, accepts PAY_PER_REQUEST, PROVISIONED
1250
+ # read_capacity_units: 1,
1251
+ # write_capacity_units: 1,
1252
+ # },
1253
+ # encryption_specification: {
1254
+ # type: "CUSTOMER_MANAGED_KMS_KEY", # required, accepts CUSTOMER_MANAGED_KMS_KEY, AWS_OWNED_KMS_KEY
1255
+ # kms_key_identifier: "kmsKeyARN",
1256
+ # },
1257
+ # point_in_time_recovery: {
1258
+ # status: "ENABLED", # required, accepts ENABLED, DISABLED
1259
+ # },
1260
+ # ttl: {
1261
+ # status: "ENABLED", # required, accepts ENABLED
1262
+ # },
1263
+ # default_time_to_live: 1,
1264
+ # })
1265
+ #
1266
+ # @example Response structure
1267
+ #
1268
+ # resp.resource_arn #=> String
1269
+ #
1270
+ # @see http://docs.aws.amazon.com/goto/WebAPI/keyspaces-2022-02-10/UpdateTable AWS API Documentation
1271
+ #
1272
+ # @overload update_table(params = {})
1273
+ # @param [Hash] params ({})
1274
+ def update_table(params = {}, options = {})
1275
+ req = build_request(:update_table, params)
1276
+ req.send_request(options)
1277
+ end
1278
+
1279
+ # @!endgroup
1280
+
1281
+ # @param params ({})
1282
+ # @api private
1283
+ def build_request(operation_name, params = {})
1284
+ handlers = @handlers.for(operation_name)
1285
+ context = Seahorse::Client::RequestContext.new(
1286
+ operation_name: operation_name,
1287
+ operation: config.api.operation(operation_name),
1288
+ client: self,
1289
+ params: params,
1290
+ config: config)
1291
+ context[:gem_name] = 'aws-sdk-keyspaces'
1292
+ context[:gem_version] = '1.0.0'
1293
+ Seahorse::Client::Request.new(handlers, context)
1294
+ end
1295
+
1296
+ # @api private
1297
+ # @deprecated
1298
+ def waiter_names
1299
+ []
1300
+ end
1301
+
1302
+ class << self
1303
+
1304
+ # @api private
1305
+ attr_reader :identifier
1306
+
1307
+ # @api private
1308
+ def errors_module
1309
+ Errors
1310
+ end
1311
+
1312
+ end
1313
+ end
1314
+ end