Module Smaws_Client_Keyspaces

Keyspaces client library built on EIO.

Types

type rs =
  1. | SINGLE_REGION
  2. | MULTI_REGION
type validation_exception = {
  1. message : string option;
    (*

    Description of the error.

    *)
}

The operation failed due to an invalid or malformed request.

type update_table_response = {
  1. resource_arn : string;
    (*

    The Amazon Resource Name (ARN) of the modified table.

    *)
}
type column_definition = {
  1. type_ : string;
    (*

    The data type of the column. For a list of available data types, see Data types in the Amazon Keyspaces Developer Guide.

    *)
  2. name : string;
    (*

    The name of the column.

    *)
}

The names and data types of regular columns.

type throughput_mode =
  1. | PAY_PER_REQUEST
  2. | PROVISIONED
type capacity_specification = {
  1. write_capacity_units : int option;
    (*

    The throughput capacity specified for write operations defined in write capacity units (WCUs).

    *)
  2. read_capacity_units : int option;
    (*

    The throughput capacity specified for read operations defined in read capacity units (RCUs).

    *)
  3. throughput_mode : throughput_mode;
    (*

    The read/write throughput capacity mode for a 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.

    *)
}

Amazon Keyspaces has two read/write capacity modes for processing reads and writes on your tables:

  • On-demand (default)
  • Provisioned

The read/write capacity mode that you choose controls how you are charged for read and write throughput and how table throughput capacity is managed.

For more information, see Read/write capacity modes in the Amazon Keyspaces Developer Guide.

type encryption_type =
  1. | CUSTOMER_MANAGED_KMS_KEY
  2. | AWS_OWNED_KMS_KEY
type encryption_specification = {
  1. kms_key_identifier : string option;
    (*

    The Amazon Resource Name (ARN) of the customer managed KMS key, for example kms_key_identifier:ARN.

    *)
  2. type_ : encryption_type;
    (*

    The encryption option specified for the table. You can choose one of the following KMS keys (KMS keys):

    • 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.

    *)
}

Amazon Keyspaces encrypts and decrypts the table data at rest transparently and integrates with Key Management Service for storing and managing the encryption key. You can choose one of the following KMS keys (KMS keys):

  • Amazon Web Services owned key - This is the default encryption type. The key is owned by Amazon Keyspaces (no additional charge).
  • Customer managed key - This key is stored in your account and is created, owned, and managed by you. You have full control over the customer managed key (KMS charges apply).

For more information about encryption at rest in Amazon Keyspaces, see Encryption at rest in the Amazon Keyspaces Developer Guide.

For more information about KMS, see KMS management service concepts in the Key Management Service Developer Guide.

type point_in_time_recovery_status =
  1. | ENABLED
  2. | DISABLED
type point_in_time_recovery = {
  1. status : point_in_time_recovery_status;
    (*

    The options are:

    • status=ENABLED
    • status=DISABLED
    *)
}

Point-in-time recovery (PITR) helps protect your Amazon Keyspaces tables from accidental write or delete operations by providing you continuous backups of your table data.

For more information, see Point-in-time recovery in the Amazon Keyspaces Developer Guide.

type time_to_live_status =
  1. | ENABLED
type time_to_live = {
  1. status : time_to_live_status;
    (*

    Shows how to enable custom Time to Live (TTL) settings for the specified table.

    *)
}

Enable custom Time to Live (TTL) settings for rows and columns without setting a TTL default for the specified table.

For more information, see Enabling TTL on tables in the Amazon Keyspaces Developer Guide.

type client_side_timestamps_status =
  1. | ENABLED
type client_side_timestamps = {
  1. status : client_side_timestamps_status;
    (*

    Shows how to enable client-side timestamps settings for the specified table.

    *)
}

The client-side timestamp setting of the table.

For more information, see How it works: Amazon Keyspaces client-side timestamps in the Amazon Keyspaces Developer Guide.

type target_tracking_scaling_policy_configuration = {
  1. target_value : float;
    (*

    Specifies the target value for the target tracking auto scaling policy.

    Amazon Keyspaces auto scaling scales up capacity automatically when traffic exceeds this target utilization rate, and then back down when it falls below the target. This ensures that the ratio of consumed capacity to provisioned capacity stays at or near this value. You define targetValue as a percentage. A double between 20 and 90.

    *)
  2. scale_out_cooldown : int option;
    (*

    Specifies a scale out cool down period.

    A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts.

    *)
  3. scale_in_cooldown : int option;
    (*

    Specifies a scale-in cool down period.

    A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts.

    *)
  4. disable_scale_in : bool option;
    (*

    Specifies if scale-in is enabled.

    When auto scaling automatically decreases capacity for a table, the table scales in. When scaling policies are set, they can't scale in the table lower than its minimum capacity.

    *)
}

