Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003eThis webpage documents the process of deleting a function within a specified project using a DELETE HTTP request.\u003c/p\u003e\n"],["\u003cp\u003eThe function to be deleted is identified by its unique name, structured as \u003ccode\u003eprojects/{project}/locations/{location}/functions/{function}\u003c/code\u003e, which is a required path parameter.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a function requires the \u003ccode\u003ecloudfunctions.functions.delete\u003c/code\u003e IAM permission and the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"],["\u003cp\u003eThe request body for deleting a function must be empty, and the response will contain an Operation instance upon successful completion.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.functions.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDeletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.\n\n### HTTP request\n\n`DELETE https://cloudfunctions.googleapis.com/v2alpha/{name}`\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/functions/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]