environment.proto 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. // Copyright 2022 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.notebooks.v1beta1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/timestamp.proto";
  19. option csharp_namespace = "Google.Cloud.Notebooks.V1Beta1";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1beta1;notebooks";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "EnvironmentProto";
  23. option java_package = "com.google.cloud.notebooks.v1beta1";
  24. option php_namespace = "Google\\Cloud\\Notebooks\\V1beta1";
  25. option ruby_package = "Google::Cloud::Notebooks::V1beta1";
  26. // Definition of a software environment that is used to start a notebook
  27. // instance.
  28. message Environment {
  29. option (google.api.resource) = {
  30. type: "notebooks.googleapis.com/Environment"
  31. pattern: "projects/{project}/environments/{environment}"
  32. };
  33. // Output only. Name of this environment.
  34. // Format:
  35. // `projects/{project_id}/locations/{location}/environments/{environment_id}`
  36. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  37. // Display name of this environment for the UI.
  38. string display_name = 2;
  39. // A brief description of this environment.
  40. string description = 3;
  41. // Type of the environment; can be one of VM image, or container image.
  42. oneof image_type {
  43. // Use a Compute Engine VM image to start the notebook instance.
  44. VmImage vm_image = 6;
  45. // Use a container image to start the notebook instance.
  46. ContainerImage container_image = 7;
  47. }
  48. // Path to a Bash script that automatically runs after a notebook instance
  49. // fully boots up. The path must be a URL or
  50. // Cloud Storage path. Example: `"gs://path-to-file/file-name"`
  51. string post_startup_script = 8;
  52. // Output only. The time at which this environment was created.
  53. google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  54. }
  55. // Definition of a custom Compute Engine virtual machine image for starting a
  56. // notebook instance with the environment installed directly on the VM.
  57. message VmImage {
  58. // Required. The name of the Google Cloud project that this VM image belongs to.
  59. // Format: `projects/{project_id}`
  60. string project = 1 [(google.api.field_behavior) = REQUIRED];
  61. // The reference to an external Compute Engine VM image.
  62. oneof image {
  63. // Use VM image name to find the image.
  64. string image_name = 2;
  65. // Use this VM image family to find the image; the newest image in this
  66. // family will be used.
  67. string image_family = 3;
  68. }
  69. }
  70. // Definition of a container image for starting a notebook instance with the
  71. // environment installed in a container.
  72. message ContainerImage {
  73. // Required. The path to the container image repository. For example:
  74. // `gcr.io/{project_id}/{image_name}`
  75. string repository = 1 [(google.api.field_behavior) = REQUIRED];
  76. // The tag of the container image. If not specified, this defaults
  77. // to the latest tag.
  78. string tag = 2;
  79. }