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.lifesciences.v2beta; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/longrunning/operations.proto"; 23import "google/protobuf/duration.proto"; 24import "google/protobuf/timestamp.proto"; 25import "google/rpc/code.proto"; 26 27option csharp_namespace = "Google.Cloud.LifeSciences.V2Beta"; 28option go_package = "cloud.google.com/go/lifesciences/apiv2beta/lifesciencespb;lifesciencespb"; 29option java_multiple_files = true; 30option java_outer_classname = "WorkflowsProto"; 31option java_package = "com.google.cloud.lifesciences.v2beta"; 32option objc_class_prefix = "CLSW"; 33option php_namespace = "Google\\Cloud\\LifeSciences\\V2beta"; 34option ruby_package = "Google::Cloud::LifeSciences::V2beta"; 35 36// A service for running workflows, such as pipelines consisting of Docker 37// containers. 38service WorkflowsServiceV2Beta { 39 option (google.api.default_host) = "lifesciences.googleapis.com"; 40 option (google.api.oauth_scopes) = 41 "https://www.googleapis.com/auth/cloud-platform"; 42 43 // Runs a pipeline. The returned Operation's [metadata] 44 // [google.longrunning.Operation.metadata] field will contain a 45 // [google.cloud.lifesciences.v2beta.Metadata][google.cloud.lifesciences.v2beta.Metadata] 46 // object describing the status of the pipeline execution. The 47 // [response][google.longrunning.Operation.response] field will contain a 48 // [google.cloud.lifesciences.v2beta.RunPipelineResponse][google.cloud.lifesciences.v2beta.RunPipelineResponse] 49 // object if the pipeline completes successfully. 50 // 51 // **Note:** Before you can use this method, the *Life Sciences Service Agent* 52 // must have access to your project. This is done automatically when the 53 // Cloud Life Sciences API is first enabled, but if you delete this permission 54 // you must disable and re-enable the API to grant the Life Sciences 55 // Service Agent the required permissions. 56 // Authorization requires the following [Google 57 // IAM](https://cloud.google.com/iam/) permission: 58 // 59 // * `lifesciences.workflows.run` 60 rpc RunPipeline(RunPipelineRequest) returns (google.longrunning.Operation) { 61 option (google.api.http) = { 62 post: "/v2beta/{parent=projects/*/locations/*}/pipelines:run" 63 body: "*" 64 }; 65 option (google.longrunning.operation_info) = { 66 response_type: "RunPipelineResponse" 67 metadata_type: "Metadata" 68 }; 69 } 70} 71 72// The arguments to the `RunPipeline` method. The requesting user must have 73// the `iam.serviceAccounts.actAs` permission for the Cloud Life Sciences 74// service account or the request will fail. 75message RunPipelineRequest { 76 // The project and location that this request should be executed against. 77 string parent = 4; 78 79 // Required. The description of the pipeline to run. 80 Pipeline pipeline = 1 [(google.api.field_behavior) = REQUIRED]; 81 82 // User-defined labels to associate with the returned operation. These 83 // labels are not propagated to any Google Cloud Platform resources used by 84 // the operation, and can be modified at any time. 85 // 86 // To associate labels with resources created while executing the operation, 87 // see the appropriate resource message (for example, `VirtualMachine`). 88 map<string, string> labels = 2; 89 90 // The name of an existing Pub/Sub topic. The server will publish 91 // messages to this topic whenever the status of the operation changes. 92 // The Life Sciences Service Agent account must have publisher permissions to 93 // the specified topic or notifications will not be sent. 94 string pub_sub_topic = 3; 95} 96 97// The response to the RunPipeline method, returned in the operation's result 98// field on success. 99message RunPipelineResponse {} 100 101// Specifies a series of actions to execute, expressed as Docker containers. 102message Pipeline { 103 // The list of actions to execute, in the order they are specified. 104 repeated Action actions = 1; 105 106 // The resources required for execution. 107 Resources resources = 2; 108 109 // The environment to pass into every action. Each action can also specify 110 // additional environment variables but cannot delete an entry from this map 111 // (though they can overwrite it with a different value). 112 map<string, string> environment = 3; 113 114 // The encrypted environment to pass into every action. Each action can also 115 // specify its own encrypted environment. 116 // 117 // The secret must decrypt to a JSON-encoded dictionary where key-value pairs 118 // serve as environment variable names and their values. The decoded 119 // environment variables can overwrite the values specified by the 120 // `environment` field. 121 Secret encrypted_environment = 5; 122 123 // The maximum amount of time to give the pipeline to complete. This includes 124 // the time spent waiting for a worker to be allocated. If the pipeline fails 125 // to complete before the timeout, it will be cancelled and the error code 126 // will be set to DEADLINE_EXCEEDED. 127 // 128 // If unspecified, it will default to 7 days. 129 google.protobuf.Duration timeout = 4; 130} 131 132// Specifies a single action that runs a Docker container. 133message Action { 134 // An optional name for the container. The container hostname will be set to 135 // this name, making it useful for inter-container communication. The name 136 // must contain only upper and lowercase alphanumeric characters and hyphens 137 // and cannot start with a hyphen. 138 string container_name = 1; 139 140 // Required. The URI to pull the container image from. Note that all images 141 // referenced by actions in the pipeline are pulled before the first action 142 // runs. If multiple actions reference the same image, it is only pulled once, 143 // ensuring that the same image is used for all actions in a single pipeline. 144 // 145 // The image URI can be either a complete host and image specification (e.g., 146 // quay.io/biocontainers/samtools), a library and image name (e.g., 147 // google/cloud-sdk) or a bare image name ('bash') to pull from the default 148 // library. No schema is required in any of these cases. 149 // 150 // If the specified image is not public, the service account specified for 151 // the Virtual Machine must have access to pull the images from GCR, or 152 // appropriate credentials must be specified in the 153 // [google.cloud.lifesciences.v2beta.Action.credentials][google.cloud.lifesciences.v2beta.Action.credentials] 154 // field. 155 string image_uri = 2 [(google.api.field_behavior) = REQUIRED]; 156 157 // If specified, overrides the `CMD` specified in the container. If the 158 // container also has an `ENTRYPOINT` the values are used as entrypoint 159 // arguments. Otherwise, they are used as a command and arguments to run 160 // inside the container. 161 repeated string commands = 3; 162 163 // If specified, overrides the `ENTRYPOINT` specified in the container. 164 string entrypoint = 4; 165 166 // The environment to pass into the container. This environment is merged 167 // with values specified in the 168 // [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] 169 // message, overwriting any duplicate values. 170 // 171 // In addition to the values passed here, a few other values are 172 // automatically injected into the environment. These cannot be hidden or 173 // overwritten. 174 // 175 // `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline failed 176 // because an action has exited with a non-zero status (and did not have the 177 // `IGNORE_EXIT_STATUS` flag set). This can be used to determine if additional 178 // debug or logging actions should execute. 179 // 180 // `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the last 181 // non-background action that executed. This can be used by workflow engine 182 // authors to determine whether an individual action has succeeded or failed. 183 map<string, string> environment = 5; 184 185 // The encrypted environment to pass into the container. This environment is 186 // merged with values specified in the 187 // [google.cloud.lifesciences.v2beta.Pipeline][google.cloud.lifesciences.v2beta.Pipeline] 188 // message, overwriting any duplicate values. 189 // 190 // The secret must decrypt to a JSON-encoded dictionary where key-value pairs 191 // serve as environment variable names and their values. The decoded 192 // environment variables can overwrite the values specified by the 193 // `environment` field. 194 Secret encrypted_environment = 21; 195 196 // An optional identifier for a PID namespace to run the action inside. 197 // Multiple actions should use the same string to share a namespace. If 198 // unspecified, a separate isolated namespace is used. 199 string pid_namespace = 6; 200 201 // A map of containers to host port mappings for this container. If the 202 // container already specifies exposed ports, use the 203 // `PUBLISH_EXPOSED_PORTS` flag instead. 204 // 205 // The host port number must be less than 65536. If it is zero, an unused 206 // random port is assigned. To determine the resulting port number, consult 207 // the `ContainerStartedEvent` in the operation metadata. 208 map<int32, int32> port_mappings = 8; 209 210 // A list of mounts to make available to the action. 211 // 212 // In addition to the values specified here, every action has a special 213 // virtual disk mounted under `/google` that contains log files and other 214 // operational components. 215 // 216 // <ul> 217 // <li><code>/google/logs</code> All logs written during the pipeline 218 // execution.</li> 219 // <li><code>/google/logs/output</code> The combined standard output and 220 // standard error of all actions run as part of the pipeline 221 // execution.</li> 222 // <li><code>/google/logs/action/*/stdout</code> The complete contents of 223 // each individual action's standard output.</li> 224 // <li><code>/google/logs/action/*/stderr</code> The complete contents of 225 // each individual action's standard error output.</li> 226 // </ul> 227 repeated Mount mounts = 9; 228 229 // Labels to associate with the action. This field is provided to assist 230 // workflow engine authors in identifying actions (for example, to indicate 231 // what sort of action they perform, such as localization or debugging). 232 // They are returned in the operation metadata, but are otherwise ignored. 233 map<string, string> labels = 10; 234 235 // If the specified image is hosted on a private registry other than Google 236 // Container Registry, the credentials required to pull the image must be 237 // specified here as an encrypted secret. 238 // 239 // The secret must decrypt to a JSON-encoded dictionary containing both 240 // `username` and `password` keys. 241 Secret credentials = 11; 242 243 // The maximum amount of time to give the action to complete. If the action 244 // fails to complete before the timeout, it will be terminated and the exit 245 // status will be non-zero. The pipeline will continue or terminate based 246 // on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS` flags. 247 google.protobuf.Duration timeout = 12; 248 249 // Normally, a non-zero exit status causes the pipeline to fail. This flag 250 // allows execution of other actions to continue instead. 251 bool ignore_exit_status = 13; 252 253 // This flag allows an action to continue running in the background while 254 // executing subsequent actions. This is useful to provide services to 255 // other actions (or to provide debugging support tools like SSH servers). 256 bool run_in_background = 14; 257 258 // By default, after an action fails, no further actions are run. This flag 259 // indicates that this action must be run even if the pipeline has already 260 // failed. This is useful for actions that copy output files off of the VM 261 // or for debugging. Note that no actions will be run if image prefetching 262 // fails. 263 bool always_run = 15; 264 265 // Enable access to the FUSE device for this action. Filesystems can then 266 // be mounted into disks shared with other actions. The other actions do 267 // not need the `enable_fuse` flag to access the mounted filesystem. 268 // 269 // This has the effect of causing the container to be executed with 270 // `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it only 271 // for containers you trust. 272 bool enable_fuse = 16; 273 274 // Exposes all ports specified by `EXPOSE` statements in the container. To 275 // discover the host side port numbers, consult the `ACTION_STARTED` event 276 // in the operation metadata. 277 bool publish_exposed_ports = 17; 278 279 // All container images are typically downloaded before any actions are 280 // executed. This helps prevent typos in URIs or issues like lack of disk 281 // space from wasting large amounts of compute resources. 282 // 283 // If set, this flag prevents the worker from downloading the image until 284 // just before the action is executed. 285 bool disable_image_prefetch = 18; 286 287 // A small portion of the container's standard error stream is typically 288 // captured and returned inside the `ContainerStoppedEvent`. Setting this 289 // flag disables this functionality. 290 bool disable_standard_error_capture = 19; 291 292 // Prevents the container from accessing the external network. 293 bool block_external_network = 20; 294} 295 296// Holds encrypted information that is only decrypted and stored in RAM 297// by the worker VM when running the pipeline. 298message Secret { 299 // The name of the Cloud KMS key that will be used to decrypt the secret 300 // value. The VM service account must have the required permissions and 301 // authentication scopes to invoke the `decrypt` method on the specified key. 302 string key_name = 1; 303 304 // The value of the cipherText response from the `encrypt` method. This field 305 // is intentionally unaudited. 306 string cipher_text = 2; 307} 308 309// Carries information about a particular disk mount inside a container. 310message Mount { 311 // The name of the disk to mount, as specified in the resources section. 312 string disk = 1; 313 314 // The path to mount the disk inside the container. 315 string path = 2; 316 317 // If true, the disk is mounted read-only inside the container. 318 bool read_only = 3; 319} 320 321// The system resources for the pipeline run. 322// 323// At least one zone or region must be specified or the pipeline run will fail. 324message Resources { 325 // The list of regions allowed for VM allocation. If set, the `zones` field 326 // must not be set. 327 repeated string regions = 2; 328 329 // The list of zones allowed for VM allocation. If set, the `regions` field 330 // must not be set. 331 repeated string zones = 3; 332 333 // The virtual machine specification. 334 VirtualMachine virtual_machine = 4; 335} 336 337// Carries information about a Compute Engine VM resource. 338message VirtualMachine { 339 // Required. The machine type of the virtual machine to create. Must be the 340 // short name of a standard machine type (such as "n1-standard-1") or a custom 341 // machine type (such as "custom-1-4096", where "1" indicates the number of 342 // vCPUs and "4096" indicates the memory in MB). See [Creating an instance 343 // with a custom machine 344 // type](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) 345 // for more specifications on creating a custom machine type. 346 string machine_type = 1 [(google.api.field_behavior) = REQUIRED]; 347 348 // If true, allocate a preemptible VM. 349 bool preemptible = 2; 350 351 // Optional set of labels to apply to the VM and any attached disk resources. 352 // These labels must adhere to the [name and value 353 // restrictions](https://cloud.google.com/compute/docs/labeling-resources) on 354 // VM labels imposed by Compute Engine. 355 // 356 // Labels keys with the prefix 'google-' are reserved for use by Google. 357 // 358 // Labels applied at creation time to the VM. Applied on a best-effort basis 359 // to attached disk resources shortly after VM creation. 360 map<string, string> labels = 3; 361 362 // The list of disks to create and attach to the VM. 363 // 364 // Specify either the `volumes[]` field or the `disks[]` field, but not both. 365 repeated Disk disks = 4; 366 367 // The VM network configuration. 368 Network network = 5; 369 370 // The list of accelerators to attach to the VM. 371 repeated Accelerator accelerators = 6; 372 373 // The service account to install on the VM. This account does not need 374 // any permissions other than those required by the pipeline. 375 ServiceAccount service_account = 7; 376 377 // The size of the boot disk, in GB. The boot disk must be large 378 // enough to accommodate all of the Docker images from each action in the 379 // pipeline at the same time. If not specified, a small but reasonable 380 // default value is used. 381 int32 boot_disk_size_gb = 8; 382 383 // The CPU platform to request. An instance based on a newer platform can be 384 // allocated, but never one with fewer capabilities. The value of this 385 // parameter must be a valid Compute Engine CPU platform name (such as "Intel 386 // Skylake"). This parameter is only useful for carefully optimized work 387 // loads where the CPU platform has a significant impact. 388 // 389 // For more information about the effect of this parameter, see 390 // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. 391 string cpu_platform = 9; 392 393 // The host operating system image to use. 394 // 395 // Currently, only Container-Optimized OS images can be used. 396 // 397 // The default value is `projects/cos-cloud/global/images/family/cos-stable`, 398 // which selects the latest stable release of Container-Optimized OS. 399 // 400 // This option is provided to allow testing against the beta release of the 401 // operating system to ensure that the new version does not interact 402 // negatively with production pipelines. 403 // 404 // To test a pipeline against the beta release of Container-Optimized OS, 405 // use the value `projects/cos-cloud/global/images/family/cos-beta`. 406 string boot_image = 10; 407 408 // The NVIDIA driver version to use when attaching an NVIDIA GPU accelerator. 409 // The version specified here must be compatible with the GPU libraries 410 // contained in the container being executed, and must be one of the drivers 411 // hosted in the `nvidia-drivers-us-public` bucket on Google Cloud Storage. 412 string nvidia_driver_version = 11 [deprecated = true]; 413 414 // Whether Stackdriver monitoring should be enabled on the VM. 415 bool enable_stackdriver_monitoring = 12; 416 417 // The Compute Engine Disk Images to use as a Docker cache. The disks will be 418 // mounted into the Docker folder in a way that the images present in the 419 // cache will not need to be pulled. The digests of the cached images must 420 // match those of the tags used or the latest version will still be pulled. 421 // The root directory of the ext4 image must contain `image` and `overlay2` 422 // directories copied from the Docker directory of a VM where the desired 423 // Docker images have already been pulled. Any images pulled that are not 424 // cached will be stored on the first cache disk instead of the boot disk. 425 // Only a single image is supported. 426 repeated string docker_cache_images = 13; 427 428 // The list of disks and other storage to create or attach to the VM. 429 // 430 // Specify either the `volumes[]` field or the `disks[]` field, but not both. 431 repeated Volume volumes = 14; 432 433 // If specified, the VM will only be allocated inside the matching 434 // reservation. It will fail if the VM parameters don't match the reservation. 435 string reservation = 15; 436} 437 438// Carries information about a Google Cloud service account. 439message ServiceAccount { 440 // Email address of the service account. If not specified, the default 441 // Compute Engine service account for the project will be used. 442 string email = 1; 443 444 // List of scopes to be enabled for this service account on the VM, in 445 // addition to the cloud-platform API scope that will be added by default. 446 repeated string scopes = 2; 447} 448 449// Carries information about an accelerator that can be attached to a VM. 450message Accelerator { 451 // The accelerator type string (for example, "nvidia-tesla-k80"). 452 // 453 // Only NVIDIA GPU accelerators are currently supported. If an NVIDIA GPU is 454 // attached, the required runtime libraries will be made available to all 455 // containers under `/usr/local/nvidia`. The driver version to install must 456 // be specified using the NVIDIA driver version parameter on the virtual 457 // machine specification. Note that attaching a GPU increases the worker VM 458 // startup time by a few minutes. 459 string type = 1; 460 461 // How many accelerators of this type to attach. 462 int64 count = 2; 463} 464 465// VM networking options. 466message Network { 467 // The network name to attach the VM's network interface to. The value will 468 // be prefixed with `global/networks/` unless it contains a `/`, in which 469 // case it is assumed to be a fully specified network resource URL. 470 // 471 // If unspecified, the global default network is used. 472 string network = 1; 473 474 // If set to true, do not attach a public IP address to the VM. Note that 475 // without a public IP address, additional configuration is required to 476 // allow the VM to access Google services. 477 // 478 // See https://cloud.google.com/vpc/docs/configure-private-google-access 479 // for more information. 480 bool use_private_address = 2; 481 482 // If the specified network is configured for custom subnet creation, the 483 // name of the subnetwork to attach the instance to must be specified here. 484 // 485 // The value is prefixed with `regions/*/subnetworks/` unless it contains a 486 // `/`, in which case it is assumed to be a fully specified subnetwork 487 // resource URL. 488 // 489 // If the `*` character appears in the value, it is replaced with the region 490 // that the virtual machine has been allocated in. 491 string subnetwork = 3; 492} 493 494// Carries information about a disk that can be attached to a VM. 495// 496// See https://cloud.google.com/compute/docs/disks/performance for more 497// information about disk type, size, and performance considerations. 498// 499// Specify either [`Volume`][google.cloud.lifesciences.v2beta.Volume] or 500// [`Disk`][google.cloud.lifesciences.v2beta.Disk], but not both. 501message Disk { 502 // A user-supplied name for the disk. Used when mounting the disk into 503 // actions. The name must contain only upper and lowercase alphanumeric 504 // characters and hyphens and cannot start with a hyphen. 505 string name = 1; 506 507 // The size, in GB, of the disk to attach. If the size is not 508 // specified, a default is chosen to ensure reasonable I/O performance. 509 // 510 // If the disk type is specified as `local-ssd`, multiple local drives are 511 // automatically combined to provide the requested size. Note, however, that 512 // each physical SSD is 375GB in size, and no more than 8 drives can be 513 // attached to a single instance. 514 int32 size_gb = 2; 515 516 // The Compute Engine disk type. If unspecified, `pd-standard` is used. 517 string type = 3; 518 519 // An optional image to put on the disk before attaching it to the VM. 520 string source_image = 4; 521} 522 523// Carries information about storage that can be attached to a VM. 524// 525// Specify either [`Volume`][google.cloud.lifesciences.v2beta.Volume] or 526// [`Disk`][google.cloud.lifesciences.v2beta.Disk], but not both. 527message Volume { 528 // A user-supplied name for the volume. Used when mounting the volume into 529 // [`Actions`][google.cloud.lifesciences.v2beta.Action]. The name must contain 530 // only upper and lowercase alphanumeric characters and hyphens and cannot 531 // start with a hyphen. 532 string volume = 1; 533 534 oneof storage { 535 // Configuration for a persistent disk. 536 PersistentDisk persistent_disk = 2; 537 538 // Configuration for a existing disk. 539 ExistingDisk existing_disk = 3; 540 541 // Configuration for an NFS mount. 542 NFSMount nfs_mount = 4; 543 } 544} 545 546// Configuration for a persistent disk to be attached to the VM. 547// 548// See https://cloud.google.com/compute/docs/disks/performance for more 549// information about disk type, size, and performance considerations. 550message PersistentDisk { 551 // The size, in GB, of the disk to attach. If the size is not 552 // specified, a default is chosen to ensure reasonable I/O performance. 553 // 554 // If the disk type is specified as `local-ssd`, multiple local drives are 555 // automatically combined to provide the requested size. Note, however, that 556 // each physical SSD is 375GB in size, and no more than 8 drives can be 557 // attached to a single instance. 558 int32 size_gb = 1; 559 560 // The Compute Engine disk type. If unspecified, `pd-standard` is used. 561 string type = 2; 562 563 // An image to put on the disk before attaching it to the VM. 564 string source_image = 3; 565} 566 567// Configuration for an existing disk to be attached to the VM. 568message ExistingDisk { 569 // If `disk` contains slashes, the Cloud Life Sciences API assumes that it is 570 // a complete URL for the disk. If `disk` does not contain slashes, the Cloud 571 // Life Sciences API assumes that the disk is a zonal disk and a URL will be 572 // generated of the form `zones/<zone>/disks/<disk>`, where `<zone>` is the 573 // zone in which the instance is allocated. The disk must be ext4 formatted. 574 // 575 // If all `Mount` references to this disk have the `read_only` flag set to 576 // true, the disk will be attached in `read-only` mode and can be shared with 577 // other instances. Otherwise, the disk will be available for writing but 578 // cannot be shared. 579 string disk = 1; 580} 581 582// Configuration for an `NFSMount` to be attached to the VM. 583message NFSMount { 584 // A target NFS mount. The target must be specified as `address:/mount". 585 string target = 1; 586} 587 588// Carries information about the pipeline execution that is returned 589// in the long running operation's metadata field. 590message Metadata { 591 // The pipeline this operation represents. 592 Pipeline pipeline = 1; 593 594 // The user-defined labels associated with this operation. 595 map<string, string> labels = 2; 596 597 // The list of events that have happened so far during the execution of this 598 // operation. 599 repeated Event events = 3; 600 601 // The time at which the operation was created by the API. 602 google.protobuf.Timestamp create_time = 4; 603 604 // The first time at which resources were allocated to execute the pipeline. 605 google.protobuf.Timestamp start_time = 5; 606 607 // The time at which execution was completed and resources were cleaned up. 608 google.protobuf.Timestamp end_time = 6; 609 610 // The name of the Cloud Pub/Sub topic where notifications of operation status 611 // changes are sent. 612 string pub_sub_topic = 7; 613} 614 615// Carries information about events that occur during pipeline execution. 616message Event { 617 // The time at which the event occurred. 618 google.protobuf.Timestamp timestamp = 1; 619 620 // A human-readable description of the event. Note that these strings can 621 // change at any time without notice. Any application logic must use the 622 // information in the `details` field. 623 string description = 2; 624 625 // Machine-readable details about the event. 626 oneof details { 627 // See 628 // [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent]. 629 DelayedEvent delayed = 17; 630 631 // See 632 // [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent]. 633 WorkerAssignedEvent worker_assigned = 18; 634 635 // See 636 // [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent]. 637 WorkerReleasedEvent worker_released = 19; 638 639 // See 640 // [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent]. 641 PullStartedEvent pull_started = 20; 642 643 // See 644 // [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent]. 645 PullStoppedEvent pull_stopped = 21; 646 647 // See 648 // [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent]. 649 ContainerStartedEvent container_started = 22; 650 651 // See 652 // [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent]. 653 ContainerStoppedEvent container_stopped = 23; 654 655 // See 656 // [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent]. 657 ContainerKilledEvent container_killed = 24; 658 659 // See 660 // [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent]. 661 UnexpectedExitStatusEvent unexpected_exit_status = 25; 662 663 // See 664 // [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent]. 665 FailedEvent failed = 26; 666 } 667} 668 669// An event generated whenever a resource limitation or transient error 670// delays execution of a pipeline that was otherwise ready to run. 671message DelayedEvent { 672 // A textual description of the cause of the delay. The string can change 673 // without notice because it is often generated by another service (such as 674 // Compute Engine). 675 string cause = 1; 676 677 // If the delay was caused by a resource shortage, this field lists the 678 // Compute Engine metrics that are preventing this operation from running 679 // (for example, `CPUS` or `INSTANCES`). If the particular metric is not 680 // known, a single `UNKNOWN` metric will be present. 681 repeated string metrics = 2; 682} 683 684// An event generated after a worker VM has been assigned to run the 685// pipeline. 686message WorkerAssignedEvent { 687 // The zone the worker is running in. 688 string zone = 1; 689 690 // The worker's instance name. 691 string instance = 2; 692 693 // The machine type that was assigned for the worker. 694 string machine_type = 3; 695} 696 697// An event generated when the worker VM that was assigned to the pipeline 698// has been released (deleted). 699message WorkerReleasedEvent { 700 // The zone the worker was running in. 701 string zone = 1; 702 703 // The worker's instance name. 704 string instance = 2; 705} 706 707// An event generated when the worker starts pulling an image. 708message PullStartedEvent { 709 // The URI of the image that was pulled. 710 string image_uri = 1; 711} 712 713// An event generated when the worker stops pulling an image. 714message PullStoppedEvent { 715 // The URI of the image that was pulled. 716 string image_uri = 1; 717} 718 719// An event generated when a container starts. 720message ContainerStartedEvent { 721 // The numeric ID of the action that started this container. 722 int32 action_id = 1; 723 724 // The container-to-host port mappings installed for this container. This 725 // set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS` flag 726 // as well as any specified in the `Action` definition. 727 map<int32, int32> port_mappings = 2; 728 729 // The public IP address that can be used to connect to the container. This 730 // field is only populated when at least one port mapping is present. If the 731 // instance was created with a private address, this field will be empty even 732 // if port mappings exist. 733 string ip_address = 3; 734} 735 736// An event generated when a container exits. 737message ContainerStoppedEvent { 738 // The numeric ID of the action that started this container. 739 int32 action_id = 1; 740 741 // The exit status of the container. 742 int32 exit_status = 2; 743 744 // The tail end of any content written to standard error by the container. 745 // If the content emits large amounts of debugging noise or contains 746 // sensitive information, you can prevent the content from being printed by 747 // setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag. 748 // 749 // Note that only a small amount of the end of the stream is captured here. 750 // The entire stream is stored in the `/google/logs` directory mounted into 751 // each action, and can be copied off the machine as described elsewhere. 752 string stderr = 3; 753} 754 755// An event generated when the execution of a container results in a 756// non-zero exit status that was not otherwise ignored. Execution will 757// continue, but only actions that are flagged as `ALWAYS_RUN` will be 758// executed. Other actions will be skipped. 759message UnexpectedExitStatusEvent { 760 // The numeric ID of the action that started the container. 761 int32 action_id = 1; 762 763 // The exit status of the container. 764 int32 exit_status = 2; 765} 766 767// An event generated when a container is forcibly terminated by the 768// worker. Currently, this only occurs when the container outlives the 769// timeout specified by the user. 770message ContainerKilledEvent { 771 // The numeric ID of the action that started the container. 772 int32 action_id = 1; 773} 774 775// An event generated when the execution of a pipeline has failed. Note 776// that other events can continue to occur after this event. 777message FailedEvent { 778 // The Google standard error code that best describes this failure. 779 google.rpc.Code code = 1; 780 781 // The human-readable description of the cause of the failure. 782 string cause = 2; 783} 784