Am 15. September 2026erreichen alle Cloud Composer 1- und Cloud Composer 2-Umgebungen der Version 2.0.x das geplante Ende des Lebenszyklus und können nicht mehr verwendet werden. Wir empfehlen, die Migration zu Cloud Composer 3 zu planen.
Sie können Cloud Composer-Umgebungen mit gcloud composer-Befehlen verwalten und darauf zugreifen, die vom Google Cloud CLI bereitgestellt werden.
Lesen Sie die Dokumentation zur Google Cloud CLI, um sich mit dem gcloud-Tool vertraut zu machen.
Mit dem Flag --help können Sie Hilfe für das Tool, Ressourcen und Befehle anfordern:
gcloudcomposerenvironments--help
Die Hilfe, die Sie mit dem Flag --help aufrufen können, ist auch in der Google Cloud CLI-Referenz für gcloud composer verfügbar.
Standardprojekt und -speicherort im lokalen Client festlegen
Für die meisten gcloud composer-Befehle ist ein Speicherort erforderlich. Sie können den Speicherort mit dem Flag --location oder durch Festlegen eines Standardspeicherorts angeben.
So legen Sie das Standardprojekt und den Standardspeicherort für Cloud Composer fest:
Legen Sie das Standardprojekt mit dem folgenden Befehl fest:
gcloudconfigsetprojectPROJECT_ID
Ersetzen Sie Folgendes:
PROJECT_ID: die Projekt-ID des Projekts, in dem sich Ihre Cloud Composer-Umgebung befindet.
Konfigurieren Sie den Cloud Composer-Speicherort mit dem folgenden Befehl:
gcloudconfigsetcomposer/locationLOCATION
Ersetzen Sie Folgendes:
LOCATION: Die Region, in der sich die Umgebung befindet, z. B. us-central1 oder europe-west1.
Optional: Wenn Sie die Konfiguration für die Google Cloud CLI auflisten möchten, können Sie den folgenden Befehl ausführen:
[[["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\u003eThis page explains how to use the Google Cloud CLI tool to interact with Cloud Composer environments.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the \u003ccode\u003egcloud composer\u003c/code\u003e commands, the Cloud Composer API must be enabled, and Google Cloud CLI needs to be installed on your local client.\u003c/p\u003e\n"],["\u003cp\u003eYou can set a default project and location for Cloud Composer using the \u003ccode\u003egcloud config set\u003c/code\u003e command, eliminating the need to repeatedly specify them with each command.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--help\u003c/code\u003e flag can be used with \u003ccode\u003egcloud composer\u003c/code\u003e commands to display help information, which is also available in the Google Cloud CLI reference documentation.\u003c/p\u003e\n"]]],[],null,["# Using Google Cloud CLI with Cloud Composer\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page describes how to get started using Google Cloud CLI with\nCloud Composer environments.\n\nBefore you begin\n----------------\n\n- Google Cloud CLI uses Cloud Composer API to run `gcloud composer` commands, so you must [enable the API](/composer/docs/latest/enable-composer-service).\n- Install [Google Cloud CLI](/sdk/docs/install) on your local client.\n\nGetting started with the gcloud command-line tool\n-------------------------------------------------\n\nYou can manage and access Cloud Composer environments\nwith `gcloud composer` commands provided by\n[Google Cloud CLI](/sdk/docs).\n\nTo start with the `gcloud` tool, review\nthe [Google Cloud CLI documentation](/sdk/docs).\nYou can get help for the tool, resources, and commands by using the `--help`\nflag: \n\n gcloud composer environments --help\n\nThe help displayed with the `--help` flag is also available in the\n[Google Cloud CLI reference](/sdk/gcloud/reference/composer) for `gcloud composer`.\n\nSetting the default project and location in your local client\n-------------------------------------------------------------\n\nMost `gcloud composer` commands require a location. You can specify the\nlocation by using the `--location` flag or by setting the default location.\n\nTo set the default project and location for Cloud Composer:\n\n1. Set the default project by running the following command:\n\n gcloud config set project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace the following:\n - `PROJECT_ID`: the [Project ID](/resource-manager/docs/creating-managing-projects) of the project where your Cloud Composer environment is located.\n2. Configure the Cloud Composer location by running the following\n command:\n\n gcloud config set composer/location \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e\n\n Replace the following:\n - `LOCATION`: the region where the environment is located, such as `us-central1` or `europe-west1`.\n3. (Optional) To list the configuration for Google Cloud CLI, you can run the\n following command:\n\n gcloud config list\n\nWhat's next\n-----------\n\n- [Add and update Airflow DAGs](/composer/docs/latest/manage-dags)\n- [`gcloud composer` reference](/sdk/gcloud/reference/composer)\n- [`gcloud beta composer` reference](/sdk/gcloud/reference/beta/composer)"]]