- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- ComposerWorkload
- ComposerWorkloadType
- ComposerWorkloadStatus
- ComposerWorkloadState
- Try it!
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/v1/{parent=projects/*/locations/*/environments/*}/workloads
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
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
|
Query parameters
Parameters | |
---|---|
page |
Optional. The maximum number of environments to return. |
page |
Optional. The nextPageToken value returned from a previous List request, if any. |
filter |
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 ( |
Fields | |
---|---|
workloads[] |
The list of environment workloads. |
next |
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 ( |
Fields | |
---|---|
name |
Name of a workload. |
type |
Type of a workload. |
status |
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 ( |
Fields | |
---|---|
state |
Output only. Workload state. |
status |
Output only. Text to provide more descriptive status. |
detailed |
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. |