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
@@ -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
|
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
|
@@ -1,11 +1,12 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/notebooks/v1/runtime.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/runtime.proto", :syntax => :proto3) do
|
@@ -37,6 +38,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
37
38
|
value :HEALTH_STATE_UNSPECIFIED, 0
|
38
39
|
value :HEALTHY, 1
|
39
40
|
value :UNHEALTHY, 2
|
41
|
+
value :AGENT_NOT_INSTALLED, 3
|
42
|
+
value :AGENT_NOT_RUNNING, 4
|
40
43
|
end
|
41
44
|
add_message "google.cloud.notebooks.v1.RuntimeAcceleratorConfig" do
|
42
45
|
optional :type, :enum, 1, "google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType"
|
@@ -88,6 +91,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
88
91
|
value :PD_STANDARD, 1
|
89
92
|
value :PD_SSD, 2
|
90
93
|
value :PD_BALANCED, 3
|
94
|
+
value :PD_EXTREME, 4
|
91
95
|
end
|
92
96
|
add_message "google.cloud.notebooks.v1.RuntimeAccessConfig" do
|
93
97
|
optional :access_type, :enum, 1, "google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType"
|
@@ -97,6 +101,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
97
101
|
add_enum "google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType" do
|
98
102
|
value :RUNTIME_ACCESS_TYPE_UNSPECIFIED, 0
|
99
103
|
value :SINGLE_USER, 1
|
104
|
+
value :SERVICE_ACCOUNT, 2
|
100
105
|
end
|
101
106
|
add_message "google.cloud.notebooks.v1.RuntimeSoftwareConfig" do
|
102
107
|
optional :notebook_upgrade_schedule, :string, 1
|
@@ -106,6 +111,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
106
111
|
optional :install_gpu_driver, :bool, 5
|
107
112
|
optional :custom_gpu_driver_path, :string, 6
|
108
113
|
optional :post_startup_script, :string, 7
|
114
|
+
repeated :kernels, :message, 8, "google.cloud.notebooks.v1.ContainerImage"
|
115
|
+
proto3_optional :upgradeable, :bool, 9
|
109
116
|
end
|
110
117
|
add_message "google.cloud.notebooks.v1.RuntimeMetrics" do
|
111
118
|
map :system_metrics, :string, :string, 1
|
@@ -136,6 +143,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
136
143
|
map :metadata, :string, :string, 15
|
137
144
|
map :labels, :string, :string, 16
|
138
145
|
optional :nic_type, :enum, 17, "google.cloud.notebooks.v1.VirtualMachineConfig.NicType"
|
146
|
+
optional :reserved_ip_range, :string, 18
|
147
|
+
optional :boot_image, :message, 19, "google.cloud.notebooks.v1.VirtualMachineConfig.BootImage"
|
148
|
+
end
|
149
|
+
add_message "google.cloud.notebooks.v1.VirtualMachineConfig.BootImage" do
|
139
150
|
end
|
140
151
|
add_enum "google.cloud.notebooks.v1.VirtualMachineConfig.NicType" do
|
141
152
|
value :UNSPECIFIED_NIC_TYPE, 0
|
@@ -166,6 +177,7 @@ module Google
|
|
166
177
|
RuntimeShieldedInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig").msgclass
|
167
178
|
VirtualMachine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.VirtualMachine").msgclass
|
168
179
|
VirtualMachineConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.VirtualMachineConfig").msgclass
|
180
|
+
VirtualMachineConfig::BootImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.VirtualMachineConfig.BootImage").msgclass
|
169
181
|
VirtualMachineConfig::NicType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.VirtualMachineConfig.NicType").enummodule
|
170
182
|
end
|
171
183
|
end
|
@@ -1,11 +1,12 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/notebooks/v1/schedule.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/execution_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/schedule.proto", :syntax => :proto3) do
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/notebooks/v1/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'
|
@@ -12,7 +14,6 @@ require 'google/cloud/notebooks/v1/instance_config_pb'
|
|
12
14
|
require 'google/cloud/notebooks/v1/schedule_pb'
|
13
15
|
require 'google/longrunning/operations_pb'
|
14
16
|
require 'google/protobuf/timestamp_pb'
|
15
|
-
require 'google/protobuf'
|
16
17
|
|
17
18
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
18
19
|
add_file("google/cloud/notebooks/v1/service.proto", :syntax => :proto3) do
|
@@ -65,6 +66,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
65
66
|
optional :name, :string, 1
|
66
67
|
map :labels, :string, :string, 2
|
67
68
|
end
|
69
|
+
add_message "google.cloud.notebooks.v1.UpdateInstanceMetadataItemsRequest" do
|
70
|
+
optional :name, :string, 1
|
71
|
+
map :items, :string, :string, 2
|
72
|
+
end
|
73
|
+
add_message "google.cloud.notebooks.v1.UpdateInstanceMetadataItemsResponse" do
|
74
|
+
map :items, :string, :string, 1
|
75
|
+
end
|
68
76
|
add_message "google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest" do
|
69
77
|
optional :name, :string, 1
|
70
78
|
optional :shielded_instance_config, :message, 2, "google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig"
|
@@ -88,6 +96,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
88
96
|
end
|
89
97
|
add_message "google.cloud.notebooks.v1.IsInstanceUpgradeableRequest" do
|
90
98
|
optional :notebook_instance, :string, 1
|
99
|
+
optional :type, :enum, 2, "google.cloud.notebooks.v1.UpgradeType"
|
91
100
|
end
|
92
101
|
add_message "google.cloud.notebooks.v1.IsInstanceUpgradeableResponse" do
|
93
102
|
optional :upgradeable, :bool, 1
|
@@ -111,6 +120,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
111
120
|
end
|
112
121
|
add_message "google.cloud.notebooks.v1.UpgradeInstanceRequest" do
|
113
122
|
optional :name, :string, 1
|
123
|
+
optional :type, :enum, 2, "google.cloud.notebooks.v1.UpgradeType"
|
114
124
|
end
|
115
125
|
add_message "google.cloud.notebooks.v1.RollbackInstanceRequest" do
|
116
126
|
optional :name, :string, 1
|
@@ -119,6 +129,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
119
129
|
add_message "google.cloud.notebooks.v1.UpgradeInstanceInternalRequest" do
|
120
130
|
optional :name, :string, 1
|
121
131
|
optional :vm_id, :string, 2
|
132
|
+
optional :type, :enum, 3, "google.cloud.notebooks.v1.UpgradeType"
|
122
133
|
end
|
123
134
|
add_message "google.cloud.notebooks.v1.ListEnvironmentsRequest" do
|
124
135
|
optional :parent, :string, 1
|
@@ -190,6 +201,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
190
201
|
optional :execution_id, :string, 2
|
191
202
|
optional :execution, :message, 3, "google.cloud.notebooks.v1.Execution"
|
192
203
|
end
|
204
|
+
add_enum "google.cloud.notebooks.v1.UpgradeType" do
|
205
|
+
value :UPGRADE_TYPE_UNSPECIFIED, 0
|
206
|
+
value :UPGRADE_FRAMEWORK, 1
|
207
|
+
value :UPGRADE_OS, 2
|
208
|
+
value :UPGRADE_CUDA, 3
|
209
|
+
value :UPGRADE_ALL, 4
|
210
|
+
end
|
193
211
|
end
|
194
212
|
end
|
195
213
|
|
@@ -207,6 +225,8 @@ module Google
|
|
207
225
|
SetInstanceMachineTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.SetInstanceMachineTypeRequest").msgclass
|
208
226
|
UpdateInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.UpdateInstanceConfigRequest").msgclass
|
209
227
|
SetInstanceLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.SetInstanceLabelsRequest").msgclass
|
228
|
+
UpdateInstanceMetadataItemsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.UpdateInstanceMetadataItemsRequest").msgclass
|
229
|
+
UpdateInstanceMetadataItemsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.UpdateInstanceMetadataItemsResponse").msgclass
|
210
230
|
UpdateShieldedInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest").msgclass
|
211
231
|
DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.DeleteInstanceRequest").msgclass
|
212
232
|
StartInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.StartInstanceRequest").msgclass
|
@@ -237,6 +257,7 @@ module Google
|
|
237
257
|
GetExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.GetExecutionRequest").msgclass
|
238
258
|
DeleteExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.DeleteExecutionRequest").msgclass
|
239
259
|
CreateExecutionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.CreateExecutionRequest").msgclass
|
260
|
+
UpgradeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.notebooks.v1.UpgradeType").enummodule
|
240
261
|
end
|
241
262
|
end
|
242
263
|
end
|
@@ -54,6 +54,8 @@ module Google
|
|
54
54
|
rpc :UpdateShieldedInstanceConfig, ::Google::Cloud::Notebooks::V1::UpdateShieldedInstanceConfigRequest, ::Google::Longrunning::Operation
|
55
55
|
# Replaces all the labels of an Instance.
|
56
56
|
rpc :SetInstanceLabels, ::Google::Cloud::Notebooks::V1::SetInstanceLabelsRequest, ::Google::Longrunning::Operation
|
57
|
+
# Add/update metadata items for an instance.
|
58
|
+
rpc :UpdateInstanceMetadataItems, ::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsRequest, ::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponse
|
57
59
|
# Deletes a single Instance.
|
58
60
|
rpc :DeleteInstance, ::Google::Cloud::Notebooks::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation
|
59
61
|
# Starts a notebook instance.
|
@@ -102,7 +104,7 @@ module Google
|
|
102
104
|
rpc :GetExecution, ::Google::Cloud::Notebooks::V1::GetExecutionRequest, ::Google::Cloud::Notebooks::V1::Execution
|
103
105
|
# Deletes execution
|
104
106
|
rpc :DeleteExecution, ::Google::Cloud::Notebooks::V1::DeleteExecutionRequest, ::Google::Longrunning::Operation
|
105
|
-
# Creates a new
|
107
|
+
# Creates a new Execution in a given project and location.
|
106
108
|
rpc :CreateExecution, ::Google::Cloud::Notebooks::V1::CreateExecutionRequest, ::Google::Longrunning::Operation
|
107
109
|
end
|
108
110
|
|
@@ -58,7 +58,7 @@ module Google
|
|
58
58
|
# @!attribute [rw] project
|
59
59
|
# @return [::String]
|
60
60
|
# Required. The name of the Google Cloud project that this VM image belongs to.
|
61
|
-
# Format: `
|
61
|
+
# Format: `{project_id}`
|
62
62
|
# @!attribute [rw] image_name
|
63
63
|
# @return [::String]
|
64
64
|
# Use VM image name to find the image.
|
@@ -28,17 +28,44 @@ module Google
|
|
28
28
|
# @!attribute [rw] type
|
29
29
|
# @return [::Google::Cloud::Notebooks::V1::Event::EventType]
|
30
30
|
# Event type.
|
31
|
+
# @!attribute [rw] details
|
32
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
33
|
+
# Optional. Event details. This field is used to pass event information.
|
31
34
|
class Event
|
32
35
|
include ::Google::Protobuf::MessageExts
|
33
36
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
34
37
|
|
35
|
-
#
|
38
|
+
# @!attribute [rw] key
|
39
|
+
# @return [::String]
|
40
|
+
# @!attribute [rw] value
|
41
|
+
# @return [::String]
|
42
|
+
class DetailsEntry
|
43
|
+
include ::Google::Protobuf::MessageExts
|
44
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
45
|
+
end
|
46
|
+
|
47
|
+
# The definition of the event types.
|
36
48
|
module EventType
|
37
49
|
# Event is not specified.
|
38
50
|
EVENT_TYPE_UNSPECIFIED = 0
|
39
51
|
|
40
52
|
# The instance / runtime is idle
|
41
53
|
IDLE = 1
|
54
|
+
|
55
|
+
# The instance / runtime is available.
|
56
|
+
# This event indicates that instance / runtime underlying compute is
|
57
|
+
# operational.
|
58
|
+
HEARTBEAT = 2
|
59
|
+
|
60
|
+
# The instance / runtime health is available.
|
61
|
+
# This event indicates that instance / runtime health information.
|
62
|
+
HEALTH = 3
|
63
|
+
|
64
|
+
# The instance / runtime is available.
|
65
|
+
# This event allows instance / runtime to send Host maintenance
|
66
|
+
# information to Control Plane.
|
67
|
+
# https://cloud.google.com/compute/docs/gpus/gpu-host-maintenance
|
68
|
+
MAINTENANCE = 4
|
42
69
|
end
|
43
70
|
end
|
44
71
|
end
|
@@ -74,7 +74,8 @@ module Google
|
|
74
74
|
#
|
75
75
|
# Finally, if you want to use a TPU for training, specify `cloud_tpu` in this
|
76
76
|
# field. Learn more about the [special configuration options for training
|
77
|
-
# with
|
77
|
+
# with
|
78
|
+
# TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).
|
78
79
|
# @!attribute [rw] accelerator_config
|
79
80
|
# @return [::Google::Cloud::Notebooks::V1::ExecutionTemplate::SchedulerAcceleratorConfig]
|
80
81
|
# Configuration (count and accelerator type) for hardware running notebook
|
@@ -90,7 +91,7 @@ module Google
|
|
90
91
|
# @return [::String]
|
91
92
|
# Path to the notebook file to execute.
|
92
93
|
# Must be in a Google Cloud Storage bucket.
|
93
|
-
# Format: `gs://{
|
94
|
+
# Format: `gs://{bucket_name}/{folder}/{notebook_file_name}`
|
94
95
|
# Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`
|
95
96
|
# @!attribute [rw] container_image_uri
|
96
97
|
# @return [::String]
|
@@ -102,7 +103,7 @@ module Google
|
|
102
103
|
# @return [::String]
|
103
104
|
# Path to the notebook folder to write to.
|
104
105
|
# Must be in a Google Cloud Storage bucket path.
|
105
|
-
# Format: `gs://{
|
106
|
+
# Format: `gs://{bucket_name}/{folder}`
|
106
107
|
# Ex: `gs://notebook_user/scheduled_notebooks`
|
107
108
|
# @!attribute [rw] params_yaml_file
|
108
109
|
# @return [::String]
|
@@ -125,13 +126,27 @@ module Google
|
|
125
126
|
# @!attribute [rw] dataproc_parameters
|
126
127
|
# @return [::Google::Cloud::Notebooks::V1::ExecutionTemplate::DataprocParameters]
|
127
128
|
# Parameters used in Dataproc JobType executions.
|
129
|
+
# @!attribute [rw] vertex_ai_parameters
|
130
|
+
# @return [::Google::Cloud::Notebooks::V1::ExecutionTemplate::VertexAIParameters]
|
131
|
+
# Parameters used in Vertex AI JobType executions.
|
132
|
+
# @!attribute [rw] kernel_spec
|
133
|
+
# @return [::String]
|
134
|
+
# Name of the kernel spec to use. This must be specified if the
|
135
|
+
# kernel spec name on the execution target does not match the name in the
|
136
|
+
# input notebook file.
|
137
|
+
# @!attribute [rw] tensorboard
|
138
|
+
# @return [::String]
|
139
|
+
# The name of a Vertex AI [Tensorboard] resource to which this execution
|
140
|
+
# will upload Tensorboard logs.
|
141
|
+
# Format:
|
142
|
+
# `projects/{project}/locations/{location}/tensorboards/{tensorboard}`
|
128
143
|
class ExecutionTemplate
|
129
144
|
include ::Google::Protobuf::MessageExts
|
130
145
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
131
146
|
|
132
147
|
# Definition of a hardware accelerator. Note that not all combinations
|
133
|
-
# of `type` and `core_count` are valid. Check GPUs on
|
134
|
-
# Compute Engine to find a valid
|
148
|
+
# of `type` and `core_count` are valid. Check [GPUs on
|
149
|
+
# Compute Engine](https://cloud.google.com/compute/docs/gpus) to find a valid
|
135
150
|
# combination. TPUs are not supported.
|
136
151
|
# @!attribute [rw] type
|
137
152
|
# @return [::Google::Cloud::Notebooks::V1::ExecutionTemplate::SchedulerAcceleratorType]
|
@@ -154,6 +169,38 @@ module Google
|
|
154
169
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
155
170
|
end
|
156
171
|
|
172
|
+
# Parameters used in Vertex AI JobType executions.
|
173
|
+
# @!attribute [rw] network
|
174
|
+
# @return [::String]
|
175
|
+
# The full name of the Compute Engine
|
176
|
+
# [network](/compute/docs/networks-and-firewalls#networks) to which the Job
|
177
|
+
# should be peered. For example, `projects/12345/global/networks/myVPC`.
|
178
|
+
# [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert)
|
179
|
+
# is of the form `projects/{project}/global/networks/{network}`.
|
180
|
+
# Where \\{project} is a project number, as in `12345`, and \\{network} is a
|
181
|
+
# network name.
|
182
|
+
#
|
183
|
+
# Private services access must already be configured for the network. If
|
184
|
+
# left unspecified, the job is not peered with any network.
|
185
|
+
# @!attribute [rw] env
|
186
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
187
|
+
# Environment variables.
|
188
|
+
# At most 100 environment variables can be specified and unique.
|
189
|
+
# Example: GCP_BUCKET=gs://my-bucket/samples/
|
190
|
+
class VertexAIParameters
|
191
|
+
include ::Google::Protobuf::MessageExts
|
192
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
193
|
+
|
194
|
+
# @!attribute [rw] key
|
195
|
+
# @return [::String]
|
196
|
+
# @!attribute [rw] value
|
197
|
+
# @return [::String]
|
198
|
+
class EnvEntry
|
199
|
+
include ::Google::Protobuf::MessageExts
|
200
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
157
204
|
# @!attribute [rw] key
|
158
205
|
# @return [::String]
|
159
206
|
# @!attribute [rw] value
|
@@ -189,25 +236,9 @@ module Google
|
|
189
236
|
# own cluster specification. When you use this tier, set values to
|
190
237
|
# configure your processing cluster according to these guidelines:
|
191
238
|
#
|
192
|
-
# * You _must_ set `
|
239
|
+
# * You _must_ set `ExecutionTemplate.masterType` to specify the type
|
193
240
|
# of machine to use for your master node. This is the only required
|
194
241
|
# setting.
|
195
|
-
#
|
196
|
-
# * You _may_ set `TrainingInput.workerCount` to specify the number of
|
197
|
-
# workers to use. If you specify one or more workers, you _must_ also
|
198
|
-
# set `TrainingInput.workerType` to specify the type of machine to use
|
199
|
-
# for your worker nodes.
|
200
|
-
#
|
201
|
-
# * You _may_ set `TrainingInput.parameterServerCount` to specify the
|
202
|
-
# number of parameter servers to use. If you specify one or more
|
203
|
-
# parameter servers, you _must_ also set
|
204
|
-
# `TrainingInput.parameterServerType` to specify the type of machine to
|
205
|
-
# use for your parameter servers.
|
206
|
-
#
|
207
|
-
# Note that all of your workers must use the same machine type, which can
|
208
|
-
# be different from your parameter server type and master type. Your
|
209
|
-
# parameter servers must likewise use the same machine type, which can be
|
210
|
-
# different from your worker type and master type.
|
211
242
|
CUSTOM = 6
|
212
243
|
end
|
213
244
|
|
@@ -231,6 +262,9 @@ module Google
|
|
231
262
|
# Nvidia Tesla T4 GPU.
|
232
263
|
NVIDIA_TESLA_T4 = 5
|
233
264
|
|
265
|
+
# Nvidia Tesla A100 GPU.
|
266
|
+
NVIDIA_TESLA_A100 = 10
|
267
|
+
|
234
268
|
# TPU v2.
|
235
269
|
TPU_V2 = 6
|
236
270
|
|
@@ -260,7 +294,7 @@ module Google
|
|
260
294
|
# @!attribute [r] name
|
261
295
|
# @return [::String]
|
262
296
|
# Output only. The resource name of the execute. Format:
|
263
|
-
# `projects/{project_id}/locations/{location}/
|
297
|
+
# `projects/{project_id}/locations/{location}/executions/{execution_id}`
|
264
298
|
# @!attribute [r] display_name
|
265
299
|
# @return [::String]
|
266
300
|
# Output only. Name used for UI purposes.
|
@@ -316,7 +350,7 @@ module Google
|
|
316
350
|
# `error_message` should describe the reason for the cancellation.
|
317
351
|
CANCELLED = 7
|
318
352
|
|
319
|
-
# The
|
353
|
+
# The job has become expired (relevant to Vertex AI jobs)
|
320
354
|
# https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState
|
321
355
|
EXPIRED = 9
|
322
356
|
|