Em 15 de setembro de 2026, todos os ambientes do Cloud Composer 1 e da versão 2.0.x do Cloud Composer 2 vão atingir o fim da vida útil planejado e não poderão mais ser usados. Recomendamos planejar a migração para o Cloud Composer 3.
Primeiros passos com a ferramenta de linha de comando gcloud
É possível gerenciar e acessar ambientes do Cloud Composer
com comandos gcloud composer fornecidos pela
Google Cloud CLI.
Para começar a usar a ferramenta gcloud, consulte a
documentação da Google Cloud CLI.
Você pode receber ajuda com a ferramenta, ver os recursos e os comandos usando a sinalização --help:
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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)"]]