Skip to content

Restores the specified table to the specified point in time within EarliestRestorableDateTime and LatestRestorableDateTime

Description

Restores the specified table to the specified point in time within EarliestRestorableDateTime and LatestRestorableDateTime. You can restore your table to any point in time in the last 35 days. You can set the recovery period to any value between 1 and 35 days. Any number of users can execute up to 50 concurrent restores (any type of restore) in a given account.

When you restore using point in time recovery, DynamoDB restores your table data to the state based on the selected date and time (day:hour:minute:second) to a new table.

Along with data, the following are also included on the new restored table using point in time recovery:

  • Global secondary indexes (GSIs)

  • Local secondary indexes (LSIs)

  • Provisioned read and write capacity

  • Encryption settings

    All these settings come from the current settings of the source table at the time of restore.

You must manually set up the following on the restored table:

  • Auto scaling policies
  • IAM policies
  • Amazon CloudWatch metrics and alarms
  • Tags
  • Stream settings
  • Time to Live (TTL) settings
  • Point in time recovery settings

Usage

dynamodb_restore_table_to_point_in_time(SourceTableArn, SourceTableName,
  TargetTableName, UseLatestRestorableTime, RestoreDateTime,
  BillingModeOverride, GlobalSecondaryIndexOverride,
  LocalSecondaryIndexOverride, ProvisionedThroughputOverride,
  OnDemandThroughputOverride, SSESpecificationOverride,
  VectorIndexOverride)

Arguments

  • SourceTableArn

    The DynamoDB table that will be restored. This value is an Amazon Resource Name (ARN).

  • SourceTableName

    Name of the source table that is being restored.

  • TargetTableName

    [required] The name of the new table to which it must be restored to.

  • UseLatestRestorableTime

    Restore the table to the latest possible time. LatestRestorableDateTime is typically 5 minutes before the current time.

  • RestoreDateTime

    Time in the past to restore the table to.

  • BillingModeOverride

    The billing mode of the restored table.

  • GlobalSecondaryIndexOverride

    List of global secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.

    The WarmThroughput setting is not supported on global secondary indexes when you use restore_table_to_point_in_time. Although WarmThroughput appears in the shared index definition, including it in a GlobalSecondaryIndexOverride entry causes the request to fail with a validation error.

  • LocalSecondaryIndexOverride

    List of local secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.

  • ProvisionedThroughputOverride

    Provisioned throughput settings for the restored table.

  • OnDemandThroughputOverride

    Overrides the on-demand throughput settings for this replica table. If you don't specify a value for this parameter, it uses the source table's on-demand throughput settings.

  • SSESpecificationOverride

    The new server-side encryption settings for the restored table.

  • VectorIndexOverride

    The vector indexes for the restored table. If not specified, all vector indexes from the source table are restored. The indexes provided must match existing vector indexes from the source table. You can choose to exclude some or all of the vector indexes at the time of restore.

Value

A list with the following syntax:

list(
  TableDescription = list(
    AttributeDefinitions = list(
      list(
        AttributeName = "string",
        AttributeType = "S"|"N"|"B"
      )
    ),
    TableName = "string",
    KeySchema = list(
      list(
        AttributeName = "string",
        KeyType = "HASH"|"RANGE"
      )
    ),
    TableStatus = "CREATING"|"UPDATING"|"DELETING"|"ACTIVE"|"INACCESSIBLE_ENCRYPTION_CREDENTIALS"|"ARCHIVING"|"ARCHIVED"|"REPLICATION_NOT_AUTHORIZED",
    CreationDateTime = as.POSIXct(
      "2015-01-01"
    ),
    ProvisionedThroughput = list(
      LastIncreaseDateTime = as.POSIXct(
        "2015-01-01"
      ),
      LastDecreaseDateTime = as.POSIXct(
        "2015-01-01"
      ),
      NumberOfDecreasesToday = 123,
      ReadCapacityUnits = 123,
      WriteCapacityUnits = 123
    ),
    TableSizeBytes = 123,
    ItemCount = 123,
    TableArn = "string",
    TableId = "string",
    BillingModeSummary = list(
      BillingMode = "PROVISIONED"|"PAY_PER_REQUEST",
      LastUpdateToPayPerRequestDateTime = as.POSIXct(
        "2015-01-01"
      )
    ),
    LocalSecondaryIndexes = list(
      list(
        IndexName = "string",
        KeySchema = list(
          list(
            AttributeName = "string",
            KeyType = "HASH"|"RANGE"
          )
        ),
        Projection = list(
          ProjectionType = "ALL"|"KEYS_ONLY"|"INCLUDE",
          NonKeyAttributes = list(
            "string"
          )
        ),
        IndexSizeBytes = 123,
        ItemCount = 123,
        IndexArn = "string"
      )
    ),
    GlobalSecondaryIndexes = list(
      list(
        IndexName = "string",
        KeySchema = list(
          list(
            AttributeName = "string",
            KeyType = "HASH"|"RANGE"
          )
        ),
        Projection = list(
          ProjectionType = "ALL"|"KEYS_ONLY"|"INCLUDE",
          NonKeyAttributes = list(
            "string"
          )
        ),
        IndexStatus = "CREATING"|"UPDATING"|"DELETING"|"ACTIVE",
        Backfilling = TRUE|FALSE,
        ProvisionedThroughput = list(
          LastIncreaseDateTime = as.POSIXct(
            "2015-01-01"
          ),
          LastDecreaseDateTime = as.POSIXct(
            "2015-01-01"
          ),
          NumberOfDecreasesToday = 123,
          ReadCapacityUnits = 123,
          WriteCapacityUnits = 123
        ),
        IndexSizeBytes = 123,
        ItemCount = 123,
        IndexArn = "string",
        OnDemandThroughput = list(
          MaxReadRequestUnits = 123,
          MaxWriteRequestUnits = 123
        ),
        WarmThroughput = list(
          ReadUnitsPerSecond = 123,
          WriteUnitsPerSecond = 123,
          Status = "CREATING"|"UPDATING"|"DELETING"|"ACTIVE"
        )
      )
    ),
    StreamSpecification = list(
      StreamEnabled = TRUE|FALSE,
      StreamViewType = "NEW_IMAGE"|"OLD_IMAGE"|"NEW_AND_OLD_IMAGES"|"KEYS_ONLY"
    ),
    LatestStreamLabel = "string",
    LatestStreamArn = "string",
    GlobalTableVersion = "string",
    Replicas = list(
      list(
        RegionName = "string",
        ReplicaStatus = "CREATING"|"CREATION_FAILED"|"UPDATING"|"DELETING"|"ACTIVE"|"REGION_DISABLED"|"INACCESSIBLE_ENCRYPTION_CREDENTIALS"|"ARCHIVING"|"ARCHIVED"|"REPLICATION_NOT_AUTHORIZED",
        ReplicaArn = "string",
        ReplicaStatusDescription = "string",
        ReplicaStatusPercentProgress = "string",
        KMSMasterKeyId = "string",
        ProvisionedThroughputOverride = list(
          ReadCapacityUnits = 123
        ),
        OnDemandThroughputOverride = list(
          MaxReadRequestUnits = 123
        ),
        WarmThroughput = list(
          ReadUnitsPerSecond = 123,
          WriteUnitsPerSecond = 123,
          Status = "CREATING"|"UPDATING"|"DELETING"|"ACTIVE"|"INACCESSIBLE_ENCRYPTION_CREDENTIALS"|"ARCHIVING"|"ARCHIVED"|"REPLICATION_NOT_AUTHORIZED"
        ),
        GlobalSecondaryIndexes = list(
          list(
            IndexName = "string",
            ProvisionedThroughputOverride = list(
              ReadCapacityUnits = 123
            ),
            OnDemandThroughputOverride = list(
              MaxReadRequestUnits = 123
            ),
            WarmThroughput = list(
              ReadUnitsPerSecond = 123,
              WriteUnitsPerSecond = 123,
              Status = "CREATING"|"UPDATING"|"DELETING"|"ACTIVE"
            )
          )
        ),
        ReplicaInaccessibleDateTime = as.POSIXct(
          "2015-01-01"
        ),
        ReplicaTableClassSummary = list(
          TableClass = "STANDARD"|"STANDARD_INFREQUENT_ACCESS",
          LastUpdateDateTime = as.POSIXct(
            "2015-01-01"
          )
        ),
        GlobalTableSettingsReplicationMode = "ENABLED"|"DISABLED"|"ENABLED_WITH_OVERRIDES"
      )
    ),
    GlobalTableWitnesses = list(
      list(
        RegionName = "string",
        WitnessStatus = "CREATING"|"DELETING"|"ACTIVE"
      )
    ),
    GlobalTableSettingsReplicationMode = "ENABLED"|"DISABLED"|"ENABLED_WITH_OVERRIDES",
    RestoreSummary = list(
      SourceBackupArn = "string",
      SourceTableArn = "string",
      RestoreDateTime = as.POSIXct(
        "2015-01-01"
      ),
      RestoreInProgress = TRUE|FALSE
    ),
    SSEDescription = list(
      Status = "ENABLING"|"ENABLED"|"DISABLING"|"DISABLED"|"UPDATING",
      SSEType = "AES256"|"KMS",
      KMSMasterKeyArn = "string",
      InaccessibleEncryptionDateTime = as.POSIXct(
        "2015-01-01"
      )
    ),
    ArchivalSummary = list(
      ArchivalDateTime = as.POSIXct(
        "2015-01-01"
      ),
      ArchivalReason = "string",
      ArchivalBackupArn = "string"
    ),
    TableClassSummary = list(
      TableClass = "STANDARD"|"STANDARD_INFREQUENT_ACCESS",
      LastUpdateDateTime = as.POSIXct(
        "2015-01-01"
      )
    ),
    DeletionProtectionEnabled = TRUE|FALSE,
    OnDemandThroughput = list(
      MaxReadRequestUnits = 123,
      MaxWriteRequestUnits = 123
    ),
    WarmThroughput = list(
      ReadUnitsPerSecond = 123,
      WriteUnitsPerSecond = 123,
      Status = "CREATING"|"UPDATING"|"DELETING"|"ACTIVE"|"INACCESSIBLE_ENCRYPTION_CREDENTIALS"|"ARCHIVING"|"ARCHIVED"|"REPLICATION_NOT_AUTHORIZED"
    ),
    MultiRegionConsistency = "EVENTUAL"|"STRONG",
    VectorIndexes = list(
      list(
        IndexName = "string",
        SearchSchema = list(
          list(
            AttributeName = "string",
            SearchSchemaElementType = "HASH"|"INLINE_FILTER"
          )
        ),
        Projection = list(
          ProjectionType = "ALL"|"KEYS_ONLY"|"INCLUDE",
          NonKeyAttributes = list(
            "string"
          )
        ),
        VectorAttribute = list(
          AttributeName = "string"
        ),
        Dimensions = 123,
        DistanceFunction = "COSINE"|"DOT_PRODUCT"|"EUCLIDEAN",
        IndexStatus = "CREATING"|"UPDATING"|"DELETING"|"ACTIVE",
        Backfilling = TRUE|FALSE,
        IndexSizeBytes = 123,
        ItemCount = 123,
        IndexArn = "string"
      )
    )
  )
)

