1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.orchestration.airflow.service.v1beta1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/cloud/orchestration/airflow/service/v1beta1/operations.proto"; 24import "google/longrunning/operations.proto"; 25import "google/protobuf/empty.proto"; 26import "google/protobuf/field_mask.proto"; 27import "google/protobuf/timestamp.proto"; 28 29option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1beta1/servicepb;servicepb"; 30option java_multiple_files = true; 31option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; 32 33// Managed Apache Airflow Environments. 34service Environments { 35 option (google.api.default_host) = "composer.googleapis.com"; 36 option (google.api.oauth_scopes) = 37 "https://www.googleapis.com/auth/cloud-platform"; 38 39 // Create a new environment. 40 rpc CreateEnvironment(CreateEnvironmentRequest) 41 returns (google.longrunning.Operation) { 42 option (google.api.http) = { 43 post: "/v1beta1/{parent=projects/*/locations/*}/environments" 44 body: "environment" 45 }; 46 option (google.api.method_signature) = "parent,environment"; 47 option (google.longrunning.operation_info) = { 48 response_type: "Environment" 49 metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" 50 }; 51 } 52 53 // Get an existing environment. 54 rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { 55 option (google.api.http) = { 56 get: "/v1beta1/{name=projects/*/locations/*/environments/*}" 57 }; 58 option (google.api.method_signature) = "name"; 59 } 60 61 // List environments. 62 rpc ListEnvironments(ListEnvironmentsRequest) 63 returns (ListEnvironmentsResponse) { 64 option (google.api.http) = { 65 get: "/v1beta1/{parent=projects/*/locations/*}/environments" 66 }; 67 option (google.api.method_signature) = "parent"; 68 } 69 70 // Update an environment. 71 rpc UpdateEnvironment(UpdateEnvironmentRequest) 72 returns (google.longrunning.Operation) { 73 option (google.api.http) = { 74 patch: "/v1beta1/{name=projects/*/locations/*/environments/*}" 75 body: "environment" 76 }; 77 option (google.api.method_signature) = "name,environment,update_mask"; 78 option (google.longrunning.operation_info) = { 79 response_type: "Environment" 80 metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" 81 }; 82 } 83 84 // Delete an environment. 85 rpc DeleteEnvironment(DeleteEnvironmentRequest) 86 returns (google.longrunning.Operation) { 87 option (google.api.http) = { 88 delete: "/v1beta1/{name=projects/*/locations/*/environments/*}" 89 }; 90 option (google.api.method_signature) = "name"; 91 option (google.longrunning.operation_info) = { 92 response_type: "google.protobuf.Empty" 93 metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" 94 }; 95 } 96 97 // Restart Airflow web server. 98 rpc RestartWebServer(RestartWebServerRequest) 99 returns (google.longrunning.Operation) { 100 option (google.api.http) = { 101 post: "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer" 102 body: "*" 103 }; 104 option (google.longrunning.operation_info) = { 105 response_type: "Environment" 106 metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" 107 }; 108 } 109 110 // Check if an upgrade operation on the environment will succeed. 111 // 112 // In case of problems detailed info can be found in the returned Operation. 113 rpc CheckUpgrade(CheckUpgradeRequest) returns (google.longrunning.Operation) { 114 option (google.api.http) = { 115 post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade" 116 body: "*" 117 }; 118 option (google.longrunning.operation_info) = { 119 response_type: "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse" 120 metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" 121 }; 122 } 123 124 // Executes Airflow CLI command. 125 rpc ExecuteAirflowCommand(ExecuteAirflowCommandRequest) 126 returns (ExecuteAirflowCommandResponse) { 127 option (google.api.http) = { 128 post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand" 129 body: "*" 130 }; 131 } 132 133 // Stops Airflow CLI command execution. 134 rpc StopAirflowCommand(StopAirflowCommandRequest) 135 returns (StopAirflowCommandResponse) { 136 option (google.api.http) = { 137 post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand" 138 body: "*" 139 }; 140 } 141 142 // Polls Airflow CLI command execution and fetches logs. 143 rpc PollAirflowCommand(PollAirflowCommandRequest) 144 returns (PollAirflowCommandResponse) { 145 option (google.api.http) = { 146 post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand" 147 body: "*" 148 }; 149 } 150 151 // Lists workloads in a Cloud Composer environment. Workload is a unit that 152 // runs a single Composer component. 153 // 154 // This method is supported for Cloud Composer environments in versions 155 // composer-3.*.*-airflow-*.*.* and newer. 156 rpc ListWorkloads(ListWorkloadsRequest) returns (ListWorkloadsResponse) { 157 option (google.api.http) = { 158 get: "/v1beta1/{parent=projects/*/locations/*/environments/*}/workloads" 159 }; 160 option (google.api.method_signature) = "parent"; 161 } 162 163 // Creates a user workloads Secret. 164 // 165 // This method is supported for Cloud Composer environments in versions 166 // composer-3.*.*-airflow-*.*.* and newer. 167 rpc CreateUserWorkloadsSecret(CreateUserWorkloadsSecretRequest) 168 returns (UserWorkloadsSecret) { 169 option (google.api.http) = { 170 post: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" 171 body: "user_workloads_secret" 172 }; 173 option (google.api.method_signature) = "parent,user_workloads_secret"; 174 } 175 176 // Gets an existing user workloads Secret. 177 // Values of the "data" field in the response are cleared. 178 // 179 // This method is supported for Cloud Composer environments in versions 180 // composer-3.*.*-airflow-*.*.* and newer. 181 rpc GetUserWorkloadsSecret(GetUserWorkloadsSecretRequest) 182 returns (UserWorkloadsSecret) { 183 option (google.api.http) = { 184 get: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" 185 }; 186 option (google.api.method_signature) = "name"; 187 } 188 189 // Lists user workloads Secrets. 190 // 191 // This method is supported for Cloud Composer environments in versions 192 // composer-3.*.*-airflow-*.*.* and newer. 193 rpc ListUserWorkloadsSecrets(ListUserWorkloadsSecretsRequest) 194 returns (ListUserWorkloadsSecretsResponse) { 195 option (google.api.http) = { 196 get: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" 197 }; 198 option (google.api.method_signature) = "parent"; 199 } 200 201 // Updates a user workloads Secret. 202 // 203 // This method is supported for Cloud Composer environments in versions 204 // composer-3.*.*-airflow-*.*.* and newer. 205 rpc UpdateUserWorkloadsSecret(UpdateUserWorkloadsSecretRequest) 206 returns (UserWorkloadsSecret) { 207 option (google.api.http) = { 208 put: "/v1beta1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" 209 body: "user_workloads_secret" 210 }; 211 option (google.api.method_signature) = "user_workloads_secret"; 212 } 213 214 // Deletes a user workloads Secret. 215 // 216 // This method is supported for Cloud Composer environments in versions 217 // composer-3.*.*-airflow-*.*.* and newer. 218 rpc DeleteUserWorkloadsSecret(DeleteUserWorkloadsSecretRequest) 219 returns (google.protobuf.Empty) { 220 option (google.api.http) = { 221 delete: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" 222 }; 223 option (google.api.method_signature) = "name"; 224 } 225 226 // Creates a user workloads ConfigMap. 227 // 228 // This method is supported for Cloud Composer environments in versions 229 // composer-3.*.*-airflow-*.*.* and newer. 230 rpc CreateUserWorkloadsConfigMap(CreateUserWorkloadsConfigMapRequest) 231 returns (UserWorkloadsConfigMap) { 232 option (google.api.http) = { 233 post: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" 234 body: "user_workloads_config_map" 235 }; 236 option (google.api.method_signature) = "parent,user_workloads_config_map"; 237 } 238 239 // Gets an existing user workloads ConfigMap. 240 // 241 // This method is supported for Cloud Composer environments in versions 242 // composer-3.*.*-airflow-*.*.* and newer. 243 rpc GetUserWorkloadsConfigMap(GetUserWorkloadsConfigMapRequest) 244 returns (UserWorkloadsConfigMap) { 245 option (google.api.http) = { 246 get: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" 247 }; 248 option (google.api.method_signature) = "name"; 249 } 250 251 // Lists user workloads ConfigMaps. 252 // 253 // This method is supported for Cloud Composer environments in versions 254 // composer-3.*.*-airflow-*.*.* and newer. 255 rpc ListUserWorkloadsConfigMaps(ListUserWorkloadsConfigMapsRequest) 256 returns (ListUserWorkloadsConfigMapsResponse) { 257 option (google.api.http) = { 258 get: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" 259 }; 260 option (google.api.method_signature) = "parent"; 261 } 262 263 // Updates a user workloads ConfigMap. 264 // 265 // This method is supported for Cloud Composer environments in versions 266 // composer-3.*.*-airflow-*.*.* and newer. 267 rpc UpdateUserWorkloadsConfigMap(UpdateUserWorkloadsConfigMapRequest) 268 returns (UserWorkloadsConfigMap) { 269 option (google.api.http) = { 270 put: "/v1beta1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" 271 body: "user_workloads_config_map" 272 }; 273 option (google.api.method_signature) = "user_workloads_config_map"; 274 } 275 276 // Deletes a user workloads ConfigMap. 277 // 278 // This method is supported for Cloud Composer environments in versions 279 // composer-3.*.*-airflow-*.*.* and newer. 280 rpc DeleteUserWorkloadsConfigMap(DeleteUserWorkloadsConfigMapRequest) 281 returns (google.protobuf.Empty) { 282 option (google.api.http) = { 283 delete: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" 284 }; 285 option (google.api.method_signature) = "name"; 286 } 287 288 // Creates a snapshots of a Cloud Composer environment. 289 // 290 // As a result of this operation, snapshot of environment's state is stored 291 // in a location specified in the SaveSnapshotRequest. 292 rpc SaveSnapshot(SaveSnapshotRequest) returns (google.longrunning.Operation) { 293 option (google.api.http) = { 294 post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:saveSnapshot" 295 body: "*" 296 }; 297 option (google.longrunning.operation_info) = { 298 response_type: "google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse" 299 metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" 300 }; 301 } 302 303 // Loads a snapshot of a Cloud Composer environment. 304 // 305 // As a result of this operation, a snapshot of environment's specified in 306 // LoadSnapshotRequest is loaded into the environment. 307 rpc LoadSnapshot(LoadSnapshotRequest) returns (google.longrunning.Operation) { 308 option (google.api.http) = { 309 post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:loadSnapshot" 310 body: "*" 311 }; 312 option (google.longrunning.operation_info) = { 313 response_type: "google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse" 314 metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" 315 }; 316 } 317 318 // Triggers database failover (only for highly resilient environments). 319 rpc DatabaseFailover(DatabaseFailoverRequest) 320 returns (google.longrunning.Operation) { 321 option (google.api.http) = { 322 post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:databaseFailover" 323 body: "*" 324 }; 325 option (google.longrunning.operation_info) = { 326 response_type: "google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse" 327 metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" 328 }; 329 } 330 331 // Fetches database properties. 332 rpc FetchDatabaseProperties(FetchDatabasePropertiesRequest) 333 returns (FetchDatabasePropertiesResponse) { 334 option (google.api.http) = { 335 get: "/v1beta1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" 336 }; 337 } 338} 339 340// Create a new environment. 341message CreateEnvironmentRequest { 342 // The parent must be of the form 343 // "projects/{projectId}/locations/{locationId}". 344 string parent = 1; 345 346 // The environment to create. 347 Environment environment = 2; 348} 349 350// Get an environment. 351message GetEnvironmentRequest { 352 // The resource name of the environment to get, in the form: 353 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 354 string name = 1; 355} 356 357// List environments in a project and location. 358message ListEnvironmentsRequest { 359 // List environments in the given project and location, in the form: 360 // "projects/{projectId}/locations/{locationId}" 361 string parent = 1; 362 363 // The maximum number of environments to return. 364 int32 page_size = 2; 365 366 // The next_page_token value returned from a previous List request, if any. 367 string page_token = 3; 368} 369 370// The environments in a project and location. 371message ListEnvironmentsResponse { 372 // The list of environments returned by a ListEnvironmentsRequest. 373 repeated Environment environments = 1; 374 375 // The page token used to query for the next page if one exists. 376 string next_page_token = 2; 377} 378 379// Delete an environment. 380message DeleteEnvironmentRequest { 381 // The environment to delete, in the form: 382 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 383 string name = 1; 384} 385 386// Update an environment. 387message UpdateEnvironmentRequest { 388 // The relative resource name of the environment to update, in the form: 389 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 390 string name = 2; 391 392 // A patch environment. Fields specified by the `updateMask` will be copied 393 // from the patch environment into the environment under update. 394 Environment environment = 1; 395 396 // Required. A comma-separated list of paths, relative to `Environment`, of 397 // fields to update. 398 // For example, to set the version of scikit-learn to install in the 399 // environment to 0.19.0 and to remove an existing installation of 400 // argparse, the `updateMask` parameter would include the following two 401 // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and 402 // "config.softwareConfig.pypiPackages.argparse". The included patch 403 // environment would specify the scikit-learn version as follows: 404 // 405 // { 406 // "config":{ 407 // "softwareConfig":{ 408 // "pypiPackages":{ 409 // "scikit-learn":"==0.19.0" 410 // } 411 // } 412 // } 413 // } 414 // 415 // Note that in the above example, any existing PyPI packages 416 // other than scikit-learn and argparse will be unaffected. 417 // 418 // Only one update type may be included in a single request's `updateMask`. 419 // For example, one cannot update both the PyPI packages and 420 // labels in the same request. However, it is possible to update multiple 421 // members of a map field simultaneously in the same request. For example, 422 // to set the labels "label1" and "label2" while clearing "label3" (assuming 423 // it already exists), one can 424 // provide the paths "labels.label1", "labels.label2", and "labels.label3" 425 // and populate the patch environment as follows: 426 // 427 // { 428 // "labels":{ 429 // "label1":"new-label1-value" 430 // "label2":"new-label2-value" 431 // } 432 // } 433 // 434 // Note that in the above example, any existing labels that are not 435 // included in the `updateMask` will be unaffected. 436 // 437 // It is also possible to replace an entire map field by providing the 438 // map field's path in the `updateMask`. The new value of the field will 439 // be that which is provided in the patch environment. For example, to 440 // delete all pre-existing user-specified PyPI packages and 441 // install botocore at version 1.7.14, the `updateMask` would contain 442 // the path "config.softwareConfig.pypiPackages", and 443 // the patch environment would be the following: 444 // 445 // { 446 // "config":{ 447 // "softwareConfig":{ 448 // "pypiPackages":{ 449 // "botocore":"==1.7.14" 450 // } 451 // } 452 // } 453 // } 454 // 455 // **Note:** Only the following fields can be updated: 456 // 457 // * `config.softwareConfig.pypiPackages` 458 // * Replace all custom custom PyPI packages. If a replacement 459 // package map is not included in `environment`, all custom 460 // PyPI packages are cleared. It is an error to provide both 461 // this mask and a mask specifying an individual package. 462 // * `config.softwareConfig.pypiPackages.`packagename 463 // * Update the custom PyPI package *packagename*, 464 // preserving other packages. To delete the package, include it in 465 // `updateMask`, and omit the mapping for it in 466 // `environment.config.softwareConfig.pypiPackages`. It is an error 467 // to provide both a mask of this form and the 468 // `config.softwareConfig.pypiPackages` mask. 469 // * `labels` 470 // * Replace all environment labels. If a replacement labels map is not 471 // included in `environment`, all labels are cleared. It is an error to 472 // provide both this mask and a mask specifying one or more individual 473 // labels. 474 // * `labels.`labelName 475 // * Set the label named *labelName*, while preserving other 476 // labels. To delete the label, include it in `updateMask` and omit its 477 // mapping in `environment.labels`. It is an error to provide both a 478 // mask of this form and the `labels` mask. 479 // * `config.nodeCount` 480 // * Horizontally scale the number of nodes in the environment. An integer 481 // greater than or equal to 3 must be provided in the `config.nodeCount` 482 // field. Supported for Cloud Composer environments in versions 483 // composer-1.*.*-airflow-*.*.*. 484 // * `config.webServerNetworkAccessControl` 485 // * Replace the environment's current WebServerNetworkAccessControl. 486 // * `config.softwareConfig.airflowConfigOverrides` 487 // * Replace all Apache Airflow config overrides. If a replacement config 488 // overrides map is not included in `environment`, all config overrides 489 // are cleared. 490 // It is an error to provide both this mask and a mask specifying one or 491 // more individual config overrides. 492 // * `config.softwareConfig.airflowConfigOverrides.`section-name 493 // * Override the Apache Airflow config property *name* in the 494 // section named *section*, preserving other properties. To 495 // delete the property override, include it in `updateMask` and omit its 496 // mapping in 497 // `environment.config.softwareConfig.airflowConfigOverrides`. 498 // It is an error to provide both a mask of this form and the 499 // `config.softwareConfig.airflowConfigOverrides` mask. 500 // * `config.softwareConfig.envVariables` 501 // * Replace all environment variables. If a replacement environment 502 // variable map is not included in `environment`, all custom environment 503 // variables are cleared. 504 // * `config.softwareConfig.imageVersion` 505 // * Upgrade the version of the environment in-place. Refer to 506 // `SoftwareConfig.image_version` for information on how to format the 507 // new image version. Additionally, the new image version cannot effect 508 // a version downgrade, and must match the current image version's 509 // Composer and Airflow major versions. Consult the [Cloud Composer 510 // version list](/composer/docs/concepts/versioning/composer-versions) 511 // for valid values. 512 // * `config.softwareConfig.schedulerCount` 513 // * Horizontally scale the number of schedulers in Airflow. A positive 514 // integer not greater than the number of nodes must be provided in the 515 // `config.softwareConfig.schedulerCount` field. Supported for Cloud 516 // Composer environments in versions composer-1.*.*-airflow-2.*.*. 517 // * `config.softwareConfig.cloudDataLineageIntegration` 518 // * Configuration for Cloud Data Lineage integration. 519 // * `config.databaseConfig.machineType` 520 // * Cloud SQL machine type used by Airflow database. 521 // It has to be one of: db-n1-standard-2, db-n1-standard-4, 522 // db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer 523 // environments in versions composer-1.*.*-airflow-*.*.*. 524 // * `config.webServerConfig.machineType` 525 // * Machine type on which Airflow web server is running. 526 // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 527 // or composer-n1-webserver-8. Supported for Cloud Composer environments 528 // in versions composer-1.*.*-airflow-*.*.*. 529 // * `config.maintenanceWindow` 530 // * Maintenance window during which Cloud Composer components may be 531 // under maintenance. 532 // * `config.workloadsConfig` 533 // * The workloads configuration settings for the GKE cluster associated 534 // with the Cloud Composer environment. Supported for Cloud Composer 535 // environments in versions composer-2.*.*-airflow-*.*.* and newer. 536 // * `config.environmentSize` 537 // * The size of the Cloud Composer environment. Supported for Cloud 538 // Composer environments in versions composer-2.*.*-airflow-*.*.* and 539 // newer. 540 google.protobuf.FieldMask update_mask = 3 541 [(google.api.field_behavior) = REQUIRED]; 542} 543 544// Restart Airflow web server. 545message RestartWebServerRequest { 546 // The resource name of the environment to restart the web server for, in the 547 // form: 548 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 549 string name = 1; 550} 551 552// Execute Airflow Command request. 553message ExecuteAirflowCommandRequest { 554 // The resource name of the environment in the form: 555 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". 556 string environment = 1; 557 558 // Airflow command. 559 string command = 2; 560 561 // Airflow subcommand. 562 string subcommand = 3; 563 564 // Parameters for the Airflow command/subcommand as an array of arguments. 565 // It may contain positional arguments like `["my-dag-id"]`, key-value 566 // parameters like `["--foo=bar"]` or `["--foo","bar"]`, 567 // or other flags like `["-f"]`. 568 repeated string parameters = 4; 569} 570 571// Response to ExecuteAirflowCommandRequest. 572message ExecuteAirflowCommandResponse { 573 // The unique ID of the command execution for polling. 574 string execution_id = 1; 575 576 // The name of the pod where the command is executed. 577 string pod = 2; 578 579 // The namespace of the pod where the command is executed. 580 string pod_namespace = 3; 581 582 // Error message. Empty if there was no error. 583 string error = 4; 584} 585 586// Stop Airflow Command request. 587message StopAirflowCommandRequest { 588 // The resource name of the environment in the form: 589 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". 590 string environment = 1; 591 592 // The unique ID of the command execution. 593 string execution_id = 2; 594 595 // The name of the pod where the command is executed. 596 string pod = 3; 597 598 // The namespace of the pod where the command is executed. 599 string pod_namespace = 4; 600 601 // If true, the execution is terminated forcefully (SIGKILL). If false, the 602 // execution is stopped gracefully, giving it time for cleanup. 603 bool force = 5; 604} 605 606// Response to StopAirflowCommandRequest. 607message StopAirflowCommandResponse { 608 // Whether the execution is still running. 609 bool is_done = 1; 610 611 // Output message from stopping execution request. 612 repeated string output = 2; 613} 614 615// Poll Airflow Command request. 616message PollAirflowCommandRequest { 617 // The resource name of the environment in the form: 618 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 619 string environment = 1; 620 621 // The unique ID of the command execution. 622 string execution_id = 2; 623 624 // The name of the pod where the command is executed. 625 string pod = 3; 626 627 // The namespace of the pod where the command is executed. 628 string pod_namespace = 4; 629 630 // Line number from which new logs should be fetched. 631 int32 next_line_number = 5; 632} 633 634// Response to PollAirflowCommandRequest. 635message PollAirflowCommandResponse { 636 // Contains information about a single line from logs. 637 message Line { 638 // Number of the line. 639 int32 line_number = 1; 640 641 // Text content of the log line. 642 string content = 2; 643 } 644 645 // Information about how a command ended. 646 message ExitInfo { 647 // The exit code from the command execution. 648 int32 exit_code = 1; 649 650 // Error message. Empty if there was no error. 651 string error = 2; 652 } 653 654 // Output from the command execution. It may not contain the full output 655 // and the caller may need to poll for more lines. 656 repeated Line output = 1; 657 658 // Whether the command execution has finished and there is no more output. 659 bool output_end = 2; 660 661 // The result exit status of the command. 662 ExitInfo exit_info = 3; 663} 664 665// Create user workloads Secret request. 666message CreateUserWorkloadsSecretRequest { 667 // Required. The environment name to create a Secret for, in the form: 668 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 669 string parent = 1 [ 670 (google.api.field_behavior) = REQUIRED, 671 (google.api.resource_reference) = { 672 type: "composer.googleapis.com/Environment" 673 } 674 ]; 675 676 // Required. User workloads Secret to create. 677 UserWorkloadsSecret user_workloads_secret = 2 678 [(google.api.field_behavior) = REQUIRED]; 679} 680 681// Get user workloads Secret request. 682message GetUserWorkloadsSecretRequest { 683 // Required. The resource name of the Secret to get, in the form: 684 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" 685 string name = 1 [ 686 (google.api.field_behavior) = REQUIRED, 687 (google.api.resource_reference) = { 688 type: "composer.googleapis.com/UserWorkloadsSecret" 689 } 690 ]; 691} 692 693// List user workloads Secrets request. 694message ListUserWorkloadsSecretsRequest { 695 // Required. List Secrets in the given environment, in the form: 696 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 697 string parent = 1 [ 698 (google.api.field_behavior) = REQUIRED, 699 (google.api.resource_reference) = { 700 type: "composer.googleapis.com/Environment" 701 } 702 ]; 703 704 // Optional. The maximum number of Secrets to return. 705 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 706 707 // Optional. The next_page_token value returned from a previous List request, 708 // if any. 709 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 710} 711 712// Update user workloads Secret request. 713message UpdateUserWorkloadsSecretRequest { 714 // Optional. User workloads Secret to override. 715 UserWorkloadsSecret user_workloads_secret = 1 716 [(google.api.field_behavior) = OPTIONAL]; 717} 718 719// Delete user workloads Secret request. 720message DeleteUserWorkloadsSecretRequest { 721 // Required. The Secret to delete, in the form: 722 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" 723 string name = 1 [ 724 (google.api.field_behavior) = REQUIRED, 725 (google.api.resource_reference) = { 726 type: "composer.googleapis.com/UserWorkloadsSecret" 727 } 728 ]; 729} 730 731// Create user workloads ConfigMap request. 732message CreateUserWorkloadsConfigMapRequest { 733 // Required. The environment name to create a ConfigMap for, in the form: 734 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 735 string parent = 1 [ 736 (google.api.field_behavior) = REQUIRED, 737 (google.api.resource_reference) = { 738 type: "composer.googleapis.com/Environment" 739 } 740 ]; 741 742 // Required. User workloads ConfigMap to create. 743 UserWorkloadsConfigMap user_workloads_config_map = 2 744 [(google.api.field_behavior) = REQUIRED]; 745} 746 747// Get user workloads ConfigMap request. 748message GetUserWorkloadsConfigMapRequest { 749 // Required. The resource name of the ConfigMap to get, in the form: 750 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" 751 string name = 1 [ 752 (google.api.field_behavior) = REQUIRED, 753 (google.api.resource_reference) = { 754 type: "composer.googleapis.com/UserWorkloadsConfigMap" 755 } 756 ]; 757} 758 759// List user workloads ConfigMaps request. 760message ListUserWorkloadsConfigMapsRequest { 761 // Required. List ConfigMaps in the given environment, in the form: 762 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 763 string parent = 1 [ 764 (google.api.field_behavior) = REQUIRED, 765 (google.api.resource_reference) = { 766 type: "composer.googleapis.com/Environment" 767 } 768 ]; 769 770 // Optional. The maximum number of ConfigMaps to return. 771 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 772 773 // Optional. The next_page_token value returned from a previous List request, 774 // if any. 775 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 776} 777 778// Update user workloads ConfigMap request. 779message UpdateUserWorkloadsConfigMapRequest { 780 // Optional. User workloads ConfigMap to override. 781 UserWorkloadsConfigMap user_workloads_config_map = 1 782 [(google.api.field_behavior) = OPTIONAL]; 783} 784 785// Delete user workloads ConfigMap request. 786message DeleteUserWorkloadsConfigMapRequest { 787 // Required. The ConfigMap to delete, in the form: 788 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" 789 string name = 1 [ 790 (google.api.field_behavior) = REQUIRED, 791 (google.api.resource_reference) = { 792 type: "composer.googleapis.com/UserWorkloadsConfigMap" 793 } 794 ]; 795} 796 797// User workloads Secret used by Airflow tasks that run with Kubernetes executor 798// or KubernetesPodOperator. 799message UserWorkloadsSecret { 800 option (google.api.resource) = { 801 type: "composer.googleapis.com/UserWorkloadsSecret" 802 pattern: "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}" 803 plural: "userWorkloadsSecrets" 804 singular: "userWorkloadsSecret" 805 }; 806 807 // Identifier. The resource name of the Secret, in the form: 808 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" 809 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 810 811 // Optional. The "data" field of Kubernetes Secret, organized in key-value 812 // pairs, which can contain sensitive values such as a password, a token, or a 813 // key. The values for all keys have to be base64-encoded strings. For details 814 // see: https://kubernetes.io/docs/concepts/configuration/secret/ 815 map<string, string> data = 2 [(google.api.field_behavior) = OPTIONAL]; 816} 817 818// The user workloads Secrets for a given environment. 819message ListUserWorkloadsSecretsResponse { 820 // The list of Secrets returned by a ListUserWorkloadsSecretsRequest. 821 repeated UserWorkloadsSecret user_workloads_secrets = 1; 822 823 // The page token used to query for the next page if one exists. 824 string next_page_token = 2; 825} 826 827// User workloads ConfigMap used by Airflow tasks that run with Kubernetes 828// executor or KubernetesPodOperator. 829message UserWorkloadsConfigMap { 830 option (google.api.resource) = { 831 type: "composer.googleapis.com/UserWorkloadsConfigMap" 832 pattern: "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}" 833 plural: "userWorkloadsConfigMaps" 834 singular: "userWorkloadsConfigMap" 835 }; 836 837 // Identifier. The resource name of the ConfigMap, in the form: 838 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" 839 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 840 841 // Optional. The "data" field of Kubernetes ConfigMap, organized in key-value 842 // pairs. For details see: 843 // https://kubernetes.io/docs/concepts/configuration/configmap/ 844 map<string, string> data = 2 [(google.api.field_behavior) = OPTIONAL]; 845} 846 847// The user workloads ConfigMaps for a given environment. 848message ListUserWorkloadsConfigMapsResponse { 849 // The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. 850 repeated UserWorkloadsConfigMap user_workloads_config_maps = 1; 851 852 // The page token used to query for the next page if one exists. 853 string next_page_token = 2; 854} 855 856// Request for listing workloads in a Cloud Composer environment. 857message ListWorkloadsRequest { 858 // Required. The environment name to get workloads for, in the form: 859 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 860 string parent = 1 [ 861 (google.api.field_behavior) = REQUIRED, 862 (google.api.resource_reference) = { 863 type: "composer.googleapis.com/Environment" 864 } 865 ]; 866 867 // Optional. The maximum number of environments to return. 868 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 869 870 // Optional. The next_page_token value returned from a previous List request, 871 // if any. 872 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 873 874 // Optional. The list filter. 875 // Currently only supports equality on the type field. The value of a field 876 // specified in the filter expression must be one ComposerWorkloadType enum 877 // option. It's possible to get multiple types using "OR" operator, e.g.: 878 // "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are 879 // returned. 880 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 881} 882 883// Response to ListWorkloadsRequest. 884message ListWorkloadsResponse { 885 // Information about a single workload. 886 message ComposerWorkload { 887 // Name of a workload. 888 string name = 1; 889 890 // Type of a workload. 891 ComposerWorkloadType type = 2; 892 893 // Output only. Status of a workload. 894 ComposerWorkloadStatus status = 3 895 [(google.api.field_behavior) = OUTPUT_ONLY]; 896 } 897 898 // Supported workload types. 899 enum ComposerWorkloadType { 900 // Not able to determine the type of the workload. 901 COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0; 902 903 // Celery worker. 904 CELERY_WORKER = 1; 905 906 // Kubernetes worker. 907 KUBERNETES_WORKER = 2; 908 909 // Workload created by Kubernetes Pod Operator. 910 KUBERNETES_OPERATOR_POD = 3; 911 912 // Airflow scheduler. 913 SCHEDULER = 4; 914 915 // Airflow Dag processor. 916 DAG_PROCESSOR = 5; 917 918 // Airflow triggerer. 919 TRIGGERER = 6; 920 921 // Airflow web server UI. 922 WEB_SERVER = 7; 923 924 // Redis. 925 REDIS = 8; 926 } 927 928 // Workload status. 929 message ComposerWorkloadStatus { 930 // Output only. Workload state. 931 ComposerWorkloadState state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 932 933 // Output only. Text to provide more descriptive status. 934 string status_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 935 936 // Output only. Detailed message of the status. 937 string detailed_status_message = 3 938 [(google.api.field_behavior) = OUTPUT_ONLY]; 939 } 940 941 // Workload states. 942 enum ComposerWorkloadState { 943 // Not able to determine the status of the workload. 944 COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0; 945 946 // Workload is in pending state and has not yet started. 947 PENDING = 1; 948 949 // Workload is running fine. 950 OK = 2; 951 952 // Workload is running but there are some non-critical problems. 953 WARNING = 3; 954 955 // Workload is not running due to an error. 956 ERROR = 4; 957 958 // Workload has finished execution with success. 959 SUCCEEDED = 5; 960 961 // Workload has finished execution with failure. 962 FAILED = 6; 963 } 964 965 // The list of environment workloads. 966 repeated ComposerWorkload workloads = 1; 967 968 // The page token used to query for the next page if one exists. 969 string next_page_token = 2; 970} 971 972// Request to create a snapshot of a Cloud Composer environment. 973message SaveSnapshotRequest { 974 // The resource name of the source environment in the form: 975 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 976 string environment = 1; 977 978 // Location in a Cloud Storage where the snapshot is going to be stored, e.g.: 979 // "gs://my-bucket/snapshots". 980 string snapshot_location = 2; 981} 982 983// Response to SaveSnapshotRequest. 984message SaveSnapshotResponse { 985 // The fully-resolved Cloud Storage path of the created snapshot, 986 // e.g.: 987 // "gs://my-bucket/snapshots/project_location_environment_timestamp". 988 // This field is populated only if the snapshot creation was successful. 989 string snapshot_path = 1; 990} 991 992// Request to load a snapshot into a Cloud Composer environment. 993message LoadSnapshotRequest { 994 // The resource name of the target environment in the form: 995 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 996 string environment = 1; 997 998 // A Cloud Storage path to a snapshot to load, e.g.: 999 // "gs://my-bucket/snapshots/project_location_environment_timestamp". 1000 string snapshot_path = 2; 1001 1002 // Whether or not to skip installing Pypi packages when loading the 1003 // environment's state. 1004 bool skip_pypi_packages_installation = 3; 1005 1006 // Whether or not to skip setting environment variables when loading the 1007 // environment's state. 1008 bool skip_environment_variables_setting = 4; 1009 1010 // Whether or not to skip setting Airflow overrides when loading the 1011 // environment's state. 1012 bool skip_airflow_overrides_setting = 5; 1013 1014 // Whether or not to skip copying Cloud Storage data when loading the 1015 // environment's state. 1016 bool skip_gcs_data_copying = 6; 1017} 1018 1019// Response to LoadSnapshotRequest. 1020message LoadSnapshotResponse {} 1021 1022// Request to trigger database failover (only for highly resilient 1023// environments). 1024message DatabaseFailoverRequest { 1025 // Target environment: 1026 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 1027 string environment = 1; 1028} 1029 1030// Response for DatabaseFailoverRequest. 1031message DatabaseFailoverResponse {} 1032 1033// Request to fetch properties of environment's database. 1034message FetchDatabasePropertiesRequest { 1035 // Required. The resource name of the environment, in the form: 1036 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 1037 string environment = 1 [ 1038 (google.api.field_behavior) = REQUIRED, 1039 (google.api.resource_reference) = { 1040 type: "composer.googleapis.com/Environment" 1041 } 1042 ]; 1043} 1044 1045// Response for FetchDatabasePropertiesRequest. 1046message FetchDatabasePropertiesResponse { 1047 // The Compute Engine zone that the instance is currently serving from. 1048 string primary_gce_zone = 1; 1049 1050 // The Compute Engine zone that the failover instance is currently serving 1051 // from for a regional Cloud SQL instance. 1052 string secondary_gce_zone = 2; 1053 1054 // The availability status of the failover replica. A false status indicates 1055 // that the failover replica is out of sync. The primary instance can only 1056 // fail over to the failover replica when the status is true. 1057 bool is_failover_replica_available = 3; 1058} 1059 1060// Configuration information for an environment. 1061message EnvironmentConfig { 1062 // The size of the Cloud Composer environment. 1063 enum EnvironmentSize { 1064 // The size of the environment is unspecified. 1065 ENVIRONMENT_SIZE_UNSPECIFIED = 0; 1066 1067 // The environment size is small. 1068 ENVIRONMENT_SIZE_SMALL = 1; 1069 1070 // The environment size is medium. 1071 ENVIRONMENT_SIZE_MEDIUM = 2; 1072 1073 // The environment size is large. 1074 ENVIRONMENT_SIZE_LARGE = 3; 1075 } 1076 1077 // Resilience mode of the Cloud Composer Environment. 1078 enum ResilienceMode { 1079 // Default mode doesn't change environment parameters. 1080 RESILIENCE_MODE_UNSPECIFIED = 0; 1081 1082 // Enabled High Resilience mode, including Cloud SQL HA. 1083 HIGH_RESILIENCE = 1; 1084 } 1085 1086 // Output only. The Kubernetes Engine cluster used to run this environment. 1087 string gke_cluster = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 1088 1089 // Output only. The Cloud Storage prefix of the DAGs for this environment. 1090 // Although Cloud Storage objects reside in a flat namespace, a hierarchical 1091 // file tree can be simulated using "/"-delimited object name prefixes. DAG 1092 // objects for this environment reside in a simulated directory with the given 1093 // prefix. 1094 string dag_gcs_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 1095 1096 // The number of nodes in the Kubernetes Engine cluster that will be 1097 // used to run this environment. 1098 // 1099 // This field is supported for Cloud Composer environments in versions 1100 // composer-1.*.*-airflow-*.*.*. 1101 int32 node_count = 3; 1102 1103 // The configuration settings for software inside the environment. 1104 SoftwareConfig software_config = 4; 1105 1106 // The configuration used for the Kubernetes Engine cluster. 1107 NodeConfig node_config = 5; 1108 1109 // The configuration used for the Private IP Cloud Composer environment. 1110 PrivateEnvironmentConfig private_environment_config = 7; 1111 1112 // Optional. The network-level access control policy for the Airflow web 1113 // server. If unspecified, no network-level access restrictions will be 1114 // applied. 1115 WebServerNetworkAccessControl web_server_network_access_control = 9 1116 [(google.api.field_behavior) = OPTIONAL]; 1117 1118 // Optional. The configuration settings for Cloud SQL instance used internally 1119 // by Apache Airflow software. 1120 DatabaseConfig database_config = 10 [(google.api.field_behavior) = OPTIONAL]; 1121 1122 // Optional. The configuration settings for the Airflow web server App Engine 1123 // instance. 1124 // 1125 // This field is supported for Cloud Composer environments in versions 1126 // composer-1.*.*-airflow-*.*.*. 1127 WebServerConfig web_server_config = 11 1128 [(google.api.field_behavior) = OPTIONAL]; 1129 1130 // Output only. The URI of the Apache Airflow Web UI hosted within this 1131 // environment (see [Airflow web 1132 // interface](/composer/docs/how-to/accessing/airflow-web-interface)). 1133 string airflow_uri = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 1134 1135 // Output only. The 'bring your own identity' variant of the URI of the Apache 1136 // Airflow Web UI hosted within this environment, to be accessed with external 1137 // identities using workforce identity federation (see [Access environments 1138 // with workforce identity 1139 // federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). 1140 string airflow_byoid_uri = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; 1141 1142 // Optional. The encryption options for the Cloud Composer environment and its 1143 // dependencies. Cannot be updated. 1144 EncryptionConfig encryption_config = 12 1145 [(google.api.field_behavior) = OPTIONAL]; 1146 1147 // Optional. The maintenance window is the period when Cloud Composer 1148 // components may undergo maintenance. It is defined so that maintenance is 1149 // not executed during peak hours or critical time periods. 1150 // 1151 // The system will not be under maintenance for every occurrence of this 1152 // window, but when maintenance is planned, it will be scheduled 1153 // during the window. 1154 // 1155 // The maintenance window period must encompass at least 12 hours per week. 1156 // This may be split into multiple chunks, each with a size of 1157 // at least 4 hours. 1158 // 1159 // If this value is omitted, Cloud Composer components may be subject to 1160 // maintenance at any time. 1161 MaintenanceWindow maintenance_window = 13 1162 [(google.api.field_behavior) = OPTIONAL]; 1163 1164 // Optional. The workloads configuration settings for the GKE cluster 1165 // associated with the Cloud Composer environment. The GKE cluster runs 1166 // Airflow scheduler, web server and workers workloads. 1167 // 1168 // This field is supported for Cloud Composer environments in versions 1169 // composer-2.*.*-airflow-*.*.* and newer. 1170 WorkloadsConfig workloads_config = 15 1171 [(google.api.field_behavior) = OPTIONAL]; 1172 1173 // Optional. The size of the Cloud Composer environment. 1174 // 1175 // This field is supported for Cloud Composer environments in versions 1176 // composer-2.*.*-airflow-*.*.* and newer. 1177 EnvironmentSize environment_size = 16 1178 [(google.api.field_behavior) = OPTIONAL]; 1179 1180 // Optional. The configuration options for GKE cluster master authorized 1181 // networks. By default master authorized networks feature is: 1182 // - in case of private environment: enabled with no external networks 1183 // allowlisted. 1184 // - in case of public environment: disabled. 1185 MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 1186 [(google.api.field_behavior) = OPTIONAL]; 1187 1188 // Optional. The Recovery settings configuration of an environment. 1189 // 1190 // This field is supported for Cloud Composer environments in versions 1191 // composer-2.*.*-airflow-*.*.* and newer. 1192 RecoveryConfig recovery_config = 18 [(google.api.field_behavior) = OPTIONAL]; 1193 1194 // Optional. The configuration setting for Airflow database data retention 1195 // mechanism. 1196 DataRetentionConfig data_retention_config = 19 1197 [(google.api.field_behavior) = OPTIONAL]; 1198 1199 // Optional. Resilience mode of the Cloud Composer Environment. 1200 // 1201 // This field is supported for Cloud Composer environments in versions 1202 // composer-2.2.0-airflow-*.*.* and newer. 1203 ResilienceMode resilience_mode = 20 [(google.api.field_behavior) = OPTIONAL]; 1204} 1205 1206// Network-level access control policy for the Airflow web server. 1207message WebServerNetworkAccessControl { 1208 // Allowed IP range with user-provided description. 1209 message AllowedIpRange { 1210 // IP address or range, defined using CIDR notation, of requests that this 1211 // rule applies to. 1212 // Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` 1213 // or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. 1214 // 1215 // IP range prefixes should be properly truncated. For example, 1216 // `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, 1217 // `2001:db8::1/32` should be truncated to `2001:db8::/32`. 1218 string value = 1; 1219 1220 // Optional. User-provided description. It must contain at most 300 1221 // characters. 1222 string description = 2 [(google.api.field_behavior) = OPTIONAL]; 1223 } 1224 1225 // A collection of allowed IP ranges with descriptions. 1226 repeated AllowedIpRange allowed_ip_ranges = 1; 1227} 1228 1229// Specifies the selection and configuration of software inside the environment. 1230message SoftwareConfig { 1231 // Web server plugins mode of the Cloud Composer environment. 1232 enum WebServerPluginsMode { 1233 // Default mode. 1234 WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0; 1235 1236 // Web server plugins are not supported. 1237 PLUGINS_DISABLED = 1; 1238 1239 // Web server plugins are supported. 1240 PLUGINS_ENABLED = 2; 1241 } 1242 1243 // The version of the software running in the environment. 1244 // This encapsulates both the version of Cloud Composer functionality and the 1245 // version of Apache Airflow. It must match the regular expression 1246 // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. 1247 // When used as input, the server also checks if the provided version is 1248 // supported and denies the request for an unsupported version. 1249 // 1250 // The Cloud Composer portion of the image version is a full 1251 // [semantic version](https://semver.org), or an alias in the form of major 1252 // version number or `latest`. When an alias is provided, the server replaces 1253 // it with the current Cloud Composer version that satisfies the alias. 1254 // 1255 // The Apache Airflow portion of the image version is a full semantic version 1256 // that points to one of the supported Apache Airflow versions, or an alias in 1257 // the form of only major or major.minor versions specified. When an alias is 1258 // provided, the server replaces it with the latest Apache Airflow version 1259 // that satisfies the alias and is supported in the given Cloud Composer 1260 // version. 1261 // 1262 // In all cases, the resolved image version is stored in the same field. 1263 // 1264 // See also [version 1265 // list](/composer/docs/concepts/versioning/composer-versions) and [versioning 1266 // overview](/composer/docs/concepts/versioning/composer-versioning-overview). 1267 string image_version = 1; 1268 1269 // Optional. Apache Airflow configuration properties to override. 1270 // 1271 // Property keys contain the section and property names, separated by a 1272 // hyphen, for example "core-dags_are_paused_at_creation". Section names must 1273 // not contain hyphens ("-"), opening square brackets ("["), or closing 1274 // square brackets ("]"). The property name must not be empty and must not 1275 // contain an equals sign ("=") or semicolon (";"). Section and property names 1276 // must not contain a period ("."). Apache Airflow configuration property 1277 // names must be written in 1278 // [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can 1279 // contain any character, and can be written in any lower/upper case format. 1280 // 1281 // Certain Apache Airflow configuration property values are 1282 // [blocked](/composer/docs/concepts/airflow-configurations), 1283 // and cannot be overridden. 1284 map<string, string> airflow_config_overrides = 2 1285 [(google.api.field_behavior) = OPTIONAL]; 1286 1287 // Optional. Custom Python Package Index (PyPI) packages to be installed in 1288 // the environment. 1289 // 1290 // Keys refer to the lowercase package name such as "numpy" 1291 // and values are the lowercase extras and version specifier such as 1292 // "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a 1293 // package without pinning it to a version specifier, use the empty string as 1294 // the value. 1295 map<string, string> pypi_packages = 3 1296 [(google.api.field_behavior) = OPTIONAL]; 1297 1298 // Optional. Additional environment variables to provide to the Apache Airflow 1299 // scheduler, worker, and webserver processes. 1300 // 1301 // Environment variable names must match the regular expression 1302 // `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow 1303 // software configuration overrides (they cannot match the regular expression 1304 // `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the 1305 // following reserved names: 1306 // 1307 // * `AIRFLOW_HOME` 1308 // * `C_FORCE_ROOT` 1309 // * `CONTAINER_NAME` 1310 // * `DAGS_FOLDER` 1311 // * `GCP_PROJECT` 1312 // * `GCS_BUCKET` 1313 // * `GKE_CLUSTER_NAME` 1314 // * `SQL_DATABASE` 1315 // * `SQL_INSTANCE` 1316 // * `SQL_PASSWORD` 1317 // * `SQL_PROJECT` 1318 // * `SQL_REGION` 1319 // * `SQL_USER` 1320 map<string, string> env_variables = 4 1321 [(google.api.field_behavior) = OPTIONAL]; 1322 1323 // Optional. The major version of Python used to run the Apache Airflow 1324 // scheduler, worker, and webserver processes. 1325 // 1326 // Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be 1327 // updated. 1328 // 1329 // This field is only supported for Cloud Composer environments in versions 1330 // composer-1.*.*-airflow-*.*.*. Environments in newer versions always use 1331 // Python major version 3. 1332 string python_version = 6 [(google.api.field_behavior) = OPTIONAL]; 1333 1334 // Optional. The number of schedulers for Airflow. 1335 // 1336 // This field is supported for Cloud Composer environments in versions 1337 // composer-1.*.*-airflow-2.*.*. 1338 int32 scheduler_count = 7 [(google.api.field_behavior) = OPTIONAL]; 1339 1340 // Optional. The configuration for Cloud Data Lineage integration. 1341 CloudDataLineageIntegration cloud_data_lineage_integration = 8 1342 [(google.api.field_behavior) = OPTIONAL]; 1343 1344 // Optional. Whether or not the web server uses custom plugins. 1345 // If unspecified, the field defaults to `PLUGINS_ENABLED`. 1346 // 1347 // This field is supported for Cloud Composer environments in versions 1348 // composer-3.*.*-airflow-*.*.* and newer. 1349 WebServerPluginsMode web_server_plugins_mode = 10 1350 [(google.api.field_behavior) = OPTIONAL]; 1351} 1352 1353// Configuration for controlling how IPs are allocated in the 1354// GKE cluster. 1355message IPAllocationPolicy { 1356 // Optional. Whether or not to enable Alias IPs in the GKE cluster. 1357 // If `true`, a VPC-native cluster is created. 1358 // 1359 // This field is only supported for Cloud Composer environments in versions 1360 // composer-1.*.*-airflow-*.*.*. Environments in newer versions always use 1361 // VPC-native GKE clusters. 1362 bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL]; 1363 1364 // Optional. The name of the cluster's secondary range used to allocate 1365 // IP addresses to pods. Specify either `cluster_secondary_range_name` 1366 // or `cluster_ipv4_cidr_block` but not both. 1367 // 1368 // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, 1369 // this field is applicable only when `use_ip_aliases` is true. 1370 string cluster_secondary_range_name = 2 1371 [(google.api.field_behavior) = OPTIONAL]; 1372 1373 // Optional. The name of the services' secondary range used to allocate 1374 // IP addresses to the cluster. Specify either `services_secondary_range_name` 1375 // or `services_ipv4_cidr_block` but not both. 1376 // 1377 // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, 1378 // this field is applicable only when `use_ip_aliases` is true. 1379 string services_secondary_range_name = 3 1380 [(google.api.field_behavior) = OPTIONAL]; 1381 1382 // Optional. The IP address range used to allocate IP addresses to pods in 1383 // the cluster. 1384 // 1385 // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, 1386 // this field is applicable only when `use_ip_aliases` is true. 1387 // 1388 // Set to blank to have GKE choose a range with the default size. 1389 // 1390 // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific 1391 // netmask. 1392 // 1393 // Set to a 1394 // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 1395 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. 1396 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range 1397 // to use. 1398 // Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block` 1399 // but not both. 1400 string cluster_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; 1401 1402 // Optional. The IP address range of the services IP addresses in this 1403 // cluster. 1404 // 1405 // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, 1406 // this field is applicable only when `use_ip_aliases` is true. 1407 // 1408 // Set to blank to have GKE choose a range with the default size. 1409 // 1410 // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific 1411 // netmask. 1412 // 1413 // Set to a 1414 // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) 1415 // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. 1416 // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range 1417 // to use. 1418 // Specify `services_secondary_range_name` or `services_ipv4_cidr_block` 1419 // but not both. 1420 string services_ipv4_cidr_block = 5 [(google.api.field_behavior) = OPTIONAL]; 1421} 1422 1423// The configuration information for the Kubernetes Engine nodes running 1424// the Apache Airflow software. 1425message NodeConfig { 1426 // Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which 1427 // to deploy the VMs used to run the Apache Airflow software, specified as a 1428 // [relative resource 1429 // name](/apis/design/resource_names#relative_resource_name). For example: 1430 // "projects/{projectId}/zones/{zoneId}". 1431 // 1432 // This `location` must belong to the enclosing environment's project and 1433 // location. If both this field and `nodeConfig.machineType` are specified, 1434 // `nodeConfig.machineType` must belong to this `location`; if both are 1435 // unspecified, the service will pick a zone in the Compute Engine region 1436 // corresponding to the Cloud Composer location, and propagate that choice to 1437 // both fields. If only one field (`location` or `nodeConfig.machineType`) is 1438 // specified, the location information from the specified field will be 1439 // propagated to the unspecified field. 1440 // 1441 // This field is supported for Cloud Composer environments in versions 1442 // composer-1.*.*-airflow-*.*.*. 1443 string location = 1 [(google.api.field_behavior) = OPTIONAL]; 1444 1445 // Optional. The Compute Engine 1446 // [machine type](/compute/docs/machine-types) used for cluster instances, 1447 // specified as a 1448 // [relative resource 1449 // name](/apis/design/resource_names#relative_resource_name). For example: 1450 // "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". 1451 // 1452 // The `machineType` must belong to the enclosing environment's project and 1453 // location. If both this field and `nodeConfig.location` are specified, 1454 // this `machineType` must belong to the `nodeConfig.location`; if both are 1455 // unspecified, the service will pick a zone in the Compute Engine region 1456 // corresponding to the Cloud Composer location, and propagate that choice to 1457 // both fields. If exactly one of this field and `nodeConfig.location` is 1458 // specified, the location information from the specified field will be 1459 // propagated to the unspecified field. 1460 // 1461 // The `machineTypeId` must not be a [shared-core machine 1462 // type](/compute/docs/machine-types#sharedcore). 1463 // 1464 // If this field is unspecified, the `machineTypeId` defaults 1465 // to "n1-standard-1". 1466 // 1467 // This field is supported for Cloud Composer environments in versions 1468 // composer-1.*.*-airflow-*.*.*. 1469 string machine_type = 2 [(google.api.field_behavior) = OPTIONAL]; 1470 1471 // Optional. The Compute Engine network to be used for machine 1472 // communications, specified as a 1473 // [relative resource 1474 // name](/apis/design/resource_names#relative_resource_name). For example: 1475 // "projects/{projectId}/global/networks/{networkId}". 1476 // 1477 // If unspecified, the default network in the environment's project is used. 1478 // If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) 1479 // is provided, `nodeConfig.subnetwork` must also be provided. For 1480 // [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see 1481 // `nodeConfig.subnetwork`. 1482 string network = 3 [(google.api.field_behavior) = OPTIONAL]; 1483 1484 // Optional. The Compute Engine subnetwork to be used for machine 1485 // communications, specified as a 1486 // [relative resource 1487 // name](/apis/design/resource_names#relative_resource_name). For example: 1488 // "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" 1489 // 1490 // If a subnetwork is provided, `nodeConfig.network` must also be provided, 1491 // and the subnetwork must belong to the enclosing environment's project and 1492 // location. 1493 string subnetwork = 4 [(google.api.field_behavior) = OPTIONAL]; 1494 1495 // Optional. The disk size in GB used for node VMs. Minimum size is 30GB. 1496 // If unspecified, defaults to 100GB. Cannot be updated. 1497 // 1498 // This field is supported for Cloud Composer environments in versions 1499 // composer-1.*.*-airflow-*.*.*. 1500 int32 disk_size_gb = 5 [(google.api.field_behavior) = OPTIONAL]; 1501 1502 // Optional. The set of Google API scopes to be made available on all 1503 // node VMs. If `oauth_scopes` is empty, defaults to 1504 // ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. 1505 // 1506 // This field is supported for Cloud Composer environments in versions 1507 // composer-1.*.*-airflow-*.*.*. 1508 repeated string oauth_scopes = 6 [(google.api.field_behavior) = OPTIONAL]; 1509 1510 // Optional. The Google Cloud Platform Service Account to be used by the 1511 // workloads. If a service account is not specified, the "default" Compute 1512 // Engine service account is used. Cannot be updated. 1513 string service_account = 7 [(google.api.field_behavior) = OPTIONAL]; 1514 1515 // Optional. The list of instance tags applied to all node VMs. Tags are used 1516 // to identify valid sources or targets for network firewalls. Each tag within 1517 // the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). 1518 // Cannot be updated. 1519 repeated string tags = 8 [(google.api.field_behavior) = OPTIONAL]; 1520 1521 // Optional. The IPAllocationPolicy fields for the GKE cluster. 1522 IPAllocationPolicy ip_allocation_policy = 9 1523 [(google.api.field_behavior) = OPTIONAL]; 1524 1525 // Optional. The maximum number of pods per node in the Cloud Composer GKE 1526 // cluster. The value must be between 8 and 110 and it can be set only if the 1527 // environment is VPC-native. The default value is 32. Values of this field 1528 // will be propagated both to the `default-pool` node pool of the newly 1529 // created GKE cluster, and to the default "Maximum Pods per Node" value which 1530 // is used for newly created node pools if their value is not explicitly set 1531 // during node pool creation. For more information, see [Optimizing IP address 1532 // allocation] 1533 // (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr). 1534 // Cannot be updated. 1535 // 1536 // This field is supported for Cloud Composer environments in versions 1537 // composer-1.*.*-airflow-*.*.*. 1538 int32 max_pods_per_node = 10 [(google.api.field_behavior) = OPTIONAL]; 1539 1540 // Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines 1541 // nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for 1542 // all destination addresses, except between pods traffic. 1543 // 1544 // See: 1545 // https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent 1546 bool enable_ip_masq_agent = 11 [(google.api.field_behavior) = OPTIONAL]; 1547 1548 // Optional. Network Attachment that Cloud Composer environment is connected 1549 // to, which provides connectivity with a user's VPC network. Takes precedence 1550 // over network and subnetwork settings. If not provided, but network and 1551 // subnetwork are defined during environment, it will be provisioned. If not 1552 // provided and network and subnetwork are also empty, then connectivity to 1553 // user's VPC network is disabled. Network attachment must be provided in 1554 // format 1555 // projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. 1556 // 1557 // This field is supported for Cloud Composer environments in versions 1558 // composer-3.*.*-airflow-*.*.* and newer. 1559 string composer_network_attachment = 12 1560 [(google.api.field_behavior) = OPTIONAL]; 1561 1562 // Optional. The IP range in CIDR notation to use internally by Cloud 1563 // Composer. IP addresses are not reserved - and the same range can be used by 1564 // multiple Cloud Composer environments. In case of overlap, IPs from this 1565 // range will not be accessible in the user's VPC network. Cannot be updated. 1566 // If not specified, the default value of '100.64.128.0/20' is used. 1567 // 1568 // This field is supported for Cloud Composer environments in versions 1569 // composer-3.*.*-airflow-*.*.* and newer. 1570 string composer_internal_ipv4_cidr_block = 13 1571 [(google.api.field_behavior) = OPTIONAL]; 1572} 1573 1574// Configuration options for the private GKE cluster in a Cloud Composer 1575// environment. 1576message PrivateClusterConfig { 1577 // Optional. If `true`, access to the public endpoint of the GKE cluster is 1578 // denied. 1579 bool enable_private_endpoint = 1 [(google.api.field_behavior) = OPTIONAL]; 1580 1581 // Optional. The CIDR block from which IPv4 range for GKE master will be 1582 // reserved. If left blank, the default value of '172.16.0.0/23' is used. 1583 string master_ipv4_cidr_block = 2 [(google.api.field_behavior) = OPTIONAL]; 1584 1585 // Output only. The IP range in CIDR notation to use for the hosted master 1586 // network. This range is used for assigning internal IP addresses to the 1587 // cluster master or set of masters and to the internal load balancer virtual 1588 // IP. This range must not overlap with any other ranges in use within the 1589 // cluster's network. 1590 string master_ipv4_reserved_range = 3 1591 [(google.api.field_behavior) = OUTPUT_ONLY]; 1592} 1593 1594// Configuration options for networking connections in the Composer 2 1595// environment. 1596message NetworkingConfig { 1597 // Represents connection type between Composer environment in Customer 1598 // Project and the corresponding Tenant project, from a predefined list 1599 // of available connection modes. 1600 enum ConnectionType { 1601 // No specific connection type was requested, so the environment uses 1602 // the default value corresponding to the rest of its configuration. 1603 CONNECTION_TYPE_UNSPECIFIED = 0; 1604 1605 // Requests the use of VPC peerings for connecting the Customer and Tenant 1606 // projects. 1607 VPC_PEERING = 1; 1608 1609 // Requests the use of Private Service Connect for connecting the Customer 1610 // and Tenant projects. 1611 PRIVATE_SERVICE_CONNECT = 2; 1612 } 1613 1614 // Optional. Indicates the user requested specifc connection type between 1615 // Tenant and Customer projects. You cannot set networking connection type in 1616 // public IP environment. 1617 ConnectionType connection_type = 1 [(google.api.field_behavior) = OPTIONAL]; 1618} 1619 1620// The configuration information for configuring a Private IP Cloud Composer 1621// environment. 1622message PrivateEnvironmentConfig { 1623 // Optional. If `true`, a Private IP Cloud Composer environment is created. 1624 // If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be 1625 // set to true for Cloud Composer environments in versions 1626 // composer-1.*.*-airflow-*.*.*. 1627 bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL]; 1628 1629 // Optional. If `true`, builds performed during operations that install Python 1630 // packages have only private connectivity to Google services (including 1631 // Artifact Registry) and VPC network (if either `NodeConfig.network` and 1632 // `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` 1633 // field are specified). If `false`, the builds also have access to the 1634 // internet. 1635 // 1636 // This field is supported for Cloud Composer environments in versions 1637 // composer-3.*.*-airflow-*.*.* and newer. 1638 bool enable_private_builds_only = 11 [(google.api.field_behavior) = OPTIONAL]; 1639 1640 // Optional. Configuration for the private GKE cluster for a Private IP 1641 // Cloud Composer environment. 1642 PrivateClusterConfig private_cluster_config = 2 1643 [(google.api.field_behavior) = OPTIONAL]; 1644 1645 // Optional. The CIDR block from which IP range for web server will be 1646 // reserved. Needs to be disjoint from 1647 // private_cluster_config.master_ipv4_cidr_block and 1648 // cloud_sql_ipv4_cidr_block. 1649 // 1650 // This field is supported for Cloud Composer environments in versions 1651 // composer-1.*.*-airflow-*.*.*. 1652 string web_server_ipv4_cidr_block = 3 1653 [(google.api.field_behavior) = OPTIONAL]; 1654 1655 // Optional. The CIDR block from which IP range in tenant project will be 1656 // reserved for Cloud SQL. Needs to be disjoint from 1657 // web_server_ipv4_cidr_block 1658 string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; 1659 1660 // Output only. The IP range reserved for the tenant project's App Engine VMs. 1661 // 1662 // This field is supported for Cloud Composer environments in versions 1663 // composer-1.*.*-airflow-*.*.*. 1664 string web_server_ipv4_reserved_range = 5 1665 [(google.api.field_behavior) = OUTPUT_ONLY]; 1666 1667 // Optional. The CIDR block from which IP range for Cloud Composer Network in 1668 // tenant project will be reserved. Needs to be disjoint from 1669 // private_cluster_config.master_ipv4_cidr_block and 1670 // cloud_sql_ipv4_cidr_block. 1671 // 1672 // This field is supported for Cloud Composer environments in versions 1673 // composer-2.*.*-airflow-*.*.* and newer. 1674 string cloud_composer_network_ipv4_cidr_block = 7 1675 [(google.api.field_behavior) = OPTIONAL]; 1676 1677 // Output only. The IP range reserved for the tenant project's Cloud Composer 1678 // network. 1679 // 1680 // This field is supported for Cloud Composer environments in versions 1681 // composer-2.*.*-airflow-*.*.* and newer. 1682 string cloud_composer_network_ipv4_reserved_range = 8 1683 [(google.api.field_behavior) = OUTPUT_ONLY]; 1684 1685 // Optional. When enabled, IPs from public (non-RFC1918) ranges can be used 1686 // for `IPAllocationPolicy.cluster_ipv4_cidr_block` and 1687 // `IPAllocationPolicy.service_ipv4_cidr_block`. 1688 bool enable_privately_used_public_ips = 6 1689 [(google.api.field_behavior) = OPTIONAL]; 1690 1691 // Optional. When specified, the environment will use Private Service Connect 1692 // instead of VPC peerings to connect to Cloud SQL in the Tenant Project, 1693 // and the PSC endpoint in the Customer Project will use an IP address from 1694 // this subnetwork. 1695 string cloud_composer_connection_subnetwork = 9 1696 [(google.api.field_behavior) = OPTIONAL]; 1697 1698 // Optional. Configuration for the network connections configuration in the 1699 // environment. 1700 NetworkingConfig networking_config = 10 1701 [(google.api.field_behavior) = OPTIONAL]; 1702} 1703 1704// The configuration of Cloud SQL instance that is used by the Apache Airflow 1705// software. 1706message DatabaseConfig { 1707 // Optional. Cloud SQL machine type used by Airflow database. 1708 // It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 1709 // or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. 1710 // Supported for Cloud Composer environments in versions 1711 // composer-1.*.*-airflow-*.*.*. 1712 string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; 1713 1714 // Optional. The Compute Engine zone where the Airflow database is created. If 1715 // zone is provided, it must be in the region selected for the environment. If 1716 // zone is not provided, a zone is automatically selected. The zone can only 1717 // be set during environment creation. Supported for Cloud Composer 1718 // environments in versions composer-2.*.*-airflow-*.*.*. 1719 string zone = 2 [(google.api.field_behavior) = OPTIONAL]; 1720} 1721 1722// The configuration settings for the Airflow web server App Engine instance. 1723// Supported for Cloud Composer environments in versions 1724// composer-1.*.*-airflow-*.*.*. 1725message WebServerConfig { 1726 // Optional. Machine type on which Airflow web server is running. 1727 // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or 1728 // composer-n1-webserver-8. 1729 // If not specified, composer-n1-webserver-2 will be used. 1730 // Value custom is returned only in response, if Airflow web server parameters 1731 // were manually changed to a non-standard values. 1732 string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; 1733} 1734 1735// The encryption options for the Cloud Composer environment and its 1736// dependencies. Supported for Cloud Composer environments in versions 1737// composer-1.*.*-airflow-*.*.*. 1738message EncryptionConfig { 1739 // Optional. Customer-managed Encryption Key available through Google's Key 1740 // Management Service. Cannot be updated. If not specified, Google-managed key 1741 // will be used. 1742 string kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; 1743} 1744 1745// The configuration settings for Cloud Composer maintenance window. 1746// The following example: 1747// 1748// ``` 1749// { 1750// "startTime":"2019-08-01T01:00:00Z" 1751// "endTime":"2019-08-01T07:00:00Z" 1752// "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE" 1753// } 1754// ``` 1755// 1756// would define a maintenance window between 01 and 07 hours UTC during 1757// each Tuesday and Wednesday. 1758message MaintenanceWindow { 1759 // Required. Start time of the first recurrence of the maintenance window. 1760 google.protobuf.Timestamp start_time = 1 1761 [(google.api.field_behavior) = REQUIRED]; 1762 1763 // Required. Maintenance window end time. It is used only to calculate the 1764 // duration of the maintenance window. The value for end_time must be in the 1765 // future, relative to `start_time`. 1766 google.protobuf.Timestamp end_time = 2 1767 [(google.api.field_behavior) = REQUIRED]; 1768 1769 // Required. Maintenance window recurrence. Format is a subset of 1770 // [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed 1771 // values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` 1772 // Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. 1773 string recurrence = 3 [(google.api.field_behavior) = REQUIRED]; 1774} 1775 1776// The Kubernetes workloads configuration for GKE cluster associated with the 1777// Cloud Composer environment. Supported for Cloud Composer environments in 1778// versions composer-2.*.*-airflow-*.*.* and newer. 1779message WorkloadsConfig { 1780 // Configuration for resources used by Airflow schedulers. 1781 message SchedulerResource { 1782 // Optional. CPU request and limit for a single Airflow scheduler replica. 1783 float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; 1784 1785 // Optional. Memory (GB) request and limit for a single Airflow scheduler 1786 // replica. 1787 float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; 1788 1789 // Optional. Storage (GB) request and limit for a single Airflow scheduler 1790 // replica. 1791 float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; 1792 1793 // Optional. The number of schedulers. 1794 int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; 1795 } 1796 1797 // Configuration for resources used by Airflow web server. 1798 message WebServerResource { 1799 // Optional. CPU request and limit for Airflow web server. 1800 float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; 1801 1802 // Optional. Memory (GB) request and limit for Airflow web server. 1803 float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; 1804 1805 // Optional. Storage (GB) request and limit for Airflow web server. 1806 float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; 1807 } 1808 1809 // Configuration for resources used by Airflow workers. 1810 message WorkerResource { 1811 // Optional. CPU request and limit for a single Airflow worker replica. 1812 float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; 1813 1814 // Optional. Memory (GB) request and limit for a single Airflow worker 1815 // replica. 1816 float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; 1817 1818 // Optional. Storage (GB) request and limit for a single Airflow worker 1819 // replica. 1820 float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; 1821 1822 // Optional. Minimum number of workers for autoscaling. 1823 int32 min_count = 4 [(google.api.field_behavior) = OPTIONAL]; 1824 1825 // Optional. Maximum number of workers for autoscaling. 1826 int32 max_count = 5 [(google.api.field_behavior) = OPTIONAL]; 1827 } 1828 1829 // Configuration for resources used by Airflow triggerers. 1830 message TriggererResource { 1831 // Optional. The number of triggerers. 1832 int32 count = 1 [(google.api.field_behavior) = OPTIONAL]; 1833 1834 // Optional. CPU request and limit for a single Airflow triggerer replica. 1835 float cpu = 2 [(google.api.field_behavior) = OPTIONAL]; 1836 1837 // Optional. Memory (GB) request and limit for a single Airflow triggerer 1838 // replica. 1839 float memory_gb = 3 [(google.api.field_behavior) = OPTIONAL]; 1840 } 1841 1842 // Configuration for resources used by Airflow DAG processors. 1843 message DagProcessorResource { 1844 // Optional. CPU request and limit for a single Airflow DAG processor 1845 // replica. 1846 float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; 1847 1848 // Optional. Memory (GB) request and limit for a single Airflow DAG 1849 // processor replica. 1850 float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; 1851 1852 // Optional. Storage (GB) request and limit for a single Airflow DAG 1853 // processor replica. 1854 float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; 1855 1856 // Optional. The number of DAG processors. If not provided or set to 0, a 1857 // single DAG processor instance will be created. 1858 int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; 1859 } 1860 1861 // Optional. Resources used by Airflow schedulers. 1862 SchedulerResource scheduler = 1 [(google.api.field_behavior) = OPTIONAL]; 1863 1864 // Optional. Resources used by Airflow web server. 1865 WebServerResource web_server = 2 [(google.api.field_behavior) = OPTIONAL]; 1866 1867 // Optional. Resources used by Airflow workers. 1868 WorkerResource worker = 3 [(google.api.field_behavior) = OPTIONAL]; 1869 1870 // Optional. Resources used by Airflow triggerers. 1871 TriggererResource triggerer = 4 [(google.api.field_behavior) = OPTIONAL]; 1872 1873 // Optional. Resources used by Airflow DAG processors. 1874 // 1875 // This field is supported for Cloud Composer environments in versions 1876 // composer-3.*.*-airflow-*.*.* and newer. 1877 DagProcessorResource dag_processor = 5 1878 [(google.api.field_behavior) = OPTIONAL]; 1879} 1880 1881// The configuration setting for Airflow database data retention mechanism. 1882message DataRetentionConfig { 1883 // Optional. The configuration settings for task logs retention 1884 TaskLogsRetentionConfig task_logs_retention_config = 4 1885 [(google.api.field_behavior) = OPTIONAL]; 1886} 1887 1888// The configuration setting for Task Logs. 1889message TaskLogsRetentionConfig { 1890 // The definition of task_logs_storage_mode. 1891 enum TaskLogsStorageMode { 1892 // This configuration is not specified by the user. 1893 TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0; 1894 1895 // Store task logs in Cloud Logging and in the environment's Cloud Storage 1896 // bucket. 1897 CLOUD_LOGGING_AND_CLOUD_STORAGE = 1; 1898 1899 // Store task logs in Cloud Logging only. 1900 CLOUD_LOGGING_ONLY = 2; 1901 } 1902 1903 // Optional. The mode of storage for Airflow workers task logs. For details, 1904 // see go/composer-store-task-logs-in-cloud-logging-only-design-doc 1905 TaskLogsStorageMode storage_mode = 2 [(google.api.field_behavior) = OPTIONAL]; 1906} 1907 1908// The configuration for data storage in the environment. 1909message StorageConfig { 1910 // Optional. The name of the Cloud Storage bucket used by the environment. No 1911 // `gs://` prefix. 1912 string bucket = 1 [(google.api.field_behavior) = OPTIONAL]; 1913} 1914 1915// The Recovery settings of an environment. 1916message RecoveryConfig { 1917 // Optional. The configuration for scheduled snapshot creation mechanism. 1918 ScheduledSnapshotsConfig scheduled_snapshots_config = 1 1919 [(google.api.field_behavior) = OPTIONAL]; 1920} 1921 1922// The configuration for scheduled snapshot creation mechanism. 1923message ScheduledSnapshotsConfig { 1924 // Optional. Whether scheduled snapshots creation is enabled. 1925 bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; 1926 1927 // Optional. The Cloud Storage location for storing automatically created 1928 // snapshots. 1929 string snapshot_location = 6 [(google.api.field_behavior) = OPTIONAL]; 1930 1931 // Optional. The cron expression representing the time when snapshots creation 1932 // mechanism runs. This field is subject to additional validation around 1933 // frequency of execution. 1934 string snapshot_creation_schedule = 3 1935 [(google.api.field_behavior) = OPTIONAL]; 1936 1937 // Optional. Time zone that sets the context to interpret 1938 // snapshot_creation_schedule. 1939 string time_zone = 5 [(google.api.field_behavior) = OPTIONAL]; 1940} 1941 1942// Configuration options for the master authorized networks feature. Enabled 1943// master authorized networks will disallow all external traffic to access 1944// Kubernetes master through HTTPS except traffic from the given CIDR blocks, 1945// Google Compute Engine Public IPs and Google Prod IPs. 1946message MasterAuthorizedNetworksConfig { 1947 // CIDR block with an optional name. 1948 message CidrBlock { 1949 // User-defined name that identifies the CIDR block. 1950 string display_name = 1; 1951 1952 // CIDR block that must be specified in CIDR notation. 1953 string cidr_block = 2; 1954 } 1955 1956 // Whether or not master authorized networks feature is enabled. 1957 bool enabled = 1; 1958 1959 // Up to 50 external networks that could access Kubernetes master through 1960 // HTTPS. 1961 repeated CidrBlock cidr_blocks = 2; 1962} 1963 1964// Configuration for Cloud Data Lineage integration. 1965message CloudDataLineageIntegration { 1966 // Optional. Whether or not Cloud Data Lineage integration is enabled. 1967 bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; 1968} 1969 1970// An environment for running orchestration tasks. 1971message Environment { 1972 option (google.api.resource) = { 1973 type: "composer.googleapis.com/Environment" 1974 pattern: "projects/{project}/locations/{location}/environments/{environment}" 1975 }; 1976 1977 // State of the environment. 1978 enum State { 1979 // The state of the environment is unknown. 1980 STATE_UNSPECIFIED = 0; 1981 1982 // The environment is in the process of being created. 1983 CREATING = 1; 1984 1985 // The environment is currently running and healthy. It is ready for use. 1986 RUNNING = 2; 1987 1988 // The environment is being updated. It remains usable but cannot receive 1989 // additional update requests or be deleted at this time. 1990 UPDATING = 3; 1991 1992 // The environment is undergoing deletion. It cannot be used. 1993 DELETING = 4; 1994 1995 // The environment has encountered an error and cannot be used. 1996 ERROR = 5; 1997 } 1998 1999 // The resource name of the environment, in the form: 2000 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 2001 // 2002 // EnvironmentId must start with a lowercase letter followed by up to 63 2003 // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. 2004 string name = 1; 2005 2006 // Configuration parameters for this environment. 2007 EnvironmentConfig config = 2; 2008 2009 // Output only. The UUID (Universally Unique IDentifier) associated with this 2010 // environment. This value is generated when the environment is created. 2011 string uuid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 2012 2013 // The current state of the environment. 2014 State state = 4; 2015 2016 // Output only. The time at which this environment was created. 2017 google.protobuf.Timestamp create_time = 5 2018 [(google.api.field_behavior) = OUTPUT_ONLY]; 2019 2020 // Output only. The time at which this environment was last modified. 2021 google.protobuf.Timestamp update_time = 6 2022 [(google.api.field_behavior) = OUTPUT_ONLY]; 2023 2024 // Optional. User-defined labels for this environment. 2025 // The labels map can contain no more than 64 entries. Entries of the labels 2026 // map are UTF8 strings that comply with the following restrictions: 2027 // 2028 // * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} 2029 // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} 2030 // * Both keys and values are additionally constrained to be <= 128 bytes in 2031 // size. 2032 map<string, string> labels = 7 [(google.api.field_behavior) = OPTIONAL]; 2033 2034 // Output only. Reserved for future use. 2035 bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 2036 2037 // Optional. Storage configuration for this environment. 2038 StorageConfig storage_config = 9 [(google.api.field_behavior) = OPTIONAL]; 2039} 2040 2041// Request to check whether image upgrade will succeed. 2042message CheckUpgradeRequest { 2043 // The resource name of the environment to check upgrade for, in the 2044 // form: 2045 // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" 2046 string environment = 1; 2047 2048 // The version of the software running in the environment. 2049 // This encapsulates both the version of Cloud Composer functionality and the 2050 // version of Apache Airflow. It must match the regular expression 2051 // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. 2052 // When used as input, the server also checks if the provided version is 2053 // supported and denies the request for an unsupported version. 2054 // 2055 // The Cloud Composer portion of the image version is a full 2056 // [semantic version](https://semver.org), or an alias in the form of major 2057 // version number or `latest`. When an alias is provided, the server replaces 2058 // it with the current Cloud Composer version that satisfies the alias. 2059 // 2060 // The Apache Airflow portion of the image version is a full semantic version 2061 // that points to one of the supported Apache Airflow versions, or an alias in 2062 // the form of only major or major.minor versions specified. When an alias is 2063 // provided, the server replaces it with the latest Apache Airflow version 2064 // that satisfies the alias and is supported in the given Cloud Composer 2065 // version. 2066 // 2067 // In all cases, the resolved image version is stored in the same field. 2068 // 2069 // See also [version 2070 // list](/composer/docs/concepts/versioning/composer-versions) and [versioning 2071 // overview](/composer/docs/concepts/versioning/composer-versioning-overview). 2072 string image_version = 2; 2073} 2074 2075// Message containing information about the result of an upgrade check 2076// operation. 2077message CheckUpgradeResponse { 2078 // Whether there were python modules conflict during image build. 2079 enum ConflictResult { 2080 // It is unknown whether build had conflicts or not. 2081 CONFLICT_RESULT_UNSPECIFIED = 0; 2082 2083 // There were python packages conflicts. 2084 CONFLICT = 1; 2085 2086 // There were no python packages conflicts. 2087 NO_CONFLICT = 2; 2088 } 2089 2090 // Output only. Url for a docker build log of an upgraded image. 2091 string build_log_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 2092 2093 // Output only. Whether build has succeeded or failed on modules conflicts. 2094 ConflictResult contains_pypi_modules_conflict = 4 2095 [(google.api.field_behavior) = OUTPUT_ONLY]; 2096 2097 // Output only. Extract from a docker image build log containing information 2098 // about pypi modules conflicts. 2099 string pypi_conflict_build_log_extract = 3 2100 [(google.api.field_behavior) = OUTPUT_ONLY]; 2101 2102 // Composer image for which the build was happening. 2103 string image_version = 5; 2104 2105 // Pypi dependencies specified in the environment configuration, at the time 2106 // when the build was triggered. 2107 map<string, string> pypi_dependencies = 6; 2108} 2109