Method: projects.locations.environments.workloads.list

Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component.

This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.

HTTP request

GET https://composer.googleapis.com/v1beta1/{parent=projects/*/locations/*/environments/*}/workloads

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The environment name to get workloads for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

Authorization requires the following IAM permission on the specified resource parent:

  • composer.environments.get

Query parameters

Parameters
pageSize

integer

Optional. The maximum number of environments to return.

pageToken

string

Optional. The nextPageToken value returned from a previous List request, if any.

filter

string

Optional. The list filter. Currently only supports equality on the type field. The value of a field specified in the filter expression must be one ComposerWorkloadType enum option. It's possible to get multiple types using "OR" operator, e.g.: "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are returned.

Request body

The request body must be empty.

Response body

Response to ListWorkloadsRequest.

If successful, the response body contains data with the following structure:

JSON representation
{
  "workloads": [
    {
      object (ComposerWorkload)
    }
  ],
  "nextPageToken": string
}
Fields
workloads[]

object (ComposerWorkload)

The list of environment workloads.

nextPageToken

string

The page token used to query for the next page if one exists.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ComposerWorkload

Information about a single workload.

JSON representation
{
  "name": string,
  "type": enum (ComposerWorkloadType),
  "status": {
    object (ComposerWorkloadStatus)
  }
}
Fields
name

string

Name of a workload.

type

enum (ComposerWorkloadType)

Type of a workload.

status

object (ComposerWorkloadStatus)

Output only. Status of a workload.

ComposerWorkloadType

Supported workload types.

Enums
COMPOSER_WORKLOAD_TYPE_UNSPECIFIED Not able to determine the type of the workload.
CELERY_WORKER Celery worker.
KUBERNETES_WORKER Kubernetes worker.
KUBERNETES_OPERATOR_POD Workload created by Kubernetes Pod Operator.
SCHEDULER Airflow scheduler.
DAG_PROCESSOR Airflow Dag processor.
TRIGGERER Airflow triggerer.
WEB_SERVER Airflow web server UI.
REDIS Redis.

ComposerWorkloadStatus

Workload status.

JSON representation
{
  "state": enum (ComposerWorkloadState),
  "statusMessage": string,
  "detailedStatusMessage": string
}
Fields
state

enum (ComposerWorkloadState)

Output only. Workload state.

statusMessage

string

Output only. Text to provide more descriptive status.

detailedStatusMessage

string

Output only. Detailed message of the status.

ComposerWorkloadState

Workload states.

Enums
COMPOSER_WORKLOAD_STATE_UNSPECIFIED Not able to determine the status of the workload.
PENDING Workload is in pending state and has not yet started.
OK Workload is running fine.
WARNING Workload is running but there are some non-critical problems.
ERROR Workload is not running due to an error.
SUCCEEDED Workload has finished execution with success.
FAILED Workload has finished execution with failure.