The auto scaling policy that scales a table based on the ratio of consumed to provisioned capacity.

type auto_scaling_policy = {
  1. target_tracking_scaling_policy_configuration : target_tracking_scaling_policy_configuration option;
    (*

    Auto scaling scales up capacity automatically when traffic exceeds this target utilization rate, and then back down when it falls below the target. A double between 20 and 90.

    *)
}

Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near the target value that you specify. You define the target value as a percentage between 20 and 90.

type auto_scaling_settings = {
  1. scaling_policy : auto_scaling_policy option;
    (*

    Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near the target value that you specify. You define the target value as a percentage between 20 and 90.

    *)
  2. maximum_units : int option;
    (*

    Manage costs by specifying the maximum amount of throughput to provision. The value must be between 1 and the max throughput per second quota for your account (40,000 by default).

    *)
  3. minimum_units : int option;
    (*

    The minimum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default).

    *)
  4. auto_scaling_disabled : bool option;
    (*

    This optional parameter enables auto scaling for the table if set to false.

    *)
}

The optional auto scaling settings for a table with provisioned throughput capacity.

To turn on auto scaling for a table in throughputMode:PROVISIONED, you must specify the following parameters.

Configure the minimum and maximum capacity units. The auto scaling policy ensures that capacity never goes below the minimum or above the maximum range.

  • minimumUnits: The minimum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default).
  • maximumUnits: The maximum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default).
  • scalingPolicy: Amazon Keyspaces supports the target tracking scaling policy. The auto scaling target is the provisioned capacity of the table.

    • targetTrackingScalingPolicyConfiguration: To define the target tracking policy, you must define the target value.

      • targetValue: The target utilization rate of the table. Amazon Keyspaces auto scaling ensures that the ratio of consumed capacity to provisioned capacity stays at or near this value. You define targetValue as a percentage. A double between 20 and 90. (Required)
      • disableScaleIn: A boolean that specifies if scale-in is disabled or enabled for the table. This parameter is disabled by default. To turn on scale-in, set the boolean value to FALSE. This means that capacity for a table can be automatically scaled down on your behalf. (Optional)
      • scaleInCooldown: A cooldown period in seconds between scaling activities that lets the table stabilize before another scale in activity starts. If no value is provided, the default is 0. (Optional)
      • scaleOutCooldown: A cooldown period in seconds between scaling activities that lets the table stabilize before another scale out activity starts. If no value is provided, the default is 0. (Optional)

For more information, see Managing throughput capacity automatically with Amazon Keyspaces auto scaling in the Amazon Keyspaces Developer Guide.

type auto_scaling_specification = {
  1. read_capacity_auto_scaling : auto_scaling_settings option;
    (*

    The auto scaling settings for the table's read capacity.

    *)
  2. write_capacity_auto_scaling : auto_scaling_settings option;
    (*

    The auto scaling settings for the table's write capacity.

    *)
}

The optional auto scaling capacity settings for a table in provisioned capacity mode.

type replica_specification = {
  1. read_capacity_auto_scaling : auto_scaling_settings option;
    (*

    The read capacity auto scaling settings for the multi-Region table in the specified Amazon Web Services Region.

    *)
  2. read_capacity_units : int option;
    (*

    The provisioned read capacity units for the multi-Region table in the specified Amazon Web Services Region.

    *)
  3. region : string;
    (*

    The Amazon Web Services Region.

    *)
}

The Amazon Web Services Region specific settings of a multi-Region table.

For a multi-Region table, you can configure the table's read capacity differently per Amazon Web Services Region. You can do this by configuring the following parameters.

  • region: The Region where these settings are applied. (Required)
  • readCapacityUnits: The provisioned read capacity units. (Optional)
  • readCapacityAutoScaling: The read capacity auto scaling settings for the table. (Optional)
