google-cloud-notebooks-v1 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8de404f937f789e0fe2e995a229e25e5114671f775b07c3015435f15bad8795
4
- data.tar.gz: 7106cd412cbc0b9208779ae23264dbb8150f86540084115881a9911bb24d0f0b
3
+ metadata.gz: dfb7e9fe3f92429865996b9090eca60384198ed59239f889e9785ce3ad02357e
4
+ data.tar.gz: '0580cd2d1ad9227594382ceb46d45bc84221ea4014f1ff0a02161f7856c08ee5'
5
5
  SHA512:
6
- metadata.gz: beca94e10cb1a77f024d8bf32e08caf512823248a4f4c760d5e6642969ce3007c79ae7218922c864a78f49b0bff8b9e68a4362d47bb08f0ffd9b2847a4d394b3
7
- data.tar.gz: 251d0776d3b129aa63f7929333400cdf00e0587d2fe9a5af1e5358e1f79df7b990690f3a73f03582b085aa7c7d28e3785c1dfa6d8c2d7eeebb8a615993b244b9
6
+ metadata.gz: c61ccb70673c636572e6a81d3e63f8e42112aed68e9d4187966aa0d61fc7d6a5b4815cf2996353b49041187d63a5fc3eec675b98598db372a315682fad02eb70
7
+ data.tar.gz: be553bea4770d12dd2d344746556fe51c94af023ee450de15f059b1dbbbe56c6e7bbf56cfcdef56ada197ba2ea0787fbdd7906d96a5a69083d6ea22f90b83d2b
@@ -1,6 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/notebooks/v1/event.proto
3
3
 
4
+ require 'google/api/field_behavior_pb'
4
5
  require 'google/protobuf/timestamp_pb'
5
6
  require 'google/protobuf'
6
7
 
@@ -9,10 +10,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
9
10
  add_message "google.cloud.notebooks.v1.Event" do
10
11
  optional :report_time, :message, 1, "google.protobuf.Timestamp"
11
12
  optional :type, :enum, 2, "google.cloud.notebooks.v1.Event.EventType"
13
+ map :details, :string, :string, 3
12
14
  end
13
15
  add_enum "google.cloud.notebooks.v1.Event.EventType" do
14
16
  value :EVENT_TYPE_UNSPECIFIED, 0
15
17
  value :IDLE, 1
18
+ value :HEARTBEAT, 2
19
+ value :HEALTH, 3
20
+ value :MAINTENANCE, 4
16
21
  end
17
22
  end
18
23
  end
@@ -20,8 +20,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
20
20
  optional :parameters, :string, 9
21
21
  optional :service_account, :string, 10
22
22
  optional :job_type, :enum, 11, "google.cloud.notebooks.v1.ExecutionTemplate.JobType"
23
+ optional :kernel_spec, :string, 14
24
+ optional :tensorboard, :string, 15
23
25
  oneof :job_parameters do
24
26
  optional :dataproc_parameters, :message, 12, "google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters"
27
+ optional :vertex_ai_parameters, :message, 13, "google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters"
25
28
  end
26
29
  end
27
30
  add_message "google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig" do
@@ -31,6 +34,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
31
34
  add_message "google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters" do
32
35
  optional :cluster, :string, 1
33
36
  end
37
+ add_message "google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters" do
38
+ optional :network, :string, 1
39
+ map :env, :string, :string, 2
40
+ end
34
41
  add_enum "google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier" do
35
42
  value :SCALE_TIER_UNSPECIFIED, 0
36
43
  value :BASIC, 1
@@ -47,6 +54,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
47
54
  value :NVIDIA_TESLA_V100, 3
48
55
  value :NVIDIA_TESLA_P4, 4
49
56
  value :NVIDIA_TESLA_T4, 5
57
+ value :NVIDIA_TESLA_A100, 10
50
58
  value :TPU_V2, 6
51
59
  value :TPU_V3, 7
52
60
  end
@@ -88,6 +96,7 @@ module Google
88
96
  ExecutionTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate").msgclass
89
97
  ExecutionTemplate::SchedulerAcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig").msgclass
90
98
  ExecutionTemplate::DataprocParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters").msgclass
