pub struct Builder { /* private fields */ }
Expand description

A builder for CreateTableInput.

Implementations§

The name of the keyspace that the table is going to be created in.

Examples found in repository?
src/client.rs (line 447)
446
447
448
449
        pub fn keyspace_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.keyspace_name(input.into());
            self
        }

The name of the keyspace that the table is going to be created in.

Examples found in repository?
src/client.rs (line 455)
451
452
453
454
455
456
457
        pub fn set_keyspace_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_keyspace_name(input);
            self
        }

The name of the table.

Examples found in repository?
src/client.rs (line 460)
459
460
461
462
        pub fn table_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.table_name(input.into());
            self
        }

The name of the table.

Examples found in repository?
src/client.rs (line 465)
464
465
466
467
        pub fn set_table_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_table_name(input);
            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.

Examples found in repository?
src/client.rs (line 482)
481
482
483
484
        pub fn schema_definition(mut self, input: crate::model::SchemaDefinition) -> Self {
            self.inner = self.inner.schema_definition(input);
            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.

Examples found in repository?
src/client.rs (line 502)
498
499
500
501
502
503
504
        pub fn set_schema_definition(
            mut self,
            input: std::option::Option<crate::model::SchemaDefinition>,
        ) -> Self {
            self.inner = self.inner.set_schema_definition(input);
            self
        }

This parameter allows to enter a description of the table.

Examples found in repository?
src/client.rs (line 507)
506
507
508
509
        pub fn comment(mut self, input: crate::model::Comment) -> Self {
            self.inner = self.inner.comment(input);
            self
        }

This parameter allows to enter a description of the table.

Examples found in repository?
src/client.rs (line 512)
511
512
513
514
        pub fn set_comment(mut self, input: std::option::Option<crate::model::Comment>) -> Self {
            self.inner = self.inner.set_comment(input);
            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.

Examples found in repository?
src/client.rs (line 524)
520
521
522
523
524
525
526
        pub fn capacity_specification(
            mut self,
            input: crate::model::CapacitySpecification,
        ) -> Self {
            self.inner = self.inner.capacity_specification(input);
            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.

Examples found in repository?
src/client.rs (line 536)
532
533
534
535
536
537
538
        pub fn set_capacity_specification(
            mut self,
            input: std::option::Option<crate::model::CapacitySpecification>,
        ) -> Self {
            self.inner = self.inner.set_capacity_specification(input);
            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.

Examples found in repository?
src/client.rs (line 548)
544
545
546
547
548
549
550
        pub fn encryption_specification(
            mut self,
            input: crate::model::EncryptionSpecification,
        ) -> Self {
            self.inner = self.inner.encryption_specification(input);
            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.

Examples found in repository?
src/client.rs (line 560)
556
557
558
559
560
561
562
        pub fn set_encryption_specification(
            mut self,
            input: std::option::Option<crate::model::EncryptionSpecification>,
        ) -> Self {
            self.inner = self.inner.set_encryption_specification(input);
            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.

Examples found in repository?
src/client.rs (line 569)
568
569
570
571
        pub fn point_in_time_recovery(mut self, input: crate::model::PointInTimeRecovery) -> Self {
            self.inner = self.inner.point_in_time_recovery(input);
            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.

Examples found in repository?
src/client.rs (line 581)
577
578
579
580
581
582
583
        pub fn set_point_in_time_recovery(
            mut self,
            input: std::option::Option<crate::model::PointInTimeRecovery>,
        ) -> Self {
            self.inner = self.inner.set_point_in_time_recovery(input);
            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.

Examples found in repository?
src/client.rs (line 590)
589
590
591
592
        pub fn ttl(mut self, input: crate::model::TimeToLive) -> Self {
            self.inner = self.inner.ttl(input);
            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.

Examples found in repository?
src/client.rs (line 599)
598
599
600
601
        pub fn set_ttl(mut self, input: std::option::Option<crate::model::TimeToLive>) -> Self {
            self.inner = self.inner.set_ttl(input);
            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.

Examples found in repository?
src/client.rs (line 605)
604
605
606
607
        pub fn default_time_to_live(mut self, input: i32) -> Self {
            self.inner = self.inner.default_time_to_live(input);
            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.

Examples found in repository?
src/client.rs (line 611)
610
611
612
613
        pub fn set_default_time_to_live(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_default_time_to_live(input);
            self
        }

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.

Examples found in repository?
src/client.rs (line 621)
620
621
622
623
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            self.inner = self.inner.tags(input);
            self
        }

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.

Examples found in repository?
src/client.rs (line 630)
626
627
628
629
630
631
632
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }

Consumes the builder and constructs a CreateTableInput.

Examples found in repository?
src/client.rs (line 414)
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateTable,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateTableError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// 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](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateTableOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateTableError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more