Request syntax

svc$restore_table_to_point_in_time(
  SourceTableArn = "string",
  SourceTableName = "string",
  TargetTableName = "string",
  UseLatestRestorableTime = TRUE|FALSE,
  RestoreDateTime = as.POSIXct(
    "2015-01-01"
  ),
  BillingModeOverride = "PROVISIONED"|"PAY_PER_REQUEST",
  GlobalSecondaryIndexOverride = list(
    list(
      IndexName = "string",
      KeySchema = list(
        list(
          AttributeName = "string",
          KeyType = "HASH"|"RANGE"
        )
      ),
      Projection = list(
        ProjectionType = "ALL"|"KEYS_ONLY"|"INCLUDE",
        NonKeyAttributes = list(
          "string"
        )
      ),
      ProvisionedThroughput = list(
        ReadCapacityUnits = 123,
        WriteCapacityUnits = 123
      ),
      OnDemandThroughput = list(
        MaxReadRequestUnits = 123,
        MaxWriteRequestUnits = 123
      ),
      WarmThroughput = list(
        ReadUnitsPerSecond = 123,
        WriteUnitsPerSecond = 123
      )
    )
  ),
  LocalSecondaryIndexOverride = list(
    list(
      IndexName = "string",
      KeySchema = list(
        list(
          AttributeName = "string",
          KeyType = "HASH"|"RANGE"
        )
      ),
      Projection = list(
        ProjectionType = "ALL"|"KEYS_ONLY"|"INCLUDE",
        NonKeyAttributes = list(
          "string"
        )
      )
    )
  ),
  ProvisionedThroughputOverride = list(
    ReadCapacityUnits = 123,
    WriteCapacityUnits = 123
  ),
  OnDemandThroughputOverride = list(
    MaxReadRequestUnits = 123,
    MaxWriteRequestUnits = 123
  ),
  SSESpecificationOverride = list(
    Enabled = TRUE|FALSE,
    SSEType = "AES256"|"KMS",
    KMSMasterKeyId = "string"
  ),
  VectorIndexOverride = list(
    list(
      IndexName = "string",
      VectorAttribute = list(
        AttributeName = "string"
      ),
      SearchSchema = list(
        list(
          AttributeName = "string",
          SearchSchemaElementType = "HASH"|"INLINE_FILTER"
        )
      ),
      Projection = list(
        ProjectionType = "ALL"|"KEYS_ONLY"|"INCLUDE",
        NonKeyAttributes = list(
          "string"
        )
      ),
      Dimensions = 123,
      DistanceFunction = "COSINE"|"DOT_PRODUCT"|"EUCLIDEAN"
    )
  )
)