99
+ ExecutionTemplate::VertexAIParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters").msgclass
91
100
  ExecutionTemplate::ScaleTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier").enummodule
92
101
  ExecutionTemplate::SchedulerAcceleratorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType").enummodule
93
102
  ExecutionTemplate::JobType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.JobType").enummodule
@@ -51,6 +51,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
51
51
  repeated :upgrade_history, :message, 29, "google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry"
52
52
  optional :nic_type, :enum, 33, "google.cloud.notebooks.v1.Instance.NicType"
53
53
  optional :reservation_affinity, :message, 34, "google.cloud.notebooks.v1.ReservationAffinity"
54
+ optional :creator, :string, 36
55
+ optional :can_ip_forward, :bool, 39
54
56
  optional :create_time, :message, 23, "google.protobuf.Timestamp"
55
57
  optional :update_time, :message, 24, "google.protobuf.Timestamp"
56
58
  oneof :environment do
@@ -132,12 +134,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
132
134
  value :UPGRADING, 7
133
135
  value :INITIALIZING, 8
134
136
  value :REGISTERING, 9
137
+ value :SUSPENDING, 10
138
+ value :SUSPENDED, 11
135
139
  end
136
140
  add_enum "google.cloud.notebooks.v1.Instance.DiskType" do
137
141
  value :DISK_TYPE_UNSPECIFIED, 0
138
142
  value :PD_STANDARD, 1
139
143
  value :PD_SSD, 2
140
144
  value :PD_BALANCED, 3
145
+ value :PD_EXTREME, 4
141
146
  end
142
147
  add_enum "google.cloud.notebooks.v1.Instance.DiskEncryption" do
143
148
  value :DISK_ENCRYPTION_UNSPECIFIED, 0
@@ -376,7 +376,7 @@ module Google
376
376
  # @param options [::Gapic::CallOptions, ::Hash]
377
377
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
378
378
  #
379
- # @overload create_runtime(parent: nil, runtime_id: nil, runtime: nil)
379
+ # @overload create_runtime(parent: nil, runtime_id: nil, runtime: nil, request_id: nil)
380
380
  # Pass arguments to `create_runtime` via keyword arguments. Note that at
381
381
  # least one keyword argument is required. To specify no parameters, or to keep all
382
382
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -388,6 +388,8 @@ module Google
388
388
  # Required. User-defined unique ID of this Runtime.
389
389
  # @param runtime [::Google::Cloud::Notebooks::V1::Runtime, ::Hash]
390
390
  # Required. The Runtime to be created.
391
+ # @param request_id [::String]
392
+ # Idempotent request UUID.
391
393
  #
392
394
  # @yield [response, operation] Access the result along with the RPC operation
393
395
  # @yieldparam response [::Gapic::Operation]
@@ -474,7 +476,7 @@ module Google
474
476
  # @param options [::Gapic::CallOptions, ::Hash]
475
477
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
476
478
  #
477
- # @overload delete_runtime(name: nil)
479
+ # @overload delete_runtime(name: nil, request_id: nil)
478
480
  # Pass arguments to `delete_runtime` via keyword arguments. Note that at
479
481
  # least one keyword argument is required. To specify no parameters, or to keep all
480
482
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -482,6 +484,8 @@ module Google
482
484
  # @param name [::String]
483
485
  # Required. Format:
484
486
  # `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
487
+ # @param request_id [::String]
488
+ # Idempotent request UUID.
485
489
  #
486
490
  # @yield [response, operation] Access the result along with the RPC operation
487
491
  # @yieldparam response [::Gapic::Operation]
@@ -572,7 +576,7 @@ module Google
572
576
  # @param options [::Gapic::CallOptions, ::Hash]
573
577
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
574
578
  #
575
- # @overload start_runtime(name: nil)
579
+ # @overload start_runtime(name: nil, request_id: nil)
576
580
  # Pass arguments to `start_runtime` via keyword arguments. Note that at
577
581
  # least one keyword argument is required. To specify no parameters, or to keep all
578
582
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -580,6 +584,8 @@ module Google
580
584
  # @param name [::String]
581
585
  # Required. Format:
