Using the Google Cloud SDK

This page describes how to get started using the Cloud SDK, so you can use it to manage Cloud Composer environments.

In addition to using the Cloud Composer APIs, you can manage and access Cloud Composer environments using Cloud SDK gcloud composer commands.

The Cloud SDK provides the gcloud command-line tool to interact with Cloud Composer and other Google Cloud Platform services.

Before you begin

  • The gcloud tool uses the API to access Cloud Composer, so you must enable the API before you can use the gcloud command-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 --help flag:

gcloud composer environments --help

The help displayed with the --help flag is also available in the Cloud SDK reference for gcloud composer.

Setting the default project and location in your local client

Most 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:

  1. 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.

  2. To configure the Cloud Composer location, enter the following command:
    gcloud config set composer/location LOCATION

    where LOCATION is a supported region such as us-central1 or europe-west1.

  3. (Optional) To list the configuration for the gcloud tool, enter the following command:
    gcloud config list

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Composer