type update_table_request = {
  1. replica_specifications : replica_specification list option;
    (*

    The Region specific settings of a multi-Regional table.

    *)
  2. auto_scaling_specification : auto_scaling_specification option;
    (*

    The optional auto scaling settings to update for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic.

    If auto scaling is already enabled for the table, you can use UpdateTable to update the minimum and maximum values or the auto scaling policy settings independently.

    For more information, see Managing throughput capacity automatically with Amazon Keyspaces auto scaling in the Amazon Keyspaces Developer Guide.

    *)
  3. client_side_timestamps : client_side_timestamps option;
    (*

    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.

    *)
  4. default_time_to_live : int option;
    (*

    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.

    *)
  5. ttl : time_to_live option;
    (*

    Modifies 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.

    *)
  6. point_in_time_recovery : point_in_time_recovery option;
    (*

    Modifies the pointInTimeRecovery settings of 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.

    *)
  7. encryption_specification : encryption_specification option;
    (*

    Modifies the encryption settings of 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 AWS_OWNED_KMS_KEY.

    For more information, see Encryption at rest in the Amazon Keyspaces Developer Guide.

    *)
  8. capacity_specification : capacity_specification option;
    (*

    Modifies 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.

    *)
  9. add_columns : column_definition list option;
    (*

    For each column to be added to the specified table:

    • name - The name of the column.
    • type - An Amazon Keyspaces data type. For more information, see Data types in the Amazon Keyspaces Developer Guide.
    *)
  10. table_name : string;
    (*

    The name of the table.

    *)
  11. keyspace_name : string;
    (*

    The name of the keyspace the specified table is stored in.

    *)
}
type service_quota_exceeded_exception = {
  1. message : string option;
    (*

    Description of the error.

    *)
}

The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer Guide.

type resource_not_found_exception = {
  1. resource_arn : string option;
    (*

    The unique identifier in the format of Amazon Resource Name (ARN), for the resource not found.

    *)
  2. message : string option;
    (*

    Description of the error.

    *)
}

The operation tried to access a keyspace or table that doesn't exist. The resource might not be specified correctly, or its status might not be ACTIVE.

type internal_server_exception = {
  1. message : string option;
    (*

    Description of the error.

    *)
}

Amazon Keyspaces was unable to fully process this request because of an internal server error.

type conflict_exception = {
  1. message : string option;
    (*

    Description of the error.

    *)
}

Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists.

type access_denied_exception = {
  1. message : string option;
    (*

    Description of the error.

    *)
}

You don't have sufficient access permissions to perform this action.

type untag_resource_response = unit
type tag = {
  1. value : string;
    (*

    The value of the tag. Tag values are case-sensitive and can be null.

    *)
  2. key : string;
    (*

    The key of the tag. Tag keys are case sensitive. Each Amazon Keyspaces resource can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.

    *)
}

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 in the Amazon Keyspaces Developer Guide.

type untag_resource_request = {
  1. tags : tag list;
    (*

    A list of existing tags to be removed from the Amazon Keyspaces resource.

    *)
  2. resource_arn : string;
    (*

    The Amazon Keyspaces resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).

    *)
}
type tag_resource_response = unit
type tag_resource_request = {
  1. tags : tag list;
    (*

    The tags to be assigned to the Amazon Keyspaces resource.

    *)
  2. resource_arn : string;
    (*

    The Amazon Resource Name (ARN) of the Amazon Keyspaces resource to which to add tags.

    *)
}
type table_summary = {
  1. resource_arn : string;
    (*

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

    *)
  2. table_name : string;
    (*

    The name of the table.

    *)
  3. keyspace_name : string;
    (*

    The name of the keyspace that the table is stored in.

    *)
}

Returns the name of the specified table, the keyspace it is stored in, and the unique identifier in the format of an Amazon Resource Name (ARN).

type table_status =
  1. | ACTIVE
  2. | CREATING
  3. | UPDATING
  4. | DELETING
  5. | DELETED
  6. | RESTORING
  7. | INACCESSIBLE_ENCRYPTION_CREDENTIALS
type static_column = {
  1. name : string;
    (*

    The name of the static column.

    *)
}

The static columns of the table. Static columns store values that are shared by all rows in the same partition.

type sort_order =
  1. | ASC
  2. | DESC
type partition_key = {
  1. name : string;
    (*

    The name(s) of the partition key column(s).

    *)
}

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.

type clustering_key = {
  1. order_by : sort_order;
    (*

    Sets the ascendant (ASC) or descendant (DESC) order modifier.

    *)
  2. name : string;
    (*

    The name(s) of the clustering column(s).

    *)
}

The optional clustering column portion of your primary key determines how the data is clustered and sorted within each partition.

type schema_definition = {
  1. static_columns : static_column list option;
    (*

    The columns that have been defined as STATIC. Static columns store values that are shared by all rows in the same partition.

    *)
  2. clustering_keys : clustering_key list option;
    (*

    The columns that are part of the clustering key of the table.

    *)
  3. partition_keys : partition_key list;
    (*

    The columns that are part of the partition key of the table .

    *)
  4. all_columns : column_definition list;
    (*

    The regular columns of the table.

    *)
}

Describes the schema of the table.