582
586
  # `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
587
+ # @param request_id [::String]
588
+ # Idempotent request UUID.
583
589
  #
584
590
  # @yield [response, operation] Access the result along with the RPC operation
585
591
  # @yieldparam response [::Gapic::Operation]
@@ -670,7 +676,7 @@ module Google
670
676
  # @param options [::Gapic::CallOptions, ::Hash]
671
677
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
672
678
  #
673
- # @overload stop_runtime(name: nil)
679
+ # @overload stop_runtime(name: nil, request_id: nil)
674
680
  # Pass arguments to `stop_runtime` via keyword arguments. Note that at
675
681
  # least one keyword argument is required. To specify no parameters, or to keep all
676
682
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -678,6 +684,8 @@ module Google
678
684
  # @param name [::String]
679
685
  # Required. Format:
680
686
  # `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
687
+ # @param request_id [::String]
688
+ # Idempotent request UUID.
681
689
  #
682
690
  # @yield [response, operation] Access the result along with the RPC operation
683
691
  # @yieldparam response [::Gapic::Operation]
@@ -764,7 +772,7 @@ module Google
764
772
  # @param options [::Gapic::CallOptions, ::Hash]
765
773
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
766
774
  #
767
- # @overload switch_runtime(name: nil, machine_type: nil, accelerator_config: nil)
775
+ # @overload switch_runtime(name: nil, machine_type: nil, accelerator_config: nil, request_id: nil)
768
776
  # Pass arguments to `switch_runtime` via keyword arguments. Note that at
769
777
  # least one keyword argument is required. To specify no parameters, or to keep all
770
778
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -776,6 +784,8 @@ module Google
776
784
  # machine type.
777
785
  # @param accelerator_config [::Google::Cloud::Notebooks::V1::RuntimeAcceleratorConfig, ::Hash]
778
786
  # accelerator config.
787
+ # @param request_id [::String]
788
+ # Idempotent request UUID.
779
789
  #
780
790
  # @yield [response, operation] Access the result along with the RPC operation
781
791
  # @yieldparam response [::Gapic::Operation]
@@ -862,7 +872,7 @@ module Google
862
872
  # @param options [::Gapic::CallOptions, ::Hash]
863
873
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
864
874
  #
865
- # @overload reset_runtime(name: nil)
875
+ # @overload reset_runtime(name: nil, request_id: nil)
866
876
  # Pass arguments to `reset_runtime` via keyword arguments. Note that at
867
877
  # least one keyword argument is required. To specify no parameters, or to keep all
868
878
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -870,6 +880,8 @@ module Google
870
880
  # @param name [::String]
871
881
  # Required. Format:
872
882
  # `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
883
+ # @param request_id [::String]
884
+ # Idempotent request UUID.
873
885
  #
874
886
  # @yield [response, operation] Access the result along with the RPC operation
875
887
  # @yieldparam response [::Gapic::Operation]
@@ -1042,6 +1054,96 @@ module Google
1042
1054
  raise ::Google::Cloud::Error.from_error(e)
1043
1055
  end
1044
1056
 
