amazonka-keyspaces-2.0: Amazon Keyspaces SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.KeySpaces.CreateTable

Description

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.

Synopsis

Creating a Request

data CreateTable Source #

See: newCreateTable smart constructor.

Constructors

CreateTable' 

Fields

  • capacitySpecification :: Maybe CapacitySpecification

    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.

  • comment :: Maybe Comment

    This parameter allows to enter a description of the table.

  • defaultTimeToLive :: Maybe Natural

    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.

  • encryptionSpecification :: Maybe EncryptionSpecification

    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.

  • pointInTimeRecovery :: Maybe PointInTimeRecovery

    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.

  • tags :: Maybe (NonEmpty Tag)

    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.

  • ttl :: Maybe TimeToLive

    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.

  • keyspaceName :: Text

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

  • tableName :: Text

    The name of the table.

  • schemaDefinition :: SchemaDefinition

    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.

Instances

Instances details
ToJSON CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

ToHeaders CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

Methods

toHeaders :: CreateTable -> [Header] #

ToPath CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

ToQuery CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

AWSRequest CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

Associated Types

type AWSResponse CreateTable #

Generic CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

Associated Types

type Rep CreateTable :: Type -> Type #

Read CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

Show CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

NFData CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

Methods

rnf :: CreateTable -> () #

Eq CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

Hashable CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

type AWSResponse CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

type Rep CreateTable Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

newCreateTable Source #

Create a value of CreateTable with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:capacitySpecification:CreateTable', createTable_capacitySpecification - 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.

$sel:comment:CreateTable', createTable_comment - This parameter allows to enter a description of the table.

$sel:defaultTimeToLive:CreateTable', createTable_defaultTimeToLive - 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.

$sel:encryptionSpecification:CreateTable', createTable_encryptionSpecification - 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.

$sel:pointInTimeRecovery:CreateTable', createTable_pointInTimeRecovery - 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.

$sel:tags:CreateTable', createTable_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.

$sel:ttl:CreateTable', createTable_ttl - 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.

CreateTable, createTable_keyspaceName - The name of the keyspace that the table is going to be created in.

CreateTable, createTable_tableName - The name of the table.

$sel:schemaDefinition:CreateTable', createTable_schemaDefinition - 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.

Request Lenses

createTable_capacitySpecification :: Lens' CreateTable (Maybe CapacitySpecification) Source #

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.

createTable_comment :: Lens' CreateTable (Maybe Comment) Source #

This parameter allows to enter a description of the table.

createTable_defaultTimeToLive :: Lens' CreateTable (Maybe Natural) Source #

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.

createTable_encryptionSpecification :: Lens' CreateTable (Maybe EncryptionSpecification) Source #

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.

createTable_pointInTimeRecovery :: Lens' CreateTable (Maybe PointInTimeRecovery) Source #

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.

createTable_tags :: Lens' CreateTable (Maybe (NonEmpty Tag)) Source #

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.

createTable_ttl :: Lens' CreateTable (Maybe TimeToLive) Source #

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.

createTable_keyspaceName :: Lens' CreateTable Text Source #

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

createTable_schemaDefinition :: Lens' CreateTable SchemaDefinition Source #

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.

Destructuring the Response

data CreateTableResponse Source #

See: newCreateTableResponse smart constructor.

Constructors

CreateTableResponse' 

Fields

  • httpStatus :: Int

    The response's http status code.

  • resourceArn :: Text

    The unique identifier of the table in the format of an Amazon Resource Name (ARN).

Instances

Instances details
Generic CreateTableResponse Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

Associated Types

type Rep CreateTableResponse :: Type -> Type #

Read CreateTableResponse Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

Show CreateTableResponse Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

NFData CreateTableResponse Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

Methods

rnf :: CreateTableResponse -> () #

Eq CreateTableResponse Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

type Rep CreateTableResponse Source # 
Instance details

Defined in Amazonka.KeySpaces.CreateTable

type Rep CreateTableResponse = D1 ('MetaData "CreateTableResponse" "Amazonka.KeySpaces.CreateTable" "amazonka-keyspaces-2.0-IgmNF4xdaFLH03VHAkrBWw" 'False) (C1 ('MetaCons "CreateTableResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "resourceArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newCreateTableResponse Source #

Create a value of CreateTableResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:httpStatus:CreateTableResponse', createTableResponse_httpStatus - The response's http status code.

CreateTableResponse, createTableResponse_resourceArn - The unique identifier of the table in the format of an Amazon Resource Name (ARN).

Response Lenses

createTableResponse_resourceArn :: Lens' CreateTableResponse Text Source #

The unique identifier of the table in the format of an Amazon Resource Name (ARN).