REST Resource: projects.locations.environments

Resource: Environment

An environment for running orchestration tasks.

JSON representation
{
  "name": string,
  "config": {
    object(EnvironmentConfig)
  },
  "uuid": string,
  "state": enum(State),
  "createTime": string,
  "updateTime": string,
  "labels": {
    string: string,
    ...
  }
}
Fields
name

string

The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}"

config

object(EnvironmentConfig)

Configuration parameters for this environment.

uuid

string

Output only. The UUID (Universally Unique IDentifier) associated with this environment. This value is generated when the environment is created.

state

enum(State)

The current state of the environment.

createTime

string (Timestamp format)

Output only. The time at which this environment was created.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The time at which this environment was last modified.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

labels

map (key: string, value: string)

Optional. User-defined labels for this environment. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions:

  • Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
  • Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
  • Both keys and values are additionally constrained to be <= 128 bytes in size.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

EnvironmentConfig

Configuration information for an environment.

JSON representation
{
  "gkeCluster": string,
  "dagGcsPrefix": string,
  "nodeCount": number,
  "softwareConfig": {
    object(SoftwareConfig)
  },
  "nodeConfig": {
    object(NodeConfig)
  },
  "airflowUri": string
}
Fields
gkeCluster

string

Output only. The Kubernetes Engine cluster used to run this environment.

dagGcsPrefix

string

Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud Storage objects reside in a flat namespace, a hierarchical file tree can be simulated using "/"-delimited object name prefixes. DAG objects for this environment reside in a simulated directory with the given prefix.

nodeCount

number

The number of nodes in the Kubernetes Engine cluster that will be used to run this environment.

softwareConfig

object(SoftwareConfig)

The configuration settings for software inside the environment.

nodeConfig

object(NodeConfig)

The configuration used for the Kubernetes Engine cluster.

airflowUri

string

Output only. The URI of the Apache Airflow Web UI hosted within this environment (see Airflow web interface).

SoftwareConfig

Specifies the selection and configuration of software inside the environment.

JSON representation
{
  "imageVersion": string,
  "airflowConfigOverrides": {
    string: string,
    ...
  },
  "pypiPackages": {
    string: string,
    ...
  },
  "envVariables": {
    string: string,
    ...
  },
  "pythonVersion": string
}
Fields
imageVersion

string

Output only. The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression composer-[0-9]+\.[0-9]+(\.[0-9]+)?-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?.

The Cloud Composer portion of the version is a semantic version. The portion of the image version following airflow- is an official Apache Airflow repository release name.

See also Release Notes.

airflowConfigOverrides

map (key: string, value: string)

Optional. Apache Airflow configuration properties to override.

Property keys contain the section and property names, separated by a hyphen, for example "core-dags_are_paused_at_creation". Section names must not contain hyphens ("-"), opening square brackets ("["), or closing square brackets ("]"). The property name must not be empty and must not contain an equals sign ("=") or semicolon (";"). Section and property names must not contain a period ("."). Apache Airflow configuration property names must be written in snake_case. Property values can contain any character, and can be written in any lower/upper case format.

Certain Apache Airflow configuration property values are blacklisted, and cannot be overridden.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

pypiPackages

map (key: string, value: string)

Optional. Custom Python Package Index (PyPI) packages to be installed in the environment.

Keys refer to the lowercase package name such as "numpy" and values are the lowercase extras and version specifier such as "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a package without pinning it to a version specifier, use the empty string as the value.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

envVariables

map (key: string, value: string)

Optional. Additional environment variables to provide to the Apache Airflow scheduler, worker, and webserver processes.

Environment variable names must match the regular expression [a-zA-Z_][a-zA-Z0-9_]*. They cannot specify Apache Airflow software configuration overrides (they cannot match the regular expression AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+), and they cannot match any of the following reserved names:

  • AIRFLOW_HOME
  • C_FORCE_ROOT
  • CONTAINER_NAME
  • DAGS_FOLDER
  • GCP_PROJECT
  • GCS_BUCKET
  • GKE_CLUSTER_NAME
  • SQL_DATABASE
  • SQL_INSTANCE
  • SQL_PASSWORD
  • SQL_PROJECT
  • SQL_REGION
  • SQL_USER

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

