aws_sdk_s3tables/client/
create_table.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateTable`](crate::operation::create_table::builders::CreateTableFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`table_bucket_arn(impl Into<String>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::table_bucket_arn) / [`set_table_bucket_arn(Option<String>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::set_table_bucket_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the table bucket to create the table in.</p><br>
7    ///   - [`namespace(impl Into<String>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::namespace) / [`set_namespace(Option<String>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::set_namespace):<br>required: **true**<br><p>The namespace to associated with the table.</p><br>
8    ///   - [`name(impl Into<String>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::set_name):<br>required: **true**<br><p>The name for the table.</p><br>
9    ///   - [`format(OpenTableFormat)`](crate::operation::create_table::builders::CreateTableFluentBuilder::format) / [`set_format(Option<OpenTableFormat>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::set_format):<br>required: **true**<br><p>The format for the table.</p><br>
10    ///   - [`metadata(TableMetadata)`](crate::operation::create_table::builders::CreateTableFluentBuilder::metadata) / [`set_metadata(Option<TableMetadata>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::set_metadata):<br>required: **false**<br><p>The metadata for the table.</p><br>
11    ///   - [`encryption_configuration(EncryptionConfiguration)`](crate::operation::create_table::builders::CreateTableFluentBuilder::encryption_configuration) / [`set_encryption_configuration(Option<EncryptionConfiguration>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::set_encryption_configuration):<br>required: **false**<br><p>The encryption configuration to use for the table. This configuration specifies the encryption algorithm and, if using SSE-KMS, the KMS key to use for encrypting the table.</p><note>  <p>If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-kms-permissions.html">Permissions requirements for S3 Tables SSE-KMS encryption</a>.</p> </note><br>
12    ///   - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_table::builders::CreateTableFluentBuilder::set_tags):<br>required: **false**<br><p>A map of user-defined tags that you would like to apply to the table that you are creating. A tag is a key-value pair that you apply to your resources. Tags can help you organize, track costs for, and control access to resources. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/tagging.html">Tagging for cost allocation or attribute-based access control (ABAC)</a>.</p><note>  <p>You must have the <code>s3tables:TagResource</code> permission in addition to <code>s3tables:CreateTable</code> permission to create a table with tags.</p> </note><br>
13    /// - On success, responds with [`CreateTableOutput`](crate::operation::create_table::CreateTableOutput) with field(s):
14    ///   - [`table_arn(String)`](crate::operation::create_table::CreateTableOutput::table_arn): <p>The Amazon Resource Name (ARN) of the table.</p>
15    ///   - [`version_token(String)`](crate::operation::create_table::CreateTableOutput::version_token): <p>The version token of the table.</p>
16    /// - On failure, responds with [`SdkError<CreateTableError>`](crate::operation::create_table::CreateTableError)
17    pub fn create_table(&self) -> crate::operation::create_table::builders::CreateTableFluentBuilder {
18        crate::operation::create_table::builders::CreateTableFluentBuilder::new(self.handle.clone())
19    }
20}