google-cloud-notebooks-v1 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -5
- data/lib/google/cloud/notebooks/v1/environment_pb.rb +2 -1
- data/lib/google/cloud/notebooks/v1/event_pb.rb +7 -1
- data/lib/google/cloud/notebooks/v1/execution_pb.rb +11 -1
- data/lib/google/cloud/notebooks/v1/instance_pb.rb +7 -1
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/client.rb +115 -6
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/operations.rb +3 -0
- data/lib/google/cloud/notebooks/v1/managed_service_pb.rb +19 -1
- data/lib/google/cloud/notebooks/v1/managed_service_services_pb.rb +3 -0
- data/lib/google/cloud/notebooks/v1/notebook_service/client.rb +108 -4
- data/lib/google/cloud/notebooks/v1/notebook_service/operations.rb +3 -0
- data/lib/google/cloud/notebooks/v1/notebook_service/paths.rb +19 -0
- data/lib/google/cloud/notebooks/v1/runtime_pb.rb +13 -1
- data/lib/google/cloud/notebooks/v1/schedule_pb.rb +2 -1
- data/lib/google/cloud/notebooks/v1/service_pb.rb +22 -1
- data/lib/google/cloud/notebooks/v1/service_services_pb.rb +3 -1
- data/lib/google/cloud/notebooks/v1/version.rb +1 -1
- data/proto_docs/google/cloud/notebooks/v1/environment.rb +1 -1
- data/proto_docs/google/cloud/notebooks/v1/event.rb +28 -1
- data/proto_docs/google/cloud/notebooks/v1/execution.rb +58 -24
- data/proto_docs/google/cloud/notebooks/v1/instance.rb +18 -2
- data/proto_docs/google/cloud/notebooks/v1/managed_service.rb +45 -1
- data/proto_docs/google/cloud/notebooks/v1/runtime.rb +55 -4
- data/proto_docs/google/cloud/notebooks/v1/schedule.rb +2 -2
- data/proto_docs/google/cloud/notebooks/v1/service.rb +72 -1
- data/proto_docs/google/protobuf/any.rb +3 -3
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed3c67d3e3f49fad38a0556bc58986751bc16c7d25a30729aa8418575603b3d0
|
4
|
+
data.tar.gz: 0c4be1a911656ebcaec3fe41803dd0aee1a5858c82cdb1eb412de48d2fb406dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d48a9a060f6e610e0a013369dba8e3fe292ea552048e3687f98d87111aff82d6ffd5d4f08a586f3a049dadb26dbc8c23f684dd4bc9309f5bd4bfe623f37abf08
|
7
|
+
data.tar.gz: 6c403dc29cdd7f3bcd16f7a9638d55695fff2c03851b3788fb2ea3f93aec1c9f01d8a53f2c623b9cbda5a9832a47ae440c23f14c356678a97c990bc219683407
|
data/README.md
CHANGED
@@ -69,16 +69,21 @@ module GRPC
|
|
69
69
|
end
|
70
70
|
```
|
71
71
|
|
72
|
+
|
73
|
+
## Google Cloud Samples
|
74
|
+
|
75
|
+
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
|
+
|
72
77
|
## Supported Ruby Versions
|
73
78
|
|
74
|
-
This library is supported on Ruby 2.
|
79
|
+
This library is supported on Ruby 2.6+.
|
75
80
|
|
76
81
|
Google provides official support for Ruby versions that are actively supported
|
77
82
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
78
|
-
in security maintenance, and not end of life.
|
79
|
-
|
80
|
-
|
81
|
-
|
83
|
+
in security maintenance, and not end of life. Older versions of Ruby _may_
|
84
|
+
still work, but are unsupported and not recommended. See
|
85
|
+
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
86
|
+
support schedule.
|
82
87
|
|
83
88
|
## Which client should I use?
|
84
89
|
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/notebooks/v1/environment.proto
|
3
3
|
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
4
6
|
require 'google/api/field_behavior_pb'
|
5
7
|
require 'google/api/resource_pb'
|
6
8
|
require 'google/protobuf/timestamp_pb'
|
7
|
-
require 'google/protobuf'
|
8
9
|
|
9
10
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
11
|
add_file("google/cloud/notebooks/v1/environment.proto", :syntax => :proto3) do
|
@@ -1,18 +1,24 @@
|
|
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/protobuf/timestamp_pb'
|
5
4
|
require 'google/protobuf'
|
6
5
|
|
6
|
+
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
|
7
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
10
|
add_file("google/cloud/notebooks/v1/event.proto", :syntax => :proto3) do
|
9
11
|
add_message "google.cloud.notebooks.v1.Event" do
|
10
12
|
optional :report_time, :message, 1, "google.protobuf.Timestamp"
|
11
13
|
optional :type, :enum, 2, "google.cloud.notebooks.v1.Event.EventType"
|
14
|
+
map :details, :string, :string, 3
|
12
15
|
end
|
13
16
|
add_enum "google.cloud.notebooks.v1.Event.EventType" do
|
14
17
|
value :EVENT_TYPE_UNSPECIFIED, 0
|
15
18
|
value :IDLE, 1
|
19
|
+
value :HEARTBEAT, 2
|
20
|
+
value :HEALTH, 3
|
21
|
+
value :MAINTENANCE, 4
|
16
22
|
end
|
17
23
|
end
|
18
24
|
end
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/notebooks/v1/execution.proto
|
3
3
|
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
4
6
|
require 'google/api/field_behavior_pb'
|
5
7
|
require 'google/api/resource_pb'
|
6
8
|
require 'google/protobuf/timestamp_pb'
|
7
|
-
require 'google/protobuf'
|
8
9
|
|
9
10
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
11
|
add_file("google/cloud/notebooks/v1/execution.proto", :syntax => :proto3) do
|
@@ -20,8 +21,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
20
21
|
optional :parameters, :string, 9
|
21
22
|
optional :service_account, :string, 10
|
22
23
|
optional :job_type, :enum, 11, "google.cloud.notebooks.v1.ExecutionTemplate.JobType"
|
24
|
+
optional :kernel_spec, :string, 14
|
25
|
+
optional :tensorboard, :string, 15
|
23
26
|
oneof :job_parameters do
|
24
27
|
optional :dataproc_parameters, :message, 12, "google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters"
|
28
|
+
optional :vertex_ai_parameters, :message, 13, "google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters"
|
25
29
|
end
|
26
30
|
end
|
27
31
|
add_message "google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig" do
|
@@ -31,6 +35,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
31
35
|
add_message "google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters" do
|
32
36
|
optional :cluster, :string, 1
|
33
37
|
end
|
38
|
+
add_message "google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters" do
|
39
|
+
optional :network, :string, 1
|
40
|
+
map :env, :string, :string, 2
|
41
|
+
end
|
34
42
|
add_enum "google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier" do
|
35
43
|
value :SCALE_TIER_UNSPECIFIED, 0
|
36
44
|
value :BASIC, 1
|
@@ -47,6 +55,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
47
55
|
value :NVIDIA_TESLA_V100, 3
|
48
56
|
value :NVIDIA_TESLA_P4, 4
|
49
57
|
value :NVIDIA_TESLA_T4, 5
|
58
|
+
value :NVIDIA_TESLA_A100, 10
|
50
59
|
value :TPU_V2, 6
|
51
60
|
value :TPU_V3, 7
|
52
61
|
end
|
@@ -88,6 +97,7 @@ module Google
|
|
88
97
|
ExecutionTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate").msgclass
|
89
98
|
ExecutionTemplate::SchedulerAcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig").msgclass
|
90
99
|
ExecutionTemplate::DataprocParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters").msgclass
|
100
|
+
ExecutionTemplate::VertexAIParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters").msgclass
|
91
101
|
ExecutionTemplate::ScaleTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier").enummodule
|
92
102
|
ExecutionTemplate::SchedulerAcceleratorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType").enummodule
|
93
103
|
ExecutionTemplate::JobType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ExecutionTemplate.JobType").enummodule
|
@@ -1,11 +1,12 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/notebooks/v1/instance.proto
|
3
3
|
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
4
6
|
require 'google/api/field_behavior_pb'
|
5
7
|
require 'google/api/resource_pb'
|
6
8
|
require 'google/cloud/notebooks/v1/environment_pb'
|
7
9
|
require 'google/protobuf/timestamp_pb'
|
8
|
-
require 'google/protobuf'
|
9
10
|
|
10
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
12
|
add_file("google/cloud/notebooks/v1/instance.proto", :syntax => :proto3) do
|
@@ -51,6 +52,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
51
52
|
repeated :upgrade_history, :message, 29, "google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry"
|
52
53
|
optional :nic_type, :enum, 33, "google.cloud.notebooks.v1.Instance.NicType"
|
53
54
|
optional :reservation_affinity, :message, 34, "google.cloud.notebooks.v1.ReservationAffinity"
|
55
|
+
optional :creator, :string, 36
|
56
|
+
optional :can_ip_forward, :bool, 39
|
54
57
|
optional :create_time, :message, 23, "google.protobuf.Timestamp"
|
55
58
|
optional :update_time, :message, 24, "google.protobuf.Timestamp"
|
56
59
|
oneof :environment do
|
@@ -132,12 +135,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
132
135
|
value :UPGRADING, 7
|
133
136
|
value :INITIALIZING, 8
|
134
137
|
value :REGISTERING, 9
|
138
|
+
value :SUSPENDING, 10
|
139
|
+
value :SUSPENDED, 11
|
135
140
|
end
|
136
141
|
add_enum "google.cloud.notebooks.v1.Instance.DiskType" do
|
137
142
|
value :DISK_TYPE_UNSPECIFIED, 0
|
138
143
|
value :PD_STANDARD, 1
|
139
144
|
value :PD_SSD, 2
|
140
145
|
value :PD_BALANCED, 3
|
146
|
+
value :PD_EXTREME, 4
|
141
147
|
end
|
142
148
|
add_enum "google.cloud.notebooks.v1.Instance.DiskEncryption" do
|
143
149
|
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
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/notebooks/v1/managed_service.proto
|
3
3
|
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
4
6
|
require 'google/api/annotations_pb'
|
5
7
|
require 'google/api/client_pb'
|
6
8
|
require 'google/api/field_behavior_pb'
|
@@ -8,7 +10,7 @@ require 'google/api/resource_pb'
|
|
8
10
|
require 'google/cloud/notebooks/v1/event_pb'
|
9
11
|
require 'google/cloud/notebooks/v1/runtime_pb'
|
10
12
|
require 'google/longrunning/operations_pb'
|
11
|
-
require 'google/protobuf'
|
13
|
+
require 'google/protobuf/timestamp_pb'
|
12
14
|
|
13
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
16
|
add_file("google/cloud/notebooks/v1/managed_service.proto", :syntax => :proto3) do
|
@@ -29,29 +31,43 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
29
31
|
optional :parent, :string, 1
|
30
32
|
optional :runtime_id, :string, 2
|
31
33
|
optional :runtime, :message, 3, "google.cloud.notebooks.v1.Runtime"
|
34
|
+
optional :request_id, :string, 4
|
32
35
|
end
|
33
36
|
add_message "google.cloud.notebooks.v1.DeleteRuntimeRequest" do
|
34
37
|
optional :name, :string, 1
|
38
|
+
optional :request_id, :string, 2
|
35
39
|
end
|
36
40
|
add_message "google.cloud.notebooks.v1.StartRuntimeRequest" do
|
37
41
|
optional :name, :string, 1
|
42
|
+
optional :request_id, :string, 2
|
38
43
|
end
|
39
44
|
add_message "google.cloud.notebooks.v1.StopRuntimeRequest" do
|
40
45
|
optional :name, :string, 1
|
46
|
+
optional :request_id, :string, 2
|
41
47
|
end
|
42
48
|
add_message "google.cloud.notebooks.v1.SwitchRuntimeRequest" do
|
43
49
|
optional :name, :string, 1
|
44
50
|
optional :machine_type, :string, 2
|
45
51
|
optional :accelerator_config, :message, 3, "google.cloud.notebooks.v1.RuntimeAcceleratorConfig"
|
52
|
+
optional :request_id, :string, 4
|
46
53
|
end
|
47
54
|
add_message "google.cloud.notebooks.v1.ResetRuntimeRequest" do
|
48
55
|
optional :name, :string, 1
|
56
|
+
optional :request_id, :string, 2
|
49
57
|
end
|
50
58
|
add_message "google.cloud.notebooks.v1.ReportRuntimeEventRequest" do
|
51
59
|
optional :name, :string, 1
|
52
60
|
optional :vm_id, :string, 2
|
53
61
|
optional :event, :message, 3, "google.cloud.notebooks.v1.Event"
|
54
62
|
end
|
63
|
+
add_message "google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest" do
|
64
|
+
optional :name, :string, 1
|
65
|
+
optional :vm_id, :string, 2
|
66
|
+
end
|
67
|
+
add_message "google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse" do
|
68
|
+
optional :access_token, :string, 1
|
69
|
+
optional :expire_time, :message, 2, "google.protobuf.Timestamp"
|
70
|
+
end
|
55
71
|
end
|
56
72
|
end
|
57
73
|
|
@@ -69,6 +85,8 @@ module Google
|
|
69
85
|
SwitchRuntimeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.SwitchRuntimeRequest").msgclass
|
70
86
|
ResetRuntimeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ResetRuntimeRequest").msgclass
|
71
87
|
ReportRuntimeEventRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.ReportRuntimeEventRequest").msgclass
|
88
|
+
RefreshRuntimeTokenInternalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest").msgclass
|
89
|
+
RefreshRuntimeTokenInternalResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse").msgclass
|
72
90
|
end
|
73
91
|
end
|
74
92
|
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
|