Skip to content

delete_backend_from_app

delete_backend_from_app(
    app_name: AppName, *, config_overrides: Optional[AmplifyGen3ClientConfig] = None
) -> DeleteBackendFromAppResponse

Removes the backend from an app. The app remains as a frontend-only app. The request returns after the backend is detached from the app, and the backend and its branches are deleted asynchronously. This permanently deletes the backend's data. If the app has no backend, the request succeeds.

Parameters:

  • app_name (AppName) –

    The name of the app.

Raises:

Source code in docs_src/capo_amplifygen3/_services/amplify_gen3.py
def delete_backend_from_app(
    self,
    app_name: "capo_amplifygen3.types.app_name.AppName",
    *,
    config_overrides: Optional[AmplifyGen3ClientConfig] = None,
) -> "capo_amplifygen3.types.delete_backend_from_app_response.DeleteBackendFromAppResponse":
    """<p>Removes the backend from an app. The app remains as a frontend-only app. The request returns after the backend is detached from the app, and the backend and its branches are deleted asynchronously. This permanently deletes the backend's data. If the app has no backend, the request succeeds.</p>

    Args:
        app_name: <p>The name of the app.</p>

    Raises:
        capo_amplifygen3.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_amplifygen3.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</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.delete_backend_from_app_request.DeleteBackendFromAppRequest]",
    ) -> OperationResponse[
        "capo_amplifygen3.types.delete_backend_from_app_response.DeleteBackendFromAppResponse"
    ]:
        import capo_amplifygen3._operations.omega.delete_backend_from_app

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteBackendFromApp")
    )
    input_: capo_amplifygen3.types.delete_backend_from_app_request.DeleteBackendFromAppRequest = {
        "app_name": app_name
    }

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