Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. In addition to assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set permission on the deleted folder to remove Assured Workloads OrgPolicies.
[[["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-30 UTC."],[[["\u003cp\u003eThis endpoint deletes a workload, but only if its direct children are already deleted, otherwise, it will return a \u003ccode\u003eFAILED_PRECONDITION\u003c/code\u003e error.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request uses a \u003ccode\u003eDELETE\u003c/code\u003e method and follows gRPC Transcoding syntax with a specific URL structure: \u003ccode\u003ehttps://{endpoint}/v1/{name=organizations/*/locations/*/workloads/*}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e path parameter is required to identify the workload in the format \u003ccode\u003eorganizations/{org_id}/locations/{locationId}/workloads/{workload_id}\u003c/code\u003e and the \u003ccode\u003eassuredworkloads.workload.delete\u003c/code\u003e IAM permission is needed.\u003c/p\u003e\n"],["\u003cp\u003eAn optional \u003ccode\u003eetag\u003c/code\u003e query parameter can be included to match the server's etag and the request body must be empty.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests return an empty response body, and the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope is necessary for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: organizations.locations.workloads.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_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\nDeletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. In addition to assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set permission on the deleted folder to remove Assured Workloads OrgPolicies.\n\n### HTTP request\n\n`DELETE https://{endpoint}/v1/{name=organizations/*/locations/*/workloads/*}`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/assured-workloads/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\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).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `assuredworkloads.workload.delete`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]