feat: added LoadSnapshot, SaveSnapshot RPCs

feat: added fields maintenance_window, workloads_config, environment_size, master_authorized_networks_config, recovery_config to EnvironmentConfig
feat: added field scheduler_count to SoftwareConfig
feat: added field enable_ip_masq_agent to NodeConfig
feat: added fields cloud_composer_network_ipv4_cidr_block, cloud_composer_network_ipv4_reserved_range, enable_privately_used_public_ips, cloud_composer_connection_subnetwork, networking_config to PrivateEnvironmentConfig

PiperOrigin-RevId: 492193414
pull/757/head
Google APIs 2 years ago committed by Copybara-Service
parent 6884ca40ed
commit 34eb8f1662
  1. 3
      google/cloud/orchestration/airflow/service/v1/composer_v1.yaml
  2. 459
      google/cloud/orchestration/airflow/service/v1/environments.proto
  3. 4
      google/cloud/orchestration/airflow/service/v1/image_versions.proto
  4. 8
      google/cloud/orchestration/airflow/service/v1/operations.proto
  5. 5
      google/cloud/orchestration/airflow/service/v1beta1/composer_v1beta1.yaml
  6. 427
      google/cloud/orchestration/airflow/service/v1beta1/environments.proto
  7. 4
      google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto
  8. 8
      google/cloud/orchestration/airflow/service/v1beta1/operations.proto

