Class RestoreTableOperation (2.38.0)

RestoreTableOperation(
    operations_client, restore_table_operation: google.api_core.operation.Operation
)

A Future for interacting with Bigtable Admin's RestoreTable Long-Running Operation.

This is needed to expose a potential long-running operation that might run after this operation finishes, OptimizeRestoreTable. This is exposed via the the optimize_restore_table_operation method.

This class should not be instantiated by users and should only be instantiated by the admin client's :meth:restore_table <<xref uid="google.cloud.bigtable_admin_v2.overlay.services.bigtable_table_admin.BigtableTableAdminClient.restore_table">google.cloud.bigtable_admin_v2.overlay.services.bigtable_table_admin.BigtableTableAdminClient.restore_table</xref>> method.

Parameters

Name Description
operations_client google.api_core.operations_v1.AbstractOperationsClient

The operations client from the admin client class's transport.

restore_table_operation google.api_core.operation.Operation

A google.api_core.operation.Operation instance resembling a RestoreTable long-running operation

Methods

optimize_restored_table_operation

optimize_restored_table_operation() -> (
    typing.Optional[google.api_core.operation.Operation]
)

Gets the OptimizeRestoredTable long-running operation that runs after this operation finishes.

This must not be called before the parent restore_table operation is complete. You can guarantee this happening by calling this function after this class's google.api_core.operation.Operation.result method.

The follow-up operation has metadata <google.api_core.operation.Operation.metadata> type :class:OptimizeRestoredTableMetadata <<xref uid="google.cloud.bigtable_admin_v2.types">google.cloud.bigtable_admin_v2.types</xref>.bigtable_table_admin.OptimizeRestoredTableMetadata> and no return value, but can be waited for with result.

The current operation might not trigger a follow-up OptimizeRestoredTable operation, in which case, this method will return None.

Exceptions
Type Description
google.api_core.GoogleAPIError raised when accessed before the restore_table operation is complete
Returns
Type Description
Optional[google.api_core.operation.Operation] An object representing a long-running operation, or None if there is no OptimizeRestoredTable operation after this one.