Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data CreateTable = CreateTable' {
- capacitySpecification :: Maybe CapacitySpecification
- comment :: Maybe Comment
- defaultTimeToLive :: Maybe Natural
- encryptionSpecification :: Maybe EncryptionSpecification
- pointInTimeRecovery :: Maybe PointInTimeRecovery
- tags :: Maybe (NonEmpty Tag)
- ttl :: Maybe TimeToLive
- keyspaceName :: Text
- tableName :: Text
- schemaDefinition :: SchemaDefinition
- newCreateTable :: Text -> Text -> SchemaDefinition -> CreateTable
- createTable_capacitySpecification :: Lens' CreateTable (Maybe CapacitySpecification)
- createTable_comment :: Lens' CreateTable (Maybe Comment)
- createTable_defaultTimeToLive :: Lens' CreateTable (Maybe Natural)
- createTable_encryptionSpecification :: Lens' CreateTable (Maybe EncryptionSpecification)
- createTable_pointInTimeRecovery :: Lens' CreateTable (Maybe PointInTimeRecovery)
- createTable_tags :: Lens' CreateTable (Maybe (NonEmpty Tag))
- createTable_ttl :: Lens' CreateTable (Maybe TimeToLive)
- createTable_keyspaceName :: Lens' CreateTable Text
- createTable_tableName :: Lens' CreateTable Text
- createTable_schemaDefinition :: Lens' CreateTable SchemaDefinition
- data CreateTableResponse = CreateTableResponse' {
- httpStatus :: Int
- resourceArn :: Text
- newCreateTableResponse :: Int -> Text -> CreateTableResponse
- createTableResponse_httpStatus :: Lens' CreateTableResponse Int
- createTableResponse_resourceArn :: Lens' CreateTableResponse Text
Creating a Request
data CreateTable Source #
See: newCreateTable
smart constructor.
CreateTable' | |
|
Instances
:: Text | |
-> Text | |
-> SchemaDefinition | |
-> CreateTable |
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_tableName :: Lens' CreateTable Text Source #
The name of the table.
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.
CreateTableResponse' | |
|
Instances
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_httpStatus :: Lens' CreateTableResponse Int Source #
The response's http status code.
createTableResponse_resourceArn :: Lens' CreateTableResponse Text Source #
The unique identifier of the table in the format of an Amazon Resource Name (ARN).