@ -6,10 +6,13 @@ title: Cloud Composer API
apis:
- name: google.cloud.orchestration.airflow.service.v1.Environments
- name: google.cloud.orchestration.airflow.service.v1.ImageVersions
- name: google.longrunning.Operations
types:
- name: google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse
- name: google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse
- name: google.cloud.orchestration.airflow.service.v1.OperationMetadata
- name: google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse
documentation:
summary: Manages Apache Airflow environments on Google Cloud Platform.

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -86,6 +86,36 @@ service Environments {
metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata"
};
}
// Creates a snapshots of a Cloud Composer environment.
//
// As a result of this operation, snapshot of environment's state is stored
// in a location specified in the SaveSnapshotRequest.
rpc SaveSnapshot(SaveSnapshotRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{environment=projects/*/locations/*/environments/*}:saveSnapshot"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse"
metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata"
};
}
// Loads a snapshot of a Cloud Composer environment.
//
// As a result of this operation, a snapshot of environment's specified in
// LoadSnapshotRequest is loaded into the environment.
rpc LoadSnapshot(LoadSnapshotRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{environment=projects/*/locations/*/environments/*}:loadSnapshot"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse"
metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata"
};
}
}
// Create a new environment.
@ -230,13 +260,10 @@ message UpdateEnvironmentRequest {
// * `config.nodeCount`
// * Horizontally scale the number of nodes in the environment. An integer
// greater than or equal to 3 must be provided in the `config.nodeCount`
// field.
// field. Supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
// * `config.webServerNetworkAccessControl`
// * Replace the environment's current `WebServerNetworkAccessControl`.
// * `config.databaseConfig`
// * Replace the environment's current `DatabaseConfig`.
// * `config.webServerConfig`
// * Replace the environment's current `WebServerConfig`.
// * `config.softwareConfig.airflowConfigOverrides`
// * Replace all Apache Airflow config overrides. If a replacement config
// overrides map is not included in `environment`, all config overrides
@ -254,14 +281,94 @@ message UpdateEnvironmentRequest {
// * `config.softwareConfig.envVariables`
// * Replace all environment variables. If a replacement environment
// variable map is not included in `environment`, all custom environment
// variables are cleared.
// It is an error to provide both this mask and a mask specifying one or
// more individual environment variables.
// variables are cleared.
// * `config.softwareConfig.schedulerCount`
// * Horizontally scale the number of schedulers in Airflow. A positive
// integer not greater than the number of nodes must be provided in the
// `config.softwareConfig.schedulerCount` field. Supported for Cloud
// Composer environments in versions composer-1.*.*-airflow-2.*.*.
// * `config.databaseConfig.machineType`
// * Cloud SQL machine type used by Airflow database.
// It has to be one of: db-n1-standard-2, db-n1-standard-4,
// db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer
// environments in versions composer-1.*.*-airflow-*.*.*.
// * `config.webServerConfig.machineType`
// * Machine type on which Airflow web server is running.
// It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
// or composer-n1-webserver-8. Supported for Cloud Composer environments
// in versions composer-1.*.*-airflow-*.*.*.
google.protobuf.FieldMask update_mask = 3;
}
// Request to create a snapshot of a Cloud Composer environment.
message SaveSnapshotRequest {
// The resource name of the source environment in the form:
// "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
string environment = 1;
// Location in a Cloud Storage where the snapshot is going to be stored, e.g.:
// "gs://my-bucket/snapshots".
string snapshot_location = 2;
}
// Response to SaveSnapshotRequest.
message SaveSnapshotResponse {
// The fully-resolved Cloud Storage path of the created snapshot,
// e.g.:
// "gs://my-bucket/snapshots/project_location_environment_timestamp".
// This field is populated only if the snapshot creation was successful.
string snapshot_path = 1;
}
// Request to load a snapshot into a Cloud Composer environment.
message LoadSnapshotRequest {
// The resource name of the target environment in the form:
// "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
string environment = 1;
// A Cloud Storage path to a snapshot to load, e.g.:
// "gs://my-bucket/snapshots/project_location_environment_timestamp".
string snapshot_path = 2;
// Whether or not to skip installing Pypi packages when loading the
// environment's state.
bool skip_pypi_packages_installation = 3;
// Whether or not to skip setting environment variables when loading the
// environment's state.
bool skip_environment_variables_setting = 4;
// Whether or not to skip setting Airflow overrides when loading the
// environment's state.
bool skip_airflow_overrides_setting = 5;
// Whether or not to skip copying Cloud Storage data when loading the
// environment's state.
bool skip_gcs_data_copying = 6;
}
// Response to LoadSnapshotRequest.
message LoadSnapshotResponse {
}
// Configuration information for an environment.
message EnvironmentConfig {
// The size of the Cloud Composer environment.
enum EnvironmentSize {
// The size of the environment is unspecified.
ENVIRONMENT_SIZE_UNSPECIFIED = 0;
// The environment size is small.
ENVIRONMENT_SIZE_SMALL = 1;
// The environment size is medium.
ENVIRONMENT_SIZE_MEDIUM = 2;
// The environment size is large.
ENVIRONMENT_SIZE_LARGE = 3;
}
// Output only. The Kubernetes Engine cluster used to run this environment.
string gke_cluster = 1;
@ -273,6 +380,9 @@ message EnvironmentConfig {
// The number of nodes in the Kubernetes Engine cluster that will be
// used to run this environment.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
int32 node_count = 3;
// The configuration settings for software inside the environment.
@ -299,10 +409,53 @@ message EnvironmentConfig {
// and its dependencies. Cannot be updated.
EncryptionConfig encryption_config = 11 [(google.api.field_behavior) = OPTIONAL];
// Optional. The maintenance window is the period when Cloud Composer components may
// undergo maintenance. It is defined so that maintenance is not executed
// during peak hours or critical time periods.
//
// The system will not be under maintenance for every occurrence of this
// window, but when maintenance is planned, it will be scheduled
// during the window.
//
// The maintenance window period must encompass at least 12 hours per week.
// This may be split into multiple chunks, each with a size of
// at least 4 hours.
//
// If this value is omitted, the default value for maintenance window will be
// applied. The default value is Saturday and Sunday 00-06 GMT.
MaintenanceWindow maintenance_window = 12 [(google.api.field_behavior) = OPTIONAL];
// Optional. The workloads configuration settings for the GKE cluster associated with
// the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
// server and workers workloads.
//
// This field is supported for Cloud Composer environments in versions
// composer-2.*.*-airflow-*.*.* and newer.
WorkloadsConfig workloads_config = 15 [(google.api.field_behavior) = OPTIONAL];
// Optional. The size of the Cloud Composer environment.
//
// This field is supported for Cloud Composer environments in versions
// composer-2.*.*-airflow-*.*.* and newer.
EnvironmentSize environment_size = 16 [(google.api.field_behavior) = OPTIONAL];
// Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
// [Airflow web
// interface](/composer/docs/how-to/accessing/airflow-web-interface)).
string airflow_uri = 6;
// Optional. The configuration options for GKE cluster master authorized networks.
// By default master authorized networks feature is:
// - in case of private environment: enabled with no external networks
// allowlisted.
// - in case of public environment: disabled.
MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 [(google.api.field_behavior) = OPTIONAL];
// Optional. The Recovery settings configuration of an environment.
//
// This field is supported for Cloud Composer environments in versions
// composer-2.*.*-airflow-*.*.* and newer.
RecoveryConfig recovery_config = 18 [(google.api.field_behavior) = OPTIONAL];
}
// Network-level access control policy for the Airflow web server.
@ -333,10 +486,14 @@ message DatabaseConfig {
// Optional. Cloud SQL machine type used by Airflow database.
// It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
// or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
// Supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
string machine_type = 1 [(google.api.field_behavior) = OPTIONAL];
}
// The configuration settings for the Airflow web server App Engine instance.
// Supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*
message WebServerConfig {
// Optional. Machine type on which Airflow web server is running.
// It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
@ -348,7 +505,8 @@ message WebServerConfig {
}
// The encryption options for the Cloud Composer environment
// and its dependencies.
// and its dependencies.Supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
message EncryptionConfig {
// Optional. Customer-managed Encryption Key available through Google's Key Management
// Service. Cannot be updated.
@ -356,28 +514,62 @@ message EncryptionConfig {
string kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL];
}
// The configuration settings for Cloud Composer maintenance window.
// The following example:
//
// ```
// {
// "startTime":"2019-08-01T01:00:00Z"
// "endTime":"2019-08-01T07:00:00Z"
// "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE"
// }
// ```
//
// would define a maintenance window between 01 and 07 hours UTC during
// each Tuesday and Wednesday.
message MaintenanceWindow {
// Required. Start time of the first recurrence of the maintenance window.
google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Maintenance window end time. It is used only to calculate the duration of
// the maintenance window.
// The value for end-time must be in the future, relative to
// `start_time`.
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = REQUIRED];
// Required. Maintenance window recurrence. Format is a subset of
// [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed
// values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...`
// Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`.
string recurrence = 3 [(google.api.field_behavior) = REQUIRED];
}
// Specifies the selection and configuration of software inside the environment.
message SoftwareConfig {
// 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]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
// `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`.
// When used as input, the server also checks if the provided version is
// supported and denies the request for an unsupported version.
//
// The Cloud Composer portion of the version is a
// [semantic version](https://semver.org) or `latest`. When the patch version
// is omitted, the current Cloud Composer patch version is selected.
// When `latest` is provided instead of an explicit version number,
// the server replaces `latest` with the current Cloud Composer version
// and stores that version number in the same field.
// The Cloud Composer portion of the image version is a full
// [semantic version](https://semver.org), or an alias in the form of major
// version number or `latest`. When an alias is provided, the server replaces
// it with the current Cloud Composer version that satisfies the alias.
//
// The portion of the image version that follows *airflow-* is an
// official Apache Airflow repository
// [release name](https://github.com/apache/incubator-airflow/releases).
// The Apache Airflow portion of the image version is a full semantic version
// that points to one of the supported Apache Airflow versions, or an alias in
// the form of only major or major.minor versions specified. When an alias is
// provided, the server replaces it with the latest Apache Airflow version
// that satisfies the alias and is supported in the given Cloud Composer
// version.
//
// See also [Version
// List](/composer/docs/concepts/versioning/composer-versions).
// In all cases, the resolved image version is stored in the same field.
//
// See also [version
// list](/composer/docs/concepts/versioning/composer-versions) and [versioning
// overview](/composer/docs/concepts/versioning/composer-versioning-overview).
string image_version = 1;
// Optional. Apache Airflow configuration properties to override.
@ -436,7 +628,17 @@ message SoftwareConfig {
//
// Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
// updated.
//
// This field is only supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*. Environments in newer versions always use
// Python major version 3.
string python_version = 6;
// Optional. The number of schedulers for Airflow.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-2.*.*.
int32 scheduler_count = 7 [(google.api.field_behavior) = OPTIONAL];
}
// Configuration for controlling how IPs are allocated in the
@ -444,6 +646,10 @@ message SoftwareConfig {
message IPAllocationPolicy {
// Optional. Whether or not to enable Alias IPs in the GKE cluster.
// If `true`, a VPC-native cluster is created.
//
// This field is only supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*. Environments in newer versions always use
// VPC-native GKE clusters.
bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL];
// Configuration of allocating IP addresses for pods in the GKE cluster.
@ -451,13 +657,15 @@ message IPAllocationPolicy {
// Optional. The name of the GKE cluster's secondary range used to allocate
// IP addresses to pods.
//
// This field is applicable only when `use_ip_aliases` is true.
// For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*,
// this field is applicable only when `use_ip_aliases` is true.
string cluster_secondary_range_name = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. The IP address range used to allocate IP addresses to pods in
// the GKE cluster.
//
// This field is applicable only when `use_ip_aliases` is true.
// For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*,
// this field is applicable only when `use_ip_aliases` is true.
//
// Set to blank to have GKE choose a range with the default size.
//
@ -465,7 +673,7 @@ message IPAllocationPolicy {
// netmask.
//
// Set to a
// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
// [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
// to use.
@ -477,13 +685,15 @@ message IPAllocationPolicy {
// Optional. The name of the services' secondary range used to allocate
// IP addresses to the GKE cluster.
//
// This field is applicable only when `use_ip_aliases` is true.
// For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*,
// this field is applicable only when `use_ip_aliases` is true.
string services_secondary_range_name = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. The IP address range of the services IP addresses in this
// GKE cluster.
//
// This field is applicable only when `use_ip_aliases` is true.
// For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*,
// this field is applicable only when `use_ip_aliases` is true.
//
// Set to blank to have GKE choose a range with the default size.
//
@ -491,7 +701,7 @@ message IPAllocationPolicy {
// netmask.
//
// Set to a
// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
// [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
// to use.
@ -516,6 +726,9 @@ message NodeConfig {
// 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.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
string location = 1;
// Optional. The Compute Engine
@ -539,6 +752,9 @@ message NodeConfig {
//
// If this field is unspecified, the `machineTypeId` defaults
// to "n1-standard-1".
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
string machine_type = 2;
// Optional. The Compute Engine network to be used for machine
@ -565,13 +781,19 @@ message NodeConfig {
// location.
string subnetwork = 4;
// Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
// Optional. The disk size in GB used for node VMs. Minimum size is 30GB.
// If unspecified, defaults to 100GB. Cannot be updated.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
int32 disk_size_gb = 5;
// Optional. The set of Google API scopes to be made available on all
// node VMs. If `oauth_scopes` is empty, defaults to
// ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
repeated string oauth_scopes = 6;
// Optional. The Google Cloud Platform Service Account to be used by the node
@ -583,10 +805,21 @@ message NodeConfig {
// to identify valid sources or targets for network firewalls. Each tag within
// the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
// Cannot be updated.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
repeated string tags = 8;
// Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
IPAllocationPolicy ip_allocation_policy = 9 [(google.api.field_behavior) = OPTIONAL];
// Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines
// nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for
// all destination addresses, except between pods traffic.
//
// See:
// https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent
bool enable_ip_masq_agent = 11 [(google.api.field_behavior) = OPTIONAL];
}
// Configuration options for the private GKE cluster in a Cloud Composer
@ -608,12 +841,39 @@ message PrivateClusterConfig {
string master_ipv4_reserved_range = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Configuration options for networking connections in the Composer 2
// environment.
message NetworkingConfig {
// Represents connection type between Composer environment in Customer
// Project and the corresponding Tenant project, from a predefined list
// of available connection modes.
enum ConnectionType {
// No specific connection type was requested, so the environment uses
// the default value corresponding to the rest of its configuration.
CONNECTION_TYPE_UNSPECIFIED = 0;
// Requests the use of VPC peerings for connecting the Customer and Tenant
// projects.
VPC_PEERING = 1;
// Requests the use of Private Service Connect for connecting the Customer
// and Tenant projects.
PRIVATE_SERVICE_CONNECT = 2;
}
// Optional. Indicates the user requested specifc connection type between Tenant and
// Customer projects.
// You cannot set networking connection type in public IP environment.
ConnectionType connection_type = 1 [(google.api.field_behavior) = OPTIONAL];
}
// The configuration information for configuring a Private IP Cloud Composer
// environment.
message PrivateEnvironmentConfig {
// Optional. If `true`, a Private IP Cloud Composer environment is created.
// If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
// set to true.
// set to true for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Configuration for the private GKE cluster for a Private IP
@ -623,6 +883,9 @@ message PrivateEnvironmentConfig {
// Optional. The CIDR block from which IP range for web server will be reserved. Needs
// to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and
// `cloud_sql_ipv4_cidr_block`.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
string web_server_ipv4_cidr_block = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. The CIDR block from which IP range in tenant project will be reserved for
@ -630,7 +893,143 @@ message PrivateEnvironmentConfig {
string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL];
// Output only. The IP range reserved for the tenant project's App Engine VMs.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
string web_server_ipv4_reserved_range = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
// project will be reserved. Needs to be disjoint from
// private_cluster_config.master_ipv4_cidr_block and
// cloud_sql_ipv4_cidr_block.
//
// This field is supported for Cloud Composer environments in versions
// composer-2.*.*-airflow-*.*.* and newer.
string cloud_composer_network_ipv4_cidr_block = 7 [(google.api.field_behavior) = OPTIONAL];
// Output only. The IP range reserved for the tenant project's Cloud Composer network.
//
// This field is supported for Cloud Composer environments in versions
// composer-2.*.*-airflow-*.*.* and newer.
string cloud_composer_network_ipv4_reserved_range = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. When enabled, IPs from public (non-RFC1918) ranges can be used for
// `IPAllocationPolicy.cluster_ipv4_cidr_block` and
// `IPAllocationPolicy.service_ipv4_cidr_block`.
bool enable_privately_used_public_ips = 6 [(google.api.field_behavior) = OPTIONAL];
// Optional. When specified, the environment will use Private Service Connect
// instead of VPC peerings to connect to Cloud SQL in the Tenant Project,
// and the PSC endpoint in the Customer Project will use an IP address from
// this subnetwork.
string cloud_composer_connection_subnetwork = 9 [(google.api.field_behavior) = OPTIONAL];
// Optional. Configuration for the network connections configuration in the environment.
NetworkingConfig networking_config = 10 [(google.api.field_behavior) = OPTIONAL];
}
// The Kubernetes workloads configuration for GKE cluster associated with the
// Cloud Composer environment. Supported for Cloud Composer environments in
// versions composer-2.*.*-airflow-*.*.* and newer.
message WorkloadsConfig {
// Configuration for resources used by Airflow schedulers.
message SchedulerResource {
// Optional. CPU request and limit for a single Airflow scheduler replica.
float cpu = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Memory (GB) request and limit for a single Airflow scheduler replica.
float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Storage (GB) request and limit for a single Airflow scheduler replica.
float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. The number of schedulers.
int32 count = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Configuration for resources used by Airflow web server.
message WebServerResource {
// Optional. CPU request and limit for Airflow web server.
float cpu = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Memory (GB) request and limit for Airflow web server.
float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Storage (GB) request and limit for Airflow web server.
float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Configuration for resources used by Airflow workers.
message WorkerResource {
// Optional. CPU request and limit for a single Airflow worker replica.
float cpu = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Memory (GB) request and limit for a single Airflow worker replica.
float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Storage (GB) request and limit for a single Airflow worker replica.
float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. Minimum number of workers for autoscaling.
int32 min_count = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. Maximum number of workers for autoscaling.
int32 max_count = 5 [(google.api.field_behavior) = OPTIONAL];
}
// Optional. Resources used by Airflow schedulers.
SchedulerResource scheduler = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Resources used by Airflow web server.
WebServerResource web_server = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Resources used by Airflow workers.
WorkerResource worker = 3 [(google.api.field_behavior) = OPTIONAL];
}
// The Recovery settings of an environment.
message RecoveryConfig {
// Optional. The configuration for scheduled snapshot creation mechanism.
ScheduledSnapshotsConfig scheduled_snapshots_config = 1 [(google.api.field_behavior) = OPTIONAL];
}
// The configuration for scheduled snapshot creation mechanism.
message ScheduledSnapshotsConfig {
// Optional. Whether scheduled snapshots creation is enabled.
bool enabled = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. The Cloud Storage location for storing automatically created snapshots.
string snapshot_location = 6 [(google.api.field_behavior) = OPTIONAL];
// Optional. The cron expression representing the time when snapshots creation mechanism
// runs. This field is subject to additional validation around frequency of
// execution.
string snapshot_creation_schedule = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. Time zone that sets the context to interpret snapshot_creation_schedule.
string time_zone = 5 [(google.api.field_behavior) = OPTIONAL];
}
// Configuration options for the master authorized networks feature. Enabled
// master authorized networks will disallow all external traffic to access
// Kubernetes master through HTTPS except traffic from the given CIDR blocks,
// Google Compute Engine Public IPs and Google Prod IPs.
message MasterAuthorizedNetworksConfig {
// CIDR block with an optional name.
message CidrBlock {
// User-defined name that identifies the CIDR block.
string display_name = 1;
// CIDR block that must be specified in CIDR notation.
string cidr_block = 2;
}
// Whether or not master authorized networks feature is enabled.
bool enabled = 1;
// Up to 50 external networks that could access Kubernetes master through
// HTTPS.
repeated CidrBlock cidr_blocks = 2;
}
// An environment for running orchestration tasks.

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -66,7 +66,7 @@ message ListImageVersionsResponse {
// ImageVersion information
message ImageVersion {
// The string identifier of the ImageVersion, in the form:
// "composer-x.y.z-airflow-a.b(.c)"
// "composer-x.y.z-airflow-a.b.c"
string image_version_id = 1;
// Whether this is the default ImageVersion used by Composer during

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -63,6 +63,12 @@ message OperationMetadata {
// A resource check operation.
CHECK = 4;
// Saves snapshot of the resource operation.
SAVE_SNAPSHOT = 5;
// Loads snapshot of the resource operation.
LOAD_SNAPSHOT = 6;
}
// Output only. The current operation state.

@ -6,10 +6,15 @@ title: Cloud Composer API
apis:
- name: google.cloud.orchestration.airflow.service.v1beta1.Environments
- name: google.cloud.orchestration.airflow.service.v1beta1.ImageVersions
- name: google.longrunning.Operations
types:
- name: google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse
- name: google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse
- name: google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse
- name: google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata
- name: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse
- name: google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse
documentation:
summary: Manages Apache Airflow environments on Google Cloud Platform.

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -112,6 +112,36 @@ service Environments {
metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata"
};
}
// Creates a snapshots of a Cloud Composer environment.
//
// As a result of this operation, snapshot of environment's state is stored
// in a location specified in the SaveSnapshotRequest.
rpc SaveSnapshot(SaveSnapshotRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:saveSnapshot"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse"
metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata"
};
}
// Loads a snapshot of a Cloud Composer environment.
//
// As a result of this operation, a snapshot of environment's specified in
// LoadSnapshotRequest is loaded into the environment.
rpc LoadSnapshot(LoadSnapshotRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:loadSnapshot"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse"
metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata"
};
}
}
// Create a new environment.
@ -256,7 +286,9 @@ message UpdateEnvironmentRequest {
// * `config.nodeCount`
// * Horizontally scale the number of nodes in the environment. An integer
// greater than or equal to 3 must be provided in the `config.nodeCount`
// field. * `config.webServerNetworkAccessControl`
// field. Supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
// * `config.webServerNetworkAccessControl`
// * Replace the environment's current WebServerNetworkAccessControl.
// * `config.softwareConfig.airflowConfigOverrides`
// * Replace all Apache Airflow config overrides. If a replacement config
@ -275,30 +307,43 @@ message UpdateEnvironmentRequest {
// * `config.softwareConfig.envVariables`
// * Replace all environment variables. If a replacement environment
// variable map is not included in `environment`, all custom environment
// variables are cleared.
// It is an error to provide both this mask and a mask specifying one or
// more individual environment variables.
// variables are cleared.
// * `config.softwareConfig.imageVersion`
// * Upgrade the version of the environment in-place. Refer to
// `SoftwareConfig.image_version` for information on how to format the
// new image version. Additionally, the new image version cannot effect
// a version downgrade and must match the current image version's
// Composer major version and Airflow major and minor versions. Consult
// the [Cloud Composer Version
// List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
// a version downgrade, and must match the current image version's
// Composer and Airflow major versions. Consult the [Cloud Composer
// version list](/composer/docs/concepts/versioning/composer-versions)
// for valid values.
// * `config.softwareConfig.schedulerCount`
// * Horizontally scale the number of schedulers in Airflow. A positive
// integer not greater than the number of nodes must be provided in the
// `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
// `config.softwareConfig.schedulerCount` field. Supported for Cloud
// Composer environments in versions composer-1.*.*-airflow-2.*.*.
// * `config.softwareConfig.cloudDataLineageIntegration`
// * Configuration for Cloud Data Lineage integration.
// * `config.databaseConfig.machineType`
// * Cloud SQL machine type used by Airflow database.
// It has to be one of: db-n1-standard-2, db-n1-standard-4,
// db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
// db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer
// environments in versions composer-1.*.*-airflow-*.*.*.
// * `config.webServerConfig.machineType`
// * Machine type on which Airflow web server is running.
// It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
// or composer-n1-webserver-8. * `config.maintenanceWindow`
// or composer-n1-webserver-8. Supported for Cloud Composer environments
// in versions composer-1.*.*-airflow-*.*.*.
// * `config.maintenanceWindow`
// * Maintenance window during which Cloud Composer components may be
// under maintenance.
// * `config.workloadsConfig`
// * The workloads configuration settings for the GKE cluster associated
// with the Cloud Composer environment. Supported for Cloud Composer
// environments in versions composer-2.*.*-airflow-*.*.* and newer.
// * `config.environmentSize`
// * The size of the Cloud Composer environment. Supported for Cloud
// Composer environments in versions composer-2.*.*-airflow-*.*.* and
// newer.
google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED];
}
@ -310,6 +355,104 @@ message RestartWebServerRequest {
string name = 1;
}
// Response to ExecuteAirflowCommandRequest.
message ExecuteAirflowCommandResponse {
// The unique ID of the command execution for polling.
string execution_id = 1;
// The name of the pod where the command is executed.
string pod = 2;
// The namespace of the pod where the command is executed.
string pod_namespace = 3;
// Error message. Empty if there was no error.
string error = 4;
}
// Response to PollAirflowCommandRequest.
message PollAirflowCommandResponse {
// Contains information about a single line from logs.
message Line {
// Number of the line.
int32 line_number = 1;
// Text content of the log line.
string content = 2;
}
// Information about how a command ended.
message ExitInfo {
// The exit code from the command execution.
int32 exit_code = 1;
// Error message. Empty if there was no error.
string error = 2;
}
// Output from the command execution. It may not contain the full output
// and the caller may need to poll for more lines.
repeated Line output = 1;
// Whether the command execution has finished and there is no more output.
bool output_end = 2;
// The result exit status of the command.
ExitInfo exit_info = 3;
}
// Request to create a snapshot of a Cloud Composer environment.
message SaveSnapshotRequest {
// The resource name of the source environment in the form:
// "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
string environment = 1;
// Location in a Cloud Storage where the snapshot is going to be stored, e.g.:
// "gs://my-bucket/snapshots".
string snapshot_location = 2;
}
// Response to SaveSnapshotRequest.
message SaveSnapshotResponse {
// The fully-resolved Cloud Storage path of the created snapshot,
// e.g.:
// "gs://my-bucket/snapshots/project_location_environment_timestamp".
// This field is populated only if the snapshot creation was successful.
string snapshot_path = 1;
}
// Request to load a snapshot into a Cloud Composer environment.
message LoadSnapshotRequest {
// The resource name of the target environment in the form:
// "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
string environment = 1;
// A Cloud Storage path to a snapshot to load, e.g.:
// "gs://my-bucket/snapshots/project_location_environment_timestamp".
string snapshot_path = 2;
// Whether or not to skip installing Pypi packages when loading the
// environment's state.
bool skip_pypi_packages_installation = 3;
// Whether or not to skip setting environment variables when loading the
// environment's state.
bool skip_environment_variables_setting = 4;
// Whether or not to skip setting Airflow overrides when loading the
// environment's state.
bool skip_airflow_overrides_setting = 5;
// Whether or not to skip copying Cloud Storage data when loading the
// environment's state.
bool skip_gcs_data_copying = 6;
}
// Response to LoadSnapshotRequest.
message LoadSnapshotResponse {
}
// Configuration information for an environment.
message EnvironmentConfig {
// The size of the Cloud Composer environment.
@ -338,6 +481,9 @@ message EnvironmentConfig {
// The number of nodes in the Kubernetes Engine cluster that will be
// used to run this environment.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
int32 node_count = 3;
// The configuration settings for software inside the environment.
@ -358,6 +504,9 @@ message EnvironmentConfig {
DatabaseConfig database_config = 10 [(google.api.field_behavior) = OPTIONAL];
// Optional. The configuration settings for the Airflow web server App Engine instance.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
WebServerConfig web_server_config = 11 [(google.api.field_behavior) = OPTIONAL];
// Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
@ -398,6 +547,19 @@ message EnvironmentConfig {
// This field is supported for Cloud Composer environments in versions
// composer-2.*.*-airflow-*.*.* and newer.
EnvironmentSize environment_size = 16 [(google.api.field_behavior) = OPTIONAL];
// Optional. The configuration options for GKE cluster master authorized networks.
// By default master authorized networks feature is:
// - in case of private environment: enabled with no external networks
// allowlisted.
// - in case of public environment: disabled.
MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 [(google.api.field_behavior) = OPTIONAL];
// Optional. The Recovery settings configuration of an environment.
//
// This field is supported for Cloud Composer environments in versions
// composer-2.*.*-airflow-*.*.* and newer.
RecoveryConfig recovery_config = 18 [(google.api.field_behavior) = OPTIONAL];
}
// Network-level access control policy for the Airflow web server.
@ -427,23 +589,27 @@ message SoftwareConfig {
// 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]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
// `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`.
// When used as input, the server also checks if the provided version is
// supported and denies the request for an unsupported version.
//
// The Cloud Composer portion of the version is a
// [semantic version](https://semver.org) or `latest`. When the patch version
// is omitted, the current Cloud Composer patch version is selected.
// When `latest` is provided instead of an explicit version number,
// the server replaces `latest` with the current Cloud Composer version
// and stores that version number in the same field.
// The Cloud Composer portion of the image version is a full
// [semantic version](https://semver.org), or an alias in the form of major
// version number or `latest`. When an alias is provided, the server replaces
// it with the current Cloud Composer version that satisfies the alias.
//
// The Apache Airflow portion of the image version is a full semantic version
// that points to one of the supported Apache Airflow versions, or an alias in
// the form of only major or major.minor versions specified. When an alias is
// provided, the server replaces it with the latest Apache Airflow version
// that satisfies the alias and is supported in the given Cloud Composer
// version.
//
// The portion of the image version that follows *airflow-* is an
// official Apache Airflow repository
// [release name](https://github.com/apache/incubator-airflow/releases).
// In all cases, the resolved image version is stored in the same field.
//
// See also [Version
// List](/composer/docs/concepts/versioning/composer-versions).
// See also [version
// list](/composer/docs/concepts/versioning/composer-versions) and [versioning
// overview](/composer/docs/concepts/versioning/composer-versioning-overview).
string image_version = 1;
// Optional. Apache Airflow configuration properties to override.
@ -502,7 +668,20 @@ message SoftwareConfig {
//
// Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
// updated.
//
// This field is only supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*. Environments in newer versions always use
// Python major version 3.
string python_version = 6 [(google.api.field_behavior) = OPTIONAL];
// Optional. The number of schedulers for Airflow.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-2.*.*.
int32 scheduler_count = 7 [(google.api.field_behavior) = OPTIONAL];
// Optional. The configuration for Cloud Data Lineage integration.
CloudDataLineageIntegration cloud_data_lineage_integration = 8 [(google.api.field_behavior) = OPTIONAL];
}
// Configuration for controlling how IPs are allocated in the
@ -510,27 +689,33 @@ message SoftwareConfig {
message IPAllocationPolicy {
// Optional. Whether or not to enable Alias IPs in the GKE cluster.
// If `true`, a VPC-native cluster is created.
//
// This field is only supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*. Environments in newer versions always use
// VPC-native GKE clusters.
bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. The name of the cluster's secondary range used to allocate
// IP addresses to pods. Specify either `cluster_secondary_range_name`
// or `cluster_ipv4_cidr_block` but not both.
//
// This field is applicable only when `use_ip_aliases` is true.
// For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*,
// this field is applicable only when `use_ip_aliases` is true.
string cluster_secondary_range_name = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. The name of the services' secondary range used to allocate
// IP addresses to the cluster. Specify either `services_secondary_range_name`
// or `services_ipv4_cidr_block` but not both.
//
// This field is applicable only when `use_ip_aliases` is true.
// For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*,
// this field is applicable only when `use_ip_aliases` is true.
string services_secondary_range_name = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. The IP address range used to allocate IP addresses to pods in
// the cluster.
//
// This field is applicable only when `use_ip_aliases` is true.
//
// For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*,
// this field is applicable only when `use_ip_aliases` is true.
//
// Set to blank to have GKE choose a range with the default size.
//
@ -538,7 +723,7 @@ message IPAllocationPolicy {
// netmask.
//
// Set to a
// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
// [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
// to use.
@ -549,8 +734,8 @@ message IPAllocationPolicy {
// Optional. The IP address range of the services IP addresses in this
// cluster.
//
// This field is applicable only when `use_ip_aliases` is true.
//
// For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*,
// this field is applicable only when `use_ip_aliases` is true.
//
// Set to blank to have GKE choose a range with the default size.
//
@ -558,7 +743,7 @@ message IPAllocationPolicy {
// netmask.
//
// Set to a
// [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
// [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
// notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
// `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
// to use.
@ -584,6 +769,9 @@ message NodeConfig {
// 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.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
string location = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. The Compute Engine
@ -607,6 +795,9 @@ message NodeConfig {
//
// If this field is unspecified, the `machineTypeId` defaults
// to "n1-standard-1".
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
string machine_type = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. The Compute Engine network to be used for machine
@ -633,13 +824,19 @@ message NodeConfig {
// location.
string subnetwork = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
// Optional. The disk size in GB used for node VMs. Minimum size is 30GB.
// If unspecified, defaults to 100GB. Cannot be updated.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
int32 disk_size_gb = 5 [(google.api.field_behavior) = OPTIONAL];
// Optional. The set of Google API scopes to be made available on all
// node VMs. If `oauth_scopes` is empty, defaults to
// ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
repeated string oauth_scopes = 6 [(google.api.field_behavior) = OPTIONAL];
// Optional. The Google Cloud Platform Service Account to be used by the workloads. If a
@ -651,6 +848,9 @@ message NodeConfig {
// to identify valid sources or targets for network firewalls. Each tag within
// the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
// Cannot be updated.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
repeated string tags = 8 [(google.api.field_behavior) = OPTIONAL];
// Optional. The IPAllocationPolicy fields for the GKE cluster.
@ -666,7 +866,18 @@ message NodeConfig {
// For more information, see [Optimizing IP address allocation]
// (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr).
// Cannot be updated.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
int32 max_pods_per_node = 10 [(google.api.field_behavior) = OPTIONAL];
// Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines
// nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for
// all destination addresses, except between pods traffic.
//
// See:
// https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent
bool enable_ip_masq_agent = 11 [(google.api.field_behavior) = OPTIONAL];
}
// Configuration options for the private GKE cluster in a Cloud Composer
@ -688,12 +899,39 @@ message PrivateClusterConfig {
string master_ipv4_reserved_range = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Configuration options for networking connections in the Composer 2
// environment.
message NetworkingConfig {
// Represents connection type between Composer environment in Customer
// Project and the corresponding Tenant project, from a predefined list
// of available connection modes.
enum ConnectionType {
// No specific connection type was requested, so the environment uses
// the default value corresponding to the rest of its configuration.
CONNECTION_TYPE_UNSPECIFIED = 0;
// Requests the use of VPC peerings for connecting the Customer and Tenant
// projects.
VPC_PEERING = 1;
// Requests the use of Private Service Connect for connecting the Customer
// and Tenant projects.
PRIVATE_SERVICE_CONNECT = 2;
}
// Optional. Indicates the user requested specifc connection type between Tenant and
// Customer projects.
// You cannot set networking connection type in public IP environment.
ConnectionType connection_type = 1 [(google.api.field_behavior) = OPTIONAL];
}
// The configuration information for configuring a Private IP Cloud Composer
// environment.
message PrivateEnvironmentConfig {
// Optional. If `true`, a Private IP Cloud Composer environment is created.
// If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
// set to true .
// set to true for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Configuration for the private GKE cluster for a Private IP
@ -703,6 +941,9 @@ message PrivateEnvironmentConfig {
// Optional. The CIDR block from which IP range for web server will be reserved. Needs
// to be disjoint from private_cluster_config.master_ipv4_cidr_block and
// cloud_sql_ipv4_cidr_block.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
string web_server_ipv4_cidr_block = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. The CIDR block from which IP range in tenant project will be reserved for
@ -710,6 +951,9 @@ message PrivateEnvironmentConfig {
string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL];
// Output only. The IP range reserved for the tenant project's App Engine VMs.
//
// This field is supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
string web_server_ipv4_reserved_range = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
@ -726,6 +970,20 @@ message PrivateEnvironmentConfig {
// This field is supported for Cloud Composer environments in versions
// composer-2.*.*-airflow-*.*.* and newer.
string cloud_composer_network_ipv4_reserved_range = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. When enabled, IPs from public (non-RFC1918) ranges can be used for
// `IPAllocationPolicy.cluster_ipv4_cidr_block` and
// `IPAllocationPolicy.service_ipv4_cidr_block`.
bool enable_privately_used_public_ips = 6 [(google.api.field_behavior) = OPTIONAL];
// Optional. When specified, the environment will use Private Service Connect
// instead of VPC peerings to connect to Cloud SQL in the Tenant Project,
// and the PSC endpoint in the Customer Project will use an IP address from
// this subnetwork.
string cloud_composer_connection_subnetwork = 9 [(google.api.field_behavior) = OPTIONAL];
// Optional. Configuration for the network connections configuration in the environment.
NetworkingConfig networking_config = 10 [(google.api.field_behavior) = OPTIONAL];
}
// The configuration of Cloud SQL instance that is used by the Apache Airflow
@ -734,10 +992,14 @@ message DatabaseConfig {
// Optional. Cloud SQL machine type used by Airflow database.
// It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
// or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
// Supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
string machine_type = 1 [(google.api.field_behavior) = OPTIONAL];
}
// The configuration settings for the Airflow web server App Engine instance.
// Supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
message WebServerConfig {
// Optional. Machine type on which Airflow web server is running.
// It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
@ -749,7 +1011,8 @@ message WebServerConfig {
}
// The encryption options for the Cloud Composer environment and its
// dependencies.
// dependencies. Supported for Cloud Composer environments in versions
// composer-1.*.*-airflow-*.*.*.
message EncryptionConfig {
// Optional. Customer-managed Encryption Key available through Google's Key Management
// Service. Cannot be updated.
@ -835,6 +1098,18 @@ message WorkloadsConfig {
int32 max_count = 5 [(google.api.field_behavior) = OPTIONAL];
}
// Configuration for resources used by Airflow triggerers.
message TriggererResource {
// Optional. The number of triggerers.
int32 count = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. CPU request and limit for a single Airflow triggerer replica.
float cpu = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Memory (GB) request and limit for a single Airflow triggerer replica.
float memory_gb = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Optional. Resources used by Airflow schedulers.
SchedulerResource scheduler = 1 [(google.api.field_behavior) = OPTIONAL];
@ -843,6 +1118,60 @@ message WorkloadsConfig {
// Optional. Resources used by Airflow workers.
WorkerResource worker = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. Resources used by Airflow triggerers.
TriggererResource triggerer = 4 [(google.api.field_behavior) = OPTIONAL];
}
// The Recovery settings of an environment.
message RecoveryConfig {
// Optional. The configuration for scheduled snapshot creation mechanism.
ScheduledSnapshotsConfig scheduled_snapshots_config = 1 [(google.api.field_behavior) = OPTIONAL];
}
// The configuration for scheduled snapshot creation mechanism.
message ScheduledSnapshotsConfig {
// Optional. Whether scheduled snapshots creation is enabled.
bool enabled = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. The Cloud Storage location for storing automatically created snapshots.
string snapshot_location = 6 [(google.api.field_behavior) = OPTIONAL];
// Optional. The cron expression representing the time when snapshots creation mechanism
// runs. This field is subject to additional validation around frequency of
// execution.
string snapshot_creation_schedule = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. Time zone that sets the context to interpret snapshot_creation_schedule.
string time_zone = 5 [(google.api.field_behavior) = OPTIONAL];
}
// Configuration options for the master authorized networks feature. Enabled
// master authorized networks will disallow all external traffic to access
// Kubernetes master through HTTPS except traffic from the given CIDR blocks,
// Google Compute Engine Public IPs and Google Prod IPs.
message MasterAuthorizedNetworksConfig {
// CIDR block with an optional name.
message CidrBlock {
// User-defined name that identifies the CIDR block.
string display_name = 1;
// CIDR block that must be specified in CIDR notation.
string cidr_block = 2;
}
// Whether or not master authorized networks feature is enabled.
bool enabled = 1;
// Up to 50 external networks that could access Kubernetes master through
// HTTPS.
repeated CidrBlock cidr_blocks = 2;
}
// Configuration for Cloud Data Lineage integration.
message CloudDataLineageIntegration {
// Optional. Whether or not Cloud Data Lineage integration is enabled.
bool enabled = 1 [(google.api.field_behavior) = OPTIONAL];
}
// An environment for running orchestration tasks.
@ -918,23 +1247,27 @@ message CheckUpgradeRequest {
// 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]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
// `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`.
// When used as input, the server also checks if the provided version is
// supported and denies the request for an unsupported version.
//
// The Cloud Composer portion of the version is a
// [semantic version](https://semver.org) or `latest`. When the patch version
// is omitted, the current Cloud Composer patch version is selected.
// When `latest` is provided instead of an explicit version number,
// the server replaces `latest` with the current Cloud Composer version
// and stores that version number in the same field.
// The Cloud Composer portion of the image version is a full
// [semantic version](https://semver.org), or an alias in the form of major
// version number or `latest`. When an alias is provided, the server replaces
// it with the current Cloud Composer version that satisfies the alias.
//
// The Apache Airflow portion of the image version is a full semantic version
// that points to one of the supported Apache Airflow versions, or an alias in
// the form of only major or major.minor versions specified. When an alias is
// provided, the server replaces it with the latest Apache Airflow version
// that satisfies the alias and is supported in the given Cloud Composer
// version.
//
// The portion of the image version that follows `airflow-` is an
// official Apache Airflow repository
// [release name](https://github.com/apache/incubator-airflow/releases).
// In all cases, the resolved image version is stored in the same field.
//
// See also [Version List]
// (/composer/docs/concepts/versioning/composer-versions).
// See also [version
// list](/composer/docs/concepts/versioning/composer-versions) and [versioning
// overview](/composer/docs/concepts/versioning/composer-versioning-overview).
string image_version = 2;
}

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -66,7 +66,7 @@ message ListImageVersionsResponse {
// Image Version information
message ImageVersion {
// The string identifier of the ImageVersion, in the form:
// "composer-x.y.z-airflow-a.b(.c)"
// "composer-x.y.z-airflow-a.b.c"
string image_version_id = 1;
// Whether this is the default ImageVersion used by Composer during

@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -59,6 +59,12 @@ message OperationMetadata {
// A resource check operation.
CHECK = 4;
// Saves snapshot of the resource operation.
SAVE_SNAPSHOT = 5;
// Loads snapshot of the resource operation.
LOAD_SNAPSHOT = 6;
}
// Output only. The current operation state.

Loading…
Cancel
Save