type restore_table_response = {
  1. restored_table_ar_n : string;
    (*

    The Amazon Resource Name (ARN) of the restored table.

    *)
}
type restore_table_request = {
  1. replica_specifications : replica_specification list option;
    (*

    The optional Region specific settings of a multi-Regional table.

    *)
  2. auto_scaling_specification : auto_scaling_specification option;
    (*

    The optional auto scaling settings for the restored table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic.

    For more information, see Managing throughput capacity automatically with Amazon Keyspaces auto scaling in the Amazon Keyspaces Developer Guide.

    *)
  3. tags_override : tag list option;
    (*

    A list of key-value pair tags to be attached to the restored table.

    For more information, see Adding tags and labels to Amazon Keyspaces resources in the Amazon Keyspaces Developer Guide.

    *)
  4. point_in_time_recovery_override : point_in_time_recovery option;
    (*

    Specifies the pointInTimeRecovery settings for the target 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.

    *)
  5. encryption_specification_override : encryption_specification option;
    (*

    Specifies the encryption settings for the target 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.

    *)
  6. capacity_specification_override : capacity_specification option;
    (*

    Specifies the read/write throughput capacity mode for the target table. The options are:

    • throughputMode:PAY_PER_REQUEST
    • 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.

    *)
  7. restore_timestamp : float option;
    (*

    The restore timestamp in ISO 8601 format.

    *)
  8. target_table_name : string;
    (*

    The name of the target table.

    *)
  9. target_keyspace_name : string;
    (*

    The name of the target keyspace.

    *)
  10. source_table_name : string;
    (*

    The name of the source table.

    *)
  11. source_keyspace_name : string;
    (*

    The keyspace name of the source table.

    *)
}
type replication_specification = {
  1. region_list : string list option;
    (*

    The regionList can contain up to six Amazon Web Services Regions where the keyspace is replicated in.

    *)
  2. replication_strategy : rs;
    (*

    The replicationStrategy of a keyspace, the required value is SINGLE_REGION or MULTI_REGION.

    *)
}

The replication specification of the keyspace includes:

  • regionList - up to six Amazon Web Services Regions where the keyspace is replicated in.
  • replicationStrategy - the required value is SINGLE_REGION or MULTI_REGION.
type capacity_specification_summary = {
  1. last_update_to_pay_per_request_timestamp : float option;
    (*

    The timestamp of the last operation that changed the provisioned throughput capacity of a table.

    *)
  2. write_capacity_units : int option;
    (*

    The throughput capacity specified for write operations defined in write capacity units (WCUs).

    *)
  3. read_capacity_units : int option;
    (*

    The throughput capacity specified for read operations defined in read capacity units (RCUs).

    *)
  4. throughput_mode : throughput_mode;
    (*

    The read/write throughput capacity mode for a 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.

    *)
}

The read/write throughput capacity mode for a table. The options are:

  • throughputMode:PAY_PER_REQUEST and
  • throughputMode:PROVISIONED.

For more information, see Read/write capacity modes in the Amazon Keyspaces Developer Guide.

type replica_specification_summary = {
  1. capacity_specification : capacity_specification_summary option;
  2. status : table_status option;
    (*

    The status of the multi-Region table in the specified Amazon Web Services Region.

    *)
  3. region : string option;
    (*

    The Amazon Web Services Region.

    *)
}

The Region-specific settings of a multi-Region table in the specified Amazon Web Services Region.

If the multi-Region table is using provisioned capacity and has optional auto scaling policies configured, note that the Region specific summary returns both read and write capacity settings. But only Region specific read capacity settings can be configured for a multi-Region table. In a multi-Region table, your write capacity units will be synced across all Amazon Web Services Regions to ensure that there is enough capacity to replicate write events across Regions.

type replica_auto_scaling_specification = {
  1. auto_scaling_specification : auto_scaling_specification option;
    (*

    The auto scaling settings for a multi-Region table in the specified Amazon Web Services Region.

    *)
  2. region : string option;
    (*

    The Amazon Web Services Region.

    *)
}

The auto scaling settings of a multi-Region table in the specified Amazon Web Services Region.

type point_in_time_recovery_summary = {
  1. earliest_restorable_timestamp : float option;
    (*

    Specifies the earliest possible restore point of the table in ISO 8601 format.

    *)
  2. status : point_in_time_recovery_status;
    (*

    Shows if point-in-time recovery is enabled or disabled for the specified table.

    *)
}

The point-in-time recovery status of the specified table.

