Menu
Amazon Redshift
API Reference (API Version 2012-12-01)

RestoreTableFromClusterSnapshot

Creates a new table from a table in an Amazon Redshift cluster snapshot. You must create the new table within the Amazon Redshift cluster that the snapshot was taken from.

You cannot use RestoreTableFromClusterSnapshot to restore a table with the same name as an existing table in an Amazon Redshift cluster. That is, you cannot overwrite an existing table in a cluster with a restored table. If you want to replace your original table with a new, restored table, then rename or drop your original table before you call RestoreTableFromClusterSnapshot. When you have renamed your original table, then you can pass the original name of the table as the NewTableName parameter value in the call to RestoreTableFromClusterSnapshot. This way, you can replace the original table with the table created from the snapshot.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

ClusterIdentifier

The identifier of the Amazon Redshift cluster to restore the table to.

Type: String

Required: Yes

NewTableName

The name of the table to create as a result of the current request.

Type: String

Required: Yes

SnapshotIdentifier

The identifier of the snapshot to restore the table from. This snapshot must have been created from the Amazon Redshift cluster specified by the ClusterIdentifier parameter.

Type: String

Required: Yes

SourceDatabaseName

The name of the source database that contains the table to restore from.

Type: String

Required: Yes

SourceTableName

The name of the source table to restore from.

Type: String

Required: Yes

SourceSchemaName

The name of the source schema that contains the table to restore from. If you do not specify a SourceSchemaName value, the default is public.

Type: String

Required: No

TargetDatabaseName

The name of the database to restore the table to.

Type: String

Required: No

TargetSchemaName

The name of the schema to restore the table to.

Type: String

Required: No

Response Elements

The following element is returned by the service.

TableRestoreStatus

Describes the status of a RestoreTableFromClusterSnapshot operation.

Type: TableRestoreStatus object

Errors

For information about the errors that are common to all actions, see Common Errors.

ClusterNotFound

The ClusterIdentifier parameter does not refer to an existing cluster.

HTTP Status Code: 404

ClusterSnapshotNotFound

The snapshot identifier does not refer to an existing cluster snapshot.

HTTP Status Code: 404

InProgressTableRestoreQuotaExceededFault

You have exceeded the allowed number of table restore requests. Wait for your current table restore requests to complete before making a new request.

HTTP Status Code: 400

InvalidClusterSnapshotState

The specified cluster snapshot is not in the available state, or other accounts are authorized to access the snapshot.

HTTP Status Code: 400

InvalidClusterState

The specified cluster is not in the available state.

HTTP Status Code: 400

InvalidTableRestoreArgument

The value specified for the sourceDatabaseName, sourceSchemaName, or sourceTableName parameter, or a combination of these, doesn't exist in the snapshot.

HTTP Status Code: 400

UnsupportedOperation

The requested operation isn't supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: