Skip to content

restore_from_recovery_point async

restore_from_recovery_point(
    recovery_point_id: str,
    namespace_name: NamespaceName,
    workgroup_name: WorkgroupName,
    *,
    config_overrides: Optional[AsyncRedshiftServerlessClientConfig] = None,
    maintain_integration: Optional[bool] = None,
) -> RestoreFromRecoveryPointResponse

Restore the data from a recovery point.

Parameters:

  • recovery_point_id (str) –

    The unique identifier of the recovery point to restore from.

  • namespace_name (NamespaceName) –

    The name of the namespace to restore data into.

  • workgroup_name (WorkgroupName) –

    The name of the workgroup used to restore data.

  • maintain_integration (Optional[bool], default: None ) –

    If true, maintain existing data sharing, zero-ETL and S3 event integrations when restoring. Otherwise, integrations will not be maintained after the restore operation. Integrations are only maintained when restored to the same serverless namespace.

    Default: true

Raises:

Source code in docs_src/capo_redshift_serverless/_services/async_redshift_serverless.py
async def restore_from_recovery_point(
    self,
    recovery_point_id: str,
    namespace_name: "capo_redshift_serverless.types.namespace_name.NamespaceName",
    workgroup_name: "capo_redshift_serverless.types.workgroup_name.WorkgroupName",
    *,
    config_overrides: Optional[AsyncRedshiftServerlessClientConfig] = None,
    maintain_integration: Optional[bool] = None,
) -> "capo_redshift_serverless.types.restore_from_recovery_point_response.RestoreFromRecoveryPointResponse":
    """<p>Restore the data from a recovery point.</p>

    Args:
        recovery_point_id: <p>The unique identifier of the recovery point to restore from.</p>
        namespace_name: <p>The name of the namespace to restore data into.</p>
        workgroup_name: <p>The name of the workgroup used to restore data.</p>
        maintain_integration: <p>If <code>true</code>, maintain existing data sharing, zero-ETL and S3 event integrations when restoring. Otherwise, integrations will not be maintained after the restore operation. Integrations are only maintained when restored to the same serverless namespace.</p> <p>Default: true</p>

    Raises:
        capo_redshift_serverless.errors.conflict_exception.ConflictException: <p>The submitted action has conflicts.</p>
        capo_redshift_serverless.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_redshift_serverless.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_redshift_serverless.errors.validation_exception.ValidationException: <p>The input failed to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_redshift_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift_serverless.types.restore_from_recovery_point_request.RestoreFromRecoveryPointRequest]",
    ) -> AsyncOperationResponse[
        "capo_redshift_serverless.types.restore_from_recovery_point_response.RestoreFromRecoveryPointResponse"
    ]:
        import capo_redshift_serverless._operations.redshift_serverless.restore_from_recovery_point

        (
            output,
            http_response,
        ) = await capo_redshift_serverless._operations.redshift_serverless.restore_from_recovery_point.async_restore_from_recovery_point(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_redshift_serverless.types.restore_from_recovery_point_response.RestoreFromRecoveryPointResponse",
    ) -> dict[str, Any]:
        import capo_redshift_serverless.types.restore_from_recovery_point_response

        return capo_redshift_serverless.types.restore_from_recovery_point_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("RestoreFromRecoveryPoint", redact_output=_redact_output),
    )
    input_: capo_redshift_serverless.types.restore_from_recovery_point_request.RestoreFromRecoveryPointRequest = {
        "recovery_point_id": recovery_point_id,
        "namespace_name": namespace_name,
        "workgroup_name": workgroup_name,
    }
    if maintain_integration is not None:
        input_["maintain_integration"] = maintain_integration

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output