type list_tags_for_resource_response = {
  1. tags : tag list option;
    (*

    A list of tags.

    *)
  2. next_token : string option;
    (*

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

    *)
}
type list_tags_for_resource_request = {
  1. max_results : int option;
    (*

    The total number of tags to return in the output. If the total number of tags available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation.

    *)
  2. next_token : string option;
    (*

    The pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

    *)
  3. resource_arn : string;
    (*

    The Amazon Resource Name (ARN) of the Amazon Keyspaces resource.

    *)
}
type list_tables_response = {
  1. tables : table_summary list option;
    (*

    A list of tables.

    *)
  2. next_token : string option;
    (*

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

    *)
}
type list_tables_request = {
  1. keyspace_name : string;
    (*

    The name of the keyspace.

    *)
  2. max_results : int option;
    (*

    The total number of tables to return in the output. If the total number of tables available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation.

    *)
  3. next_token : string option;
    (*

    The pagination token. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation.

    *)
}
type keyspace_summary = {
  1. replication_regions : string list option;
    (*

    If the replicationStrategy of the keyspace is MULTI_REGION, a list of replication Regions is returned.

    *)
  2. replication_strategy : rs;
    (*

    This property specifies if a keyspace is a single Region keyspace or a multi-Region keyspace. The available values are SINGLE_REGION or MULTI_REGION.

    *)
  3. resource_arn : string;
    (*

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

    *)
  4. keyspace_name : string;
    (*

    The name of the keyspace.

    *)
}

Represents the properties of a keyspace.

type list_keyspaces_response = {
  1. keyspaces : keyspace_summary list;
    (*

    A list of keyspaces.

    *)
  2. next_token : string option;
    (*

    A token to specify where to start paginating. This is the NextToken from a previously truncated response.

    *)
}
type list_keyspaces_request = {
  1. max_results : int option;
    (*

    The total number of keyspaces to return in the output. If the total number of keyspaces available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as an argument of a subsequent API invocation.

    *)
  2. next_token : string option;
    (*

    The pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

    *)
}
type get_table_auto_scaling_settings_response = {
  1. replica_specifications : replica_auto_scaling_specification list option;
    (*

    The Amazon Web Services Region specific settings of a multi-Region table. Returns the settings for all Regions the table is replicated in.

    *)
  2. auto_scaling_specification : auto_scaling_specification option;
    (*

    The auto scaling settings of the table.

    *)
  3. resource_arn : string;
    (*

    The Amazon Resource Name (ARN) of the table.

    *)
  4. table_name : string;
    (*

    The name of the table.

    *)
  5. keyspace_name : string;
    (*

    The name of the keyspace.

    *)
}
type get_table_auto_scaling_settings_request = {
  1. table_name : string;
    (*

    The name of the table.

    *)
  2. keyspace_name : string;
    (*

    The name of the keyspace.

    *)
}
type comment = {
  1. message : string;
    (*

    An optional description of the table.

    *)
}

An optional comment that describes the table.