1057
+ ##
1058
+ # Gets an access token for the consumer service account that the customer
1059
+ # attached to the runtime. Only accessible from the tenant instance.
1060
+ #
1061
+ # @overload refresh_runtime_token_internal(request, options = nil)
1062
+ # Pass arguments to `refresh_runtime_token_internal` via a request object, either of type
1063
+ # {::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalRequest} or an equivalent Hash.
1064
+ #
1065
+ # @param request [::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalRequest, ::Hash]
1066
+ # A request object representing the call parameters. Required. To specify no
1067
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1068
+ # @param options [::Gapic::CallOptions, ::Hash]
1069
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1070
+ #
1071
+ # @overload refresh_runtime_token_internal(name: nil, vm_id: nil)
1072
+ # Pass arguments to `refresh_runtime_token_internal` via keyword arguments. Note that at
1073
+ # least one keyword argument is required. To specify no parameters, or to keep all
1074
+ # the default parameter values, pass an empty Hash as a request object (see above).
1075
+ #
1076
+ # @param name [::String]
1077
+ # Required. Format:
1078
+ # `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
1079
+ # @param vm_id [::String]
1080
+ # Required. The VM hardware token for authenticating the VM.
1081
+ # https://cloud.google.com/compute/docs/instances/verifying-instance-identity
1082
+ #
1083
+ # @yield [response, operation] Access the result along with the RPC operation
1084
+ # @yieldparam response [::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse]
1085
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1086
+ #
1087
+ # @return [::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse]
1088
+ #
1089
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1090
+ #
1091
+ # @example Basic example
1092
+ # require "google/cloud/notebooks/v1"
1093
+ #
1094
+ # # Create a client object. The client can be reused for multiple calls.
1095
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Client.new
1096
+ #
1097
+ # # Create a request. To set request fields, pass in keyword arguments.
1098
+ # request = Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalRequest.new
1099
+ #
1100
+ # # Call the refresh_runtime_token_internal method.
1101
+ # result = client.refresh_runtime_token_internal request
1102
+ #
1103
+ # # The returned object is of type Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse.
1104
+ # p result
1105
+ #
1106
+ def refresh_runtime_token_internal request, options = nil
1107
+ raise ::ArgumentError, "request must be provided" if request.nil?
1108
+
1109
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalRequest
1110
+
1111
+ # Converts hash and nil to an options object
1112
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1113
+
1114
+ # Customize the options with defaults
1115
+ metadata = @config.rpcs.refresh_runtime_token_internal.metadata.to_h
1116
+
1117
+ # Set x-goog-api-client and x-goog-user-project headers
1118
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1119
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1120
+ gapic_version: ::Google::Cloud::Notebooks::V1::VERSION
1121
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1122
+
1123
+ header_params = {}
1124
+ if request.name
1125
+ header_params["name"] = request.name
1126
+ end
1127
+
1128
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1129
+ metadata[:"x-goog-request-params"] ||= request_params_header
1130
+
1131
+ options.apply_defaults timeout: @config.rpcs.refresh_runtime_token_internal.timeout,
1132
+ metadata: metadata,
1133
+ retry_policy: @config.rpcs.refresh_runtime_token_internal.retry_policy
1134
+
1135
+ options.apply_defaults timeout: @config.timeout,
1136
+ metadata: @config.metadata,
1137
+ retry_policy: @config.retry_policy
1138
+
1139
+ @managed_notebook_service_stub.call_rpc :refresh_runtime_token_internal, request, options: options do |response, operation|
1140
+ yield response, operation if block_given?
1141
+ return response
1142
+ end
1143
+ rescue ::GRPC::BadStatus => e
1144
+ raise ::Google::Cloud::Error.from_error(e)
1145
+ end
1146
+
1045
1147
  ##
1046
1148
  # Configuration class for the ManagedNotebookService API.
1047
1149
  #
@@ -1222,6 +1324,11 @@ module Google
1222
1324
  # @return [::Gapic::Config::Method]
1223
1325
  #
1224
1326
  attr_reader :report_runtime_event
1327
+ ##
1328
+ # RPC-specific configuration for `refresh_runtime_token_internal`
1329
+ # @return [::Gapic::Config::Method]
1330
+ #
1331
+ attr_reader :refresh_runtime_token_internal
1225
1332
 
1226
1333
  # @private
1227
1334
  def initialize parent_rpcs = nil
@@ -1243,6 +1350,8 @@ module Google
1243
1350
  @reset_runtime = ::Gapic::Config::Method.new reset_runtime_config
1244
1351
  report_runtime_event_config = parent_rpcs.report_runtime_event if parent_rpcs.respond_to? :report_runtime_event
1245
1352
  @report_runtime_event = ::Gapic::Config::Method.new report_runtime_event_config
1353
+ refresh_runtime_token_internal_config = parent_rpcs.refresh_runtime_token_internal if parent_rpcs.respond_to? :refresh_runtime_token_internal
1354
+ @refresh_runtime_token_internal = ::Gapic::Config::Method.new refresh_runtime_token_internal_config
1246
1355
 
1247
1356
  yield self if block_given?
1248
1357
  end
@@ -8,6 +8,7 @@ require 'google/api/resource_pb'
8
8
  require 'google/cloud/notebooks/v1/event_pb'
