Detaches a service project from a host project. You can call this API from any service project without needing access to the host project that it is attached to.
HTTP request
POST https://apphub.googleapis.com/v1/{name=projects/*/locations/*}:detachServiceProjectAttachment
Required. Service project id and location to detach from a host project. Only global location is supported. Expected format: projects/{project}/locations/{location}.
[[["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-04-23 UTC."],[[["\u003cp\u003eThis API endpoint detaches a service project from a host project, allowing detachment without host project access.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a \u003ccode\u003ePOST\u003c/code\u003e to a specific URL using gRPC Transcoding syntax, targeting the detachment action.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e path parameter is required, specifying the service project ID and location (global only) in the format \u003ccode\u003eprojects/{project}/locations/{location}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request and response bodies are both expected to be empty for this operation.\u003c/p\u003e\n"],["\u003cp\u003eDetaching the service project requires the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e and the \u003ccode\u003eapphub.serviceProjectAttachments.detach\u003c/code\u003e IAM permission on the specified resource.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.detachServiceProjectAttachment\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- [IAM Permissions](#body.aspect_1)\n- [Try it!](#try-it)\n\nDetaches a service project from a host project. You can call this API from any service project without needing access to the host project that it is attached to.\n\n### HTTP request\n\n`POST https://apphub.googleapis.com/v1/{name=projects/*/locations/*}:detachServiceProjectAttachment`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\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 is empty.\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](https://cloud.google.com/docs/authentication/).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `apphub.serviceProjectAttachments.detach`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]