Class: Aws::Keyspaces::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Keyspaces::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb
Overview
An API client for Keyspaces. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::Keyspaces::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#create_keyspace(params = {}) ⇒ Types::CreateKeyspaceResponse
The
CreateKeyspace
operation adds a new keyspace to your account. -
#create_table(params = {}) ⇒ Types::CreateTableResponse
The
CreateTable
operation adds a new table to the specified keyspace. -
#delete_keyspace(params = {}) ⇒ Struct
The
DeleteKeyspace
operation deletes a keyspace and all of its tables. -
#delete_table(params = {}) ⇒ Struct
The
DeleteTable
operation deletes a table and all of its data. -
#get_keyspace(params = {}) ⇒ Types::GetKeyspaceResponse
Returns the name and the Amazon Resource Name (ARN) of the specified table.
-
#get_table(params = {}) ⇒ Types::GetTableResponse
Returns information about the table, including the table's name and current status, the keyspace name, configuration settings, and metadata.
-
#get_table_auto_scaling_settings(params = {}) ⇒ Types::GetTableAutoScalingSettingsResponse
Returns auto scaling related settings of the specified table in JSON format.
-
#list_keyspaces(params = {}) ⇒ Types::ListKeyspacesResponse
Returns a list of keyspaces.
-
#list_tables(params = {}) ⇒ Types::ListTablesResponse
Returns a list of tables for a specified keyspace.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns a list of all tags associated with the specified Amazon Keyspaces resource.
-
#restore_table(params = {}) ⇒ Types::RestoreTableResponse
Restores the table to the specified point in time within the
earliest_restorable_timestamp
and the current time. -
#tag_resource(params = {}) ⇒ Struct
Associates a set of tags with a Amazon Keyspaces resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes the association of tags from a Amazon Keyspaces resource.
-
#update_table(params = {}) ⇒ Types::UpdateTableResponse
Adds new columns to the table or updates one of the table's settings, for example capacity mode, auto scaling, encryption, point-in-time recovery, or ttl settings.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
451 452 453 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 451 def initialize(*args) super end |
Instance Method Details
#create_keyspace(params = {}) ⇒ Types::CreateKeyspaceResponse
The CreateKeyspace
operation adds a new keyspace to your account. In
an Amazon Web Services account, keyspace names must be unique within
each Region.
CreateKeyspace
is an asynchronous operation. You can monitor the
creation status of the new keyspace by using the GetKeyspace
operation.
For more information, see Creating keyspaces in the Amazon Keyspaces Developer Guide.
525 526 527 528 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 525 def create_keyspace(params = {}, = {}) req = build_request(:create_keyspace, params) req.send_request() end |
#create_table(params = {}) ⇒ Types::CreateTableResponse
The CreateTable
operation adds a new table to the specified
keyspace. Within a keyspace, table names must be unique.
CreateTable
is an asynchronous operation. When the request is
received, the status of the table is set to CREATING
. You can
monitor the creation status of the new table by using the GetTable
operation, which returns the current status
of the table. You can
start using a table when the status is ACTIVE
.
For more information, see Creating tables in the Amazon Keyspaces Developer Guide.
854 855 856 857 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 854 def create_table(params = {}, = {}) req = build_request(:create_table, params) req.send_request() end |
#delete_keyspace(params = {}) ⇒ Struct
The DeleteKeyspace
operation deletes a keyspace and all of its
tables.
877 878 879 880 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 877 def delete_keyspace(params = {}, = {}) req = build_request(:delete_keyspace, params) req.send_request() end |
#delete_table(params = {}) ⇒ Struct
The DeleteTable
operation deletes a table and all of its data. After
a DeleteTable
request is received, the specified table is in the
DELETING
state until Amazon Keyspaces completes the deletion. If the
table is in the ACTIVE
state, you can delete it. If a table is
either in the CREATING
or UPDATING
states, then Amazon Keyspaces
returns a ResourceInUseException
. If the specified table does not
exist, Amazon Keyspaces returns a ResourceNotFoundException
. If the
table is already in the DELETING
state, no error is returned.
910 911 912 913 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 910 def delete_table(params = {}, = {}) req = build_request(:delete_table, params) req.send_request() end |
#get_keyspace(params = {}) ⇒ Types::GetKeyspaceResponse
Returns the name and the Amazon Resource Name (ARN) of the specified table.
946 947 948 949 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 946 def get_keyspace(params = {}, = {}) req = build_request(:get_keyspace, params) req.send_request() end |
#get_table(params = {}) ⇒ Types::GetTableResponse
Returns information about the table, including the table's name and current status, the keyspace name, configuration settings, and metadata.
To read table metadata using GetTable
, Select
action permissions
for the table and system tables are required to complete the
operation.
1030 1031 1032 1033 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 1030 def get_table(params = {}, = {}) req = build_request(:get_table, params) req.send_request() end |
#get_table_auto_scaling_settings(params = {}) ⇒ Types::GetTableAutoScalingSettingsResponse
Returns auto scaling related settings of the specified table in JSON format. If the table is a multi-Region table, the Amazon Web Services Region specific auto scaling settings of the table are included.
Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic. For more information, see Managing throughput capacity automatically with Amazon Keyspaces auto scaling in the Amazon Keyspaces Developer Guide.
GetTableAutoScalingSettings
can't be used as an action in an IAM
policy.
To define permissions for GetTableAutoScalingSettings
, you must
allow the following two actions in the IAM policy statement's
Action
element:
application-autoscaling:DescribeScalableTargets
application-autoscaling:DescribeScalingPolicies
1122 1123 1124 1125 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 1122 def get_table_auto_scaling_settings(params = {}, = {}) req = build_request(:get_table_auto_scaling_settings, params) req.send_request() end |
#list_keyspaces(params = {}) ⇒ Types::ListKeyspacesResponse
Returns a list of keyspaces.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1167 1168 1169 1170 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 1167 def list_keyspaces(params = {}, = {}) req = build_request(:list_keyspaces, params) req.send_request() end |
#list_tables(params = {}) ⇒ Types::ListTablesResponse
Returns a list of tables for a specified keyspace.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1214 1215 1216 1217 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 1214 def list_tables(params = {}, = {}) req = build_request(:list_tables, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns a list of all tags associated with the specified Amazon Keyspaces resource.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1261 1262 1263 1264 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 1261 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#restore_table(params = {}) ⇒ Types::RestoreTableResponse
Restores the table to the specified point in time within the
earliest_restorable_timestamp
and the current time. For more
information about restore points, see Time window for PITR
continuous backups in the Amazon Keyspaces Developer Guide.
Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account.
When you restore using point in time recovery, Amazon Keyspaces
restores your source table's schema and data to the state based on
the selected timestamp (day:hour:minute:second)
to a new table. The
Time to Live (TTL) settings are also restored to the state based on
the selected timestamp.
In addition to the table's schema, data, and TTL settings,
RestoreTable
restores the capacity mode, auto scaling settings,
encryption settings, and point-in-time recovery settings from the
source table. Unlike the table's schema data and TTL settings, which
are restored based on the selected timestamp, these settings are
always restored based on the table's settings as of the current time
or when the table was deleted.
You can also overwrite these settings during restore:
Read/write capacity mode
Provisioned throughput capacity units
Auto scaling settings
Point-in-time (PITR) settings
Tags
For more information, see PITR restore settings in the Amazon Keyspaces Developer Guide.
Note that the following settings are not restored, and you must configure them manually for the new table:
Identity and Access Management (IAM) policies
Amazon CloudWatch metrics and alarms
1502 1503 1504 1505 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 1502 def restore_table(params = {}, = {}) req = build_request(:restore_table, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Associates a set of tags with a Amazon Keyspaces resource. You can then activate these user-defined tags so that they appear on the Cost Management Console for cost allocation tracking. For more information, see Adding tags and labels to Amazon Keyspaces resources in the Amazon Keyspaces Developer Guide.
For IAM policy examples that show how to control access to Amazon Keyspaces resources based on tags, see Amazon Keyspaces resource access based on tags in the Amazon Keyspaces Developer Guide.
1547 1548 1549 1550 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 1547 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes the association of tags from a Amazon Keyspaces resource.
1580 1581 1582 1583 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 1580 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_table(params = {}) ⇒ Types::UpdateTableResponse
Adds new columns to the table or updates one of the table's settings, for example capacity mode, auto scaling, encryption, point-in-time recovery, or ttl settings. Note that you can only update one specific table setting per update operation.
1817 1818 1819 1820 |
# File 'gems/aws-sdk-keyspaces/lib/aws-sdk-keyspaces/client.rb', line 1817 def update_table(params = {}, = {}) req = build_request(:update_table, params) req.send_request() end |