/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the keyspaces-2022-02-10.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Keyspaces.Model
{
///
/// Container for the parameters to the CreateTable operation.
/// 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.
///
///
public partial class CreateTableRequest : AmazonKeyspacesRequest
{
private CapacitySpecification _capacitySpecification;
private ClientSideTimestamps _clientSideTimestamps;
private Comment _comment;
private int? _defaultTimeToLive;
private EncryptionSpecification _encryptionSpecification;
private string _keyspaceName;
private PointInTimeRecovery _pointInTimeRecovery;
private SchemaDefinition _schemaDefinition;
private string _tableName;
private List _tags = new List();
private TimeToLive _ttl;
///
/// Gets and sets the property 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.
///
///
public CapacitySpecification CapacitySpecification
{
get { return this._capacitySpecification; }
set { this._capacitySpecification = value; }
}
// Check to see if CapacitySpecification property is set
internal bool IsSetCapacitySpecification()
{
return this._capacitySpecification != null;
}
///
/// Gets and sets the property ClientSideTimestamps.
///
/// Enables client-side timestamps for the table. By default, the setting is disabled.
/// You can enable client-side timestamps with the following option:
///
/// -
///
///
status: "enabled"
///
///
///
/// Once client-side timestamps are enabled for a table, this setting cannot be disabled.
///
///
public ClientSideTimestamps ClientSideTimestamps
{
get { return this._clientSideTimestamps; }
set { this._clientSideTimestamps = value; }
}
// Check to see if ClientSideTimestamps property is set
internal bool IsSetClientSideTimestamps()
{
return this._clientSideTimestamps != null;
}
///
/// Gets and sets the property Comment.
///
/// This parameter allows to enter a description of the table.
///
///
public Comment Comment
{
get { return this._comment; }
set { this._comment = value; }
}
// Check to see if Comment property is set
internal bool IsSetComment()
{
return this._comment != null;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Min=1, Max=630720000)]
public int DefaultTimeToLive
{
get { return this._defaultTimeToLive.GetValueOrDefault(); }
set { this._defaultTimeToLive = value; }
}
// Check to see if DefaultTimeToLive property is set
internal bool IsSetDefaultTimeToLive()
{
return this._defaultTimeToLive.HasValue;
}
///
/// Gets and sets the property 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.
///
///
public EncryptionSpecification EncryptionSpecification
{
get { return this._encryptionSpecification; }
set { this._encryptionSpecification = value; }
}
// Check to see if EncryptionSpecification property is set
internal bool IsSetEncryptionSpecification()
{
return this._encryptionSpecification != null;
}
///
/// Gets and sets the property KeyspaceName.
///
/// The name of the keyspace that the table is going to be created in.
///
///
[AWSProperty(Required=true, Min=1, Max=48)]
public string KeyspaceName
{
get { return this._keyspaceName; }
set { this._keyspaceName = value; }
}
// Check to see if KeyspaceName property is set
internal bool IsSetKeyspaceName()
{
return this._keyspaceName != null;
}
///
/// Gets and sets the property PointInTimeRecovery.
///
/// Specifies if pointInTimeRecovery
is enabled or disabled for the table.
/// The options are:
///
/// -
///
///
status=ENABLED
///
/// -
///
///
status=DISABLED
///
///
///
/// If it's not specified, the default is status=DISABLED
.
///
///
///
/// For more information, see Point-in-time
/// recovery in the Amazon Keyspaces Developer Guide.
///
///
public PointInTimeRecovery PointInTimeRecovery
{
get { return this._pointInTimeRecovery; }
set { this._pointInTimeRecovery = value; }
}
// Check to see if PointInTimeRecovery property is set
internal bool IsSetPointInTimeRecovery()
{
return this._pointInTimeRecovery != null;
}
///
/// Gets and sets the property 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.
///
///
///
[AWSProperty(Required=true)]
public SchemaDefinition SchemaDefinition
{
get { return this._schemaDefinition; }
set { this._schemaDefinition = value; }
}
// Check to see if SchemaDefinition property is set
internal bool IsSetSchemaDefinition()
{
return this._schemaDefinition != null;
}
///
/// Gets and sets the property TableName.
///
/// The name of the table.
///
///
[AWSProperty(Required=true, Min=1, Max=48)]
public string TableName
{
get { return this._tableName; }
set { this._tableName = value; }
}
// Check to see if TableName property is set
internal bool IsSetTableName()
{
return this._tableName != null;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Min=1, Max=60)]
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property 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.
///
///
public TimeToLive Ttl
{
get { return this._ttl; }
set { this._ttl = value; }
}
// Check to see if Ttl property is set
internal bool IsSetTtl()
{
return this._ttl != null;
}
}
}