You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

Class: AWS.Keyspaces

Inherits:
AWS.Service show all
Identifier:
keyspaces
API Version:
2022-02-10
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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

Sending a Request Using Keyspaces

var keyspaces = new AWS.Keyspaces();
keyspaces.createKeyspace(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Keyspaces object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var keyspaces = new AWS.Keyspaces({apiVersion: '2022-02-10'});

You can also set the API version globally in AWS.config.apiVersions using the keyspaces service identifier:

AWS.config.apiVersions = {
  keyspaces: '2022-02-10',
  // other service API versions
};

var keyspaces = new AWS.Keyspaces();

Version:

  • 2022-02-10

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService

Constructor Details

new AWS.Keyspaces(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Keyspaces object

var keyspaces = new AWS.Keyspaces({apiVersion: '2022-02-10'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Keyspaces.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Keyspaces.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Keyspaces.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createKeyspace(params = {}, callback) ⇒ AWS.Request

The CreateKeyspace operation adds a new keyspace to your account. In an Amazon Web Services account, keyspace names must be unique within each Region.

CreateKeyspace is an asynchronous operation. You can monitor the creation status of the new keyspace by using the GetKeyspace operation.

For more information, see Creating keyspaces in the Amazon Keyspaces Developer Guide.

Service Reference:

Examples:

Calling the createKeyspace operation

var params = {
  keyspaceName: 'STRING_VALUE', /* required */
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
keyspaces.createKeyspace(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • keyspaceName — (String)

      The name of the keyspace to be created.

    • tags — (Array<map>)

      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.

      • keyrequired — (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.

      • valuerequired — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • resourceArn — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createTable(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createTable operation

var params = {
  keyspaceName: 'STRING_VALUE', /* required */
  schemaDefinition: { /* required */
    allColumns: [ /* required */
      {
        name: 'STRING_VALUE', /* required */
        type: 'STRING_VALUE' /* required */
      },
      /* more items */
    ],
    partitionKeys: [ /* required */
      {
        name: 'STRING_VALUE' /* required */
      },
      /* more items */
    ],
    clusteringKeys: [
      {
        name: 'STRING_VALUE', /* required */
        orderBy: ASC | DESC /* required */
      },
      /* more items */
    ],
    staticColumns: [
      {
        name: 'STRING_VALUE' /* required */
      },
      /* more items */
    ]
  },
  tableName: 'STRING_VALUE', /* required */
  capacitySpecification: {
    throughputMode: PAY_PER_REQUEST | PROVISIONED, /* required */
    readCapacityUnits: 'NUMBER_VALUE',
    writeCapacityUnits: 'NUMBER_VALUE'
  },
  comment: {
    message: 'STRING_VALUE' /* required */
  },
  defaultTimeToLive: 'NUMBER_VALUE',
  encryptionSpecification: {
    type: CUSTOMER_MANAGED_KMS_KEY | AWS_OWNED_KMS_KEY, /* required */
    kmsKeyIdentifier: 'STRING_VALUE'
  },
  pointInTimeRecovery: {
    status: ENABLED | DISABLED /* required */
  },
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  ttl: {
    status: ENABLED /* required */
  }
};
keyspaces.createTable(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • keyspaceName — (String)

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

    • tableName — (String)

      The name of the table.

    • schemaDefinition — (map)

      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.

      • allColumnsrequired — (Array<map>)

        The regular columns of the table.

        • namerequired — (String)

          The name of the column.

        • typerequired — (String)

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

      • partitionKeysrequired — (Array<map>)

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

        • namerequired — (String)

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

      • clusteringKeys — (Array<map>)

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

        • namerequired — (String)

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

        • orderByrequired — (String)

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

          Possible values include:
          • "ASC"
          • "DESC"
      • staticColumns — (Array<map>)

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

        • namerequired — (String)

          The name of the static column.

    • comment — (map)

      This parameter allows to enter a description of the table.

      • messagerequired — (String)

        An optional description of the table.

    • capacitySpecification — (map)

      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.

      • throughputModerequired — (String)

        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.

        Possible values include:
        • "PAY_PER_REQUEST"
        • "PROVISIONED"
      • readCapacityUnits — (Integer)

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

      • writeCapacityUnits — (Integer)

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

    • encryptionSpecification — (map)

      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.

      • typerequired — (String)

        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.

        Possible values include:
        • "CUSTOMER_MANAGED_KMS_KEY"
        • "AWS_OWNED_KMS_KEY"
      • kmsKeyIdentifier — (String)

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

    • pointInTimeRecovery — (map)

      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.

      • statusrequired — (String)

        The options are:

        ENABLED

        DISABLED

        Possible values include:
        • "ENABLED"
        • "DISABLED"
    • ttl — (map)

      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.

      • statusrequired — (String)

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

        Possible values include:
        • "ENABLED"
    • defaultTimeToLive — (Integer)

      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.

    • tags — (Array<map>)

      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.

      • keyrequired — (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.

      • valuerequired — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • resourceArn — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteKeyspace(params = {}, callback) ⇒ AWS.Request

The DeleteKeyspace operation deletes a keyspace and all of its tables.

Service Reference:

Examples:

Calling the deleteKeyspace operation

var params = {
  keyspaceName: 'STRING_VALUE' /* required */
};
keyspaces.deleteKeyspace(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • keyspaceName — (String)

      The name of the keyspace to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteTable(params = {}, callback) ⇒ AWS.Request

The DeleteTable operation deletes a table and all of its data. After a DeleteTable request is received, the specified table is in the DELETING state until Amazon Keyspaces completes the deletion. If the table is in the ACTIVE state, you can delete it. If a table is either in the CREATING or UPDATING states, then Amazon Keyspaces returns a ResourceInUseException. If the specified table does not exist, Amazon Keyspaces returns a ResourceNotFoundException. If the table is already in the DELETING state, no error is returned.

Service Reference:

Examples:

Calling the deleteTable operation

var params = {
  keyspaceName: 'STRING_VALUE', /* required */
  tableName: 'STRING_VALUE' /* required */
};
keyspaces.deleteTable(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • keyspaceName — (String)

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

    • tableName — (String)

      The name of the table to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getKeyspace(params = {}, callback) ⇒ AWS.Request

Returns the name and the Amazon Resource Name (ARN) of the specified table.

Service Reference:

Examples:

Calling the getKeyspace operation

var params = {
  keyspaceName: 'STRING_VALUE' /* required */
};
keyspaces.getKeyspace(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • keyspaceName — (String)

      The name of the keyspace.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • keyspaceName — (String)

        The name of the keyspace.

      • resourceArn — (String)

        The ARN of the keyspace.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getTable(params = {}, callback) ⇒ AWS.Request

Returns information about the table, including the table's name and current status, the keyspace name, configuration settings, and metadata.

To read table metadata using GetTable, Select action permissions for the table and system tables are required to complete the operation.

Service Reference:

Examples:

Calling the getTable operation

var params = {
  keyspaceName: 'STRING_VALUE', /* required */
  tableName: 'STRING_VALUE' /* required */
};
keyspaces.getTable(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • keyspaceName — (String)

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

    • tableName — (String)

      The name of the table.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • keyspaceName — (String)

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

      • tableName — (String)

        The name of the specified table.

      • resourceArn — (String)

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

      • creationTimestamp — (Date)

        The creation timestamp of the specified table.

      • status — (String)

        The current status of the specified table.

        Possible values include:
        • "ACTIVE"
        • "CREATING"
        • "UPDATING"
        • "DELETING"
        • "DELETED"
        • "RESTORING"
        • "INACCESSIBLE_ENCRYPTION_CREDENTIALS"
      • schemaDefinition — (map)

        The schema definition of the specified table.

        • allColumnsrequired — (Array<map>)

          The regular columns of the table.

          • namerequired — (String)

            The name of the column.

          • typerequired — (String)

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

        • partitionKeysrequired — (Array<map>)

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

          • namerequired — (String)

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

        • clusteringKeys — (Array<map>)

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

          • namerequired — (String)

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

          • orderByrequired — (String)

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

            Possible values include:
            • "ASC"
            • "DESC"
        • staticColumns — (Array<map>)

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

          • namerequired — (String)

            The name of the static column.

      • capacitySpecification — (map)

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

        throughputMode:PAY_PER_REQUEST

        throughputMode:PROVISIONED

        • throughputModerequired — (String)

          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.

          Possible values include:
          • "PAY_PER_REQUEST"
          • "PROVISIONED"
        • readCapacityUnits — (Integer)

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

        • writeCapacityUnits — (Integer)

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

        • lastUpdateToPayPerRequestTimestamp — (Date)

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

      • encryptionSpecification — (map)

        The encryption settings of the specified table.

        • typerequired — (String)

          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.

          Possible values include:
          • "CUSTOMER_MANAGED_KMS_KEY"
          • "AWS_OWNED_KMS_KEY"
        • kmsKeyIdentifier — (String)

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

      • pointInTimeRecovery — (map)

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

        • statusrequired — (String)

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

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • earliestRestorableTimestamp — (Date)

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

      • ttl — (map)

        The custom Time to Live settings of the specified table.

        • statusrequired — (String)

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

          Possible values include:
          • "ENABLED"
      • defaultTimeToLive — (Integer)

        The default Time to Live settings of the specified table.

      • comment — (map)

        The the description of the specified table.

        • messagerequired — (String)

          An optional description of the table.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listKeyspaces(params = {}, callback) ⇒ AWS.Request

Returns a list of keyspaces.

Service Reference:

Examples:

Calling the listKeyspaces operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
keyspaces.listKeyspaces(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

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

    • maxResults — (Integer)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • nextToken — (String)

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

      • keyspaces — (Array<map>)

        A list of keyspaces.

        • keyspaceNamerequired — (String)

          The name of the keyspace.

        • resourceArnrequired — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTables(params = {}, callback) ⇒ AWS.Request

Returns a list of tables for a specified keyspace.

Service Reference:

Examples:

Calling the listTables operation

var params = {
  keyspaceName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
keyspaces.listTables(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

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

    • maxResults — (Integer)

      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.

    • keyspaceName — (String)

      The name of the keyspace.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • nextToken — (String)

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

      • tables — (Array<map>)

        A list of tables.

        • keyspaceNamerequired — (String)

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

        • tableNamerequired — (String)

          The name of the table.

        • resourceArnrequired — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Returns a list of all tags associated with the specified Amazon Keyspaces resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
keyspaces.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

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

    • nextToken — (String)

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

    • maxResults — (Integer)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • nextToken — (String)

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

      • tags — (Array<map>)

        A list of tags.

        • keyrequired — (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.

        • valuerequired — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

restoreTable(params = {}, callback) ⇒ AWS.Request

Restores the specified table to the specified point in time within the earliest_restorable_timestamp and the current time. For more information about restore points, see Time window for PITR continuous backups in the Amazon Keyspaces Developer Guide.

Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account.

When you restore using point in time recovery, Amazon Keyspaces restores your source table's schema and data to the state based on the selected timestamp (day:hour:minute:second) to a new table. The Time to Live (TTL) settings are also restored to the state based on the selected timestamp.

In addition to the table's schema, data, and TTL settings, RestoreTable restores the capacity mode, encryption, and point-in-time recovery settings from the source table. Unlike the table's schema data and TTL settings, which are restored based on the selected timestamp, these settings are always restored based on the table's settings as of the current time or when the table was deleted.

You can also overwrite these settings during restore:

• Read/write capacity mode

• Provisioned throughput capacity settings

• Point-in-time (PITR) settings

• Tags

For more information, see PITR restore settings in the Amazon Keyspaces Developer Guide.

Note that the following settings are not restored, and you must configure them manually for the new table:

• Automatic scaling policies (for tables that use provisioned capacity mode)

• Identity and Access Management (IAM) policies

• Amazon CloudWatch metrics and alarms

Service Reference:

Examples:

Calling the restoreTable operation

var params = {
  sourceKeyspaceName: 'STRING_VALUE', /* required */
  sourceTableName: 'STRING_VALUE', /* required */
  targetKeyspaceName: 'STRING_VALUE', /* required */
  targetTableName: 'STRING_VALUE', /* required */
  capacitySpecificationOverride: {
    throughputMode: PAY_PER_REQUEST | PROVISIONED, /* required */
    readCapacityUnits: 'NUMBER_VALUE',
    writeCapacityUnits: 'NUMBER_VALUE'
  },
  encryptionSpecificationOverride: {
    type: CUSTOMER_MANAGED_KMS_KEY | AWS_OWNED_KMS_KEY, /* required */
    kmsKeyIdentifier: 'STRING_VALUE'
  },
  pointInTimeRecoveryOverride: {
    status: ENABLED | DISABLED /* required */
  },
  restoreTimestamp: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  tagsOverride: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
keyspaces.restoreTable(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • sourceKeyspaceName — (String)

      The keyspace name of the source table.

    • sourceTableName — (String)

      The name of the source table.

    • targetKeyspaceName — (String)

      The name of the target keyspace.

    • targetTableName — (String)

      The name of the target table.

    • restoreTimestamp — (Date)

      The restore timestamp in ISO 8601 format.

    • capacitySpecificationOverride — (map)

      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.

      • throughputModerequired — (String)

        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.

        Possible values include:
        • "PAY_PER_REQUEST"
        • "PROVISIONED"
      • readCapacityUnits — (Integer)

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

      • writeCapacityUnits — (Integer)

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

    • encryptionSpecificationOverride — (map)

      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.

      • typerequired — (String)

        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.

        Possible values include:
        • "CUSTOMER_MANAGED_KMS_KEY"
        • "AWS_OWNED_KMS_KEY"
      • kmsKeyIdentifier — (String)

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

    • pointInTimeRecoveryOverride — (map)

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

      • statusrequired — (String)

        The options are:

        ENABLED

        DISABLED

        Possible values include:
        • "ENABLED"
        • "DISABLED"
    • tagsOverride — (Array<map>)

      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.

      • keyrequired — (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.

      • valuerequired — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • restoredTableARN — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Associates a set of tags with a Amazon Keyspaces resource. You can then activate these user-defined tags so that they appear on the Cost Management Console for cost allocation tracking. For more information, see Adding tags and labels to Amazon Keyspaces resources in the Amazon Keyspaces Developer Guide.

For IAM policy examples that show how to control access to Amazon Keyspaces resources based on tags, see Amazon Keyspaces resource access based on tags in the Amazon Keyspaces Developer Guide.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: [ /* required */
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
keyspaces.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

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

    • tags — (Array<map>)

      The tags to be assigned to the Amazon Keyspaces resource.

      • keyrequired — (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.

      • valuerequired — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes the association of tags from a Amazon Keyspaces resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: [ /* required */
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
keyspaces.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

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

    • tags — (Array<map>)

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

      • keyrequired — (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.

      • valuerequired — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateTable(params = {}, callback) ⇒ AWS.Request

Adds new columns to the table or updates one of the table's settings, for example capacity mode, encryption, point-in-time recovery, or ttl settings. Note that you can only update one specific table setting per update operation.

Service Reference:

Examples:

Calling the updateTable operation

var params = {
  keyspaceName: 'STRING_VALUE', /* required */
  tableName: 'STRING_VALUE', /* required */
  addColumns: [
    {
      name: 'STRING_VALUE', /* required */
      type: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  capacitySpecification: {
    throughputMode: PAY_PER_REQUEST | PROVISIONED, /* required */
    readCapacityUnits: 'NUMBER_VALUE',
    writeCapacityUnits: 'NUMBER_VALUE'
  },
  defaultTimeToLive: 'NUMBER_VALUE',
  encryptionSpecification: {
    type: CUSTOMER_MANAGED_KMS_KEY | AWS_OWNED_KMS_KEY, /* required */
    kmsKeyIdentifier: 'STRING_VALUE'
  },
  pointInTimeRecovery: {
    status: ENABLED | DISABLED /* required */
  },
  ttl: {
    status: ENABLED /* required */
  }
};
keyspaces.updateTable(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • keyspaceName — (String)

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

    • tableName — (String)

      The name of the table.

    • addColumns — (Array<map>)

      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.

      • namerequired — (String)

        The name of the column.

      • typerequired — (String)

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

    • capacitySpecification — (map)

      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.

      • throughputModerequired — (String)

        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.

        Possible values include:
        • "PAY_PER_REQUEST"
        • "PROVISIONED"
      • readCapacityUnits — (Integer)

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

      • writeCapacityUnits — (Integer)

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

    • encryptionSpecification — (map)

      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.

      • typerequired — (String)

        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.

        Possible values include:
        • "CUSTOMER_MANAGED_KMS_KEY"
        • "AWS_OWNED_KMS_KEY"
      • kmsKeyIdentifier — (String)

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

    • pointInTimeRecovery — (map)

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

      • statusrequired — (String)

        The options are:

        ENABLED

        DISABLED

        Possible values include:
        • "ENABLED"
        • "DISABLED"
    • ttl — (map)

      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.

      • statusrequired — (String)

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

        Possible values include:
        • "ENABLED"
    • defaultTimeToLive — (Integer)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • resourceArn — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given Keyspaces resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.

Parameters:

  • state (String)

    the resource state to wait for. Available states for this service are listed in "Waiter Resource States" below.

  • params (map) (defaults to: {})

    a list of parameters for the given state. See each waiter resource state for required parameters.

Callback (callback):

  • function(err, data) { ... }

    Callback containing error and data information. See the respective resource state for the expected error or data information.

    If the waiter times out its requests, it will return a ResourceNotReady error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.