import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { RestoreTableFromClusterSnapshotMessage, RestoreTableFromClusterSnapshotResult } from "../models/models_1"; import type { RedshiftClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RedshiftClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link RestoreTableFromClusterSnapshotCommand}. */ export interface RestoreTableFromClusterSnapshotCommandInput extends RestoreTableFromClusterSnapshotMessage { } /** * @public * * The output of {@link RestoreTableFromClusterSnapshotCommand}. */ export interface RestoreTableFromClusterSnapshotCommandOutput extends RestoreTableFromClusterSnapshotResult, __MetadataBearer { } declare const RestoreTableFromClusterSnapshotCommand_base: { new (input: RestoreTableFromClusterSnapshotCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: RestoreTableFromClusterSnapshotCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

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.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { RedshiftClient, RestoreTableFromClusterSnapshotCommand } from "@aws-sdk/client-redshift"; // ES Modules import * // const { RedshiftClient, RestoreTableFromClusterSnapshotCommand } = require("@aws-sdk/client-redshift"); // CommonJS import * // import type { RedshiftClientConfig } from "@aws-sdk/client-redshift"; * const config = {}; // type is RedshiftClientConfig * const client = new RedshiftClient(config); * const input = { // RestoreTableFromClusterSnapshotMessage * ClusterIdentifier: "STRING_VALUE", // required * SnapshotIdentifier: "STRING_VALUE", // required * SourceDatabaseName: "STRING_VALUE", // required * SourceSchemaName: "STRING_VALUE", * SourceTableName: "STRING_VALUE", // required * TargetDatabaseName: "STRING_VALUE", * TargetSchemaName: "STRING_VALUE", * NewTableName: "STRING_VALUE", // required * EnableCaseSensitiveIdentifier: true || false, * }; * const command = new RestoreTableFromClusterSnapshotCommand(input); * const response = await client.send(command); * // { // RestoreTableFromClusterSnapshotResult * // TableRestoreStatus: { // TableRestoreStatus * // TableRestoreRequestId: "STRING_VALUE", * // Status: "PENDING" || "IN_PROGRESS" || "SUCCEEDED" || "FAILED" || "CANCELED", * // Message: "STRING_VALUE", * // RequestTime: new Date("TIMESTAMP"), * // ProgressInMegaBytes: Number("long"), * // TotalDataInMegaBytes: Number("long"), * // ClusterIdentifier: "STRING_VALUE", * // SnapshotIdentifier: "STRING_VALUE", * // SourceDatabaseName: "STRING_VALUE", * // SourceSchemaName: "STRING_VALUE", * // SourceTableName: "STRING_VALUE", * // TargetDatabaseName: "STRING_VALUE", * // TargetSchemaName: "STRING_VALUE", * // NewTableName: "STRING_VALUE", * // }, * // }; * * ``` * * @param RestoreTableFromClusterSnapshotCommandInput - {@link RestoreTableFromClusterSnapshotCommandInput} * @returns {@link RestoreTableFromClusterSnapshotCommandOutput} * @see {@link RestoreTableFromClusterSnapshotCommandInput} for command's `input` shape. * @see {@link RestoreTableFromClusterSnapshotCommandOutput} for command's `response` shape. * @see {@link RedshiftClientResolvedConfig | config} for RedshiftClient's `config` shape. * * @throws {@link ClusterNotFoundFault} (client fault) *

The ClusterIdentifier parameter does not refer to an existing cluster. *

* * @throws {@link ClusterSnapshotNotFoundFault} (client fault) *

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

* * @throws {@link InProgressTableRestoreQuotaExceededFault} (client fault) *

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

* * @throws {@link InvalidClusterSnapshotStateFault} (client fault) *

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

* * @throws {@link InvalidClusterStateFault} (client fault) *

The specified cluster is not in the available state.

* * @throws {@link InvalidTableRestoreArgumentFault} (client fault) *

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

* * @throws {@link UnsupportedOperationFault} (client fault) *

The requested operation isn't supported.

* * @throws {@link RedshiftServiceException} *

Base exception class for all service exceptions from Redshift service.

* * * @public */ export declare class RestoreTableFromClusterSnapshotCommand extends RestoreTableFromClusterSnapshotCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: RestoreTableFromClusterSnapshotMessage; output: RestoreTableFromClusterSnapshotResult; }; sdk: { input: RestoreTableFromClusterSnapshotCommandInput; output: RestoreTableFromClusterSnapshotCommandOutput; }; }; }