restore_table_from_cluster_snapshot
async
¶
restore_table_from_cluster_snapshot(
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = None,
cluster_identifier: Optional[String] = None,
snapshot_identifier: Optional[String] = None,
source_database_name: Optional[String] = None,
source_schema_name: Optional[String] = None,
source_table_name: Optional[String] = None,
target_database_name: Optional[String] = None,
target_schema_name: Optional[String] = None,
new_table_name: Optional[String] = None,
enable_case_sensitive_identifier: Optional[BooleanOptional] = None,
) -> RestoreTableFromClusterSnapshotResult
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.
You can't use this operation to restore tables with interleaved sort keys.
Parameters:
-
cluster_identifier(Optional[String], default:None) –The identifier of the Amazon Redshift cluster to restore the table to.
-
snapshot_identifier(Optional[String], default:None) –The identifier of the snapshot to restore the table from. This snapshot must have been created from the Amazon Redshift cluster specified by the
ClusterIdentifierparameter. -
source_database_name(Optional[String], default:None) –The name of the source database that contains the table to restore from.
-
source_schema_name(Optional[String], default:None) –The name of the source schema that contains the table to restore from. If you do not specify a
SourceSchemaNamevalue, the default ispublic. -
source_table_name(Optional[String], default:None) –The name of the source table to restore from.
-
target_database_name(Optional[String], default:None) –The name of the database to restore the table to.
-
target_schema_name(Optional[String], default:None) –The name of the schema to restore the table to.
-
new_table_name(Optional[String], default:None) –The name of the table to create as a result of the current request.
-
enable_case_sensitive_identifier(Optional[BooleanOptional], default:None) –Indicates whether name identifiers for database, schema, and table are case sensitive. If
true, the names are case sensitive. Iffalse(default), the names are not case sensitive.
Raises:
-
ClusterNotFoundFault–The
ClusterIdentifierparameter does not refer to an existing cluster. -
ClusterSnapshotNotFoundFault–The snapshot identifier does not refer to an existing cluster snapshot.
-
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.
-
InvalidClusterSnapshotStateFault–The specified cluster snapshot is not in the
availablestate, or other accounts are authorized to access the snapshot. -
InvalidClusterStateFault–The specified cluster is not in the
availablestate. -
InvalidTableRestoreArgumentFault–The value specified for the
sourceDatabaseName,sourceSchemaName, orsourceTableNameparameter, or a combination of these, doesn't exist in the snapshot. -
UnsupportedOperationFault–The requested operation isn't supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_redshift/_services/async_redshift.py
10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 | |