type get_table_response = {
  1. replica_specifications : replica_specification_summary list option;
    (*

    Returns the Amazon Web Services Region specific settings of all Regions a multi-Region table is replicated in.

    *)
  2. client_side_timestamps : client_side_timestamps option;
    (*

    The client-side timestamps setting of the table.

    *)
  3. comment : comment option;
    (*

    The the description of the specified table.

    *)
  4. default_time_to_live : int option;
    (*

    The default Time to Live settings in seconds of the specified table.

    *)
  5. ttl : time_to_live option;
    (*

    The custom Time to Live settings of the specified table.

    *)
  6. point_in_time_recovery : point_in_time_recovery_summary option;
    (*

    The point-in-time recovery status of the specified table.

    *)
  7. encryption_specification : encryption_specification option;
    (*

    The encryption settings of the specified table.

    *)
  8. capacity_specification : capacity_specification_summary option;
    (*

    The read/write throughput capacity mode for a table. The options are:

    • throughputMode:PAY_PER_REQUEST
    • throughputMode:PROVISIONED
    *)
  9. schema_definition : schema_definition option;
    (*

    The schema definition of the specified table.

    *)
  10. status : table_status option;
    (*

    The current status of the specified table.

    *)
  11. creation_timestamp : float option;
    (*

    The creation timestamp of the specified table.

    *)
  12. resource_arn : string;
    (*

    The Amazon Resource Name (ARN) of the specified table.

    *)
  13. table_name : string;
    (*

    The name of the specified table.

    *)
  14. keyspace_name : string;
    (*

    The name of the keyspace that the specified table is stored in.

    *)
}
type get_table_request = {
  1. table_name : string;
    (*

    The name of the table.

    *)
  2. keyspace_name : string;
    (*

    The name of the keyspace that the table is stored in.

    *)
}
type get_keyspace_response = {
  1. replication_regions : string list option;
    (*

    If the replicationStrategy of the keyspace is MULTI_REGION, a list of replication Regions is returned.

    *)
  2. replication_strategy : rs;
    (*

    Returns the replication strategy of the keyspace. The options are SINGLE_REGION or MULTI_REGION.

    *)
  3. resource_arn : string;
    (*

    Returns the ARN of the keyspace.

    *)
  4. keyspace_name : string;
    (*

    The name of the keyspace.

    *)
}
type get_keyspace_request = {
  1. keyspace_name : string;
    (*

    The name of the keyspace.

    *)
}
type delete_table_response = unit
type delete_table_request = {
  1. table_name : string;
    (*

    The name of the table to be deleted.

    *)
  2. keyspace_name : string;
    (*

    The name of the keyspace of the to be deleted table.

    *)
}
type delete_keyspace_response = unit
type delete_keyspace_request = {
  1. keyspace_name : string;
    (*

    The name of the keyspace to be deleted.

    *)
}
type create_table_response = {
  1. resource_arn : string;
    (*

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

    *)
}
type create_table_request = {
  1. replica_specifications : replica_specification list option;
    (*

    The optional Amazon Web Services Region specific settings of a multi-Region table. These settings overwrite the general settings of the table for the specified Region.

    For a multi-Region table in provisioned capacity mode, you can configure the table's read capacity differently for each Region's replica. The write capacity, however, remains synchronized between all replicas to ensure that there's enough capacity to replicate writes across all Regions. To define the read capacity for a table replica in a specific Region, you can do so by configuring the following parameters.

    • region: The Region where these settings are applied. (Required)
    • readCapacityUnits: The provisioned read capacity units. (Optional)
    • readCapacityAutoScaling: The read capacity auto scaling settings for the table. (Optional)
    *)
  2. auto_scaling_specification : auto_scaling_specification option;
    (*

    The optional auto scaling settings for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity automatically on your behalf.

    Auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic. For more information, see Managing throughput capacity automatically with Amazon Keyspaces auto scaling in the Amazon Keyspaces Developer Guide.

    By default, auto scaling is disabled for a table.

    *)
  3. client_side_timestamps : client_side_timestamps option;
    (*

    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.

    *)
  4. tags : tag list option;
    (*

    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.

    *)
  5. default_time_to_live : int option;
    (*

    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.

    *)
  6. ttl : time_to_live option;
    (*

    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.

    *)
  7. point_in_time_recovery : point_in_time_recovery option;
    (*

    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.

    *)
  8. encryption_specification : encryption_specification option;
    (*

    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.

    *)
  9. capacity_specification : capacity_specification option;
    (*

    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.

    *)
  10. comment : comment option;
    (*

    This parameter allows to enter a description of the table.

    *)
  11. schema_definition : schema_definition;
    (*

    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.
    *)
  12. table_name : string;
    (*

    The name of the table.

    *)
  13. keyspace_name : string;
    (*

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

    *)
}
type create_keyspace_response = {
  1. resource_arn : string;
    (*

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

    *)
}
type create_keyspace_request = {
  1. replication_specification : replication_specification option;
    (*

    The replication specification of the keyspace includes:

    • replicationStrategy - the required value is SINGLE_REGION or MULTI_REGION.
    • regionList - if the replicationStrategy is MULTI_REGION, the regionList requires the current Region and at least one additional Amazon Web Services Region where the keyspace is going to be replicated in. The maximum number of supported replication Regions including the current Region is six.
    *)
  2. tags : tag list option;
    (*

    A list of key-value pair tags to be attached to the keyspace.

    For more information, see Adding tags and labels to Amazon Keyspaces resources in the Amazon Keyspaces Developer Guide.

    *)
  3. keyspace_name : string;
    (*

    The name of the keyspace to be created.

    *)
}

Amazon Keyspaces (for Apache Cassandra) is a scalable, highly available, and managed Apache Cassandra-compatible database service. Amazon Keyspaces makes it easy to migrate, run, and scale Cassandra workloads in the Amazon Web Services Cloud. With just a few clicks on the Amazon Web Services Management Console or a few lines of code, you can create keyspaces and tables in Amazon Keyspaces, without deploying any infrastructure or installing software.

In addition to supporting Cassandra Query Language (CQL) requests via open-source Cassandra drivers, Amazon Keyspaces supports data definition language (DDL) operations to manage keyspaces and tables using the Amazon Web Services SDK and CLI, as well as infrastructure as code (IaC) services and tools such as CloudFormation and Terraform. This API reference describes the supported DDL operations in detail.

For the list of all supported CQL APIs, see Supported Cassandra APIs, operations, and data types in Amazon Keyspaces in the Amazon Keyspaces Developer Guide.

To learn how Amazon Keyspaces API actions are recorded with CloudTrail, see Amazon Keyspaces information in CloudTrail in the Amazon Keyspaces Developer Guide.

For more information about Amazon Web Services APIs, for example how to implement retry logic or how to sign Amazon Web Services API requests, see Amazon Web Services APIs in the General Reference.

type base_document = Smaws_Lib.Json.t

Builders

val make_update_table_response : resource_arn:string -> unit -> update_table_response

Create a update_table_response type

val make_column_definition : type_:string -> name:string -> unit -> column_definition

Create a column_definition type

val make_capacity_specification : ?write_capacity_units:int -> ?read_capacity_units:int -> throughput_mode:throughput_mode -> unit -> capacity_specification
val make_encryption_specification : ?kms_key_identifier:string -> type_:encryption_type -> unit -> encryption_specification
val make_point_in_time_recovery : status:point_in_time_recovery_status -> unit -> point_in_time_recovery
val make_time_to_live : status:time_to_live_status -> unit -> time_to_live

Create a time_to_live type

val make_client_side_timestamps : status:client_side_timestamps_status -> unit -> client_side_timestamps
val make_target_tracking_scaling_policy_configuration : ?scale_out_cooldown:int -> ?scale_in_cooldown:int -> ?disable_scale_in:bool -> target_value:float -> unit -> target_tracking_scaling_policy_configuration
val make_auto_scaling_policy : ?target_tracking_scaling_policy_configuration: target_tracking_scaling_policy_configuration -> unit -> auto_scaling_policy

Create a auto_scaling_policy type

val make_auto_scaling_settings : ?scaling_policy:auto_scaling_policy -> ?maximum_units:int -> ?minimum_units:int -> ?auto_scaling_disabled:bool -> unit -> auto_scaling_settings

Create a auto_scaling_settings type

val make_auto_scaling_specification : ?read_capacity_auto_scaling:auto_scaling_settings -> ?write_capacity_auto_scaling:auto_scaling_settings -> unit -> auto_scaling_specification
val make_replica_specification : ?read_capacity_auto_scaling:auto_scaling_settings -> ?read_capacity_units:int -> region:string -> unit -> replica_specification

Create a replica_specification type

val make_update_table_request : ?replica_specifications:replica_specification list -> ?auto_scaling_specification:auto_scaling_specification -> ?client_side_timestamps:client_side_timestamps -> ?default_time_to_live:int -> ?ttl:time_to_live -> ?point_in_time_recovery:point_in_time_recovery -> ?encryption_specification:encryption_specification -> ?capacity_specification:capacity_specification -> ?add_columns:column_definition list -> table_name:string -> keyspace_name:string -> unit -> update_table_request

Create a update_table_request type

val make_untag_resource_response : unit -> untag_resource_response
val make_tag : value:string -> key:string -> unit -> tag

Create a tag type

val make_untag_resource_request : tags:tag list -> resource_arn:string -> unit -> untag_resource_request
val make_tag_resource_response : unit -> tag_resource_response

Create a tag_resource_response type

val make_tag_resource_request : tags:tag list -> resource_arn:string -> unit -> tag_resource_request

Create a tag_resource_request type

val make_table_summary : resource_arn:string -> table_name:string -> keyspace_name:string -> unit -> table_summary

Create a table_summary type

val make_static_column : name:string -> unit -> static_column

Create a static_column type

val make_partition_key : name:string -> unit -> partition_key

Create a partition_key type

val make_clustering_key : order_by:sort_order -> name:string -> unit -> clustering_key

Create a clustering_key type

val make_schema_definition : ?static_columns:static_column list -> ?clustering_keys:clustering_key list -> partition_keys:partition_key list -> all_columns:column_definition list -> unit -> schema_definition

Create a schema_definition type

val make_restore_table_response : restored_table_ar_n:string -> unit -> restore_table_response
val make_restore_table_request : ?replica_specifications:replica_specification list -> ?auto_scaling_specification:auto_scaling_specification -> ?tags_override:tag list -> ?point_in_time_recovery_override:point_in_time_recovery -> ?encryption_specification_override:encryption_specification -> ?capacity_specification_override:capacity_specification -> ?restore_timestamp:float -> target_table_name:string -> target_keyspace_name:string -> source_table_name:string -> source_keyspace_name:string -> unit -> restore_table_request

Create a restore_table_request type

