DescribeTableRestoreStatusCommand

Lists the status of one or more table restore requests made using the RestoreTableFromClusterSnapshot API action. If you don't specify a value for the TableRestoreRequestId parameter, then DescribeTableRestoreStatus returns the status of all table restore requests ordered by the date and time of the request in ascending order. Otherwise DescribeTableRestoreStatus returns the status of the table specified by TableRestoreRequestId.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { RedshiftClient, DescribeTableRestoreStatusCommand } from "@aws-sdk/client-redshift"; // ES Modules import
// const { RedshiftClient, DescribeTableRestoreStatusCommand } = require("@aws-sdk/client-redshift"); // CommonJS import
const client = new RedshiftClient(config);
const input = { // DescribeTableRestoreStatusMessage
  ClusterIdentifier: "STRING_VALUE",
  TableRestoreRequestId: "STRING_VALUE",
  MaxRecords: Number("int"),
  Marker: "STRING_VALUE",
};
const command = new DescribeTableRestoreStatusCommand(input);
const response = await client.send(command);
// { // TableRestoreStatusMessage
//   TableRestoreStatusDetails: [ // TableRestoreStatusList
//     { // 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",
//     },
//   ],
//   Marker: "STRING_VALUE",
// };

DescribeTableRestoreStatusCommand Input

Parameter
Type
Description
ClusterIdentifier
string | undefined

The Amazon Redshift cluster that the table is being restored to.

Marker
string | undefined

An optional pagination token provided by a previous DescribeTableRestoreStatus request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by the MaxRecords parameter.

MaxRecords
number | undefined

The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.

TableRestoreRequestId
string | undefined

The identifier of the table restore request to return status for. If you don't specify a TableRestoreRequestId value, then DescribeTableRestoreStatus returns the status of all in-progress table restore requests.

DescribeTableRestoreStatusCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Marker
string | undefined

A pagination token that can be used in a subsequent DescribeTableRestoreStatus request.

TableRestoreStatusDetails
TableRestoreStatus[] | undefined

A list of status details for one or more table restore requests.

Throws

Name
Fault
Details
ClusterNotFoundFault
client

The ClusterIdentifier parameter does not refer to an existing cluster.

TableRestoreNotFoundFault
client

The specified TableRestoreRequestId value was not found.

RedshiftServiceException
Base exception class for all service exceptions from Redshift service.