kcr_keyspaces_services_k8s_aws 3.20260112.164334

Kubernetes Custom Resource Bindings
Documentation
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/aws-controllers-k8s/keyspaces-controller/keyspaces.services.k8s.aws/v1alpha1/tables.yaml
// kopium version: 0.22.5

#[allow(unused_imports)]
mod prelude {
    pub use kube::CustomResource;
    pub use serde::{Serialize, Deserialize};
    pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
}
use self::prelude::*;

/// TableSpec defines the desired state of Table.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "keyspaces.services.k8s.aws", version = "v1alpha1", kind = "Table", plural = "tables")]
#[kube(namespaced)]
#[kube(status = "TableStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct TableSpec {
    /// 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 (<https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html)>
    /// in the Amazon Keyspaces Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "capacitySpecification")]
    pub capacity_specification: Option<TableCapacitySpecification>,
    /// 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.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientSideTimestamps")]
    pub client_side_timestamps: Option<TableClientSideTimestamps>,
    /// This parameter allows to enter a description of the table.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub comment: Option<TableComment>,
    /// The default Time to Live setting in seconds for the table.
    /// 
    /// For more information, see Setting the default TTL value for a table (<https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl)>
    /// in the Amazon Keyspaces Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultTimeToLive")]
    pub default_time_to_live: Option<i64>,
    /// 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 (<https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html)>
    /// in the Amazon Keyspaces Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "encryptionSpecification")]
    pub encryption_specification: Option<TableEncryptionSpecification>,
    /// The name of the keyspace that the table is going to be created in.
    /// 
    /// Regex Pattern: `^[a-zA-Z0-9][a-zA-Z0-9_]{0,47}$`
    #[serde(rename = "keyspaceName")]
    pub keyspace_name: String,
    /// 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 (<https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html)>
    /// in the Amazon Keyspaces Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "pointInTimeRecovery")]
    pub point_in_time_recovery: Option<TablePointInTimeRecovery>,
    /// 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 (<https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.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.
    #[serde(rename = "schemaDefinition")]
    pub schema_definition: TableSchemaDefinition,
    /// The name of the table.
    /// 
    /// Regex Pattern: `^[a-zA-Z0-9][a-zA-Z0-9_]{0,47}$`
    #[serde(rename = "tableName")]
    pub table_name: String,
    /// 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
    /// (<https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html)>
    /// in the Amazon Keyspaces Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<TableTags>>,
    /// 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) (<https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html)>
    /// in the Amazon Keyspaces Developer Guide.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub ttl: Option<TableTtl>,
}

/// 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 (<https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html)>
/// in the Amazon Keyspaces Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableCapacitySpecification {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readCapacityUnits")]
    pub read_capacity_units: Option<i64>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "throughputMode")]
    pub throughput_mode: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "writeCapacityUnits")]
    pub write_capacity_units: Option<i64>,
}

/// 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.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableClientSideTimestamps {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
}

/// This parameter allows to enter a description of the table.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableComment {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}

/// 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 (<https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html)>
/// in the Amazon Keyspaces Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableEncryptionSpecification {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "kmsKeyIdentifier")]
    pub kms_key_identifier: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type_")]
    pub r#type: Option<String>,
}

/// 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 (<https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html)>
/// in the Amazon Keyspaces Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TablePointInTimeRecovery {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
}

/// 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 (<https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.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.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableSchemaDefinition {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "allColumns")]
    pub all_columns: Option<Vec<TableSchemaDefinitionAllColumns>>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusteringKeys")]
    pub clustering_keys: Option<Vec<TableSchemaDefinitionClusteringKeys>>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "partitionKeys")]
    pub partition_keys: Option<Vec<TableSchemaDefinitionPartitionKeys>>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "staticColumns")]
    pub static_columns: Option<Vec<TableSchemaDefinitionStaticColumns>>,
}

/// The names and data types of regular columns.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableSchemaDefinitionAllColumns {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type_")]
    pub r#type: Option<String>,
}

/// The optional clustering column portion of your primary key determines how
/// the data is clustered and sorted within each partition.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableSchemaDefinitionClusteringKeys {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "orderBy")]
    pub order_by: Option<String>,
}

/// The partition key portion of the primary key is required and determines how
/// Amazon Keyspaces stores the data. The partition key can be a single column,
/// or it can be a compound value composed of two or more columns.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableSchemaDefinitionPartitionKeys {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

/// The static columns of the table. Static columns store values that are shared
/// by all rows in the same partition.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableSchemaDefinitionStaticColumns {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

/// Describes a tag. A tag is a key-value pair. You can add up to 50 tags to
/// a single Amazon Keyspaces resource.
/// 
/// Amazon Web Services-assigned tag names and values are automatically assigned
/// the aws: prefix, which the user cannot assign. Amazon Web Services-assigned
/// tag names do not count towards the tag limit of 50. User-assigned tag names
/// have the prefix user: in the Cost Allocation Report. You cannot backdate
/// the application of a tag.
/// 
/// For more information, see Adding tags and labels to Amazon Keyspaces resources
/// (<https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html)>
/// in the Amazon Keyspaces Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableTags {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub key: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

/// 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) (<https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html)>
/// in the Amazon Keyspaces Developer Guide.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableTtl {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
}

/// TableStatus defines the observed state of Table
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableStatus {
    /// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
    /// that is used to contain resource sync state, account ownership,
    /// constructed ARN for the resource
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "ackResourceMetadata")]
    pub ack_resource_metadata: Option<TableStatusAckResourceMetadata>,
    /// All CRs managed by ACK have a common `Status.Conditions` member that
    /// contains a collection of `ackv1alpha1.Condition` objects that describe
    /// the various terminal states of the CR and its backend AWS service API
    /// resource
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<Condition>>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
}

/// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
/// that is used to contain resource sync state, account ownership,
/// constructed ARN for the resource
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TableStatusAckResourceMetadata {
    /// ARN is the Amazon Resource Name for the resource. This is a
    /// globally-unique identifier and is set only by the ACK service controller
    /// once the controller has orchestrated the creation of the resource OR
    /// when it has verified that an "adopted" resource (a resource where the
    /// ARN annotation was set by the Kubernetes user on the CR) exists and
    /// matches the supplied CR's Spec field values.
    /// <https://github.com/aws/aws-controllers-k8s/issues/270>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub arn: Option<String>,
    /// OwnerAccountID is the AWS Account ID of the account that owns the
    /// backend AWS service API resource.
    #[serde(rename = "ownerAccountID")]
    pub owner_account_id: String,
    /// Region is the AWS region in which the resource exists or will exist.
    pub region: String,
}