9
9
  require 'google/cloud/notebooks/v1/runtime_pb'
10
10
  require 'google/longrunning/operations_pb'
11
+ require 'google/protobuf/timestamp_pb'
11
12
  require 'google/protobuf'
12
13
 
13
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -29,29 +30,43 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
30
  optional :parent, :string, 1
30
31
  optional :runtime_id, :string, 2
31
32
  optional :runtime, :message, 3, "google.cloud.notebooks.v1.Runtime"
33
+ optional :request_id, :string, 4
32
34
  end
33
35
  add_message "google.cloud.notebooks.v1.DeleteRuntimeRequest" do
34
36
  optional :name, :string, 1
37
+ optional :request_id, :string, 2
35
38
  end
36
39
  add_message "google.cloud.notebooks.v1.StartRuntimeRequest" do
37
40
  optional :name, :string, 1
41
+ optional :request_id, :string, 2
38
42
  end
39
43
  add_message "google.cloud.notebooks.v1.StopRuntimeRequest" do
40
44
  optional :name, :string, 1
45
+ optional :request_id, :string, 2
41
46
  end
42
47
  add_message "google.cloud.notebooks.v1.SwitchRuntimeRequest" do
43
48
  optional :name, :string, 1
44
49
  optional :machine_type, :string, 2
45
50
  optional :accelerator_config, :message, 3, "google.cloud.notebooks.v1.RuntimeAcceleratorConfig"
51
+ optional :request_id, :string, 4
46
52
  end
47
53
  add_message "google.cloud.notebooks.v1.ResetRuntimeRequest" do
48
54
  optional :name, :string, 1
55
+ optional :request_id, :string, 2
49
56
  end
50
57
  add_message "google.cloud.notebooks.v1.ReportRuntimeEventRequest" do
51
58
  optional :name, :string, 1
52
59
  optional :vm_id, :string, 2
53
60
  optional :event, :message, 3, "google.cloud.notebooks.v1.Event"
54
61
  end
62
+ add_message "google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest" do
63
+ optional :name, :string, 1
64
+ optional :vm_id, :string, 2
65
+ end
66
+ add_message "google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse" do
67
+ optional :access_token, :string, 1
68
+ optional :expire_time, :message, 2, "google.protobuf.Timestamp"
69
+ end
55
70
  end
56
71
  end
57
72
 
@@ -69,6 +84,8 @@ module Google
69
84
  SwitchRuntimeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.SwitchRuntimeRequest").msgclass
70
85
  ResetRuntimeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ResetRuntimeRequest").msgclass
71
86
  ReportRuntimeEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ReportRuntimeEventRequest").msgclass
87
+ RefreshRuntimeTokenInternalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest").msgclass
88
+ RefreshRuntimeTokenInternalResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse").msgclass
72
89
  end
73
90
  end
74
91
  end
@@ -60,6 +60,9 @@ module Google
60
60
  rpc :ResetRuntime, ::Google::Cloud::Notebooks::V1::ResetRuntimeRequest, ::Google::Longrunning::Operation
61
61
  # Report and process a runtime event.
62
62
  rpc :ReportRuntimeEvent, ::Google::Cloud::Notebooks::V1::ReportRuntimeEventRequest, ::Google::Longrunning::Operation
63
+ # Gets an access token for the consumer service account that the customer
64
+ # attached to the runtime. Only accessible from the tenant instance.
65
+ rpc :RefreshRuntimeTokenInternal, ::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalRequest, ::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse
63
66
  end
64
67
 
65
68
  Stub = Service.rpc_stub_class
@@ -1095,6 +1095,94 @@ module Google
1095
1095
  raise ::Google::Cloud::Error.from_error(e)
1096
1096
  end
1097
1097
 
