environment.proto 3.5 KB

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