Pada 15 September 2026, semua lingkungan Cloud Composer 1 dan Cloud Composer 2 versi 2.0.x akan mencapai akhir masa pakainya yang direncanakan, dan Anda tidak akan dapat menggunakannya. Sebaiknya rencanakan migrasi ke Cloud Composer 3.
Anda dapat mengelola dan mengakses lingkungan Cloud Composer dengan perintah gcloud composer yang disediakan oleh Google Cloud CLI.
Untuk memulai alat gcloud, tinjau
dokumentasi Google Cloud CLI.
Anda bisa mendapatkan bantuan untuk alat, resource, dan perintah menggunakan flag --help:
gcloudcomposerenvironments--help
Bantuan yang ditampilkan dengan flag --help juga tersedia di
referensi Google Cloud CLI untuk gcloud composer.
Menetapkan project dan lokasi default di klien lokal Anda
Sebagian besar perintah gcloud composer memerlukan lokasi. Anda dapat menentukan
lokasi menggunakan flag --location atau dengan menetapkan lokasi default.
Untuk menetapkan project dan lokasi default untuk Cloud Composer:
Tetapkan project default dengan menjalankan perintah berikut:
gcloudconfigsetprojectPROJECT_ID
Ganti kode berikut:
PROJECT_ID: Project ID dari project tempat lingkungan Cloud Composer Anda berada.
Konfigurasikan lokasi Cloud Composer dengan menjalankan perintah
berikut:
gcloudconfigsetcomposer/locationLOCATION
Ganti kode berikut:
LOCATION: region tempat lingkungan berada, seperti
us-central1 atau europe-west1.
(Opsional) Untuk mencantumkan konfigurasi untuk Google Cloud CLI, Anda dapat menjalankan perintah berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-29 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)"]]