1098
+ ##
1099
+ # Add/update metadata items for an instance.
1100
+ #
1101
+ # @overload update_instance_metadata_items(request, options = nil)
1102
+ # Pass arguments to `update_instance_metadata_items` via a request object, either of type
1103
+ # {::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsRequest} or an equivalent Hash.
1104
+ #
1105
+ # @param request [::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsRequest, ::Hash]
1106
+ # A request object representing the call parameters. Required. To specify no
1107
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1108
+ # @param options [::Gapic::CallOptions, ::Hash]
1109
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1110
+ #
1111
+ # @overload update_instance_metadata_items(name: nil, items: nil)
1112
+ # Pass arguments to `update_instance_metadata_items` via keyword arguments. Note that at
1113
+ # least one keyword argument is required. To specify no parameters, or to keep all
1114
+ # the default parameter values, pass an empty Hash as a request object (see above).
1115
+ #
1116
+ # @param name [::String]
1117
+ # Required. Format:
1118
+ # `projects/{project_id}/locations/{location}/instances/{instance_id}`
1119
+ # @param items [::Hash{::String => ::String}]
1120
+ # Metadata items to add/update for the instance.
1121
+ #
1122
+ # @yield [response, operation] Access the result along with the RPC operation
1123
+ # @yieldparam response [::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponse]
1124
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1125
+ #
1126
+ # @return [::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponse]
1127
+ #
1128
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1129
+ #
1130
+ # @example Basic example
1131
+ # require "google/cloud/notebooks/v1"
1132
+ #
1133
+ # # Create a client object. The client can be reused for multiple calls.
1134
+ # client = Google::Cloud::Notebooks::V1::NotebookService::Client.new
1135
+ #
1136
+ # # Create a request. To set request fields, pass in keyword arguments.
1137
+ # request = Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsRequest.new
1138
+ #
1139
+ # # Call the update_instance_metadata_items method.
1140
+ # result = client.update_instance_metadata_items request
1141
+ #
1142
+ # # The returned object is of type Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponse.
1143
+ # p result
1144
+ #
1145
+ def update_instance_metadata_items request, options = nil
1146
+ raise ::ArgumentError, "request must be provided" if request.nil?
1147
+
1148
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsRequest
1149
+
1150
+ # Converts hash and nil to an options object
1151
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1152
+
1153
+ # Customize the options with defaults
1154
+ metadata = @config.rpcs.update_instance_metadata_items.metadata.to_h
1155
+
1156
+ # Set x-goog-api-client and x-goog-user-project headers
1157
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1158
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1159
+ gapic_version: ::Google::Cloud::Notebooks::V1::VERSION
1160
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1161
+
1162
+ header_params = {}
1163
+ if request.name
1164
+ header_params["name"] = request.name
1165
+ end
1166
+
1167
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1168
+ metadata[:"x-goog-request-params"] ||= request_params_header
1169
+
1170
+ options.apply_defaults timeout: @config.rpcs.update_instance_metadata_items.timeout,
1171
+ metadata: metadata,
1172
+ retry_policy: @config.rpcs.update_instance_metadata_items.retry_policy
1173
+
1174
+ options.apply_defaults timeout: @config.timeout,
1175
+ metadata: @config.metadata,
1176
+ retry_policy: @config.retry_policy
1177
+
1178
+ @notebook_service_stub.call_rpc :update_instance_metadata_items, request, options: options do |response, operation|
1179
+ yield response, operation if block_given?
1180
+ return response
1181
+ end
1182
+ rescue ::GRPC::BadStatus => e
1183
+ raise ::Google::Cloud::Error.from_error(e)
1184
+ end
1185
+
1098
1186
  ##
1099
1187
  # Deletes a single Instance.
1100
1188
  #
@@ -1587,7 +1675,7 @@ module Google
1587
1675
  # @param options [::Gapic::CallOptions, ::Hash]
1588
1676
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1589
1677
  #
1590
- # @overload is_instance_upgradeable(notebook_instance: nil)
1678
+ # @overload is_instance_upgradeable(notebook_instance: nil, type: nil)
1591
1679
  # Pass arguments to `is_instance_upgradeable` via keyword arguments. Note that at
1592
1680
  # least one keyword argument is required. To specify no parameters, or to keep all
1593
1681
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1595,6 +1683,9 @@ module Google
1595
1683
  # @param notebook_instance [::String]
1596
1684
  # Required. Format:
1597
1685
  # `projects/{project_id}/locations/{location}/instances/{instance_id}`