pythonVersion

string

Optional. The major version of Python used to run the Apache Airflow scheduler, worker, and webserver processes.

Can be set to '2' or '3'. If not specified, the default is '2'. Cannot be updated.

NodeConfig

The configuration information for the Kubernetes Engine nodes running the Apache Airflow software.

JSON representation
{
  "location": string,
  "machineType": string,
  "network": string,
  "subnetwork": string,
  "diskSizeGb": number,
  "oauthScopes": [
    string
  ],
  "serviceAccount": string,
  "tags": [
    string
  ]
}
Fields
location

string

Optional. The Compute Engine zone in which to deploy the VMs used to run the Apache Airflow software, specified as a relative resource name. For example: "projects/{projectId}/zones/{zoneId}".

This location must belong to the enclosing environment's project and location. If both this field and nodeConfig.machineType are specified, nodeConfig.machineType must belong to this location; if both are unspecified, the service will pick a zone in the Compute Engine region corresponding to the Cloud Composer location, and propagate that choice to both fields. If only one field (location or nodeConfig.machineType) is specified, the location information from the specified field will be propagated to the unspecified field.

machineType

string

Optional. The Compute Engine machine type used for cluster instances, specified as a relative resource name. For example: "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".

The machineType must belong to the enclosing environment's project and location. If both this field and nodeConfig.location are specified, this machineType must belong to the nodeConfig.location; if both are unspecified, the service will pick a zone in the Compute Engine region corresponding to the Cloud Composer location, and propagate that choice to both fields. If exactly one of this field and nodeConfig.location is specified, the location information from the specified field will be propagated to the unspecified field.

If this field is unspecified, the machineTypeId defaults to "n1-standard-1".

network

string

Optional. The Compute Engine network to be used for machine communications, specified as a relative resource name. For example: "projects/{projectId}/global/networks/{networkId}".

If unspecified, the default network in the environment's project is used. If a Custom Subnet Network is provided, nodeConfig.subnetwork must also be provided. For Shared VPC subnetwork requirements, see nodeConfig.subnetwork.

subnetwork

string

Optional. The Compute Engine subnetwork to be used for machine communications, specified as a relative resource name. For example: "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"

If a subnetwork is provided, nodeConfig.network must also be provided, and the subnetwork must belong to the same project as the network.

For Shared VPC, you must configure the subnetwork with secondary ranges named composer-pods and composer-services to support Alias IPs.

diskSizeGb

number

Optional. The disk size in GB used for node VMs. Minimum size is 20GB. If unspecified, defaults to 100GB. Cannot be updated.

oauthScopes[]

string

Optional. The set of Google API scopes to be made available on all node VMs. Defaults to ["https://www.googleapis.com/auth/cloud-platform"] and must be included in the list of specified scopes. Cannot be updated.

serviceAccount

string

Optional. The Google Cloud Platform Service Account to be used by the node VMs. If a service account is not specified, the "default" Compute Engine service account is used. Cannot be updated.

tags[]

string

Optional. The list of instance tags applied to all node VMs. Tags are used to identify valid sources or targets for network firewalls. Each tag within the list must comply with RFC1035. Cannot be updated.

State

State of the environment.

Enums
STATE_UNSPECIFIED The state of the environment is unknown.
CREATING The environment is in the process of being created.
RUNNING The environment is currently running and healthy. It is ready for use.
UPDATING The environment is being updated. It remains usable but cannot receive additional update requests or be deleted at this time.
DELETING The environment is undergoing deletion. It cannot be used.
ERROR The environment has encountered an error and cannot be used.

Methods

create

Create a new environment.

delete

Delete an environment.

get

Get an existing environment.

list

List environments.

patch

Update an environment.
Was this page helpful? Let us know how we did:

Send feedback about...

Google Cloud Composer