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.
Parameters:
-
cluster_identifier
(Optional[String], default:
None
)
–
The Amazon Redshift cluster that the table is being restored to.
-
table_restore_request_id
(Optional[String], default:
None
)
–
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.
-
max_records
(Optional[IntegerOptional], default:
None
)
–
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.
-
marker
(Optional[String], default:
None
)
–
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.
Raises:
Source code in docs_src/capo_redshift/_services/redshift.py
| def describe_table_restore_status(
self,
*,
config_overrides: Optional[RedshiftClientConfig] = None,
cluster_identifier: Optional["capo_redshift.types.string.String"] = None,
table_restore_request_id: Optional["capo_redshift.types.string.String"] = None,
max_records: Optional[
"capo_redshift.types.integer_optional.IntegerOptional"
] = None,
marker: Optional["capo_redshift.types.string.String"] = None,
) -> "capo_redshift.types.table_restore_status_message.TableRestoreStatusMessage":
"""<p>Lists the status of one or more table restore requests made using the <a>RestoreTableFromClusterSnapshot</a> API action. If you don't specify a value for the <code>TableRestoreRequestId</code> parameter, then <code>DescribeTableRestoreStatus</code> returns the status of all table restore requests ordered by the date and time of the request in ascending order. Otherwise <code>DescribeTableRestoreStatus</code> returns the status of the table specified by <code>TableRestoreRequestId</code>.</p>
Args:
cluster_identifier: <p>The Amazon Redshift cluster that the table is being restored to.</p>
table_restore_request_id: <p>The identifier of the table restore request to return status for. If you don't specify a <code>TableRestoreRequestId</code> value, then <code>DescribeTableRestoreStatus</code> returns the status of all in-progress table restore requests.</p>
max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.</p>
marker: <p>An optional pagination token provided by a previous <code>DescribeTableRestoreStatus</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by the <code>MaxRecords</code> parameter.</p>
Raises:
capo_redshift.errors.cluster_not_found_fault.ClusterNotFoundFault: <p>The <code>ClusterIdentifier</code> parameter does not refer to an existing cluster. </p>
capo_redshift.errors.table_restore_not_found_fault.TableRestoreNotFoundFault: <p>The specified <code>TableRestoreRequestId</code> value was not found.</p>
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_redshift.types.describe_table_restore_status_message.DescribeTableRestoreStatusMessage]",
) -> OperationResponse[
"capo_redshift.types.table_restore_status_message.TableRestoreStatusMessage"
]:
import capo_redshift._operations.redshift_service_version20121201.describe_table_restore_status
output, http_response = (
capo_redshift._operations.redshift_service_version20121201.describe_table_restore_status.describe_table_restore_status(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeTableRestoreStatus")
)
input_: capo_redshift.types.describe_table_restore_status_message.DescribeTableRestoreStatusMessage = {}
if cluster_identifier is not None:
input_["cluster_identifier"] = cluster_identifier
if table_restore_request_id is not None:
input_["table_restore_request_id"] = table_restore_request_id
if max_records is not None:
input_["max_records"] = max_records
if marker is not None:
input_["marker"] = marker
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|