workflows.proto 31 KB

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