val make_replication_specification : ?region_list:string list -> replication_strategy:rs -> unit -> replication_specification
val make_capacity_specification_summary : ?last_update_to_pay_per_request_timestamp:float -> ?write_capacity_units:int -> ?read_capacity_units:int -> throughput_mode:throughput_mode -> unit -> capacity_specification_summary
val make_replica_specification_summary : ?capacity_specification:capacity_specification_summary -> ?status:table_status -> ?region:string -> unit -> replica_specification_summary
val make_replica_auto_scaling_specification : ?auto_scaling_specification:auto_scaling_specification -> ?region:string -> unit -> replica_auto_scaling_specification
val make_point_in_time_recovery_summary : ?earliest_restorable_timestamp:float -> status:point_in_time_recovery_status -> unit -> point_in_time_recovery_summary
val make_list_tags_for_resource_response : ?tags:tag list -> ?next_token:string -> unit -> list_tags_for_resource_response
val make_list_tags_for_resource_request : ?max_results:int -> ?next_token:string -> resource_arn:string -> unit -> list_tags_for_resource_request
val make_list_tables_response : ?tables:table_summary list -> ?next_token:string -> unit -> list_tables_response

Create a list_tables_response type

val make_list_tables_request : ?max_results:int -> ?next_token:string -> keyspace_name:string -> unit -> list_tables_request

Create a list_tables_request type

val make_keyspace_summary : ?replication_regions:string list -> replication_strategy:rs -> resource_arn:string -> keyspace_name:string -> unit -> keyspace_summary

Create a keyspace_summary type

val make_list_keyspaces_response : ?next_token:string -> keyspaces:keyspace_summary list -> unit -> list_keyspaces_response
val make_list_keyspaces_request : ?max_results:int -> ?next_token:string -> unit -> list_keyspaces_request
val make_get_table_auto_scaling_settings_response : ?replica_specifications:replica_auto_scaling_specification list -> ?auto_scaling_specification:auto_scaling_specification -> resource_arn:string -> table_name:string -> keyspace_name:string -> unit -> get_table_auto_scaling_settings_response
val make_get_table_auto_scaling_settings_request : table_name:string -> keyspace_name:string -> unit -> get_table_auto_scaling_settings_request
val make_comment : message:string -> unit -> comment

Create a comment type

val make_get_table_response : ?replica_specifications:replica_specification_summary list -> ?client_side_timestamps:client_side_timestamps -> ?comment:comment -> ?default_time_to_live:int -> ?ttl:time_to_live -> ?point_in_time_recovery:point_in_time_recovery_summary -> ?encryption_specification:encryption_specification -> ?capacity_specification:capacity_specification_summary -> ?schema_definition:schema_definition -> ?status:table_status -> ?creation_timestamp:float -> resource_arn:string -> table_name:string -> keyspace_name:string -> unit -> get_table_response

Create a get_table_response type

val make_get_table_request : table_name:string -> keyspace_name:string -> unit -> get_table_request

Create a get_table_request type

val make_get_keyspace_response : ?replication_regions:string list -> replication_strategy:rs -> resource_arn:string -> keyspace_name:string -> unit -> get_keyspace_response

Create a get_keyspace_response type

val make_get_keyspace_request : keyspace_name:string -> unit -> get_keyspace_request

Create a get_keyspace_request type

val make_delete_table_response : unit -> delete_table_response

Create a delete_table_response type

val make_delete_table_request : table_name:string -> keyspace_name:string -> unit -> delete_table_request

Create a delete_table_request type

val make_delete_keyspace_response : unit -> delete_keyspace_response
val make_delete_keyspace_request : keyspace_name:string -> unit -> delete_keyspace_request
val make_create_table_response : resource_arn:string -> unit -> create_table_response

Create a create_table_response type

val make_create_table_request : ?replica_specifications:replica_specification list -> ?auto_scaling_specification:auto_scaling_specification -> ?client_side_timestamps:client_side_timestamps -> ?tags:tag list -> ?default_time_to_live:int -> ?ttl:time_to_live -> ?point_in_time_recovery:point_in_time_recovery -> ?encryption_specification:encryption_specification -> ?capacity_specification:capacity_specification -> ?comment:comment -> schema_definition:schema_definition -> table_name:string -> keyspace_name:string -> unit -> create_table_request

Create a create_table_request type

val make_create_keyspace_response : resource_arn:string -> unit -> create_keyspace_response
val make_create_keyspace_request : ?replication_specification:replication_specification -> ?tags:tag list -> keyspace_name:string -> unit -> create_keyspace_request

Operations

module CreateKeyspace : sig ... end
module CreateTable : sig ... end
module DeleteKeyspace : sig ... end
module DeleteTable : sig ... end
module GetKeyspace : sig ... end
module GetTable : sig ... end
module GetTableAutoScalingSettings : sig ... end
module ListKeyspaces : sig ... end
module ListTables : sig ... end
module ListTagsForResource : sig ... end
module RestoreTable : sig ... end
module TagResource : sig ... end
module UntagResource : sig ... end
module UpdateTable : sig ... end