This page describes how to get started using the Cloud SDK, so you can use it to manage Cloud Composer environments.
The Cloud SDK provides the
gcloud command-line tool to interact
with Cloud Composer and other Google Cloud Platform services.
Before you begin
gcloudtool uses the API to access Cloud Composer, so you must enable the API before you can use the
gcloudcommand-line tool to access Cloud Composer.
Enable the Cloud Composer API
- Install the Cloud SDK on your local client.
Getting started with the gcloud command-line tool
To start with the
gcloud tool, review the
Cloud SDK Documentation. You can get help for the tool, resources, and commands by using the
gcloud composer environments --help
The help displayed with the
--help flag is also available in the Cloud SDK
Setting the default project and location in your local client
gcloud composer commands require a location. You can specify the
location by using the
--location flag or by setting the default location.
To set the default project and location for Cloud Composer:
- To set the default project, enter the following command:
gcloud config set project PROJECT_ID
where PROJECT_ID is the ID of the Google Cloud Platform project that the Cloud Composer environment belongs to.
- To configure the Cloud Composer location, enter the following command:
gcloud config set composer/location LOCATION
where LOCATION is a supported region such as
- (Optional) To list the configuration for the
gcloudtool, enter the following command:
gcloud config list