Skip to content

Restore Table

keyspaces_restore_table R Documentation

Restores the table to the specified point in time within the earliest_restorable_timestamp and the current time

Description

Restores the 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, restore_table restores the capacity mode, auto scaling settings, encryption settings, 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 units

  • Auto scaling 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:

  • Identity and Access Management (IAM) policies

  • Amazon CloudWatch metrics and alarms

Usage

keyspaces_restore_table(sourceKeyspaceName, sourceTableName,
  targetKeyspaceName, targetTableName, restoreTimestamp,
  capacitySpecificationOverride, encryptionSpecificationOverride,
  pointInTimeRecoveryOverride, tagsOverride, autoScalingSpecification,
  replicaSpecifications)

Arguments

sourceKeyspaceName

[required] The keyspace name of the source table.

sourceTableName

[required] The name of the source table.

targetKeyspaceName

[required] The name of the target keyspace.

targetTableName

[required] The name of the target table.

restoreTimestamp

The restore timestamp in ISO 8601 format.

capacitySpecificationOverride

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.

encryptionSpecificationOverride

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.

pointInTimeRecoveryOverride

Specifies the pointInTimeRecovery settings for the target table. The options are:

  • status=ENABLED

  • status=DISABLED

If it's not specified, the default is status=DISABLED.

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

tagsOverride

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.

autoScalingSpecification

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

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

replicaSpecifications

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

Value

A list with the following syntax:

list(
  restoredTableARN = "string"
)

Request syntax

svc$restore_table(
  sourceKeyspaceName = "string",
  sourceTableName = "string",
  targetKeyspaceName = "string",
  targetTableName = "string",
  restoreTimestamp = as.POSIXct(
    "2015-01-01"
  ),
  capacitySpecificationOverride = list(
    throughputMode = "PAY_PER_REQUEST"|"PROVISIONED",
    readCapacityUnits = 123,
    writeCapacityUnits = 123
  ),
  encryptionSpecificationOverride = list(
    type = "CUSTOMER_MANAGED_KMS_KEY"|"AWS_OWNED_KMS_KEY",
    kmsKeyIdentifier = "string"
  ),
  pointInTimeRecoveryOverride = list(
    status = "ENABLED"|"DISABLED"
  ),
  tagsOverride = list(
    list(
      key = "string",
      value = "string"
    )
  ),
  autoScalingSpecification = list(
    writeCapacityAutoScaling = list(
      autoScalingDisabled = TRUE|FALSE,
      minimumUnits = 123,
      maximumUnits = 123,
      scalingPolicy = list(
        targetTrackingScalingPolicyConfiguration = list(
          disableScaleIn = TRUE|FALSE,
          scaleInCooldown = 123,
          scaleOutCooldown = 123,
          targetValue = 123.0
        )
      )
    ),
    readCapacityAutoScaling = list(
      autoScalingDisabled = TRUE|FALSE,
      minimumUnits = 123,
      maximumUnits = 123,
      scalingPolicy = list(
        targetTrackingScalingPolicyConfiguration = list(
          disableScaleIn = TRUE|FALSE,
          scaleInCooldown = 123,
          scaleOutCooldown = 123,
          targetValue = 123.0
        )
      )
    )
  ),
  replicaSpecifications = list(
    list(
      region = "string",
      readCapacityUnits = 123,
      readCapacityAutoScaling = list(
        autoScalingDisabled = TRUE|FALSE,
        minimumUnits = 123,
        maximumUnits = 123,
        scalingPolicy = list(
          targetTrackingScalingPolicyConfiguration = list(
            disableScaleIn = TRUE|FALSE,
            scaleInCooldown = 123,
            scaleOutCooldown = 123,
            targetValue = 123.0
          )
        )
      )
    )
  )
)