1686
+ # @param type [::Google::Cloud::Notebooks::V1::UpgradeType]
1687
+ # Optional. The optional UpgradeType. Setting this field will search for additional
1688
+ # compute images to upgrade this instance.
1598
1689
  #
1599
1690
  # @yield [response, operation] Access the result along with the RPC operation
1600
1691
  # @yieldparam response [::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableResponse]
@@ -1759,7 +1850,7 @@ module Google
1759
1850
  # @param options [::Gapic::CallOptions, ::Hash]
1760
1851
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1761
1852
  #
1762
- # @overload upgrade_instance(name: nil)
1853
+ # @overload upgrade_instance(name: nil, type: nil)
1763
1854
  # Pass arguments to `upgrade_instance` via keyword arguments. Note that at
1764
1855
  # least one keyword argument is required. To specify no parameters, or to keep all
1765
1856
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1767,6 +1858,9 @@ module Google
1767
1858
  # @param name [::String]
1768
1859
  # Required. Format:
1769
1860
  # `projects/{project_id}/locations/{location}/instances/{instance_id}`
1861
+ # @param type [::Google::Cloud::Notebooks::V1::UpgradeType]
1862
+ # Optional. The optional UpgradeType. Setting this field will search for additional
1863
+ # compute images to upgrade this instance.
1770
1864
  #
1771
1865
  # @yield [response, operation] Access the result along with the RPC operation
1772
1866
  # @yieldparam response [::Gapic::Operation]
@@ -1951,7 +2045,7 @@ module Google
1951
2045
  # @param options [::Gapic::CallOptions, ::Hash]
1952
2046
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1953
2047
  #
1954
- # @overload upgrade_instance_internal(name: nil, vm_id: nil)
2048
+ # @overload upgrade_instance_internal(name: nil, vm_id: nil, type: nil)
1955
2049
  # Pass arguments to `upgrade_instance_internal` via keyword arguments. Note that at
1956
2050
  # least one keyword argument is required. To specify no parameters, or to keep all
1957
2051
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1962,6 +2056,9 @@ module Google
1962
2056
  # @param vm_id [::String]
1963
2057
  # Required. The VM hardware token for authenticating the VM.
1964
2058
  # https://cloud.google.com/compute/docs/instances/verifying-instance-identity
2059
+ # @param type [::Google::Cloud::Notebooks::V1::UpgradeType]
2060
+ # Optional. The optional UpgradeType. Setting this field will search for additional
2061
+ # compute images to upgrade this instance.
1965
2062
  #
1966
2063
  # @yield [response, operation] Access the result along with the RPC operation
1967
2064
  # @yieldparam response [::Gapic::Operation]
@@ -3171,7 +3268,7 @@ module Google
3171
3268
  end
3172
3269
 
3173
3270
  ##
3174
- # Creates a new Scheduled Notebook in a given project and location.
3271
+ # Creates a new Execution in a given project and location.
3175
3272
  #
3176
3273
  # @overload create_execution(request, options = nil)
3177
3274
  # Pass arguments to `create_execution` via a request object, either of type
@@ -3449,6 +3546,11 @@ module Google
3449
3546
  #
3450
3547
  attr_reader :set_instance_labels
3451
3548
  ##
3549
+ # RPC-specific configuration for `update_instance_metadata_items`
3550
+ # @return [::Gapic::Config::Method]
3551
+ #
3552
+ attr_reader :update_instance_metadata_items
3553
+ ##
3452
3554
  # RPC-specific configuration for `delete_instance`
3453
3555
  # @return [::Gapic::Config::Method]
3454
3556
  #
@@ -3584,6 +3686,8 @@ module Google
3584
3686
  @update_shielded_instance_config = ::Gapic::Config::Method.new update_shielded_instance_config_config
3585
3687
  set_instance_labels_config = parent_rpcs.set_instance_labels if parent_rpcs.respond_to? :set_instance_labels
3586
3688
  @set_instance_labels = ::Gapic::Config::Method.new set_instance_labels_config
3689
+ update_instance_metadata_items_config = parent_rpcs.update_instance_metadata_items if parent_rpcs.respond_to? :update_instance_metadata_items
3690
+ @update_instance_metadata_items = ::Gapic::Config::Method.new update_instance_metadata_items_config
3587
3691
  delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
