pub struct Client { /* private fields */ }
Expand description
Client for Amazon Keyspaces
Client for invoking operations on Amazon Keyspaces. Each operation on Amazon Keyspaces is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_keyspaces::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_keyspaces::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CreateKeyspace
operation has
a Client::create_keyspace
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.create_keyspace()
.keyspace_name("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn create_keyspace(&self) -> CreateKeyspaceFluentBuilder
pub fn create_keyspace(&self) -> CreateKeyspaceFluentBuilder
Constructs a fluent builder for the CreateKeyspace
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace to be created.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseA list of key-value pair tags to be attached to the keyspace.
For more information, see Adding tags and labels to Amazon Keyspaces resources in the Amazon Keyspaces Developer Guide.
replication_specification(ReplicationSpecification)
/set_replication_specification(Option<ReplicationSpecification>)
:
required: falseThe replication specification of the keyspace includes:
-
replicationStrategy
- the required value isSINGLE_REGION
orMULTI_REGION
. -
regionList
- if thereplicationStrategy
isMULTI_REGION
, theregionList
requires the current Region and at least one additional Amazon Web Services Region where the keyspace is going to be replicated in.
-
- On success, responds with
CreateKeyspaceOutput
with field(s):resource_arn(String)
:The unique identifier of the keyspace in the format of an Amazon Resource Name (ARN).
- On failure, responds with
SdkError<CreateKeyspaceError>
Source§impl Client
impl Client
Sourcepub fn create_table(&self) -> CreateTableFluentBuilder
pub fn create_table(&self) -> CreateTableFluentBuilder
Constructs a fluent builder for the CreateTable
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace that the table is going to be created in.
table_name(impl Into<String>)
/set_table_name(Option<String>)
:
required: trueThe name of the table.
schema_definition(SchemaDefinition)
/set_schema_definition(Option<SchemaDefinition>)
:
required: trueThe
schemaDefinition
consists of the following parameters.For each column to be created:
-
name
- The name of the column. -
type
- An Amazon Keyspaces data type. For more information, see Data types in the Amazon Keyspaces Developer Guide.
The primary key of the table consists of the following columns:
-
partitionKeys
- 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. -
name
- The name of each partition key column. -
clusteringKeys
- The optional clustering column portion of your primary key determines how the data is clustered and sorted within each partition. -
name
- The name of the clustering column. -
orderBy
- Sets the ascendant (ASC
) or descendant (DESC
) order modifier.To define a column as static use
staticColumns
- Static columns store values that are shared by all rows in the same partition: -
name
- The name of the column. -
type
- An Amazon Keyspaces data type.
-
comment(Comment)
/set_comment(Option<Comment>)
:
required: falseThis parameter allows to enter a description of the table.
capacity_specification(CapacitySpecification)
/set_capacity_specification(Option<CapacitySpecification>)
:
required: falseSpecifies the read/write throughput capacity mode for the table. The options are:
-
throughputMode:PAY_PER_REQUEST
and -
throughputMode:PROVISIONED
- Provisioned capacity mode requiresreadCapacityUnits
andwriteCapacityUnits
as input.
The default is
throughput_mode:PAY_PER_REQUEST
.For more information, see Read/write capacity modes in the Amazon Keyspaces Developer Guide.
-
encryption_specification(EncryptionSpecification)
/set_encryption_specification(Option<EncryptionSpecification>)
:
required: falseSpecifies how the encryption key for encryption at rest is managed for the table. You can choose one of the following KMS key (KMS key):
-
type:AWS_OWNED_KMS_KEY
- This key is owned by Amazon Keyspaces. -
type:CUSTOMER_MANAGED_KMS_KEY
- This key is stored in your account and is created, owned, and managed by you. This option requires thekms_key_identifier
of the KMS key in Amazon Resource Name (ARN) format as input.
The default is
type:AWS_OWNED_KMS_KEY
.For more information, see Encryption at rest in the Amazon Keyspaces Developer Guide.
-
point_in_time_recovery(PointInTimeRecovery)
/set_point_in_time_recovery(Option<PointInTimeRecovery>)
:
required: falseSpecifies if
pointInTimeRecovery
is enabled or disabled for the table. The options are:-
status=ENABLED
-
status=DISABLED
If it’s not specified, the default is
status=DISABLED
.For more information, see Point-in-time recovery in the Amazon Keyspaces Developer Guide.
-
ttl(TimeToLive)
/set_ttl(Option<TimeToLive>)
:
required: falseEnables Time to Live custom settings for the table. The options are:
-
status:enabled
-
status:disabled
The default is
status:disabled
. Afterttl
is enabled, you can’t disable it for the table.For more information, see Expiring data by using Amazon Keyspaces Time to Live (TTL) in the Amazon Keyspaces Developer Guide.
-
default_time_to_live(i32)
/set_default_time_to_live(Option<i32>)
:
required: falseThe default Time to Live setting in seconds for the table.
For more information, see Setting the default TTL value for a table in the Amazon Keyspaces Developer Guide.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseA list of key-value pair tags to be attached to the resource.
For more information, see Adding tags and labels to Amazon Keyspaces resources in the Amazon Keyspaces Developer Guide.
client_side_timestamps(ClientSideTimestamps)
/set_client_side_timestamps(Option<ClientSideTimestamps>)
:
required: falseEnables client-side timestamps for the table. By default, the setting is disabled. You can enable client-side timestamps with the following option:
-
status: “enabled”
Once client-side timestamps are enabled for a table, this setting cannot be disabled.
-
auto_scaling_specification(AutoScalingSpecification)
/set_auto_scaling_specification(Option<AutoScalingSpecification>)
:
required: falseThe optional auto scaling settings for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity automatically on your behalf.
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.
By default, auto scaling is disabled for a table.
replica_specifications(ReplicaSpecification)
/set_replica_specifications(Option<Vec::<ReplicaSpecification>>)
:
required: falseThe optional Amazon Web Services Region specific settings of a multi-Region table. These settings overwrite the general settings of the table for the specified Region.
For a multi-Region table in provisioned capacity mode, you can configure the table’s read capacity differently for each Region’s replica. The write capacity, however, remains synchronized between all replicas to ensure that there’s enough capacity to replicate writes across all Regions. To define the read capacity for a table replica in a specific Region, you can do so by configuring the following parameters.
-
region
: The Region where these settings are applied. (Required) -
readCapacityUnits
: The provisioned read capacity units. (Optional) -
readCapacityAutoScaling
: The read capacity auto scaling settings for the table. (Optional)
-
- On success, responds with
CreateTableOutput
with field(s):resource_arn(String)
:The unique identifier of the table in the format of an Amazon Resource Name (ARN).
- On failure, responds with
SdkError<CreateTableError>
Source§impl Client
impl Client
Sourcepub fn create_type(&self) -> CreateTypeFluentBuilder
pub fn create_type(&self) -> CreateTypeFluentBuilder
Constructs a fluent builder for the CreateType
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace.
type_name(impl Into<String>)
/set_type_name(Option<String>)
:
required: trueThe name of the user-defined type.
UDT names must contain 48 characters or less, must begin with an alphabetic character, and can only contain alpha-numeric characters and underscores. Amazon Keyspaces converts upper case characters automatically into lower case characters.
Alternatively, you can declare a UDT name in double quotes. When declaring a UDT name inside double quotes, Amazon Keyspaces preserves upper casing and allows special characters.
You can also use double quotes as part of the name when you create the UDT, but you must escape each double quote character with an additional double quote character.
field_definitions(FieldDefinition)
/set_field_definitions(Option<Vec::<FieldDefinition>>)
:
required: trueThe field definitions, consisting of names and types, that define this type.
- On success, responds with
CreateTypeOutput
with field(s):keyspace_arn(String)
:The unique identifier of the keyspace that contains the new type in the format of an Amazon Resource Name (ARN).
type_name(String)
:The formatted name of the user-defined type that was created. Note that Amazon Keyspaces requires the formatted name of the type for other operations, for example
GetType
.
- On failure, responds with
SdkError<CreateTypeError>
Source§impl Client
impl Client
Sourcepub fn delete_keyspace(&self) -> DeleteKeyspaceFluentBuilder
pub fn delete_keyspace(&self) -> DeleteKeyspaceFluentBuilder
Constructs a fluent builder for the DeleteKeyspace
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace to be deleted.
- On success, responds with
DeleteKeyspaceOutput
- On failure, responds with
SdkError<DeleteKeyspaceError>
Source§impl Client
impl Client
Sourcepub fn delete_table(&self) -> DeleteTableFluentBuilder
pub fn delete_table(&self) -> DeleteTableFluentBuilder
Constructs a fluent builder for the DeleteTable
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace of the to be deleted table.
table_name(impl Into<String>)
/set_table_name(Option<String>)
:
required: trueThe name of the table to be deleted.
- On success, responds with
DeleteTableOutput
- On failure, responds with
SdkError<DeleteTableError>
Source§impl Client
impl Client
Sourcepub fn delete_type(&self) -> DeleteTypeFluentBuilder
pub fn delete_type(&self) -> DeleteTypeFluentBuilder
Constructs a fluent builder for the DeleteType
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace of the to be deleted type.
type_name(impl Into<String>)
/set_type_name(Option<String>)
:
required: trueThe name of the type to be deleted.
- On success, responds with
DeleteTypeOutput
with field(s):keyspace_arn(String)
:The unique identifier of the keyspace from which the type was deleted in the format of an Amazon Resource Name (ARN).
type_name(String)
:The name of the type that was deleted.
- On failure, responds with
SdkError<DeleteTypeError>
Source§impl Client
impl Client
Sourcepub fn get_keyspace(&self) -> GetKeyspaceFluentBuilder
pub fn get_keyspace(&self) -> GetKeyspaceFluentBuilder
Constructs a fluent builder for the GetKeyspace
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace.
- On success, responds with
GetKeyspaceOutput
with field(s):keyspace_name(String)
:The name of the keyspace.
resource_arn(String)
:Returns the ARN of the keyspace.
replication_strategy(Rs)
:Returns the replication strategy of the keyspace. The options are
SINGLE_REGION
orMULTI_REGION
.replication_regions(Option<Vec::<String>>)
:If the
replicationStrategy
of the keyspace isMULTI_REGION
, a list of replication Regions is returned.replication_group_statuses(Option<Vec::<ReplicationGroupStatus>>)
:A list of all Regions the keyspace is replicated in after the update keyspace operation and their status.
- On failure, responds with
SdkError<GetKeyspaceError>
Source§impl Client
impl Client
Sourcepub fn get_table(&self) -> GetTableFluentBuilder
pub fn get_table(&self) -> GetTableFluentBuilder
Constructs a fluent builder for the GetTable
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace that the table is stored in.
table_name(impl Into<String>)
/set_table_name(Option<String>)
:
required: trueThe name of the table.
- On success, responds with
GetTableOutput
with field(s):keyspace_name(String)
:The name of the keyspace that the specified table is stored in.
table_name(String)
:The name of the specified table.
resource_arn(String)
:The Amazon Resource Name (ARN) of the specified table.
creation_timestamp(Option<DateTime>)
:The creation timestamp of the specified table.
status(Option<TableStatus>)
:The current status of the specified table.
schema_definition(Option<SchemaDefinition>)
:The schema definition of the specified table.
capacity_specification(Option<CapacitySpecificationSummary>)
:The read/write throughput capacity mode for a table. The options are:
-
throughputMode:PAY_PER_REQUEST
-
throughputMode:PROVISIONED
-
encryption_specification(Option<EncryptionSpecification>)
:The encryption settings of the specified table.
point_in_time_recovery(Option<PointInTimeRecoverySummary>)
:The point-in-time recovery status of the specified table.
ttl(Option<TimeToLive>)
:The custom Time to Live settings of the specified table.
default_time_to_live(Option<i32>)
:The default Time to Live settings in seconds of the specified table.
comment(Option<Comment>)
:The the description of the specified table.
client_side_timestamps(Option<ClientSideTimestamps>)
:The client-side timestamps setting of the table.
replica_specifications(Option<Vec::<ReplicaSpecificationSummary>>)
:Returns the Amazon Web Services Region specific settings of all Regions a multi-Region table is replicated in.
- On failure, responds with
SdkError<GetTableError>
Source§impl Client
impl Client
Sourcepub fn get_table_auto_scaling_settings(
&self,
) -> GetTableAutoScalingSettingsFluentBuilder
pub fn get_table_auto_scaling_settings( &self, ) -> GetTableAutoScalingSettingsFluentBuilder
Constructs a fluent builder for the GetTableAutoScalingSettings
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace.
table_name(impl Into<String>)
/set_table_name(Option<String>)
:
required: trueThe name of the table.
- On success, responds with
GetTableAutoScalingSettingsOutput
with field(s):keyspace_name(String)
:The name of the keyspace.
table_name(String)
:The name of the table.
resource_arn(String)
:The Amazon Resource Name (ARN) of the table.
auto_scaling_specification(Option<AutoScalingSpecification>)
:The auto scaling settings of the table.
replica_specifications(Option<Vec::<ReplicaAutoScalingSpecification>>)
:The Amazon Web Services Region specific settings of a multi-Region table. Returns the settings for all Regions the table is replicated in.
- On failure, responds with
SdkError<GetTableAutoScalingSettingsError>
Source§impl Client
impl Client
Sourcepub fn get_type(&self) -> GetTypeFluentBuilder
pub fn get_type(&self) -> GetTypeFluentBuilder
Constructs a fluent builder for the GetType
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace that contains this type.
type_name(impl Into<String>)
/set_type_name(Option<String>)
:
required: trueThe formatted name of the type. For example, if the name of the type was created without double quotes, Amazon Keyspaces saved the name in lower-case characters. If the name was created in double quotes, you must use double quotes to specify the type name.
- On success, responds with
GetTypeOutput
with field(s):keyspace_name(String)
:The name of the keyspace that contains this type.
type_name(String)
:The name of the type.
field_definitions(Option<Vec::<FieldDefinition>>)
:The names and types that define this type.
last_modified_timestamp(Option<DateTime>)
:The timestamp that shows when this type was last modified.
status(Option<TypeStatus>)
:The status of this type.
direct_referring_tables(Option<Vec::<String>>)
:The tables that use this type.
direct_parent_types(Option<Vec::<String>>)
:The types that use this type.
max_nesting_depth(i32)
:The level of nesting implemented for this type.
keyspace_arn(String)
:The unique identifier of the keyspace that contains this type in the format of an Amazon Resource Name (ARN).
- On failure, responds with
SdkError<GetTypeError>
Source§impl Client
impl Client
Sourcepub fn list_keyspaces(&self) -> ListKeyspacesFluentBuilder
pub fn list_keyspaces(&self) -> ListKeyspacesFluentBuilder
Constructs a fluent builder for the ListKeyspaces
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token. To resume pagination, provide the
NextToken
value as argument of a subsequent API invocation.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe total number of keyspaces to return in the output. If the total number of keyspaces available is more than the value specified, a
NextToken
is provided in the output. To resume pagination, provide theNextToken
value as an argument of a subsequent API invocation.
- On success, responds with
ListKeyspacesOutput
with field(s):next_token(Option<String>)
:A token to specify where to start paginating. This is the
NextToken
from a previously truncated response.keyspaces(Vec::<KeyspaceSummary>)
:A list of keyspaces.
- On failure, responds with
SdkError<ListKeyspacesError>
Source§impl Client
impl Client
Sourcepub fn list_tables(&self) -> ListTablesFluentBuilder
pub fn list_tables(&self) -> ListTablesFluentBuilder
Constructs a fluent builder for the ListTables
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token. To resume pagination, provide the
NextToken
value as an argument of a subsequent API invocation.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe total number of tables to return in the output. If the total number of tables available is more than the value specified, a
NextToken
is provided in the output. To resume pagination, provide theNextToken
value as an argument of a subsequent API invocation.keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace.
- On success, responds with
ListTablesOutput
with field(s):next_token(Option<String>)
:A token to specify where to start paginating. This is the
NextToken
from a previously truncated response.tables(Option<Vec::<TableSummary>>)
:A list of tables.
- On failure, responds with
SdkError<ListTablesError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Amazon Keyspaces resource.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token. To resume pagination, provide the
NextToken
value as argument of a subsequent API invocation.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe total number of tags to return in the output. If the total number of tags available is more than the value specified, a
NextToken
is provided in the output. To resume pagination, provide theNextToken
value as an argument of a subsequent API invocation.
- On success, responds with
ListTagsForResourceOutput
with field(s):next_token(Option<String>)
:A token to specify where to start paginating. This is the
NextToken
from a previously truncated response.tags(Option<Vec::<Tag>>)
:A list of tags.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_types(&self) -> ListTypesFluentBuilder
pub fn list_types(&self) -> ListTypesFluentBuilder
Constructs a fluent builder for the ListTypes
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe pagination token. To resume pagination, provide the
NextToken
value as an argument of a subsequent API invocation.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe total number of types to return in the output. If the total number of types available is more than the value specified, a
NextToken
is provided in the output. To resume pagination, provide theNextToken
value as an argument of a subsequent API invocation.keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace that contains the listed types.
- On success, responds with
ListTypesOutput
with field(s):next_token(Option<String>)
:The pagination token. To resume pagination, provide the
NextToken
value as an argument of a subsequent API invocation.types(Vec::<String>)
:The list of types contained in the specified keyspace.
- On failure, responds with
SdkError<ListTypesError>
Source§impl Client
impl Client
Sourcepub fn restore_table(&self) -> RestoreTableFluentBuilder
pub fn restore_table(&self) -> RestoreTableFluentBuilder
Constructs a fluent builder for the RestoreTable
operation.
- The fluent builder is configurable:
source_keyspace_name(impl Into<String>)
/set_source_keyspace_name(Option<String>)
:
required: trueThe keyspace name of the source table.
source_table_name(impl Into<String>)
/set_source_table_name(Option<String>)
:
required: trueThe name of the source table.
target_keyspace_name(impl Into<String>)
/set_target_keyspace_name(Option<String>)
:
required: trueThe name of the target keyspace.
target_table_name(impl Into<String>)
/set_target_table_name(Option<String>)
:
required: trueThe name of the target table.
restore_timestamp(DateTime)
/set_restore_timestamp(Option<DateTime>)
:
required: falseThe restore timestamp in ISO 8601 format.
capacity_specification_override(CapacitySpecification)
/set_capacity_specification_override(Option<CapacitySpecification>)
:
required: falseSpecifies the read/write throughput capacity mode for the target table. The options are:
-
throughputMode:PAY_PER_REQUEST
-
throughputMode:PROVISIONED
- Provisioned capacity mode requiresreadCapacityUnits
andwriteCapacityUnits
as input.
The default is
throughput_mode:PAY_PER_REQUEST
.For more information, see Read/write capacity modes in the Amazon Keyspaces Developer Guide.
-
encryption_specification_override(EncryptionSpecification)
/set_encryption_specification_override(Option<EncryptionSpecification>)
:
required: falseSpecifies the encryption settings for the target table. You can choose one of the following KMS key (KMS key):
-
type:AWS_OWNED_KMS_KEY
- This key is owned by Amazon Keyspaces. -
type:CUSTOMER_MANAGED_KMS_KEY
- This key is stored in your account and is created, owned, and managed by you. This option requires thekms_key_identifier
of the KMS key in Amazon Resource Name (ARN) format as input.
The default is
type:AWS_OWNED_KMS_KEY
.For more information, see Encryption at rest in the Amazon Keyspaces Developer Guide.
-
point_in_time_recovery_override(PointInTimeRecovery)
/set_point_in_time_recovery_override(Option<PointInTimeRecovery>)
:
required: falseSpecifies the
pointInTimeRecovery
settings for the target table. The options are:-
status=ENABLED
-
status=DISABLED
If it’s not specified, the default is
status=DISABLED
.For more information, see Point-in-time recovery in the Amazon Keyspaces Developer Guide.
-
tags_override(Tag)
/set_tags_override(Option<Vec::<Tag>>)
:
required: falseA list of key-value pair tags to be attached to the restored table.
For more information, see Adding tags and labels to Amazon Keyspaces resources in the Amazon Keyspaces Developer Guide.
auto_scaling_specification(AutoScalingSpecification)
/set_auto_scaling_specification(Option<AutoScalingSpecification>)
:
required: falseThe optional auto scaling settings for the restored table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. 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.
replica_specifications(ReplicaSpecification)
/set_replica_specifications(Option<Vec::<ReplicaSpecification>>)
:
required: falseThe optional Region specific settings of a multi-Regional table.
- On success, responds with
RestoreTableOutput
with field(s):restored_table_arn(String)
:The Amazon Resource Name (ARN) of the restored table.
- On failure, responds with
SdkError<RestoreTableError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Amazon Keyspaces resource to which to add tags.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueThe tags to be assigned to the Amazon Keyspaces resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Keyspaces resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueA list of existing tags to be removed from the Amazon Keyspaces resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_keyspace(&self) -> UpdateKeyspaceFluentBuilder
pub fn update_keyspace(&self) -> UpdateKeyspaceFluentBuilder
Constructs a fluent builder for the UpdateKeyspace
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace.
replication_specification(ReplicationSpecification)
/set_replication_specification(Option<ReplicationSpecification>)
:
required: trueThe replication specification of the keyspace includes:
-
regionList
- the Amazon Web Services Regions where the keyspace is replicated in. -
replicationStrategy
- the required value isSINGLE_REGION
orMULTI_REGION
.
-
client_side_timestamps(ClientSideTimestamps)
/set_client_side_timestamps(Option<ClientSideTimestamps>)
:
required: falseThe client-side timestamp setting of the table.
For more information, see How it works: Amazon Keyspaces client-side timestamps in the Amazon Keyspaces Developer Guide.
- On success, responds with
UpdateKeyspaceOutput
with field(s):resource_arn(String)
:The unique identifier of the keyspace in the format of an Amazon Resource Name (ARN).
- On failure, responds with
SdkError<UpdateKeyspaceError>
Source§impl Client
impl Client
Sourcepub fn update_table(&self) -> UpdateTableFluentBuilder
pub fn update_table(&self) -> UpdateTableFluentBuilder
Constructs a fluent builder for the UpdateTable
operation.
- The fluent builder is configurable:
keyspace_name(impl Into<String>)
/set_keyspace_name(Option<String>)
:
required: trueThe name of the keyspace the specified table is stored in.
table_name(impl Into<String>)
/set_table_name(Option<String>)
:
required: trueThe name of the table.
add_columns(ColumnDefinition)
/set_add_columns(Option<Vec::<ColumnDefinition>>)
:
required: falseFor each column to be added to the specified table:
-
name
- The name of the column. -
type
- An Amazon Keyspaces data type. For more information, see Data types in the Amazon Keyspaces Developer Guide.
-
capacity_specification(CapacitySpecification)
/set_capacity_specification(Option<CapacitySpecification>)
:
required: falseModifies the read/write throughput capacity mode for the table. The options are:
-
throughputMode:PAY_PER_REQUEST
and -
throughputMode:PROVISIONED
- Provisioned capacity mode requiresreadCapacityUnits
andwriteCapacityUnits
as input.
The default is
throughput_mode:PAY_PER_REQUEST
.For more information, see Read/write capacity modes in the Amazon Keyspaces Developer Guide.
-
encryption_specification(EncryptionSpecification)
/set_encryption_specification(Option<EncryptionSpecification>)
:
required: falseModifies the encryption settings of the table. You can choose one of the following KMS key (KMS key):
-
type:AWS_OWNED_KMS_KEY
- This key is owned by Amazon Keyspaces. -
type:CUSTOMER_MANAGED_KMS_KEY
- This key is stored in your account and is created, owned, and managed by you. This option requires thekms_key_identifier
of the KMS key in Amazon Resource Name (ARN) format as input.
The default is
AWS_OWNED_KMS_KEY
.For more information, see Encryption at rest in the Amazon Keyspaces Developer Guide.
-
point_in_time_recovery(PointInTimeRecovery)
/set_point_in_time_recovery(Option<PointInTimeRecovery>)
:
required: falseModifies the
pointInTimeRecovery
settings of the table. The options are:-
status=ENABLED
-
status=DISABLED
If it’s not specified, the default is
status=DISABLED
.For more information, see Point-in-time recovery in the Amazon Keyspaces Developer Guide.
-
ttl(TimeToLive)
/set_ttl(Option<TimeToLive>)
:
required: falseModifies Time to Live custom settings for the table. The options are:
-
status:enabled
-
status:disabled
The default is
status:disabled
. Afterttl
is enabled, you can’t disable it for the table.For more information, see Expiring data by using Amazon Keyspaces Time to Live (TTL) in the Amazon Keyspaces Developer Guide.
-
default_time_to_live(i32)
/set_default_time_to_live(Option<i32>)
:
required: falseThe default Time to Live setting in seconds for the table.
For more information, see Setting the default TTL value for a table in the Amazon Keyspaces Developer Guide.
client_side_timestamps(ClientSideTimestamps)
/set_client_side_timestamps(Option<ClientSideTimestamps>)
:
required: falseEnables client-side timestamps for the table. By default, the setting is disabled. You can enable client-side timestamps with the following option:
-
status: “enabled”
Once client-side timestamps are enabled for a table, this setting cannot be disabled.
-
auto_scaling_specification(AutoScalingSpecification)
/set_auto_scaling_specification(Option<AutoScalingSpecification>)
:
required: falseThe optional auto scaling settings to update for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. 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.
If auto scaling is already enabled for the table, you can use
UpdateTable
to update the minimum and maximum values or the auto scaling policy settings independently.For more information, see Managing throughput capacity automatically with Amazon Keyspaces auto scaling in the Amazon Keyspaces Developer Guide.
replica_specifications(ReplicaSpecification)
/set_replica_specifications(Option<Vec::<ReplicaSpecification>>)
:
required: falseThe Region specific settings of a multi-Regional table.
- On success, responds with
UpdateTableOutput
with field(s):resource_arn(String)
:The Amazon Resource Name (ARN) of the modified table.
- On failure, responds with
SdkError<UpdateTableError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);