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
10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 | |