Struct aws_sdk_keyspaces::client::fluent_builders::CreateTable
source · [−]pub struct CreateTable { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateTable
.
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.
Implementations
sourceimpl CreateTable
impl CreateTable
sourcepub async fn send(self) -> Result<CreateTableOutput, SdkError<CreateTableError>>
pub async fn send(self) -> Result<CreateTableOutput, SdkError<CreateTableError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn keyspace_name(self, input: impl Into<String>) -> Self
pub fn keyspace_name(self, input: impl Into<String>) -> Self
The name of the keyspace that the table is going to be created in.
sourcepub fn set_keyspace_name(self, input: Option<String>) -> Self
pub fn set_keyspace_name(self, input: Option<String>) -> Self
The name of the keyspace that the table is going to be created in.
sourcepub fn table_name(self, input: impl Into<String>) -> Self
pub fn table_name(self, input: impl Into<String>) -> Self
The name of the table.
sourcepub fn set_table_name(self, input: Option<String>) -> Self
pub fn set_table_name(self, input: Option<String>) -> Self
The name of the table.
sourcepub fn schema_definition(self, input: SchemaDefinition) -> Self
pub fn schema_definition(self, input: SchemaDefinition) -> Self
The 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.
sourcepub fn set_schema_definition(self, input: Option<SchemaDefinition>) -> Self
pub fn set_schema_definition(self, input: Option<SchemaDefinition>) -> Self
The 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.
sourcepub fn comment(self, input: Comment) -> Self
pub fn comment(self, input: Comment) -> Self
This parameter allows to enter a description of the table.
sourcepub fn set_comment(self, input: Option<Comment>) -> Self
pub fn set_comment(self, input: Option<Comment>) -> Self
This parameter allows to enter a description of the table.
sourcepub fn capacity_specification(self, input: CapacitySpecification) -> Self
pub fn capacity_specification(self, input: CapacitySpecification) -> Self
Specifies the read/write throughput capacity mode for the table. The options are:
• throughputMode:PAY_PER_REQUEST
and
• throughputMode:PROVISIONED
- Provisioned capacity mode requires readCapacityUnits
and writeCapacityUnits
as input.
The default is throughput_mode:PAY_PER_REQUEST
.
For more information, see Read/write capacity modes in the Amazon Keyspaces Developer Guide.
sourcepub fn set_capacity_specification(
self,
input: Option<CapacitySpecification>
) -> Self
pub fn set_capacity_specification(
self,
input: Option<CapacitySpecification>
) -> Self
Specifies the read/write throughput capacity mode for the table. The options are:
• throughputMode:PAY_PER_REQUEST
and
• throughputMode:PROVISIONED
- Provisioned capacity mode requires readCapacityUnits
and writeCapacityUnits
as input.
The default is throughput_mode:PAY_PER_REQUEST
.
For more information, see Read/write capacity modes in the Amazon Keyspaces Developer Guide.
sourcepub fn encryption_specification(self, input: EncryptionSpecification) -> Self
pub fn encryption_specification(self, input: EncryptionSpecification) -> Self
Specifies 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 the kms_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.
sourcepub fn set_encryption_specification(
self,
input: Option<EncryptionSpecification>
) -> Self
pub fn set_encryption_specification(
self,
input: Option<EncryptionSpecification>
) -> Self
Specifies 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 the kms_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.
sourcepub fn point_in_time_recovery(self, input: PointInTimeRecovery) -> Self
pub fn point_in_time_recovery(self, input: PointInTimeRecovery) -> Self
Specifies if pointInTimeRecovery
is enabled or disabled for the table. The options are:
• ENABLED
• DISABLED
If it's not specified, the default is DISABLED
.
For more information, see Point-in-time recovery in the Amazon Keyspaces Developer Guide.
sourcepub fn set_point_in_time_recovery(
self,
input: Option<PointInTimeRecovery>
) -> Self
pub fn set_point_in_time_recovery(
self,
input: Option<PointInTimeRecovery>
) -> Self
Specifies if pointInTimeRecovery
is enabled or disabled for the table. The options are:
• ENABLED
• DISABLED
If it's not specified, the default is DISABLED
.
For more information, see Point-in-time recovery in the Amazon Keyspaces Developer Guide.
sourcepub fn ttl(self, input: TimeToLive) -> Self
pub fn ttl(self, input: TimeToLive) -> Self
Enables Time to Live custom settings for the table. The options are:
• status:enabled
• status:disabled
The default is status:disabled
. After ttl
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.
sourcepub fn set_ttl(self, input: Option<TimeToLive>) -> Self
pub fn set_ttl(self, input: Option<TimeToLive>) -> Self
Enables Time to Live custom settings for the table. The options are:
• status:enabled
• status:disabled
The default is status:disabled
. After ttl
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.
sourcepub fn default_time_to_live(self, input: i32) -> Self
pub fn default_time_to_live(self, input: i32) -> Self
The 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.
sourcepub fn set_default_time_to_live(self, input: Option<i32>) -> Self
pub fn set_default_time_to_live(self, input: Option<i32>) -> Self
The 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.
Appends an item to tags
.
To override the contents of this collection use set_tags
.
A 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.
A 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.
Trait Implementations
sourceimpl Clone for CreateTable
impl Clone for CreateTable
sourcefn clone(&self) -> CreateTable
fn clone(&self) -> CreateTable
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CreateTable
impl Send for CreateTable
impl Sync for CreateTable
impl Unpin for CreateTable
impl !UnwindSafe for CreateTable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more