The AWS SDK for JavaScript v2 has reached end-of-support.
We recommend that you migrate to AWS SDK for JavaScript v3. For additional details and information on how to migrate, please refer to the announcement.

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

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 */
  replicationSpecification: {
    replicationStrategy: SINGLE_REGION | MULTI_REGION, /* required */
    regionList: [
      'STRING_VALUE',
      /* more items */
    ]
  },
  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.

    • replicationSpecification — (map)

      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.

      • replicationStrategyrequired — (String)

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

        Possible values include:
        • "SINGLE_REGION"
        • "MULTI_REGION"
      • regionList — (Array<String>)

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

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 */
  autoScalingSpecification: {
    readCapacityAutoScaling: {
      autoScalingDisabled: true || false,
      maximumUnits: 'NUMBER_VALUE',
      minimumUnits: 'NUMBER_VALUE',
      scalingPolicy: {
        targetTrackingScalingPolicyConfiguration: {
          targetValue: 'NUMBER_VALUE', /* required */
          disableScaleIn: true || false,
          scaleInCooldown: 'NUMBER_VALUE',
          scaleOutCooldown: 'NUMBER_VALUE'
        }
      }
    },
    writeCapacityAutoScaling: {
      autoScalingDisabled: true || false,
      maximumUnits: 'NUMBER_VALUE',
      minimumUnits: 'NUMBER_VALUE',
      scalingPolicy: {
        targetTrackingScalingPolicyConfiguration: {
          targetValue: 'NUMBER_VALUE', /* required */
          disableScaleIn: true || false,
          scaleInCooldown: 'NUMBER_VALUE',
          scaleOutCooldown: 'NUMBER_VALUE'
        }
      }
    }
  },
  capacitySpecification: {
    throughputMode: PAY_PER_REQUEST | PROVISIONED, /* required */
    readCapacityUnits: 'NUMBER_VALUE',
    writeCapacityUnits: 'NUMBER_VALUE'
  },
  clientSideTimestamps: {
    status: ENABLED /* required */
  },
  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 */
  },
  replicaSpecifications: [
    {
      region: 'STRING_VALUE', /* required */
      readCapacityAutoScaling: {
        autoScalingDisabled: true || false,
        maximumUnits: 'NUMBER_VALUE',
        minimumUnits: 'NUMBER_VALUE',
        scalingPolicy: {
          targetTrackingScalingPolicyConfiguration: {
            targetValue: 'NUMBER_VALUE', /* required */
            disableScaleIn: true || false,
            scaleInCooldown: 'NUMBER_VALUE',
            scaleOutCooldown: 'NUMBER_VALUE'
          }
        }
      },
      readCapacityUnits: 'NUMBER_VALUE'
    },
    /* more items */
  ],
  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:

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

      • statusrequired — (String)

        The options are:

        • status=ENABLED

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

    • clientSideTimestamps — (map)

      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.

      • statusrequired — (String)

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

        Possible values include:
        • "ENABLED"
    • autoScalingSpecification — (map)

      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.

      • writeCapacityAutoScaling — (map)

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

        • autoScalingDisabled — (Boolean)

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

        • minimumUnits — (Integer)

          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 — (Integer)

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

        • scalingPolicy — (map)

          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.

          • targetTrackingScalingPolicyConfiguration — (map)

            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.

            • disableScaleIn — (Boolean)

              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.

            • scaleInCooldown — (Integer)

              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.

            • scaleOutCooldown — (Integer)

              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.

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

      • readCapacityAutoScaling — (map)

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

        • autoScalingDisabled — (Boolean)

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

        • minimumUnits — (Integer)

          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 — (Integer)

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

        • scalingPolicy — (map)

          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.

          • targetTrackingScalingPolicyConfiguration — (map)

            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.

            • disableScaleIn — (Boolean)

              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.

            • scaleInCooldown — (Integer)

              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.

            • scaleOutCooldown — (Integer)

              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.

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

    • replicaSpecifications — (Array<map>)

      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)

      • regionrequired — (String)

        The Amazon Web Services Region.

      • readCapacityUnits — (Integer)

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

      • readCapacityAutoScaling — (map)

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

        • autoScalingDisabled — (Boolean)

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

        • minimumUnits — (Integer)

          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 — (Integer)

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

        • scalingPolicy — (map)

          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.

          • targetTrackingScalingPolicyConfiguration — (map)

            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.

            • disableScaleIn — (Boolean)

              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.

            • scaleInCooldown — (Integer)

              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.

            • scaleOutCooldown — (Integer)

              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.

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

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)

        Returns the ARN of the keyspace.

      • replicationStrategy — (String)

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

        Possible values include:
        • "SINGLE_REGION"
        • "MULTI_REGION"
      • replicationRegions — (Array<String>)

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

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: