Skip to content

get_restore_window

get_restore_window(
    branch_arn: BranchArn, *, config_overrides: Optional[AmplifyGen3ClientConfig] = None
) -> GetRestoreWindowResponse

Returns the point-in-time restore window for the production branch. The window is the range of times that you can specify in a RestoreBranch request. The latest restorable time advances continuously. If no restore window is available yet, for example because the production branch has no completed deployment, the response omits both times.

Parameters:

  • branch_arn (BranchArn) –

    The Amazon Resource Name (ARN) of the production branch of the Production environment. Other branches can't be restored.

Raises:

Source code in docs_src/capo_amplifygen3/_services/amplify_gen3.py
def get_restore_window(
    self,
    branch_arn: "capo_amplifygen3.types.branch_arn.BranchArn",
    *,
    config_overrides: Optional[AmplifyGen3ClientConfig] = None,
) -> "capo_amplifygen3.types.get_restore_window_response.GetRestoreWindowResponse":
    """<p>Returns the point-in-time restore window for the production branch. The window is the range of times that you can specify in a RestoreBranch request. The latest restorable time advances continuously. If no restore window is available yet, for example because the production branch has no completed deployment, the response omits both times.</p>

    Args:
        branch_arn: <p>The Amazon Resource Name (ARN) of the production branch of the Production environment. Other branches can't be restored.</p>

    Raises:
        capo_amplifygen3.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_amplifygen3.errors.internal_server_exception.InternalServerException: <p>An internal error occurred. Retry the request.</p>
        capo_amplifygen3.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_amplifygen3.errors.throttling_exception.ThrottlingException: <p>The request was denied because the request rate exceeds the allowed limit.</p>
        capo_amplifygen3.errors.validation_exception.ValidationException: <p>The request contains invalid parameters or is otherwise malformed.</p>
        capo_amplifygen3.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_amplifygen3.types.get_restore_window_request.GetRestoreWindowRequest]",
    ) -> OperationResponse[
        "capo_amplifygen3.types.get_restore_window_response.GetRestoreWindowResponse"
    ]:
        import capo_amplifygen3._operations.omega.get_restore_window

        output, http_response = (
            capo_amplifygen3._operations.omega.get_restore_window.get_restore_window(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetRestoreWindow")
    )
    input_: capo_amplifygen3.types.get_restore_window_request.GetRestoreWindowRequest = {
        "branch_arn": branch_arn
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output