Der Support für Cloud Deployment Manager endet am 31. Dezember 2025. Wenn Sie derzeit Deployment Manager verwenden, müssen Sie bis zum 31. Dezember 2025 zu Infrastructure Manager oder einer alternativen Bereitstellungstechnologie migrieren, damit Ihre Dienste ohne Unterbrechung weiterlaufen.
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wenn Sie eine Bereitstellung löschen, werden auch alle Ressourcen gelöscht, die zur Bereitstellung gehören.
Wenn Sie bestimmte Ressourcen Ihrer Bereitstellung löschen und die übrigen Ressourcen beibehalten möchten, löschen Sie diese Ressourcen aus Ihrer Konfigurationsdatei und aktualisieren dann die Bereitstellung.
Hinweis
Wenn Sie die Befehlszeilenbeispiele in dieser Anleitung verwenden möchten, installieren Sie das gcloud-Befehlszeilentool.
Wenn Sie die API-Beispiele in dieser Anleitung verwenden möchten, richten Sie den API-Zugriff ein.
Bereitstellungen löschen
Wenn Sie ein Deployment löschen, aber alle zugrunde liegenden Ressourcen beibehalten möchten, müssen Sie die Google Cloud CLI oder die API verwenden.
Console
Öffnen Sie in der Google Cloud Console die Seite „Bereitstellungen“. Zur Seite „Deployments“
Klicken Sie in der Liste der Bereitstellungen auf die Kästchen für die Bereitstellungen, die Sie löschen möchten.
Klicken Sie oben auf der Seite auf Löschen.
gcloud
Verwenden Sie mit gcloud den Befehl deployments delete:
Ersetzen Sie myproject mit dem Namen Ihres Projekts, example-deployment mit dem Namen des Deployments und policy mit der unten beschriebenen Löschrichtlinie.
Löschrichtlinie auswählen
Die von Ihnen verwendete Löschrichtlinie legt fest, wie die Ressourcen in der Bereitstellung behandelt werden. Es sind folgende Richtlinien verfügbar:
DELETE[Standard]: Löscht die zugrunde liegende Ressource. Dieser Vorgang ist endgültig und kann nicht rückgängig gemacht werden.
ABANDON: Löscht die Bereitstellung, aber nicht die zugrunde liegenden Ressourcen. Wenn zur Bereitstellung beispielsweise eine VM-Instanz gehört, steht diese nach dem Löschen der Bereitstellung weiterhin zur Verfügung.
Für die nochmalige Erstellung einer gelöschten Bereitstellung können Sie die ursprüngliche Konfigurationsdatei verwenden. Die Bereitstellung wird jedoch als neue Bereitstellung mit neuen Ressourcen betrachtet.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-03 (UTC)."],[[["\u003cp\u003eDeleting a deployment will also delete all resources associated with that deployment, unless an alternative policy is specified.\u003c/p\u003e\n"],["\u003cp\u003eTo delete specific resources while keeping others, modify the configuration file and update the deployment instead of deleting it entirely.\u003c/p\u003e\n"],["\u003cp\u003eIf you want to delete a deployment but keep its underlying resources, you must use the Google Cloud CLI or the API, and use the \u003ccode\u003eABANDON\u003c/code\u003e policy.\u003c/p\u003e\n"],["\u003cp\u003eThe default delete policy, \u003ccode\u003eDELETE\u003c/code\u003e, permanently removes the underlying resources when a deployment is deleted, and this action cannot be reversed.\u003c/p\u003e\n"],["\u003cp\u003eWhile a deleted deployment's configuration can be reused, it will create an entirely new deployment with new resources.\u003c/p\u003e\n"]]],[],null,["# Deleting deployments\n\nWhen you delete a deployment, all resources that are part of the deployment are\nalso deleted.\n\nIf you want to delete specific resources from your deployment and keep the rest,\ndelete those resources from your configuration file, and\n[update the deployment](/deployment-manager/docs/deployments/updating-deployments)\ninstead.\n\nBefore you begin\n----------------\n\n- If you want to use the command-line examples in this guide, install the [\\`gcloud\\` command-line tool](/sdk).\n- If you want to use the API examples in this guide, set up [API access](/deployment-manager/docs/reference/latest).\n\nDeleting deployments\n--------------------\n\n| **Warning:** You cannot undo this operation.\n\nIf you want to delete a deployment, but keep all the underlying resources, you\nmust use the Google Cloud CLI or the API. \n\n### Console\n\n1. In the Google Cloud console, open the Deployments page. \n [Go to the Deployments page](https://console.cloud.google.com/project/_/deployments)\n2. In the list of deployments, select the check boxes for the deployments that you want to delete.\n3. On the top of the page, click **Delete**.\n\n### gcloud\n\nWith `gcloud`, use the `deployments delete` command:\n\n\u003cbr /\u003e\n\n```\n gcloud deployment-manager deployments delete example-deployment --delete-policy=POLICY\n \n```\n\n\u003cbr /\u003e\n\nWhere \u003cvar translate=\"no\"\u003ePOLICY\u003c/var\u003e is the [delete policy](#delete-policy).\n\n`gcloud` returns a response similar to the following: \n\n```\nWaiting for delete operation operation-1415233139561-2d5dd654-f438-4d15-87e3-4b5b8ca68c5d to complete...done.\nDelete operation operation-1415233139561-2d5dd654-f438-4d15-87e3-4b5b8ca68c5d completed successfully.\nendTime: '2014-11-05T16:19:03.253-08:00'\nid: '5642095755656583573'\nname: operation-1415233139561-2d5dd654-f438-4d15-87e3-4b5b8ca68c5d\noperationType: delete\nstartTime: '2014-11-05T16:19:02.669-08:00'\nstatus: DONE\ntargetLink: https://www.googleapis.com/deploymentmanager/v2beta1/projects/myproject/global/deployments/example-deployment\n```\n\n### API\n\nIn the API, provide an empty `DELETE` request to the following URL: \n\n```\nDELETE https://www.googleapis.com/deploymentmanager/v2beta1/projects/myproject/global/deployments/example-deployment?deletePolicy=policy\n```\n\nReplace `myproject` with the name of your project, `example-deployment`\nwith the name of the deployment, and `policy` with the delete policy,\ndescribed below.\n\nSelect a delete policy\n----------------------\n\nThe delete policy you use determines how the resources in the deployment\nare handled. You can use one of these policies:\n\n- `DELETE` **\\[Default\\]**: Deletes the underlying resource. This is\n permanent and cannot be undone.\n\n- `ABANDON`: This deletes the deployment, but does not delete the\n underlying resources. For example, if you have a VM instance in the\n deployment, it will still be available for you to use after the\n deployment is deleted.\n\nIf you need to re-create a deployment that you deleted, you can use the original\nconfiguration file. However, the deployment is considered a new deployment, with new resources."]]