3588
3692
  @delete_instance = ::Gapic::Config::Method.new delete_instance_config
3589
3693
  start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance
@@ -96,6 +96,25 @@ module Google
96
96
  "projects/#{project}/location/#{location}/schedules/#{schedule}"
97
97
  end
98
98
 
99
+ ##
100
+ # Create a fully-qualified Tensorboard resource string.
101
+ #
102
+ # The resource will be in the following format:
103
+ #
104
+ # `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
105
+ #
106
+ # @param project [String]
107
+ # @param location [String]
108
+ # @param tensorboard [String]
109
+ #
110
+ # @return [::String]
111
+ def tensorboard_path project:, location:, tensorboard:
112
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
113
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
114
+
115
+ "projects/#{project}/locations/#{location}/tensorboards/#{tensorboard}"
116
+ end
117
+
99
118
  extend self
100
119
  end
101
120
  end
@@ -37,6 +37,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
37
37
  value :HEALTH_STATE_UNSPECIFIED, 0
38
38
  value :HEALTHY, 1
39
39
  value :UNHEALTHY, 2
40
+ value :AGENT_NOT_INSTALLED, 3
41
+ value :AGENT_NOT_RUNNING, 4
40
42
  end
41
43
  add_message "google.cloud.notebooks.v1.RuntimeAcceleratorConfig" do
42
44
  optional :type, :enum, 1, "google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType"
@@ -88,6 +90,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
88
90
  value :PD_STANDARD, 1
89
91
  value :PD_SSD, 2
90
92
  value :PD_BALANCED, 3
93
+ value :PD_EXTREME, 4
91
94
  end
92
95
  add_message "google.cloud.notebooks.v1.RuntimeAccessConfig" do
93
96
  optional :access_type, :enum, 1, "google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType"
@@ -97,6 +100,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
97
100
  add_enum "google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType" do
98
101
  value :RUNTIME_ACCESS_TYPE_UNSPECIFIED, 0
99
102
  value :SINGLE_USER, 1
103
+ value :SERVICE_ACCOUNT, 2
100
104
  end
101
105
  add_message "google.cloud.notebooks.v1.RuntimeSoftwareConfig" do
102
106
  optional :notebook_upgrade_schedule, :string, 1
@@ -106,6 +110,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
106
110
  optional :install_gpu_driver, :bool, 5
107
111
  optional :custom_gpu_driver_path, :string, 6
108
112
  optional :post_startup_script, :string, 7
113
+ repeated :kernels, :message, 8, "google.cloud.notebooks.v1.ContainerImage"
114
+ proto3_optional :upgradeable, :bool, 9
109
115
  end
110
116
  add_message "google.cloud.notebooks.v1.RuntimeMetrics" do
111
117
  map :system_metrics, :string, :string, 1
@@ -136,6 +142,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
136
142
  map :metadata, :string, :string, 15
137
143
  map :labels, :string, :string, 16
138
144
  optional :nic_type, :enum, 17, "google.cloud.notebooks.v1.VirtualMachineConfig.NicType"
145
+ optional :reserved_ip_range, :string, 18
146
+ optional :boot_image, :message, 19, "google.cloud.notebooks.v1.VirtualMachineConfig.BootImage"
147
+ end
148
+ add_message "google.cloud.notebooks.v1.VirtualMachineConfig.BootImage" do
139
149
  end
140
150
  add_enum "google.cloud.notebooks.v1.VirtualMachineConfig.NicType" do
141
151
  value :UNSPECIFIED_NIC_TYPE, 0
@@ -166,6 +176,7 @@ module Google
166
176
  RuntimeShieldedInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig").msgclass
167
177
  VirtualMachine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.VirtualMachine").msgclass
168
178
  VirtualMachineConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.VirtualMachineConfig").msgclass
179
+ VirtualMachineConfig::BootImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.VirtualMachineConfig.BootImage").msgclass
169
180
  VirtualMachineConfig::NicType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.VirtualMachineConfig.NicType").enummodule
170
181
  end
171
182
  end