123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017 |
- // Copyright 2022 Google LLC
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- syntax = "proto3";
- package google.cloud.notebooks.v1;
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/api/resource.proto";
- import "google/cloud/notebooks/v1/diagnostic_config.proto";
- import "google/cloud/notebooks/v1/environment.proto";
- import "google/cloud/notebooks/v1/execution.proto";
- import "google/cloud/notebooks/v1/instance.proto";
- import "google/cloud/notebooks/v1/instance_config.proto";
- import "google/cloud/notebooks/v1/schedule.proto";
- import "google/longrunning/operations.proto";
- import "google/protobuf/timestamp.proto";
- option csharp_namespace = "Google.Cloud.Notebooks.V1";
- option go_package = "google.golang.org/genproto/googleapis/cloud/notebooks/v1;notebooks";
- option java_multiple_files = true;
- option java_outer_classname = "NotebooksProto";
- option java_package = "com.google.cloud.notebooks.v1";
- option php_namespace = "Google\\Cloud\\Notebooks\\V1";
- option ruby_package = "Google::Cloud::Notebooks::V1";
- // API v1 service for Cloud AI Platform Notebooks.
- service NotebookService {
- option (google.api.default_host) = "notebooks.googleapis.com";
- option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
- // Lists instances in a given project and location.
- rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=projects/*/locations/*}/instances"
- };
- option (google.api.method_signature) = "parent";
- }
- // Gets details of a single Instance.
- rpc GetInstance(GetInstanceRequest) returns (Instance) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/locations/*/instances/*}"
- };
- option (google.api.method_signature) = "name";
- }
- // Creates a new Instance in a given project and location.
- rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*}/instances"
- body: "instance"
- };
- option (google.api.method_signature) = "parent,instance,instance_id";
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Registers an existing legacy notebook instance to the Notebooks API server.
- // Legacy instances are instances created with the legacy Compute Engine
- // calls. They are not manageable by the Notebooks API out of the box. This
- // call makes these instances manageable by the Notebooks API.
- rpc RegisterInstance(RegisterInstanceRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*}/instances:register"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Updates the guest accelerators of a single Instance.
- rpc SetInstanceAccelerator(SetInstanceAcceleratorRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- patch: "/v1/{name=projects/*/locations/*/instances/*}:setAccelerator"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Updates the machine type of a single Instance.
- rpc SetInstanceMachineType(SetInstanceMachineTypeRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- patch: "/v1/{name=projects/*/locations/*/instances/*}:setMachineType"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Update Notebook Instance configurations.
- rpc UpdateInstanceConfig(UpdateInstanceConfigRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- patch: "/v1/{name=projects/*/locations/*/instances/*}:updateConfig"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Updates the Shielded instance configuration of a single Instance.
- rpc UpdateShieldedInstanceConfig(UpdateShieldedInstanceConfigRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- patch: "/v1/{name=projects/*/locations/*/instances/*}:updateShieldedInstanceConfig"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Replaces all the labels of an Instance.
- rpc SetInstanceLabels(SetInstanceLabelsRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- patch: "/v1/{name=projects/*/locations/*/instances/*}:setLabels"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Add/update metadata items for an instance.
- rpc UpdateInstanceMetadataItems(UpdateInstanceMetadataItemsRequest) returns (UpdateInstanceMetadataItemsResponse) {
- option (google.api.http) = {
- patch: "/v1/{name=projects/*/locations/*/instances/*}:updateMetadataItems"
- body: "*"
- };
- }
- // Deletes a single Instance.
- rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- delete: "/v1/{name=projects/*/locations/*/instances/*}"
- };
- option (google.api.method_signature) = "name";
- option (google.longrunning.operation_info) = {
- response_type: "google.protobuf.Empty"
- metadata_type: "OperationMetadata"
- };
- }
- // Starts a notebook instance.
- rpc StartInstance(StartInstanceRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/instances/*}:start"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Stops a notebook instance.
- rpc StopInstance(StopInstanceRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/instances/*}:stop"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Resets a notebook instance.
- rpc ResetInstance(ResetInstanceRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/instances/*}:reset"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Allows notebook instances to
- // report their latest instance information to the Notebooks
- // API server. The server will merge the reported information to
- // the instance metadata store. Do not use this method directly.
- rpc ReportInstanceInfo(ReportInstanceInfoRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/instances/*}:report"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Check if a notebook instance is upgradable.
- rpc IsInstanceUpgradeable(IsInstanceUpgradeableRequest) returns (IsInstanceUpgradeableResponse) {
- option (google.api.http) = {
- get: "/v1/{notebook_instance=projects/*/locations/*/instances/*}:isUpgradeable"
- };
- }
- // Check if a notebook instance is healthy.
- rpc GetInstanceHealth(GetInstanceHealthRequest) returns (GetInstanceHealthResponse) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/locations/*/instances/*}:getInstanceHealth"
- };
- option (google.api.method_signature) = "name";
- }
- // Upgrades a notebook instance to the latest version.
- rpc UpgradeInstance(UpgradeInstanceRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/instances/*}:upgrade"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Rollbacks a notebook instance to the previous version.
- rpc RollbackInstance(RollbackInstanceRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/instances/*}:rollback"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Creates a Diagnostic File and runs Diagnostic Tool given an Instance.
- rpc DiagnoseInstance(DiagnoseInstanceRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/instances/*}:diagnose"
- body: "*"
- };
- option (google.api.method_signature) = "name,diagnostic_config";
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Allows notebook instances to
- // call this endpoint to upgrade themselves. Do not use this method directly.
- rpc UpgradeInstanceInternal(UpgradeInstanceInternalRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/instances/*}:upgradeInternal"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Instance"
- metadata_type: "OperationMetadata"
- };
- }
- // Lists environments in a project.
- rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=projects/*/locations/*}/environments"
- };
- option (google.api.method_signature) = "parent";
- }
- // Gets details of a single Environment.
- rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/locations/*/environments/*}"
- };
- option (google.api.method_signature) = "name";
- }
- // Creates a new Environment.
- rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*}/environments"
- body: "environment"
- };
- option (google.api.method_signature) = "parent,environment,environment_id";
- option (google.longrunning.operation_info) = {
- response_type: "Environment"
- metadata_type: "OperationMetadata"
- };
- }
- // Deletes a single Environment.
- rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- delete: "/v1/{name=projects/*/locations/*/environments/*}"
- };
- option (google.api.method_signature) = "name";
- option (google.longrunning.operation_info) = {
- response_type: "google.protobuf.Empty"
- metadata_type: "OperationMetadata"
- };
- }
- // Lists schedules in a given project and location.
- rpc ListSchedules(ListSchedulesRequest) returns (ListSchedulesResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=projects/*/locations/*}/schedules"
- };
- option (google.api.method_signature) = "parent";
- }
- // Gets details of schedule
- rpc GetSchedule(GetScheduleRequest) returns (Schedule) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/locations/*/schedules/*}"
- };
- option (google.api.method_signature) = "name";
- }
- // Deletes schedule and all underlying jobs
- rpc DeleteSchedule(DeleteScheduleRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- delete: "/v1/{name=projects/*/locations/*/schedules/*}"
- };
- option (google.api.method_signature) = "name";
- option (google.longrunning.operation_info) = {
- response_type: "google.protobuf.Empty"
- metadata_type: "OperationMetadata"
- };
- }
- // Creates a new Scheduled Notebook in a given project and location.
- rpc CreateSchedule(CreateScheduleRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*}/schedules"
- body: "schedule"
- };
- option (google.api.method_signature) = "parent,schedule,schedule_id";
- option (google.longrunning.operation_info) = {
- response_type: "Schedule"
- metadata_type: "OperationMetadata"
- };
- }
- // Triggers execution of an existing schedule.
- rpc TriggerSchedule(TriggerScheduleRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/schedules/*}:trigger"
- body: "*"
- };
- option (google.longrunning.operation_info) = {
- response_type: "Schedule"
- metadata_type: "OperationMetadata"
- };
- }
- // Lists executions in a given project and location
- rpc ListExecutions(ListExecutionsRequest) returns (ListExecutionsResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=projects/*/locations/*}/executions"
- };
- option (google.api.method_signature) = "parent";
- }
- // Gets details of executions
- rpc GetExecution(GetExecutionRequest) returns (Execution) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/locations/*/executions/*}"
- };
- option (google.api.method_signature) = "name";
- }
- // Deletes execution
- rpc DeleteExecution(DeleteExecutionRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- delete: "/v1/{name=projects/*/locations/*/executions/*}"
- };
- option (google.api.method_signature) = "name";
- option (google.longrunning.operation_info) = {
- response_type: "google.protobuf.Empty"
- metadata_type: "OperationMetadata"
- };
- }
- // Creates a new Execution in a given project and location.
- rpc CreateExecution(CreateExecutionRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*}/executions"
- body: "execution"
- };
- option (google.api.method_signature) = "parent,execution,execution_id";
- option (google.longrunning.operation_info) = {
- response_type: "Execution"
- metadata_type: "OperationMetadata"
- };
- }
- }
- // Represents the metadata of the long-running operation.
- message OperationMetadata {
- // The time the operation was created.
- google.protobuf.Timestamp create_time = 1;
- // The time the operation finished running.
- google.protobuf.Timestamp end_time = 2;
- // Server-defined resource path for the target of the operation.
- string target = 3;
- // Name of the verb executed by the operation.
- string verb = 4;
- // Human-readable status of the operation, if any.
- string status_message = 5;
- // Identifies whether the user has requested cancellation
- // of the operation. Operations that have successfully been cancelled
- // have [Operation.error][] value with a
- // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`.
- bool requested_cancellation = 6;
- // API version used to start the operation.
- string api_version = 7;
- // API endpoint name of this operation.
- string endpoint = 8;
- }
- // Request for listing notebook instances.
- message ListInstancesRequest {
- // Required. Format:
- // `parent=projects/{project_id}/locations/{location}`
- string parent = 1 [(google.api.field_behavior) = REQUIRED];
- // Maximum return size of the list call.
- int32 page_size = 2;
- // A previous returned page token that can be used to continue listing
- // from the last result.
- string page_token = 3;
- }
- // Response for listing notebook instances.
- message ListInstancesResponse {
- // A list of returned instances.
- repeated Instance instances = 1;
- // Page token that can be used to continue listing from the last result in the
- // next list call.
- string next_page_token = 2;
- // Locations that could not be reached. For example,
- // ['us-west1-a', 'us-central1-b'].
- // A ListInstancesResponse will only contain either instances or unreachables,
- repeated string unreachable = 3;
- }
- // Request for getting a notebook instance.
- message GetInstanceRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for creating a notebook instance.
- message CreateInstanceRequest {
- // Required. Format:
- // `parent=projects/{project_id}/locations/{location}`
- string parent = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. User-defined unique ID of this instance.
- string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
- // Required. The instance to be created.
- Instance instance = 3 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for registering a notebook instance.
- message RegisterInstanceRequest {
- // Required. Format:
- // `parent=projects/{project_id}/locations/{location}`
- string parent = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. User defined unique ID of this instance. The `instance_id` must
- // be 1 to 63 characters long and contain only lowercase letters,
- // numeric characters, and dashes. The first character must be a lowercase
- // letter and the last character cannot be a dash.
- string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for setting instance accelerator.
- message SetInstanceAcceleratorRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. Type of this accelerator.
- Instance.AcceleratorType type = 2 [(google.api.field_behavior) = REQUIRED];
- // Required. Count of cores of this accelerator. Note that not all combinations
- // of `type` and `core_count` are valid. Check [GPUs on
- // Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to
- // find a valid combination. TPUs are not supported.
- int64 core_count = 3 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for setting instance machine type.
- message SetInstanceMachineTypeRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. The [Compute Engine machine
- // type](https://cloud.google.com/compute/docs/machine-types).
- string machine_type = 2 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for updating instance configurations.
- message UpdateInstanceConfigRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- // The instance configurations to be updated.
- InstanceConfig config = 2;
- }
- // Request for setting instance labels.
- message SetInstanceLabelsRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- // Labels to apply to this instance.
- // These can be later modified by the setLabels method
- map<string, string> labels = 2;
- }
- // Request for adding/changing metadata items for an instance.
- message UpdateInstanceMetadataItemsRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- // Metadata items to add/update for the instance.
- map<string, string> items = 2;
- }
- // Response for adding/changing metadata items for an instance.
- message UpdateInstanceMetadataItemsResponse {
- // Map of items that were added/updated to/in the metadata.
- map<string, string> items = 1;
- }
- // Request for updating the Shielded Instance config for a notebook instance.
- // You can only use this method on a stopped instance
- message UpdateShieldedInstanceConfigRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- // ShieldedInstance configuration to be updated.
- Instance.ShieldedInstanceConfig shielded_instance_config = 2;
- }
- // Request for deleting a notebook instance.
- message DeleteInstanceRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for starting a notebook instance
- message StartInstanceRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for stopping a notebook instance
- message StopInstanceRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for resetting a notebook instance
- message ResetInstanceRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for notebook instances to report information to Notebooks API.
- message ReportInstanceInfoRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. The VM hardware token for authenticating the VM.
- // https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- string vm_id = 2 [(google.api.field_behavior) = REQUIRED];
- // The metadata reported to Notebooks API. This will be merged to the instance
- // metadata store
- map<string, string> metadata = 3;
- }
- // Request for checking if a notebook instance is upgradeable.
- message IsInstanceUpgradeableRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string notebook_instance = 1 [(google.api.field_behavior) = REQUIRED];
- // Optional. The optional UpgradeType. Setting this field will search for additional
- // compute images to upgrade this instance.
- UpgradeType type = 2 [(google.api.field_behavior) = OPTIONAL];
- }
- // Response for checking if a notebook instance is upgradeable.
- message IsInstanceUpgradeableResponse {
- // If an instance is upgradeable.
- bool upgradeable = 1;
- // The version this instance will be upgraded to if calling the upgrade
- // endpoint. This field will only be populated if field upgradeable is true.
- string upgrade_version = 2;
- // Additional information about upgrade.
- string upgrade_info = 3;
- // The new image self link this instance will be upgraded to if calling the
- // upgrade endpoint. This field will only be populated if field upgradeable
- // is true.
- string upgrade_image = 4;
- }
- // Request for checking if a notebook instance is healthy.
- message GetInstanceHealthRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Instance"
- }
- ];
- }
- // Response for checking if a notebook instance is healthy.
- message GetInstanceHealthResponse {
- // If an instance is healthy or not.
- enum HealthState {
- // The instance substate is unknown.
- HEALTH_STATE_UNSPECIFIED = 0;
- // The instance is known to be in an healthy state
- // (for example, critical daemons are running)
- // Applies to ACTIVE state.
- HEALTHY = 1;
- // The instance is known to be in an unhealthy state
- // (for example, critical daemons are not running)
- // Applies to ACTIVE state.
- UNHEALTHY = 2;
- // The instance has not installed health monitoring agent.
- // Applies to ACTIVE state.
- AGENT_NOT_INSTALLED = 3;
- // The instance health monitoring agent is not running.
- // Applies to ACTIVE state.
- AGENT_NOT_RUNNING = 4;
- }
- // Output only. Runtime health_state.
- HealthState health_state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
- // Output only. Additional information about instance health.
- // Example:
- // healthInfo": {
- // "docker_proxy_agent_status": "1",
- // "docker_status": "1",
- // "jupyterlab_api_status": "-1",
- // "jupyterlab_status": "-1",
- // "updated": "2020-10-18 09:40:03.573409"
- // }
- map<string, string> health_info = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
- }
- // Request for upgrading a notebook instance
- message UpgradeInstanceRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- // Optional. The optional UpgradeType. Setting this field will search for additional
- // compute images to upgrade this instance.
- UpgradeType type = 2 [(google.api.field_behavior) = OPTIONAL];
- }
- // Request for rollbacking a notebook instance
- message RollbackInstanceRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. The snapshot for rollback.
- // Example: "projects/test-project/global/snapshots/krwlzipynril".
- string target_snapshot = 2 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for upgrading a notebook instance from within the VM
- message UpgradeInstanceInternalRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. The VM hardware token for authenticating the VM.
- // https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- string vm_id = 2 [(google.api.field_behavior) = REQUIRED];
- // Optional. The optional UpgradeType. Setting this field will search for additional
- // compute images to upgrade this instance.
- UpgradeType type = 3 [(google.api.field_behavior) = OPTIONAL];
- }
- // Request for listing environments.
- message ListEnvironmentsRequest {
- // Required. Format: `projects/{project_id}/locations/{location}`
- string parent = 1 [(google.api.field_behavior) = REQUIRED];
- // Maximum return size of the list call.
- int32 page_size = 2;
- // A previous returned page token that can be used to continue listing from
- // the last result.
- string page_token = 3;
- }
- // Request for creating a notebook instance diagnostic file.
- message DiagnoseInstanceRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/instances/{instance_id}`
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Instance"
- }
- ];
- // Required. Defines flags that are used to run the diagnostic tool
- DiagnosticConfig diagnostic_config = 2 [(google.api.field_behavior) = REQUIRED];
- }
- // Response for listing environments.
- message ListEnvironmentsResponse {
- // A list of returned environments.
- repeated Environment environments = 1;
- // A page token that can be used to continue listing from the last result
- // in the next list call.
- string next_page_token = 2;
- // Locations that could not be reached.
- repeated string unreachable = 3;
- }
- // Request for getting a notebook environment.
- message GetEnvironmentRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/environments/{environment_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for creating a notebook environment.
- message CreateEnvironmentRequest {
- // Required. Format: `projects/{project_id}/locations/{location}`
- string parent = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. User-defined unique ID of this environment. The `environment_id` must
- // be 1 to 63 characters long and contain only lowercase letters,
- // numeric characters, and dashes. The first character must be a lowercase
- // letter and the last character cannot be a dash.
- string environment_id = 2 [(google.api.field_behavior) = REQUIRED];
- // Required. The environment to be created.
- Environment environment = 3 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for deleting a notebook environment.
- message DeleteEnvironmentRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/environments/{environment_id}`
- string name = 1 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for listing scheduled notebook job.
- message ListSchedulesRequest {
- // Required. Format:
- // `parent=projects/{project_id}/locations/{location}`
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Schedule"
- }
- ];
- // Maximum return size of the list call.
- int32 page_size = 2;
- // A previous returned page token that can be used to continue listing
- // from the last result.
- string page_token = 3;
- // Filter applied to resulting schedules.
- string filter = 4;
- // Field to order results by.
- string order_by = 5;
- }
- // Response for listing scheduled notebook job.
- message ListSchedulesResponse {
- // A list of returned instances.
- repeated Schedule schedules = 1;
- // Page token that can be used to continue listing from the last result in the
- // next list call.
- string next_page_token = 2;
- // Schedules that could not be reached. For example:
- //
- // ['projects/{project_id}/location/{location}/schedules/monthly_digest',
- // 'projects/{project_id}/location/{location}/schedules/weekly_sentiment']
- repeated string unreachable = 3;
- }
- // Request for getting scheduled notebook.
- message GetScheduleRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Schedule"
- }
- ];
- }
- // Request for deleting an Schedule
- message DeleteScheduleRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Schedule"
- }
- ];
- }
- // Request for created scheduled notebooks
- message CreateScheduleRequest {
- // Required. Format:
- // `parent=projects/{project_id}/locations/{location}`
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Schedule"
- }
- ];
- // Required. User-defined unique ID of this schedule.
- string schedule_id = 2 [(google.api.field_behavior) = REQUIRED];
- // Required. The schedule to be created.
- Schedule schedule = 3 [(google.api.field_behavior) = REQUIRED];
- }
- // Request for created scheduled notebooks
- message TriggerScheduleRequest {
- // Required. Format:
- // `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Schedule"
- }
- ];
- }
- // Request for listing scheduled notebook executions.
- message ListExecutionsRequest {
- // Required. Format:
- // `parent=projects/{project_id}/locations/{location}`
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Execution"
- }
- ];
- // Maximum return size of the list call.
- int32 page_size = 2;
- // A previous returned page token that can be used to continue listing
- // from the last result.
- string page_token = 3;
- // Filter applied to resulting executions. Currently only supports filtering
- // executions by a specified schedule_id.
- // Format: `schedule_id=<Schedule_ID>`
- string filter = 4;
- // Sort by field.
- string order_by = 5;
- }
- // Response for listing scheduled notebook executions
- message ListExecutionsResponse {
- // A list of returned instances.
- repeated Execution executions = 1;
- // Page token that can be used to continue listing from the last result in the
- // next list call.
- string next_page_token = 2;
- // Executions IDs that could not be reached. For example:
- //
- // ['projects/{project_id}/location/{location}/executions/imagenet_test1',
- // 'projects/{project_id}/location/{location}/executions/classifier_train1']
- repeated string unreachable = 3;
- }
- // Request for getting scheduled notebook execution
- message GetExecutionRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/executions/{execution_id}`
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Execution"
- }
- ];
- }
- // Request for deleting a scheduled notebook execution
- message DeleteExecutionRequest {
- // Required. Format:
- // `projects/{project_id}/locations/{location}/executions/{execution_id}`
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Execution"
- }
- ];
- }
- // Request to create notebook execution
- message CreateExecutionRequest {
- // Required. Format:
- // `parent=projects/{project_id}/locations/{location}`
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "notebooks.googleapis.com/Execution"
- }
- ];
- // Required. User-defined unique ID of this execution.
- string execution_id = 2 [(google.api.field_behavior) = REQUIRED];
- // Required. The execution to be created.
- Execution execution = 3 [(google.api.field_behavior) = REQUIRED];
- }
- // Definition of the types of upgrade that can be used on this
- // instance.
- enum UpgradeType {
- // Upgrade type is not specified.
- UPGRADE_TYPE_UNSPECIFIED = 0;
- // Upgrade ML framework.
- UPGRADE_FRAMEWORK = 1;
- // Upgrade Operating System.
- UPGRADE_OS = 2;
- // Upgrade CUDA.
- UPGRADE_CUDA = 3;
- // Upgrade All (OS, Framework and CUDA).
- UPGRADE_ALL = 4;
- }
|