google-cloud-notebooks-v1 0.4.1 → 0.5.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 +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/notebooks/v1/bindings_override.rb +159 -0
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/client.rb +50 -52
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/operations.rb +12 -14
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest/client.rb +1342 -0
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest/operations.rb +793 -0
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest/service_stub.rb +825 -0
- data/lib/google/cloud/notebooks/v1/managed_notebook_service/rest.rb +54 -0
- data/lib/google/cloud/notebooks/v1/managed_notebook_service.rb +7 -1
- data/lib/google/cloud/notebooks/v1/notebook_service/client.rb +110 -118
- data/lib/google/cloud/notebooks/v1/notebook_service/operations.rb +12 -14
- data/lib/google/cloud/notebooks/v1/notebook_service/rest/client.rb +2898 -0
- data/lib/google/cloud/notebooks/v1/notebook_service/rest/operations.rb +793 -0
- data/lib/google/cloud/notebooks/v1/notebook_service/rest/service_stub.rb +2074 -0
- data/lib/google/cloud/notebooks/v1/notebook_service/rest.rb +54 -0
- data/lib/google/cloud/notebooks/v1/notebook_service.rb +7 -1
- data/lib/google/cloud/notebooks/v1/rest.rb +39 -0
- data/lib/google/cloud/notebooks/v1/version.rb +1 -1
- data/lib/google/cloud/notebooks/v1.rb +7 -2
- data/proto_docs/google/cloud/notebooks/v1/execution.rb +7 -6
- data/proto_docs/google/cloud/notebooks/v1/instance.rb +33 -32
- data/proto_docs/google/cloud/notebooks/v1/managed_service.rb +7 -7
- data/proto_docs/google/cloud/notebooks/v1/runtime.rb +26 -25
- data/proto_docs/google/cloud/notebooks/v1/schedule.rb +3 -3
- data/proto_docs/google/cloud/notebooks/v1/service.rb +10 -10
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +22 -12
@@ -0,0 +1,2898 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/notebooks/v1/service_pb"
|
21
|
+
require "google/cloud/notebooks/v1/notebook_service/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
23
|
+
require "google/iam/v1/rest"
|
24
|
+
|
25
|
+
module Google
|
26
|
+
module Cloud
|
27
|
+
module Notebooks
|
28
|
+
module V1
|
29
|
+
module NotebookService
|
30
|
+
module Rest
|
31
|
+
##
|
32
|
+
# REST client for the NotebookService service.
|
33
|
+
#
|
34
|
+
# API v1 service for Cloud AI Platform Notebooks.
|
35
|
+
#
|
36
|
+
class Client
|
37
|
+
include Paths
|
38
|
+
|
39
|
+
# @private
|
40
|
+
attr_reader :notebook_service_stub
|
41
|
+
|
42
|
+
##
|
43
|
+
# Configure the NotebookService Client class.
|
44
|
+
#
|
45
|
+
# See {::Google::Cloud::Notebooks::V1::NotebookService::Rest::Client::Configuration}
|
46
|
+
# for a description of the configuration fields.
|
47
|
+
#
|
48
|
+
# @example
|
49
|
+
#
|
50
|
+
# # Modify the configuration for all NotebookService clients
|
51
|
+
# ::Google::Cloud::Notebooks::V1::NotebookService::Rest::Client.configure do |config|
|
52
|
+
# config.timeout = 10.0
|
53
|
+
# end
|
54
|
+
#
|
55
|
+
# @yield [config] Configure the Client client.
|
56
|
+
# @yieldparam config [Client::Configuration]
|
57
|
+
#
|
58
|
+
# @return [Client::Configuration]
|
59
|
+
#
|
60
|
+
def self.configure
|
61
|
+
@configure ||= begin
|
62
|
+
namespace = ["Google", "Cloud", "Notebooks", "V1"]
|
63
|
+
parent_config = while namespace.any?
|
64
|
+
parent_name = namespace.join "::"
|
65
|
+
parent_const = const_get parent_name
|
66
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
67
|
+
namespace.pop
|
68
|
+
end
|
69
|
+
default_config = Client::Configuration.new parent_config
|
70
|
+
|
71
|
+
default_config.timeout = 60.0
|
72
|
+
default_config.retry_policy = {
|
73
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
|
+
}
|
75
|
+
|
76
|
+
default_config.rpcs.list_instances.timeout = 60.0
|
77
|
+
|
78
|
+
default_config.rpcs.get_instance.timeout = 60.0
|
79
|
+
|
80
|
+
default_config.rpcs.create_instance.timeout = 60.0
|
81
|
+
|
82
|
+
default_config.rpcs.register_instance.timeout = 60.0
|
83
|
+
|
84
|
+
default_config.rpcs.set_instance_accelerator.timeout = 60.0
|
85
|
+
|
86
|
+
default_config.rpcs.set_instance_machine_type.timeout = 60.0
|
87
|
+
|
88
|
+
default_config.rpcs.update_instance_config.timeout = 60.0
|
89
|
+
|
90
|
+
default_config.rpcs.update_shielded_instance_config.timeout = 60.0
|
91
|
+
|
92
|
+
default_config.rpcs.set_instance_labels.timeout = 60.0
|
93
|
+
|
94
|
+
default_config.rpcs.delete_instance.timeout = 60.0
|
95
|
+
|
96
|
+
default_config.rpcs.start_instance.timeout = 60.0
|
97
|
+
|
98
|
+
default_config.rpcs.stop_instance.timeout = 60.0
|
99
|
+
|
100
|
+
default_config.rpcs.reset_instance.timeout = 60.0
|
101
|
+
|
102
|
+
default_config.rpcs.report_instance_info.timeout = 60.0
|
103
|
+
|
104
|
+
default_config.rpcs.is_instance_upgradeable.timeout = 60.0
|
105
|
+
|
106
|
+
default_config.rpcs.get_instance_health.timeout = 60.0
|
107
|
+
|
108
|
+
default_config.rpcs.upgrade_instance.timeout = 60.0
|
109
|
+
|
110
|
+
default_config.rpcs.rollback_instance.timeout = 60.0
|
111
|
+
|
112
|
+
default_config.rpcs.diagnose_instance.timeout = 60.0
|
113
|
+
|
114
|
+
default_config.rpcs.upgrade_instance_internal.timeout = 60.0
|
115
|
+
|
116
|
+
default_config.rpcs.list_environments.timeout = 60.0
|
117
|
+
|
118
|
+
default_config.rpcs.get_environment.timeout = 60.0
|
119
|
+
|
120
|
+
default_config.rpcs.create_environment.timeout = 60.0
|
121
|
+
|
122
|
+
default_config.rpcs.delete_environment.timeout = 60.0
|
123
|
+
|
124
|
+
default_config.rpcs.list_schedules.timeout = 60.0
|
125
|
+
|
126
|
+
default_config.rpcs.get_schedule.timeout = 60.0
|
127
|
+
|
128
|
+
default_config.rpcs.delete_schedule.timeout = 60.0
|
129
|
+
|
130
|
+
default_config.rpcs.create_schedule.timeout = 60.0
|
131
|
+
|
132
|
+
default_config.rpcs.list_executions.timeout = 60.0
|
133
|
+
|
134
|
+
default_config.rpcs.get_execution.timeout = 60.0
|
135
|
+
|
136
|
+
default_config.rpcs.delete_execution.timeout = 60.0
|
137
|
+
|
138
|
+
default_config.rpcs.create_execution.timeout = 60.0
|
139
|
+
|
140
|
+
default_config
|
141
|
+
end
|
142
|
+
yield @configure if block_given?
|
143
|
+
@configure
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# Configure the NotebookService Client instance.
|
148
|
+
#
|
149
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
150
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
151
|
+
# should be made on {Client.configure}.
|
152
|
+
#
|
153
|
+
# See {::Google::Cloud::Notebooks::V1::NotebookService::Rest::Client::Configuration}
|
154
|
+
# for a description of the configuration fields.
|
155
|
+
#
|
156
|
+
# @yield [config] Configure the Client client.
|
157
|
+
# @yieldparam config [Client::Configuration]
|
158
|
+
#
|
159
|
+
# @return [Client::Configuration]
|
160
|
+
#
|
161
|
+
def configure
|
162
|
+
yield @config if block_given?
|
163
|
+
@config
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# Create a new NotebookService REST client object.
|
168
|
+
#
|
169
|
+
# @example
|
170
|
+
#
|
171
|
+
# # Create a client using the default configuration
|
172
|
+
# client = ::Google::Cloud::Notebooks::V1::NotebookService::Rest::Client.new
|
173
|
+
#
|
174
|
+
# # Create a client using a custom configuration
|
175
|
+
# client = ::Google::Cloud::Notebooks::V1::NotebookService::Rest::Client.new do |config|
|
176
|
+
# config.timeout = 10.0
|
177
|
+
# end
|
178
|
+
#
|
179
|
+
# @yield [config] Configure the NotebookService client.
|
180
|
+
# @yieldparam config [Client::Configuration]
|
181
|
+
#
|
182
|
+
def initialize
|
183
|
+
# Create the configuration object
|
184
|
+
@config = Configuration.new Client.configure
|
185
|
+
|
186
|
+
# Yield the configuration if needed
|
187
|
+
yield @config if block_given?
|
188
|
+
|
189
|
+
# Create credentials
|
190
|
+
credentials = @config.credentials
|
191
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
192
|
+
# but only if the default endpoint does not have a region prefix.
|
193
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
194
|
+
!@config.endpoint.split(".").first.include?("-")
|
195
|
+
credentials ||= Credentials.default scope: @config.scope,
|
196
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
197
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
198
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
199
|
+
end
|
200
|
+
|
201
|
+
@quota_project_id = @config.quota_project
|
202
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
203
|
+
|
204
|
+
@operations_client = ::Google::Cloud::Notebooks::V1::NotebookService::Rest::Operations.new do |config|
|
205
|
+
config.credentials = credentials
|
206
|
+
config.quota_project = @quota_project_id
|
207
|
+
config.endpoint = @config.endpoint
|
208
|
+
end
|
209
|
+
|
210
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
211
|
+
config.credentials = credentials
|
212
|
+
config.quota_project = @quota_project_id
|
213
|
+
config.endpoint = @config.endpoint
|
214
|
+
config.bindings_override = @config.bindings_override
|
215
|
+
end
|
216
|
+
|
217
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
218
|
+
config.credentials = credentials
|
219
|
+
config.quota_project = @quota_project_id
|
220
|
+
config.endpoint = @config.endpoint
|
221
|
+
config.bindings_override = @config.bindings_override
|
222
|
+
end
|
223
|
+
|
224
|
+
@notebook_service_stub = ::Google::Cloud::Notebooks::V1::NotebookService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
225
|
+
end
|
226
|
+
|
227
|
+
##
|
228
|
+
# Get the associated client for long-running operations.
|
229
|
+
#
|
230
|
+
# @return [::Google::Cloud::Notebooks::V1::NotebookService::Rest::Operations]
|
231
|
+
#
|
232
|
+
attr_reader :operations_client
|
233
|
+
|
234
|
+
##
|
235
|
+
# Get the associated client for mix-in of the Locations.
|
236
|
+
#
|
237
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
238
|
+
#
|
239
|
+
attr_reader :location_client
|
240
|
+
|
241
|
+
##
|
242
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
243
|
+
#
|
244
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
245
|
+
#
|
246
|
+
attr_reader :iam_policy_client
|
247
|
+
|
248
|
+
# Service calls
|
249
|
+
|
250
|
+
##
|
251
|
+
# Lists instances in a given project and location.
|
252
|
+
#
|
253
|
+
# @overload list_instances(request, options = nil)
|
254
|
+
# Pass arguments to `list_instances` via a request object, either of type
|
255
|
+
# {::Google::Cloud::Notebooks::V1::ListInstancesRequest} or an equivalent Hash.
|
256
|
+
#
|
257
|
+
# @param request [::Google::Cloud::Notebooks::V1::ListInstancesRequest, ::Hash]
|
258
|
+
# A request object representing the call parameters. Required. To specify no
|
259
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
260
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
261
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
262
|
+
#
|
263
|
+
# @overload list_instances(parent: nil, page_size: nil, page_token: nil)
|
264
|
+
# Pass arguments to `list_instances` via keyword arguments. Note that at
|
265
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
266
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
267
|
+
#
|
268
|
+
# @param parent [::String]
|
269
|
+
# Required. Format:
|
270
|
+
# `parent=projects/{project_id}/locations/{location}`
|
271
|
+
# @param page_size [::Integer]
|
272
|
+
# Maximum return size of the list call.
|
273
|
+
# @param page_token [::String]
|
274
|
+
# A previous returned page token that can be used to continue listing
|
275
|
+
# from the last result.
|
276
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
277
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::ListInstancesResponse]
|
278
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
279
|
+
#
|
280
|
+
# @return [::Google::Cloud::Notebooks::V1::ListInstancesResponse]
|
281
|
+
#
|
282
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
283
|
+
def list_instances request, options = nil
|
284
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
285
|
+
|
286
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::ListInstancesRequest
|
287
|
+
|
288
|
+
# Converts hash and nil to an options object
|
289
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
290
|
+
|
291
|
+
# Customize the options with defaults
|
292
|
+
call_metadata = @config.rpcs.list_instances.metadata.to_h
|
293
|
+
|
294
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
295
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
296
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
297
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
298
|
+
transports_version_send: [:rest]
|
299
|
+
|
300
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
301
|
+
|
302
|
+
options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
|
303
|
+
metadata: call_metadata,
|
304
|
+
retry_policy: @config.rpcs.list_instances.retry_policy
|
305
|
+
|
306
|
+
options.apply_defaults timeout: @config.timeout,
|
307
|
+
metadata: @config.metadata,
|
308
|
+
retry_policy: @config.retry_policy
|
309
|
+
|
310
|
+
@notebook_service_stub.list_instances request, options do |result, operation|
|
311
|
+
yield result, operation if block_given?
|
312
|
+
return result
|
313
|
+
end
|
314
|
+
rescue ::Gapic::Rest::Error => e
|
315
|
+
raise ::Google::Cloud::Error.from_error(e)
|
316
|
+
end
|
317
|
+
|
318
|
+
##
|
319
|
+
# Gets details of a single Instance.
|
320
|
+
#
|
321
|
+
# @overload get_instance(request, options = nil)
|
322
|
+
# Pass arguments to `get_instance` via a request object, either of type
|
323
|
+
# {::Google::Cloud::Notebooks::V1::GetInstanceRequest} or an equivalent Hash.
|
324
|
+
#
|
325
|
+
# @param request [::Google::Cloud::Notebooks::V1::GetInstanceRequest, ::Hash]
|
326
|
+
# A request object representing the call parameters. Required. To specify no
|
327
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
328
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
329
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
330
|
+
#
|
331
|
+
# @overload get_instance(name: nil)
|
332
|
+
# Pass arguments to `get_instance` via keyword arguments. Note that at
|
333
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
334
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
335
|
+
#
|
336
|
+
# @param name [::String]
|
337
|
+
# Required. Format:
|
338
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
339
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
340
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::Instance]
|
341
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
342
|
+
#
|
343
|
+
# @return [::Google::Cloud::Notebooks::V1::Instance]
|
344
|
+
#
|
345
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
346
|
+
def get_instance request, options = nil
|
347
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
348
|
+
|
349
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::GetInstanceRequest
|
350
|
+
|
351
|
+
# Converts hash and nil to an options object
|
352
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
353
|
+
|
354
|
+
# Customize the options with defaults
|
355
|
+
call_metadata = @config.rpcs.get_instance.metadata.to_h
|
356
|
+
|
357
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
358
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
359
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
360
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
361
|
+
transports_version_send: [:rest]
|
362
|
+
|
363
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
364
|
+
|
365
|
+
options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
|
366
|
+
metadata: call_metadata,
|
367
|
+
retry_policy: @config.rpcs.get_instance.retry_policy
|
368
|
+
|
369
|
+
options.apply_defaults timeout: @config.timeout,
|
370
|
+
metadata: @config.metadata,
|
371
|
+
retry_policy: @config.retry_policy
|
372
|
+
|
373
|
+
@notebook_service_stub.get_instance request, options do |result, operation|
|
374
|
+
yield result, operation if block_given?
|
375
|
+
return result
|
376
|
+
end
|
377
|
+
rescue ::Gapic::Rest::Error => e
|
378
|
+
raise ::Google::Cloud::Error.from_error(e)
|
379
|
+
end
|
380
|
+
|
381
|
+
##
|
382
|
+
# Creates a new Instance in a given project and location.
|
383
|
+
#
|
384
|
+
# @overload create_instance(request, options = nil)
|
385
|
+
# Pass arguments to `create_instance` via a request object, either of type
|
386
|
+
# {::Google::Cloud::Notebooks::V1::CreateInstanceRequest} or an equivalent Hash.
|
387
|
+
#
|
388
|
+
# @param request [::Google::Cloud::Notebooks::V1::CreateInstanceRequest, ::Hash]
|
389
|
+
# A request object representing the call parameters. Required. To specify no
|
390
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
391
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
392
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
393
|
+
#
|
394
|
+
# @overload create_instance(parent: nil, instance_id: nil, instance: nil)
|
395
|
+
# Pass arguments to `create_instance` via keyword arguments. Note that at
|
396
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
397
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
398
|
+
#
|
399
|
+
# @param parent [::String]
|
400
|
+
# Required. Format:
|
401
|
+
# `parent=projects/{project_id}/locations/{location}`
|
402
|
+
# @param instance_id [::String]
|
403
|
+
# Required. User-defined unique ID of this instance.
|
404
|
+
# @param instance [::Google::Cloud::Notebooks::V1::Instance, ::Hash]
|
405
|
+
# Required. The instance to be created.
|
406
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
407
|
+
# @yieldparam result [::Gapic::Operation]
|
408
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
409
|
+
#
|
410
|
+
# @return [::Gapic::Operation]
|
411
|
+
#
|
412
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
413
|
+
def create_instance request, options = nil
|
414
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
415
|
+
|
416
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::CreateInstanceRequest
|
417
|
+
|
418
|
+
# Converts hash and nil to an options object
|
419
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
420
|
+
|
421
|
+
# Customize the options with defaults
|
422
|
+
call_metadata = @config.rpcs.create_instance.metadata.to_h
|
423
|
+
|
424
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
425
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
426
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
427
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
428
|
+
transports_version_send: [:rest]
|
429
|
+
|
430
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
431
|
+
|
432
|
+
options.apply_defaults timeout: @config.rpcs.create_instance.timeout,
|
433
|
+
metadata: call_metadata,
|
434
|
+
retry_policy: @config.rpcs.create_instance.retry_policy
|
435
|
+
|
436
|
+
options.apply_defaults timeout: @config.timeout,
|
437
|
+
metadata: @config.metadata,
|
438
|
+
retry_policy: @config.retry_policy
|
439
|
+
|
440
|
+
@notebook_service_stub.create_instance request, options do |result, operation|
|
441
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
442
|
+
yield result, operation if block_given?
|
443
|
+
return result
|
444
|
+
end
|
445
|
+
rescue ::Gapic::Rest::Error => e
|
446
|
+
raise ::Google::Cloud::Error.from_error(e)
|
447
|
+
end
|
448
|
+
|
449
|
+
##
|
450
|
+
# Registers an existing legacy notebook instance to the Notebooks API server.
|
451
|
+
# Legacy instances are instances created with the legacy Compute Engine
|
452
|
+
# calls. They are not manageable by the Notebooks API out of the box. This
|
453
|
+
# call makes these instances manageable by the Notebooks API.
|
454
|
+
#
|
455
|
+
# @overload register_instance(request, options = nil)
|
456
|
+
# Pass arguments to `register_instance` via a request object, either of type
|
457
|
+
# {::Google::Cloud::Notebooks::V1::RegisterInstanceRequest} or an equivalent Hash.
|
458
|
+
#
|
459
|
+
# @param request [::Google::Cloud::Notebooks::V1::RegisterInstanceRequest, ::Hash]
|
460
|
+
# A request object representing the call parameters. Required. To specify no
|
461
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
462
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
463
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
464
|
+
#
|
465
|
+
# @overload register_instance(parent: nil, instance_id: nil)
|
466
|
+
# Pass arguments to `register_instance` via keyword arguments. Note that at
|
467
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
468
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
469
|
+
#
|
470
|
+
# @param parent [::String]
|
471
|
+
# Required. Format:
|
472
|
+
# `parent=projects/{project_id}/locations/{location}`
|
473
|
+
# @param instance_id [::String]
|
474
|
+
# Required. User defined unique ID of this instance. The `instance_id` must
|
475
|
+
# be 1 to 63 characters long and contain only lowercase letters,
|
476
|
+
# numeric characters, and dashes. The first character must be a lowercase
|
477
|
+
# letter and the last character cannot be a dash.
|
478
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
479
|
+
# @yieldparam result [::Gapic::Operation]
|
480
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
481
|
+
#
|
482
|
+
# @return [::Gapic::Operation]
|
483
|
+
#
|
484
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
485
|
+
def register_instance request, options = nil
|
486
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
487
|
+
|
488
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::RegisterInstanceRequest
|
489
|
+
|
490
|
+
# Converts hash and nil to an options object
|
491
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
492
|
+
|
493
|
+
# Customize the options with defaults
|
494
|
+
call_metadata = @config.rpcs.register_instance.metadata.to_h
|
495
|
+
|
496
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
497
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
498
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
499
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
500
|
+
transports_version_send: [:rest]
|
501
|
+
|
502
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
503
|
+
|
504
|
+
options.apply_defaults timeout: @config.rpcs.register_instance.timeout,
|
505
|
+
metadata: call_metadata,
|
506
|
+
retry_policy: @config.rpcs.register_instance.retry_policy
|
507
|
+
|
508
|
+
options.apply_defaults timeout: @config.timeout,
|
509
|
+
metadata: @config.metadata,
|
510
|
+
retry_policy: @config.retry_policy
|
511
|
+
|
512
|
+
@notebook_service_stub.register_instance request, options do |result, operation|
|
513
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
514
|
+
yield result, operation if block_given?
|
515
|
+
return result
|
516
|
+
end
|
517
|
+
rescue ::Gapic::Rest::Error => e
|
518
|
+
raise ::Google::Cloud::Error.from_error(e)
|
519
|
+
end
|
520
|
+
|
521
|
+
##
|
522
|
+
# Updates the guest accelerators of a single Instance.
|
523
|
+
#
|
524
|
+
# @overload set_instance_accelerator(request, options = nil)
|
525
|
+
# Pass arguments to `set_instance_accelerator` via a request object, either of type
|
526
|
+
# {::Google::Cloud::Notebooks::V1::SetInstanceAcceleratorRequest} or an equivalent Hash.
|
527
|
+
#
|
528
|
+
# @param request [::Google::Cloud::Notebooks::V1::SetInstanceAcceleratorRequest, ::Hash]
|
529
|
+
# A request object representing the call parameters. Required. To specify no
|
530
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
531
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
532
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
533
|
+
#
|
534
|
+
# @overload set_instance_accelerator(name: nil, type: nil, core_count: nil)
|
535
|
+
# Pass arguments to `set_instance_accelerator` via keyword arguments. Note that at
|
536
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
537
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
538
|
+
#
|
539
|
+
# @param name [::String]
|
540
|
+
# Required. Format:
|
541
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
542
|
+
# @param type [::Google::Cloud::Notebooks::V1::Instance::AcceleratorType]
|
543
|
+
# Required. Type of this accelerator.
|
544
|
+
# @param core_count [::Integer]
|
545
|
+
# Required. Count of cores of this accelerator. Note that not all combinations
|
546
|
+
# of `type` and `core_count` are valid. Check [GPUs on
|
547
|
+
# Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to
|
548
|
+
# find a valid combination. TPUs are not supported.
|
549
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
550
|
+
# @yieldparam result [::Gapic::Operation]
|
551
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
552
|
+
#
|
553
|
+
# @return [::Gapic::Operation]
|
554
|
+
#
|
555
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
556
|
+
def set_instance_accelerator request, options = nil
|
557
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
558
|
+
|
559
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::SetInstanceAcceleratorRequest
|
560
|
+
|
561
|
+
# Converts hash and nil to an options object
|
562
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
563
|
+
|
564
|
+
# Customize the options with defaults
|
565
|
+
call_metadata = @config.rpcs.set_instance_accelerator.metadata.to_h
|
566
|
+
|
567
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
568
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
569
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
570
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
571
|
+
transports_version_send: [:rest]
|
572
|
+
|
573
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
574
|
+
|
575
|
+
options.apply_defaults timeout: @config.rpcs.set_instance_accelerator.timeout,
|
576
|
+
metadata: call_metadata,
|
577
|
+
retry_policy: @config.rpcs.set_instance_accelerator.retry_policy
|
578
|
+
|
579
|
+
options.apply_defaults timeout: @config.timeout,
|
580
|
+
metadata: @config.metadata,
|
581
|
+
retry_policy: @config.retry_policy
|
582
|
+
|
583
|
+
@notebook_service_stub.set_instance_accelerator request, options do |result, operation|
|
584
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
585
|
+
yield result, operation if block_given?
|
586
|
+
return result
|
587
|
+
end
|
588
|
+
rescue ::Gapic::Rest::Error => e
|
589
|
+
raise ::Google::Cloud::Error.from_error(e)
|
590
|
+
end
|
591
|
+
|
592
|
+
##
|
593
|
+
# Updates the machine type of a single Instance.
|
594
|
+
#
|
595
|
+
# @overload set_instance_machine_type(request, options = nil)
|
596
|
+
# Pass arguments to `set_instance_machine_type` via a request object, either of type
|
597
|
+
# {::Google::Cloud::Notebooks::V1::SetInstanceMachineTypeRequest} or an equivalent Hash.
|
598
|
+
#
|
599
|
+
# @param request [::Google::Cloud::Notebooks::V1::SetInstanceMachineTypeRequest, ::Hash]
|
600
|
+
# A request object representing the call parameters. Required. To specify no
|
601
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
602
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
603
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
604
|
+
#
|
605
|
+
# @overload set_instance_machine_type(name: nil, machine_type: nil)
|
606
|
+
# Pass arguments to `set_instance_machine_type` via keyword arguments. Note that at
|
607
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
608
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
609
|
+
#
|
610
|
+
# @param name [::String]
|
611
|
+
# Required. Format:
|
612
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
613
|
+
# @param machine_type [::String]
|
614
|
+
# Required. The [Compute Engine machine
|
615
|
+
# type](https://cloud.google.com/compute/docs/machine-types).
|
616
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
617
|
+
# @yieldparam result [::Gapic::Operation]
|
618
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
619
|
+
#
|
620
|
+
# @return [::Gapic::Operation]
|
621
|
+
#
|
622
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
623
|
+
def set_instance_machine_type request, options = nil
|
624
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
625
|
+
|
626
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::SetInstanceMachineTypeRequest
|
627
|
+
|
628
|
+
# Converts hash and nil to an options object
|
629
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
630
|
+
|
631
|
+
# Customize the options with defaults
|
632
|
+
call_metadata = @config.rpcs.set_instance_machine_type.metadata.to_h
|
633
|
+
|
634
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
635
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
636
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
637
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
638
|
+
transports_version_send: [:rest]
|
639
|
+
|
640
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
641
|
+
|
642
|
+
options.apply_defaults timeout: @config.rpcs.set_instance_machine_type.timeout,
|
643
|
+
metadata: call_metadata,
|
644
|
+
retry_policy: @config.rpcs.set_instance_machine_type.retry_policy
|
645
|
+
|
646
|
+
options.apply_defaults timeout: @config.timeout,
|
647
|
+
metadata: @config.metadata,
|
648
|
+
retry_policy: @config.retry_policy
|
649
|
+
|
650
|
+
@notebook_service_stub.set_instance_machine_type request, options do |result, operation|
|
651
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
652
|
+
yield result, operation if block_given?
|
653
|
+
return result
|
654
|
+
end
|
655
|
+
rescue ::Gapic::Rest::Error => e
|
656
|
+
raise ::Google::Cloud::Error.from_error(e)
|
657
|
+
end
|
658
|
+
|
659
|
+
##
|
660
|
+
# Update Notebook Instance configurations.
|
661
|
+
#
|
662
|
+
# @overload update_instance_config(request, options = nil)
|
663
|
+
# Pass arguments to `update_instance_config` via a request object, either of type
|
664
|
+
# {::Google::Cloud::Notebooks::V1::UpdateInstanceConfigRequest} or an equivalent Hash.
|
665
|
+
#
|
666
|
+
# @param request [::Google::Cloud::Notebooks::V1::UpdateInstanceConfigRequest, ::Hash]
|
667
|
+
# A request object representing the call parameters. Required. To specify no
|
668
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
669
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
670
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
671
|
+
#
|
672
|
+
# @overload update_instance_config(name: nil, config: nil)
|
673
|
+
# Pass arguments to `update_instance_config` via keyword arguments. Note that at
|
674
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
675
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
676
|
+
#
|
677
|
+
# @param name [::String]
|
678
|
+
# Required. Format:
|
679
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
680
|
+
# @param config [::Google::Cloud::Notebooks::V1::InstanceConfig, ::Hash]
|
681
|
+
# The instance configurations to be updated.
|
682
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
683
|
+
# @yieldparam result [::Gapic::Operation]
|
684
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
685
|
+
#
|
686
|
+
# @return [::Gapic::Operation]
|
687
|
+
#
|
688
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
689
|
+
def update_instance_config request, options = nil
|
690
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
691
|
+
|
692
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::UpdateInstanceConfigRequest
|
693
|
+
|
694
|
+
# Converts hash and nil to an options object
|
695
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
696
|
+
|
697
|
+
# Customize the options with defaults
|
698
|
+
call_metadata = @config.rpcs.update_instance_config.metadata.to_h
|
699
|
+
|
700
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
701
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
702
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
703
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
704
|
+
transports_version_send: [:rest]
|
705
|
+
|
706
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
707
|
+
|
708
|
+
options.apply_defaults timeout: @config.rpcs.update_instance_config.timeout,
|
709
|
+
metadata: call_metadata,
|
710
|
+
retry_policy: @config.rpcs.update_instance_config.retry_policy
|
711
|
+
|
712
|
+
options.apply_defaults timeout: @config.timeout,
|
713
|
+
metadata: @config.metadata,
|
714
|
+
retry_policy: @config.retry_policy
|
715
|
+
|
716
|
+
@notebook_service_stub.update_instance_config request, options do |result, operation|
|
717
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
718
|
+
yield result, operation if block_given?
|
719
|
+
return result
|
720
|
+
end
|
721
|
+
rescue ::Gapic::Rest::Error => e
|
722
|
+
raise ::Google::Cloud::Error.from_error(e)
|
723
|
+
end
|
724
|
+
|
725
|
+
##
|
726
|
+
# Updates the Shielded instance configuration of a single Instance.
|
727
|
+
#
|
728
|
+
# @overload update_shielded_instance_config(request, options = nil)
|
729
|
+
# Pass arguments to `update_shielded_instance_config` via a request object, either of type
|
730
|
+
# {::Google::Cloud::Notebooks::V1::UpdateShieldedInstanceConfigRequest} or an equivalent Hash.
|
731
|
+
#
|
732
|
+
# @param request [::Google::Cloud::Notebooks::V1::UpdateShieldedInstanceConfigRequest, ::Hash]
|
733
|
+
# A request object representing the call parameters. Required. To specify no
|
734
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
735
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
736
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
737
|
+
#
|
738
|
+
# @overload update_shielded_instance_config(name: nil, shielded_instance_config: nil)
|
739
|
+
# Pass arguments to `update_shielded_instance_config` via keyword arguments. Note that at
|
740
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
741
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
742
|
+
#
|
743
|
+
# @param name [::String]
|
744
|
+
# Required. Format:
|
745
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
746
|
+
# @param shielded_instance_config [::Google::Cloud::Notebooks::V1::Instance::ShieldedInstanceConfig, ::Hash]
|
747
|
+
# ShieldedInstance configuration to be updated.
|
748
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
749
|
+
# @yieldparam result [::Gapic::Operation]
|
750
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
751
|
+
#
|
752
|
+
# @return [::Gapic::Operation]
|
753
|
+
#
|
754
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
755
|
+
def update_shielded_instance_config request, options = nil
|
756
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
757
|
+
|
758
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::UpdateShieldedInstanceConfigRequest
|
759
|
+
|
760
|
+
# Converts hash and nil to an options object
|
761
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
762
|
+
|
763
|
+
# Customize the options with defaults
|
764
|
+
call_metadata = @config.rpcs.update_shielded_instance_config.metadata.to_h
|
765
|
+
|
766
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
767
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
768
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
769
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
770
|
+
transports_version_send: [:rest]
|
771
|
+
|
772
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
773
|
+
|
774
|
+
options.apply_defaults timeout: @config.rpcs.update_shielded_instance_config.timeout,
|
775
|
+
metadata: call_metadata,
|
776
|
+
retry_policy: @config.rpcs.update_shielded_instance_config.retry_policy
|
777
|
+
|
778
|
+
options.apply_defaults timeout: @config.timeout,
|
779
|
+
metadata: @config.metadata,
|
780
|
+
retry_policy: @config.retry_policy
|
781
|
+
|
782
|
+
@notebook_service_stub.update_shielded_instance_config request, options do |result, operation|
|
783
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
784
|
+
yield result, operation if block_given?
|
785
|
+
return result
|
786
|
+
end
|
787
|
+
rescue ::Gapic::Rest::Error => e
|
788
|
+
raise ::Google::Cloud::Error.from_error(e)
|
789
|
+
end
|
790
|
+
|
791
|
+
##
|
792
|
+
# Replaces all the labels of an Instance.
|
793
|
+
#
|
794
|
+
# @overload set_instance_labels(request, options = nil)
|
795
|
+
# Pass arguments to `set_instance_labels` via a request object, either of type
|
796
|
+
# {::Google::Cloud::Notebooks::V1::SetInstanceLabelsRequest} or an equivalent Hash.
|
797
|
+
#
|
798
|
+
# @param request [::Google::Cloud::Notebooks::V1::SetInstanceLabelsRequest, ::Hash]
|
799
|
+
# A request object representing the call parameters. Required. To specify no
|
800
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
801
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
802
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
803
|
+
#
|
804
|
+
# @overload set_instance_labels(name: nil, labels: nil)
|
805
|
+
# Pass arguments to `set_instance_labels` via keyword arguments. Note that at
|
806
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
807
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
808
|
+
#
|
809
|
+
# @param name [::String]
|
810
|
+
# Required. Format:
|
811
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
812
|
+
# @param labels [::Hash{::String => ::String}]
|
813
|
+
# Labels to apply to this instance.
|
814
|
+
# These can be later modified by the setLabels method
|
815
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
816
|
+
# @yieldparam result [::Gapic::Operation]
|
817
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
818
|
+
#
|
819
|
+
# @return [::Gapic::Operation]
|
820
|
+
#
|
821
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
822
|
+
def set_instance_labels request, options = nil
|
823
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
824
|
+
|
825
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::SetInstanceLabelsRequest
|
826
|
+
|
827
|
+
# Converts hash and nil to an options object
|
828
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
829
|
+
|
830
|
+
# Customize the options with defaults
|
831
|
+
call_metadata = @config.rpcs.set_instance_labels.metadata.to_h
|
832
|
+
|
833
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
834
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
835
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
836
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
837
|
+
transports_version_send: [:rest]
|
838
|
+
|
839
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
840
|
+
|
841
|
+
options.apply_defaults timeout: @config.rpcs.set_instance_labels.timeout,
|
842
|
+
metadata: call_metadata,
|
843
|
+
retry_policy: @config.rpcs.set_instance_labels.retry_policy
|
844
|
+
|
845
|
+
options.apply_defaults timeout: @config.timeout,
|
846
|
+
metadata: @config.metadata,
|
847
|
+
retry_policy: @config.retry_policy
|
848
|
+
|
849
|
+
@notebook_service_stub.set_instance_labels request, options do |result, operation|
|
850
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
851
|
+
yield result, operation if block_given?
|
852
|
+
return result
|
853
|
+
end
|
854
|
+
rescue ::Gapic::Rest::Error => e
|
855
|
+
raise ::Google::Cloud::Error.from_error(e)
|
856
|
+
end
|
857
|
+
|
858
|
+
##
|
859
|
+
# Add/update metadata items for an instance.
|
860
|
+
#
|
861
|
+
# @overload update_instance_metadata_items(request, options = nil)
|
862
|
+
# Pass arguments to `update_instance_metadata_items` via a request object, either of type
|
863
|
+
# {::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsRequest} or an equivalent Hash.
|
864
|
+
#
|
865
|
+
# @param request [::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsRequest, ::Hash]
|
866
|
+
# A request object representing the call parameters. Required. To specify no
|
867
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
868
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
869
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
870
|
+
#
|
871
|
+
# @overload update_instance_metadata_items(name: nil, items: nil)
|
872
|
+
# Pass arguments to `update_instance_metadata_items` via keyword arguments. Note that at
|
873
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
874
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
875
|
+
#
|
876
|
+
# @param name [::String]
|
877
|
+
# Required. Format:
|
878
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
879
|
+
# @param items [::Hash{::String => ::String}]
|
880
|
+
# Metadata items to add/update for the instance.
|
881
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
882
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponse]
|
883
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
884
|
+
#
|
885
|
+
# @return [::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponse]
|
886
|
+
#
|
887
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
888
|
+
def update_instance_metadata_items request, options = nil
|
889
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
890
|
+
|
891
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsRequest
|
892
|
+
|
893
|
+
# Converts hash and nil to an options object
|
894
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
895
|
+
|
896
|
+
# Customize the options with defaults
|
897
|
+
call_metadata = @config.rpcs.update_instance_metadata_items.metadata.to_h
|
898
|
+
|
899
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
900
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
901
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
902
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
903
|
+
transports_version_send: [:rest]
|
904
|
+
|
905
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
906
|
+
|
907
|
+
options.apply_defaults timeout: @config.rpcs.update_instance_metadata_items.timeout,
|
908
|
+
metadata: call_metadata,
|
909
|
+
retry_policy: @config.rpcs.update_instance_metadata_items.retry_policy
|
910
|
+
|
911
|
+
options.apply_defaults timeout: @config.timeout,
|
912
|
+
metadata: @config.metadata,
|
913
|
+
retry_policy: @config.retry_policy
|
914
|
+
|
915
|
+
@notebook_service_stub.update_instance_metadata_items request, options do |result, operation|
|
916
|
+
yield result, operation if block_given?
|
917
|
+
return result
|
918
|
+
end
|
919
|
+
rescue ::Gapic::Rest::Error => e
|
920
|
+
raise ::Google::Cloud::Error.from_error(e)
|
921
|
+
end
|
922
|
+
|
923
|
+
##
|
924
|
+
# Deletes a single Instance.
|
925
|
+
#
|
926
|
+
# @overload delete_instance(request, options = nil)
|
927
|
+
# Pass arguments to `delete_instance` via a request object, either of type
|
928
|
+
# {::Google::Cloud::Notebooks::V1::DeleteInstanceRequest} or an equivalent Hash.
|
929
|
+
#
|
930
|
+
# @param request [::Google::Cloud::Notebooks::V1::DeleteInstanceRequest, ::Hash]
|
931
|
+
# A request object representing the call parameters. Required. To specify no
|
932
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
933
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
934
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
935
|
+
#
|
936
|
+
# @overload delete_instance(name: nil)
|
937
|
+
# Pass arguments to `delete_instance` via keyword arguments. Note that at
|
938
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
939
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
940
|
+
#
|
941
|
+
# @param name [::String]
|
942
|
+
# Required. Format:
|
943
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
944
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
945
|
+
# @yieldparam result [::Gapic::Operation]
|
946
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
947
|
+
#
|
948
|
+
# @return [::Gapic::Operation]
|
949
|
+
#
|
950
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
951
|
+
def delete_instance request, options = nil
|
952
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
953
|
+
|
954
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::DeleteInstanceRequest
|
955
|
+
|
956
|
+
# Converts hash and nil to an options object
|
957
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
958
|
+
|
959
|
+
# Customize the options with defaults
|
960
|
+
call_metadata = @config.rpcs.delete_instance.metadata.to_h
|
961
|
+
|
962
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
963
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
964
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
965
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
966
|
+
transports_version_send: [:rest]
|
967
|
+
|
968
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
969
|
+
|
970
|
+
options.apply_defaults timeout: @config.rpcs.delete_instance.timeout,
|
971
|
+
metadata: call_metadata,
|
972
|
+
retry_policy: @config.rpcs.delete_instance.retry_policy
|
973
|
+
|
974
|
+
options.apply_defaults timeout: @config.timeout,
|
975
|
+
metadata: @config.metadata,
|
976
|
+
retry_policy: @config.retry_policy
|
977
|
+
|
978
|
+
@notebook_service_stub.delete_instance request, options do |result, operation|
|
979
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
980
|
+
yield result, operation if block_given?
|
981
|
+
return result
|
982
|
+
end
|
983
|
+
rescue ::Gapic::Rest::Error => e
|
984
|
+
raise ::Google::Cloud::Error.from_error(e)
|
985
|
+
end
|
986
|
+
|
987
|
+
##
|
988
|
+
# Starts a notebook instance.
|
989
|
+
#
|
990
|
+
# @overload start_instance(request, options = nil)
|
991
|
+
# Pass arguments to `start_instance` via a request object, either of type
|
992
|
+
# {::Google::Cloud::Notebooks::V1::StartInstanceRequest} or an equivalent Hash.
|
993
|
+
#
|
994
|
+
# @param request [::Google::Cloud::Notebooks::V1::StartInstanceRequest, ::Hash]
|
995
|
+
# A request object representing the call parameters. Required. To specify no
|
996
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
997
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
998
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
999
|
+
#
|
1000
|
+
# @overload start_instance(name: nil)
|
1001
|
+
# Pass arguments to `start_instance` via keyword arguments. Note that at
|
1002
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1003
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1004
|
+
#
|
1005
|
+
# @param name [::String]
|
1006
|
+
# Required. Format:
|
1007
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
1008
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1009
|
+
# @yieldparam result [::Gapic::Operation]
|
1010
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1011
|
+
#
|
1012
|
+
# @return [::Gapic::Operation]
|
1013
|
+
#
|
1014
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1015
|
+
def start_instance request, options = nil
|
1016
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1017
|
+
|
1018
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::StartInstanceRequest
|
1019
|
+
|
1020
|
+
# Converts hash and nil to an options object
|
1021
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1022
|
+
|
1023
|
+
# Customize the options with defaults
|
1024
|
+
call_metadata = @config.rpcs.start_instance.metadata.to_h
|
1025
|
+
|
1026
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1027
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1028
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1029
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1030
|
+
transports_version_send: [:rest]
|
1031
|
+
|
1032
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1033
|
+
|
1034
|
+
options.apply_defaults timeout: @config.rpcs.start_instance.timeout,
|
1035
|
+
metadata: call_metadata,
|
1036
|
+
retry_policy: @config.rpcs.start_instance.retry_policy
|
1037
|
+
|
1038
|
+
options.apply_defaults timeout: @config.timeout,
|
1039
|
+
metadata: @config.metadata,
|
1040
|
+
retry_policy: @config.retry_policy
|
1041
|
+
|
1042
|
+
@notebook_service_stub.start_instance request, options do |result, operation|
|
1043
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1044
|
+
yield result, operation if block_given?
|
1045
|
+
return result
|
1046
|
+
end
|
1047
|
+
rescue ::Gapic::Rest::Error => e
|
1048
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
##
|
1052
|
+
# Stops a notebook instance.
|
1053
|
+
#
|
1054
|
+
# @overload stop_instance(request, options = nil)
|
1055
|
+
# Pass arguments to `stop_instance` via a request object, either of type
|
1056
|
+
# {::Google::Cloud::Notebooks::V1::StopInstanceRequest} or an equivalent Hash.
|
1057
|
+
#
|
1058
|
+
# @param request [::Google::Cloud::Notebooks::V1::StopInstanceRequest, ::Hash]
|
1059
|
+
# A request object representing the call parameters. Required. To specify no
|
1060
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1061
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1062
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1063
|
+
#
|
1064
|
+
# @overload stop_instance(name: nil)
|
1065
|
+
# Pass arguments to `stop_instance` via keyword arguments. Note that at
|
1066
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1067
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1068
|
+
#
|
1069
|
+
# @param name [::String]
|
1070
|
+
# Required. Format:
|
1071
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
1072
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1073
|
+
# @yieldparam result [::Gapic::Operation]
|
1074
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1075
|
+
#
|
1076
|
+
# @return [::Gapic::Operation]
|
1077
|
+
#
|
1078
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1079
|
+
def stop_instance request, options = nil
|
1080
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1081
|
+
|
1082
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::StopInstanceRequest
|
1083
|
+
|
1084
|
+
# Converts hash and nil to an options object
|
1085
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1086
|
+
|
1087
|
+
# Customize the options with defaults
|
1088
|
+
call_metadata = @config.rpcs.stop_instance.metadata.to_h
|
1089
|
+
|
1090
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1091
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1092
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1093
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1094
|
+
transports_version_send: [:rest]
|
1095
|
+
|
1096
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1097
|
+
|
1098
|
+
options.apply_defaults timeout: @config.rpcs.stop_instance.timeout,
|
1099
|
+
metadata: call_metadata,
|
1100
|
+
retry_policy: @config.rpcs.stop_instance.retry_policy
|
1101
|
+
|
1102
|
+
options.apply_defaults timeout: @config.timeout,
|
1103
|
+
metadata: @config.metadata,
|
1104
|
+
retry_policy: @config.retry_policy
|
1105
|
+
|
1106
|
+
@notebook_service_stub.stop_instance request, options do |result, operation|
|
1107
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1108
|
+
yield result, operation if block_given?
|
1109
|
+
return result
|
1110
|
+
end
|
1111
|
+
rescue ::Gapic::Rest::Error => e
|
1112
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1113
|
+
end
|
1114
|
+
|
1115
|
+
##
|
1116
|
+
# Resets a notebook instance.
|
1117
|
+
#
|
1118
|
+
# @overload reset_instance(request, options = nil)
|
1119
|
+
# Pass arguments to `reset_instance` via a request object, either of type
|
1120
|
+
# {::Google::Cloud::Notebooks::V1::ResetInstanceRequest} or an equivalent Hash.
|
1121
|
+
#
|
1122
|
+
# @param request [::Google::Cloud::Notebooks::V1::ResetInstanceRequest, ::Hash]
|
1123
|
+
# A request object representing the call parameters. Required. To specify no
|
1124
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1125
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1126
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1127
|
+
#
|
1128
|
+
# @overload reset_instance(name: nil)
|
1129
|
+
# Pass arguments to `reset_instance` via keyword arguments. Note that at
|
1130
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1131
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1132
|
+
#
|
1133
|
+
# @param name [::String]
|
1134
|
+
# Required. Format:
|
1135
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
1136
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1137
|
+
# @yieldparam result [::Gapic::Operation]
|
1138
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1139
|
+
#
|
1140
|
+
# @return [::Gapic::Operation]
|
1141
|
+
#
|
1142
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1143
|
+
def reset_instance request, options = nil
|
1144
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1145
|
+
|
1146
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::ResetInstanceRequest
|
1147
|
+
|
1148
|
+
# Converts hash and nil to an options object
|
1149
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1150
|
+
|
1151
|
+
# Customize the options with defaults
|
1152
|
+
call_metadata = @config.rpcs.reset_instance.metadata.to_h
|
1153
|
+
|
1154
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1155
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1156
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1157
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1158
|
+
transports_version_send: [:rest]
|
1159
|
+
|
1160
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1161
|
+
|
1162
|
+
options.apply_defaults timeout: @config.rpcs.reset_instance.timeout,
|
1163
|
+
metadata: call_metadata,
|
1164
|
+
retry_policy: @config.rpcs.reset_instance.retry_policy
|
1165
|
+
|
1166
|
+
options.apply_defaults timeout: @config.timeout,
|
1167
|
+
metadata: @config.metadata,
|
1168
|
+
retry_policy: @config.retry_policy
|
1169
|
+
|
1170
|
+
@notebook_service_stub.reset_instance request, options do |result, operation|
|
1171
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1172
|
+
yield result, operation if block_given?
|
1173
|
+
return result
|
1174
|
+
end
|
1175
|
+
rescue ::Gapic::Rest::Error => e
|
1176
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
##
|
1180
|
+
# Allows notebook instances to
|
1181
|
+
# report their latest instance information to the Notebooks
|
1182
|
+
# API server. The server will merge the reported information to
|
1183
|
+
# the instance metadata store. Do not use this method directly.
|
1184
|
+
#
|
1185
|
+
# @overload report_instance_info(request, options = nil)
|
1186
|
+
# Pass arguments to `report_instance_info` via a request object, either of type
|
1187
|
+
# {::Google::Cloud::Notebooks::V1::ReportInstanceInfoRequest} or an equivalent Hash.
|
1188
|
+
#
|
1189
|
+
# @param request [::Google::Cloud::Notebooks::V1::ReportInstanceInfoRequest, ::Hash]
|
1190
|
+
# A request object representing the call parameters. Required. To specify no
|
1191
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1192
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1193
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1194
|
+
#
|
1195
|
+
# @overload report_instance_info(name: nil, vm_id: nil, metadata: nil)
|
1196
|
+
# Pass arguments to `report_instance_info` via keyword arguments. Note that at
|
1197
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1198
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1199
|
+
#
|
1200
|
+
# @param name [::String]
|
1201
|
+
# Required. Format:
|
1202
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
1203
|
+
# @param vm_id [::String]
|
1204
|
+
# Required. The VM hardware token for authenticating the VM.
|
1205
|
+
# https://cloud.google.com/compute/docs/instances/verifying-instance-identity
|
1206
|
+
# @param metadata [::Hash{::String => ::String}]
|
1207
|
+
# The metadata reported to Notebooks API. This will be merged to the instance
|
1208
|
+
# metadata store
|
1209
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1210
|
+
# @yieldparam result [::Gapic::Operation]
|
1211
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1212
|
+
#
|
1213
|
+
# @return [::Gapic::Operation]
|
1214
|
+
#
|
1215
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1216
|
+
def report_instance_info request, options = nil
|
1217
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1218
|
+
|
1219
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::ReportInstanceInfoRequest
|
1220
|
+
|
1221
|
+
# Converts hash and nil to an options object
|
1222
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1223
|
+
|
1224
|
+
# Customize the options with defaults
|
1225
|
+
call_metadata = @config.rpcs.report_instance_info.metadata.to_h
|
1226
|
+
|
1227
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1228
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1229
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1230
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1231
|
+
transports_version_send: [:rest]
|
1232
|
+
|
1233
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1234
|
+
|
1235
|
+
options.apply_defaults timeout: @config.rpcs.report_instance_info.timeout,
|
1236
|
+
metadata: call_metadata,
|
1237
|
+
retry_policy: @config.rpcs.report_instance_info.retry_policy
|
1238
|
+
|
1239
|
+
options.apply_defaults timeout: @config.timeout,
|
1240
|
+
metadata: @config.metadata,
|
1241
|
+
retry_policy: @config.retry_policy
|
1242
|
+
|
1243
|
+
@notebook_service_stub.report_instance_info request, options do |result, operation|
|
1244
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1245
|
+
yield result, operation if block_given?
|
1246
|
+
return result
|
1247
|
+
end
|
1248
|
+
rescue ::Gapic::Rest::Error => e
|
1249
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1250
|
+
end
|
1251
|
+
|
1252
|
+
##
|
1253
|
+
# Check if a notebook instance is upgradable.
|
1254
|
+
#
|
1255
|
+
# @overload is_instance_upgradeable(request, options = nil)
|
1256
|
+
# Pass arguments to `is_instance_upgradeable` via a request object, either of type
|
1257
|
+
# {::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableRequest} or an equivalent Hash.
|
1258
|
+
#
|
1259
|
+
# @param request [::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableRequest, ::Hash]
|
1260
|
+
# A request object representing the call parameters. Required. To specify no
|
1261
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1262
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1263
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1264
|
+
#
|
1265
|
+
# @overload is_instance_upgradeable(notebook_instance: nil, type: nil)
|
1266
|
+
# Pass arguments to `is_instance_upgradeable` via keyword arguments. Note that at
|
1267
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1268
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1269
|
+
#
|
1270
|
+
# @param notebook_instance [::String]
|
1271
|
+
# Required. Format:
|
1272
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
1273
|
+
# @param type [::Google::Cloud::Notebooks::V1::UpgradeType]
|
1274
|
+
# Optional. The optional UpgradeType. Setting this field will search for additional
|
1275
|
+
# compute images to upgrade this instance.
|
1276
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1277
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableResponse]
|
1278
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1279
|
+
#
|
1280
|
+
# @return [::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableResponse]
|
1281
|
+
#
|
1282
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1283
|
+
def is_instance_upgradeable request, options = nil
|
1284
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1285
|
+
|
1286
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableRequest
|
1287
|
+
|
1288
|
+
# Converts hash and nil to an options object
|
1289
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1290
|
+
|
1291
|
+
# Customize the options with defaults
|
1292
|
+
call_metadata = @config.rpcs.is_instance_upgradeable.metadata.to_h
|
1293
|
+
|
1294
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1295
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1296
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1297
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1298
|
+
transports_version_send: [:rest]
|
1299
|
+
|
1300
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1301
|
+
|
1302
|
+
options.apply_defaults timeout: @config.rpcs.is_instance_upgradeable.timeout,
|
1303
|
+
metadata: call_metadata,
|
1304
|
+
retry_policy: @config.rpcs.is_instance_upgradeable.retry_policy
|
1305
|
+
|
1306
|
+
options.apply_defaults timeout: @config.timeout,
|
1307
|
+
metadata: @config.metadata,
|
1308
|
+
retry_policy: @config.retry_policy
|
1309
|
+
|
1310
|
+
@notebook_service_stub.is_instance_upgradeable request, options do |result, operation|
|
1311
|
+
yield result, operation if block_given?
|
1312
|
+
return result
|
1313
|
+
end
|
1314
|
+
rescue ::Gapic::Rest::Error => e
|
1315
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1316
|
+
end
|
1317
|
+
|
1318
|
+
##
|
1319
|
+
# Check if a notebook instance is healthy.
|
1320
|
+
#
|
1321
|
+
# @overload get_instance_health(request, options = nil)
|
1322
|
+
# Pass arguments to `get_instance_health` via a request object, either of type
|
1323
|
+
# {::Google::Cloud::Notebooks::V1::GetInstanceHealthRequest} or an equivalent Hash.
|
1324
|
+
#
|
1325
|
+
# @param request [::Google::Cloud::Notebooks::V1::GetInstanceHealthRequest, ::Hash]
|
1326
|
+
# A request object representing the call parameters. Required. To specify no
|
1327
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1328
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1329
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1330
|
+
#
|
1331
|
+
# @overload get_instance_health(name: nil)
|
1332
|
+
# Pass arguments to `get_instance_health` via keyword arguments. Note that at
|
1333
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1334
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1335
|
+
#
|
1336
|
+
# @param name [::String]
|
1337
|
+
# Required. Format:
|
1338
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
1339
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1340
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::GetInstanceHealthResponse]
|
1341
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1342
|
+
#
|
1343
|
+
# @return [::Google::Cloud::Notebooks::V1::GetInstanceHealthResponse]
|
1344
|
+
#
|
1345
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1346
|
+
def get_instance_health request, options = nil
|
1347
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1348
|
+
|
1349
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::GetInstanceHealthRequest
|
1350
|
+
|
1351
|
+
# Converts hash and nil to an options object
|
1352
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1353
|
+
|
1354
|
+
# Customize the options with defaults
|
1355
|
+
call_metadata = @config.rpcs.get_instance_health.metadata.to_h
|
1356
|
+
|
1357
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1358
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1359
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1360
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1361
|
+
transports_version_send: [:rest]
|
1362
|
+
|
1363
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1364
|
+
|
1365
|
+
options.apply_defaults timeout: @config.rpcs.get_instance_health.timeout,
|
1366
|
+
metadata: call_metadata,
|
1367
|
+
retry_policy: @config.rpcs.get_instance_health.retry_policy
|
1368
|
+
|
1369
|
+
options.apply_defaults timeout: @config.timeout,
|
1370
|
+
metadata: @config.metadata,
|
1371
|
+
retry_policy: @config.retry_policy
|
1372
|
+
|
1373
|
+
@notebook_service_stub.get_instance_health request, options do |result, operation|
|
1374
|
+
yield result, operation if block_given?
|
1375
|
+
return result
|
1376
|
+
end
|
1377
|
+
rescue ::Gapic::Rest::Error => e
|
1378
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1379
|
+
end
|
1380
|
+
|
1381
|
+
##
|
1382
|
+
# Upgrades a notebook instance to the latest version.
|
1383
|
+
#
|
1384
|
+
# @overload upgrade_instance(request, options = nil)
|
1385
|
+
# Pass arguments to `upgrade_instance` via a request object, either of type
|
1386
|
+
# {::Google::Cloud::Notebooks::V1::UpgradeInstanceRequest} or an equivalent Hash.
|
1387
|
+
#
|
1388
|
+
# @param request [::Google::Cloud::Notebooks::V1::UpgradeInstanceRequest, ::Hash]
|
1389
|
+
# A request object representing the call parameters. Required. To specify no
|
1390
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1391
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1392
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1393
|
+
#
|
1394
|
+
# @overload upgrade_instance(name: nil, type: nil)
|
1395
|
+
# Pass arguments to `upgrade_instance` via keyword arguments. Note that at
|
1396
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1397
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1398
|
+
#
|
1399
|
+
# @param name [::String]
|
1400
|
+
# Required. Format:
|
1401
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
1402
|
+
# @param type [::Google::Cloud::Notebooks::V1::UpgradeType]
|
1403
|
+
# Optional. The optional UpgradeType. Setting this field will search for additional
|
1404
|
+
# compute images to upgrade this instance.
|
1405
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1406
|
+
# @yieldparam result [::Gapic::Operation]
|
1407
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1408
|
+
#
|
1409
|
+
# @return [::Gapic::Operation]
|
1410
|
+
#
|
1411
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1412
|
+
def upgrade_instance request, options = nil
|
1413
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1414
|
+
|
1415
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::UpgradeInstanceRequest
|
1416
|
+
|
1417
|
+
# Converts hash and nil to an options object
|
1418
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1419
|
+
|
1420
|
+
# Customize the options with defaults
|
1421
|
+
call_metadata = @config.rpcs.upgrade_instance.metadata.to_h
|
1422
|
+
|
1423
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1424
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1425
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1426
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1427
|
+
transports_version_send: [:rest]
|
1428
|
+
|
1429
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1430
|
+
|
1431
|
+
options.apply_defaults timeout: @config.rpcs.upgrade_instance.timeout,
|
1432
|
+
metadata: call_metadata,
|
1433
|
+
retry_policy: @config.rpcs.upgrade_instance.retry_policy
|
1434
|
+
|
1435
|
+
options.apply_defaults timeout: @config.timeout,
|
1436
|
+
metadata: @config.metadata,
|
1437
|
+
retry_policy: @config.retry_policy
|
1438
|
+
|
1439
|
+
@notebook_service_stub.upgrade_instance request, options do |result, operation|
|
1440
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1441
|
+
yield result, operation if block_given?
|
1442
|
+
return result
|
1443
|
+
end
|
1444
|
+
rescue ::Gapic::Rest::Error => e
|
1445
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1446
|
+
end
|
1447
|
+
|
1448
|
+
##
|
1449
|
+
# Rollbacks a notebook instance to the previous version.
|
1450
|
+
#
|
1451
|
+
# @overload rollback_instance(request, options = nil)
|
1452
|
+
# Pass arguments to `rollback_instance` via a request object, either of type
|
1453
|
+
# {::Google::Cloud::Notebooks::V1::RollbackInstanceRequest} or an equivalent Hash.
|
1454
|
+
#
|
1455
|
+
# @param request [::Google::Cloud::Notebooks::V1::RollbackInstanceRequest, ::Hash]
|
1456
|
+
# A request object representing the call parameters. Required. To specify no
|
1457
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1458
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1459
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1460
|
+
#
|
1461
|
+
# @overload rollback_instance(name: nil, target_snapshot: nil)
|
1462
|
+
# Pass arguments to `rollback_instance` via keyword arguments. Note that at
|
1463
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1464
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1465
|
+
#
|
1466
|
+
# @param name [::String]
|
1467
|
+
# Required. Format:
|
1468
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
1469
|
+
# @param target_snapshot [::String]
|
1470
|
+
# Required. The snapshot for rollback.
|
1471
|
+
# Example: `projects/test-project/global/snapshots/krwlzipynril`.
|
1472
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1473
|
+
# @yieldparam result [::Gapic::Operation]
|
1474
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1475
|
+
#
|
1476
|
+
# @return [::Gapic::Operation]
|
1477
|
+
#
|
1478
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1479
|
+
def rollback_instance request, options = nil
|
1480
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1481
|
+
|
1482
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::RollbackInstanceRequest
|
1483
|
+
|
1484
|
+
# Converts hash and nil to an options object
|
1485
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1486
|
+
|
1487
|
+
# Customize the options with defaults
|
1488
|
+
call_metadata = @config.rpcs.rollback_instance.metadata.to_h
|
1489
|
+
|
1490
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1491
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1492
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1493
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1494
|
+
transports_version_send: [:rest]
|
1495
|
+
|
1496
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1497
|
+
|
1498
|
+
options.apply_defaults timeout: @config.rpcs.rollback_instance.timeout,
|
1499
|
+
metadata: call_metadata,
|
1500
|
+
retry_policy: @config.rpcs.rollback_instance.retry_policy
|
1501
|
+
|
1502
|
+
options.apply_defaults timeout: @config.timeout,
|
1503
|
+
metadata: @config.metadata,
|
1504
|
+
retry_policy: @config.retry_policy
|
1505
|
+
|
1506
|
+
@notebook_service_stub.rollback_instance request, options do |result, operation|
|
1507
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1508
|
+
yield result, operation if block_given?
|
1509
|
+
return result
|
1510
|
+
end
|
1511
|
+
rescue ::Gapic::Rest::Error => e
|
1512
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1513
|
+
end
|
1514
|
+
|
1515
|
+
##
|
1516
|
+
# Creates a Diagnostic File and runs Diagnostic Tool given an Instance.
|
1517
|
+
#
|
1518
|
+
# @overload diagnose_instance(request, options = nil)
|
1519
|
+
# Pass arguments to `diagnose_instance` via a request object, either of type
|
1520
|
+
# {::Google::Cloud::Notebooks::V1::DiagnoseInstanceRequest} or an equivalent Hash.
|
1521
|
+
#
|
1522
|
+
# @param request [::Google::Cloud::Notebooks::V1::DiagnoseInstanceRequest, ::Hash]
|
1523
|
+
# A request object representing the call parameters. Required. To specify no
|
1524
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1525
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1526
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1527
|
+
#
|
1528
|
+
# @overload diagnose_instance(name: nil, diagnostic_config: nil)
|
1529
|
+
# Pass arguments to `diagnose_instance` via keyword arguments. Note that at
|
1530
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1531
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1532
|
+
#
|
1533
|
+
# @param name [::String]
|
1534
|
+
# Required. Format:
|
1535
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
1536
|
+
# @param diagnostic_config [::Google::Cloud::Notebooks::V1::DiagnosticConfig, ::Hash]
|
1537
|
+
# Required. Defines flags that are used to run the diagnostic tool
|
1538
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1539
|
+
# @yieldparam result [::Gapic::Operation]
|
1540
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1541
|
+
#
|
1542
|
+
# @return [::Gapic::Operation]
|
1543
|
+
#
|
1544
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1545
|
+
def diagnose_instance request, options = nil
|
1546
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1547
|
+
|
1548
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::DiagnoseInstanceRequest
|
1549
|
+
|
1550
|
+
# Converts hash and nil to an options object
|
1551
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1552
|
+
|
1553
|
+
# Customize the options with defaults
|
1554
|
+
call_metadata = @config.rpcs.diagnose_instance.metadata.to_h
|
1555
|
+
|
1556
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1557
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1558
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1559
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1560
|
+
transports_version_send: [:rest]
|
1561
|
+
|
1562
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1563
|
+
|
1564
|
+
options.apply_defaults timeout: @config.rpcs.diagnose_instance.timeout,
|
1565
|
+
metadata: call_metadata,
|
1566
|
+
retry_policy: @config.rpcs.diagnose_instance.retry_policy
|
1567
|
+
|
1568
|
+
options.apply_defaults timeout: @config.timeout,
|
1569
|
+
metadata: @config.metadata,
|
1570
|
+
retry_policy: @config.retry_policy
|
1571
|
+
|
1572
|
+
@notebook_service_stub.diagnose_instance request, options do |result, operation|
|
1573
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1574
|
+
yield result, operation if block_given?
|
1575
|
+
return result
|
1576
|
+
end
|
1577
|
+
rescue ::Gapic::Rest::Error => e
|
1578
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1579
|
+
end
|
1580
|
+
|
1581
|
+
##
|
1582
|
+
# Allows notebook instances to
|
1583
|
+
# call this endpoint to upgrade themselves. Do not use this method directly.
|
1584
|
+
#
|
1585
|
+
# @overload upgrade_instance_internal(request, options = nil)
|
1586
|
+
# Pass arguments to `upgrade_instance_internal` via a request object, either of type
|
1587
|
+
# {::Google::Cloud::Notebooks::V1::UpgradeInstanceInternalRequest} or an equivalent Hash.
|
1588
|
+
#
|
1589
|
+
# @param request [::Google::Cloud::Notebooks::V1::UpgradeInstanceInternalRequest, ::Hash]
|
1590
|
+
# A request object representing the call parameters. Required. To specify no
|
1591
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1592
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1593
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1594
|
+
#
|
1595
|
+
# @overload upgrade_instance_internal(name: nil, vm_id: nil, type: nil)
|
1596
|
+
# Pass arguments to `upgrade_instance_internal` via keyword arguments. Note that at
|
1597
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1598
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1599
|
+
#
|
1600
|
+
# @param name [::String]
|
1601
|
+
# Required. Format:
|
1602
|
+
# `projects/{project_id}/locations/{location}/instances/{instance_id}`
|
1603
|
+
# @param vm_id [::String]
|
1604
|
+
# Required. The VM hardware token for authenticating the VM.
|
1605
|
+
# https://cloud.google.com/compute/docs/instances/verifying-instance-identity
|
1606
|
+
# @param type [::Google::Cloud::Notebooks::V1::UpgradeType]
|
1607
|
+
# Optional. The optional UpgradeType. Setting this field will search for additional
|
1608
|
+
# compute images to upgrade this instance.
|
1609
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1610
|
+
# @yieldparam result [::Gapic::Operation]
|
1611
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1612
|
+
#
|
1613
|
+
# @return [::Gapic::Operation]
|
1614
|
+
#
|
1615
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1616
|
+
def upgrade_instance_internal request, options = nil
|
1617
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1618
|
+
|
1619
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::UpgradeInstanceInternalRequest
|
1620
|
+
|
1621
|
+
# Converts hash and nil to an options object
|
1622
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1623
|
+
|
1624
|
+
# Customize the options with defaults
|
1625
|
+
call_metadata = @config.rpcs.upgrade_instance_internal.metadata.to_h
|
1626
|
+
|
1627
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1628
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1629
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1630
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1631
|
+
transports_version_send: [:rest]
|
1632
|
+
|
1633
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1634
|
+
|
1635
|
+
options.apply_defaults timeout: @config.rpcs.upgrade_instance_internal.timeout,
|
1636
|
+
metadata: call_metadata,
|
1637
|
+
retry_policy: @config.rpcs.upgrade_instance_internal.retry_policy
|
1638
|
+
|
1639
|
+
options.apply_defaults timeout: @config.timeout,
|
1640
|
+
metadata: @config.metadata,
|
1641
|
+
retry_policy: @config.retry_policy
|
1642
|
+
|
1643
|
+
@notebook_service_stub.upgrade_instance_internal request, options do |result, operation|
|
1644
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1645
|
+
yield result, operation if block_given?
|
1646
|
+
return result
|
1647
|
+
end
|
1648
|
+
rescue ::Gapic::Rest::Error => e
|
1649
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1650
|
+
end
|
1651
|
+
|
1652
|
+
##
|
1653
|
+
# Lists environments in a project.
|
1654
|
+
#
|
1655
|
+
# @overload list_environments(request, options = nil)
|
1656
|
+
# Pass arguments to `list_environments` via a request object, either of type
|
1657
|
+
# {::Google::Cloud::Notebooks::V1::ListEnvironmentsRequest} or an equivalent Hash.
|
1658
|
+
#
|
1659
|
+
# @param request [::Google::Cloud::Notebooks::V1::ListEnvironmentsRequest, ::Hash]
|
1660
|
+
# A request object representing the call parameters. Required. To specify no
|
1661
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1662
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1663
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1664
|
+
#
|
1665
|
+
# @overload list_environments(parent: nil, page_size: nil, page_token: nil)
|
1666
|
+
# Pass arguments to `list_environments` via keyword arguments. Note that at
|
1667
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1668
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1669
|
+
#
|
1670
|
+
# @param parent [::String]
|
1671
|
+
# Required. Format: `projects/{project_id}/locations/{location}`
|
1672
|
+
# @param page_size [::Integer]
|
1673
|
+
# Maximum return size of the list call.
|
1674
|
+
# @param page_token [::String]
|
1675
|
+
# A previous returned page token that can be used to continue listing from
|
1676
|
+
# the last result.
|
1677
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1678
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::ListEnvironmentsResponse]
|
1679
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1680
|
+
#
|
1681
|
+
# @return [::Google::Cloud::Notebooks::V1::ListEnvironmentsResponse]
|
1682
|
+
#
|
1683
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1684
|
+
def list_environments request, options = nil
|
1685
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1686
|
+
|
1687
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::ListEnvironmentsRequest
|
1688
|
+
|
1689
|
+
# Converts hash and nil to an options object
|
1690
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1691
|
+
|
1692
|
+
# Customize the options with defaults
|
1693
|
+
call_metadata = @config.rpcs.list_environments.metadata.to_h
|
1694
|
+
|
1695
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1696
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1697
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1698
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1699
|
+
transports_version_send: [:rest]
|
1700
|
+
|
1701
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1702
|
+
|
1703
|
+
options.apply_defaults timeout: @config.rpcs.list_environments.timeout,
|
1704
|
+
metadata: call_metadata,
|
1705
|
+
retry_policy: @config.rpcs.list_environments.retry_policy
|
1706
|
+
|
1707
|
+
options.apply_defaults timeout: @config.timeout,
|
1708
|
+
metadata: @config.metadata,
|
1709
|
+
retry_policy: @config.retry_policy
|
1710
|
+
|
1711
|
+
@notebook_service_stub.list_environments request, options do |result, operation|
|
1712
|
+
yield result, operation if block_given?
|
1713
|
+
return result
|
1714
|
+
end
|
1715
|
+
rescue ::Gapic::Rest::Error => e
|
1716
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1717
|
+
end
|
1718
|
+
|
1719
|
+
##
|
1720
|
+
# Gets details of a single Environment.
|
1721
|
+
#
|
1722
|
+
# @overload get_environment(request, options = nil)
|
1723
|
+
# Pass arguments to `get_environment` via a request object, either of type
|
1724
|
+
# {::Google::Cloud::Notebooks::V1::GetEnvironmentRequest} or an equivalent Hash.
|
1725
|
+
#
|
1726
|
+
# @param request [::Google::Cloud::Notebooks::V1::GetEnvironmentRequest, ::Hash]
|
1727
|
+
# A request object representing the call parameters. Required. To specify no
|
1728
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1729
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1730
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1731
|
+
#
|
1732
|
+
# @overload get_environment(name: nil)
|
1733
|
+
# Pass arguments to `get_environment` via keyword arguments. Note that at
|
1734
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1735
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1736
|
+
#
|
1737
|
+
# @param name [::String]
|
1738
|
+
# Required. Format:
|
1739
|
+
# `projects/{project_id}/locations/{location}/environments/{environment_id}`
|
1740
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1741
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::Environment]
|
1742
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1743
|
+
#
|
1744
|
+
# @return [::Google::Cloud::Notebooks::V1::Environment]
|
1745
|
+
#
|
1746
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1747
|
+
def get_environment request, options = nil
|
1748
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1749
|
+
|
1750
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::GetEnvironmentRequest
|
1751
|
+
|
1752
|
+
# Converts hash and nil to an options object
|
1753
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1754
|
+
|
1755
|
+
# Customize the options with defaults
|
1756
|
+
call_metadata = @config.rpcs.get_environment.metadata.to_h
|
1757
|
+
|
1758
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1759
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1760
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1761
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1762
|
+
transports_version_send: [:rest]
|
1763
|
+
|
1764
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1765
|
+
|
1766
|
+
options.apply_defaults timeout: @config.rpcs.get_environment.timeout,
|
1767
|
+
metadata: call_metadata,
|
1768
|
+
retry_policy: @config.rpcs.get_environment.retry_policy
|
1769
|
+
|
1770
|
+
options.apply_defaults timeout: @config.timeout,
|
1771
|
+
metadata: @config.metadata,
|
1772
|
+
retry_policy: @config.retry_policy
|
1773
|
+
|
1774
|
+
@notebook_service_stub.get_environment request, options do |result, operation|
|
1775
|
+
yield result, operation if block_given?
|
1776
|
+
return result
|
1777
|
+
end
|
1778
|
+
rescue ::Gapic::Rest::Error => e
|
1779
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1780
|
+
end
|
1781
|
+
|
1782
|
+
##
|
1783
|
+
# Creates a new Environment.
|
1784
|
+
#
|
1785
|
+
# @overload create_environment(request, options = nil)
|
1786
|
+
# Pass arguments to `create_environment` via a request object, either of type
|
1787
|
+
# {::Google::Cloud::Notebooks::V1::CreateEnvironmentRequest} or an equivalent Hash.
|
1788
|
+
#
|
1789
|
+
# @param request [::Google::Cloud::Notebooks::V1::CreateEnvironmentRequest, ::Hash]
|
1790
|
+
# A request object representing the call parameters. Required. To specify no
|
1791
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1792
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1793
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1794
|
+
#
|
1795
|
+
# @overload create_environment(parent: nil, environment_id: nil, environment: nil)
|
1796
|
+
# Pass arguments to `create_environment` via keyword arguments. Note that at
|
1797
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1798
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1799
|
+
#
|
1800
|
+
# @param parent [::String]
|
1801
|
+
# Required. Format: `projects/{project_id}/locations/{location}`
|
1802
|
+
# @param environment_id [::String]
|
1803
|
+
# Required. User-defined unique ID of this environment. The `environment_id` must
|
1804
|
+
# be 1 to 63 characters long and contain only lowercase letters,
|
1805
|
+
# numeric characters, and dashes. The first character must be a lowercase
|
1806
|
+
# letter and the last character cannot be a dash.
|
1807
|
+
# @param environment [::Google::Cloud::Notebooks::V1::Environment, ::Hash]
|
1808
|
+
# Required. The environment to be created.
|
1809
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1810
|
+
# @yieldparam result [::Gapic::Operation]
|
1811
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1812
|
+
#
|
1813
|
+
# @return [::Gapic::Operation]
|
1814
|
+
#
|
1815
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1816
|
+
def create_environment request, options = nil
|
1817
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1818
|
+
|
1819
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::CreateEnvironmentRequest
|
1820
|
+
|
1821
|
+
# Converts hash and nil to an options object
|
1822
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1823
|
+
|
1824
|
+
# Customize the options with defaults
|
1825
|
+
call_metadata = @config.rpcs.create_environment.metadata.to_h
|
1826
|
+
|
1827
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1828
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1829
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1830
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1831
|
+
transports_version_send: [:rest]
|
1832
|
+
|
1833
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1834
|
+
|
1835
|
+
options.apply_defaults timeout: @config.rpcs.create_environment.timeout,
|
1836
|
+
metadata: call_metadata,
|
1837
|
+
retry_policy: @config.rpcs.create_environment.retry_policy
|
1838
|
+
|
1839
|
+
options.apply_defaults timeout: @config.timeout,
|
1840
|
+
metadata: @config.metadata,
|
1841
|
+
retry_policy: @config.retry_policy
|
1842
|
+
|
1843
|
+
@notebook_service_stub.create_environment request, options do |result, operation|
|
1844
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1845
|
+
yield result, operation if block_given?
|
1846
|
+
return result
|
1847
|
+
end
|
1848
|
+
rescue ::Gapic::Rest::Error => e
|
1849
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1850
|
+
end
|
1851
|
+
|
1852
|
+
##
|
1853
|
+
# Deletes a single Environment.
|
1854
|
+
#
|
1855
|
+
# @overload delete_environment(request, options = nil)
|
1856
|
+
# Pass arguments to `delete_environment` via a request object, either of type
|
1857
|
+
# {::Google::Cloud::Notebooks::V1::DeleteEnvironmentRequest} or an equivalent Hash.
|
1858
|
+
#
|
1859
|
+
# @param request [::Google::Cloud::Notebooks::V1::DeleteEnvironmentRequest, ::Hash]
|
1860
|
+
# A request object representing the call parameters. Required. To specify no
|
1861
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1862
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1863
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1864
|
+
#
|
1865
|
+
# @overload delete_environment(name: nil)
|
1866
|
+
# Pass arguments to `delete_environment` via keyword arguments. Note that at
|
1867
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1868
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1869
|
+
#
|
1870
|
+
# @param name [::String]
|
1871
|
+
# Required. Format:
|
1872
|
+
# `projects/{project_id}/locations/{location}/environments/{environment_id}`
|
1873
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1874
|
+
# @yieldparam result [::Gapic::Operation]
|
1875
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1876
|
+
#
|
1877
|
+
# @return [::Gapic::Operation]
|
1878
|
+
#
|
1879
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1880
|
+
def delete_environment request, options = nil
|
1881
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1882
|
+
|
1883
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::DeleteEnvironmentRequest
|
1884
|
+
|
1885
|
+
# Converts hash and nil to an options object
|
1886
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1887
|
+
|
1888
|
+
# Customize the options with defaults
|
1889
|
+
call_metadata = @config.rpcs.delete_environment.metadata.to_h
|
1890
|
+
|
1891
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1892
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1893
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1894
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1895
|
+
transports_version_send: [:rest]
|
1896
|
+
|
1897
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1898
|
+
|
1899
|
+
options.apply_defaults timeout: @config.rpcs.delete_environment.timeout,
|
1900
|
+
metadata: call_metadata,
|
1901
|
+
retry_policy: @config.rpcs.delete_environment.retry_policy
|
1902
|
+
|
1903
|
+
options.apply_defaults timeout: @config.timeout,
|
1904
|
+
metadata: @config.metadata,
|
1905
|
+
retry_policy: @config.retry_policy
|
1906
|
+
|
1907
|
+
@notebook_service_stub.delete_environment request, options do |result, operation|
|
1908
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1909
|
+
yield result, operation if block_given?
|
1910
|
+
return result
|
1911
|
+
end
|
1912
|
+
rescue ::Gapic::Rest::Error => e
|
1913
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1914
|
+
end
|
1915
|
+
|
1916
|
+
##
|
1917
|
+
# Lists schedules in a given project and location.
|
1918
|
+
#
|
1919
|
+
# @overload list_schedules(request, options = nil)
|
1920
|
+
# Pass arguments to `list_schedules` via a request object, either of type
|
1921
|
+
# {::Google::Cloud::Notebooks::V1::ListSchedulesRequest} or an equivalent Hash.
|
1922
|
+
#
|
1923
|
+
# @param request [::Google::Cloud::Notebooks::V1::ListSchedulesRequest, ::Hash]
|
1924
|
+
# A request object representing the call parameters. Required. To specify no
|
1925
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1926
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1927
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1928
|
+
#
|
1929
|
+
# @overload list_schedules(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1930
|
+
# Pass arguments to `list_schedules` via keyword arguments. Note that at
|
1931
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1932
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1933
|
+
#
|
1934
|
+
# @param parent [::String]
|
1935
|
+
# Required. Format:
|
1936
|
+
# `parent=projects/{project_id}/locations/{location}`
|
1937
|
+
# @param page_size [::Integer]
|
1938
|
+
# Maximum return size of the list call.
|
1939
|
+
# @param page_token [::String]
|
1940
|
+
# A previous returned page token that can be used to continue listing
|
1941
|
+
# from the last result.
|
1942
|
+
# @param filter [::String]
|
1943
|
+
# Filter applied to resulting schedules.
|
1944
|
+
# @param order_by [::String]
|
1945
|
+
# Field to order results by.
|
1946
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1947
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::ListSchedulesResponse]
|
1948
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1949
|
+
#
|
1950
|
+
# @return [::Google::Cloud::Notebooks::V1::ListSchedulesResponse]
|
1951
|
+
#
|
1952
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1953
|
+
def list_schedules request, options = nil
|
1954
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1955
|
+
|
1956
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::ListSchedulesRequest
|
1957
|
+
|
1958
|
+
# Converts hash and nil to an options object
|
1959
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1960
|
+
|
1961
|
+
# Customize the options with defaults
|
1962
|
+
call_metadata = @config.rpcs.list_schedules.metadata.to_h
|
1963
|
+
|
1964
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1965
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1966
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1967
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
1968
|
+
transports_version_send: [:rest]
|
1969
|
+
|
1970
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1971
|
+
|
1972
|
+
options.apply_defaults timeout: @config.rpcs.list_schedules.timeout,
|
1973
|
+
metadata: call_metadata,
|
1974
|
+
retry_policy: @config.rpcs.list_schedules.retry_policy
|
1975
|
+
|
1976
|
+
options.apply_defaults timeout: @config.timeout,
|
1977
|
+
metadata: @config.metadata,
|
1978
|
+
retry_policy: @config.retry_policy
|
1979
|
+
|
1980
|
+
@notebook_service_stub.list_schedules request, options do |result, operation|
|
1981
|
+
yield result, operation if block_given?
|
1982
|
+
return result
|
1983
|
+
end
|
1984
|
+
rescue ::Gapic::Rest::Error => e
|
1985
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1986
|
+
end
|
1987
|
+
|
1988
|
+
##
|
1989
|
+
# Gets details of schedule
|
1990
|
+
#
|
1991
|
+
# @overload get_schedule(request, options = nil)
|
1992
|
+
# Pass arguments to `get_schedule` via a request object, either of type
|
1993
|
+
# {::Google::Cloud::Notebooks::V1::GetScheduleRequest} or an equivalent Hash.
|
1994
|
+
#
|
1995
|
+
# @param request [::Google::Cloud::Notebooks::V1::GetScheduleRequest, ::Hash]
|
1996
|
+
# A request object representing the call parameters. Required. To specify no
|
1997
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1998
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1999
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2000
|
+
#
|
2001
|
+
# @overload get_schedule(name: nil)
|
2002
|
+
# Pass arguments to `get_schedule` via keyword arguments. Note that at
|
2003
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2004
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2005
|
+
#
|
2006
|
+
# @param name [::String]
|
2007
|
+
# Required. Format:
|
2008
|
+
# `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
|
2009
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2010
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::Schedule]
|
2011
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2012
|
+
#
|
2013
|
+
# @return [::Google::Cloud::Notebooks::V1::Schedule]
|
2014
|
+
#
|
2015
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2016
|
+
def get_schedule request, options = nil
|
2017
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2018
|
+
|
2019
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::GetScheduleRequest
|
2020
|
+
|
2021
|
+
# Converts hash and nil to an options object
|
2022
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2023
|
+
|
2024
|
+
# Customize the options with defaults
|
2025
|
+
call_metadata = @config.rpcs.get_schedule.metadata.to_h
|
2026
|
+
|
2027
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2028
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2029
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2030
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
2031
|
+
transports_version_send: [:rest]
|
2032
|
+
|
2033
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2034
|
+
|
2035
|
+
options.apply_defaults timeout: @config.rpcs.get_schedule.timeout,
|
2036
|
+
metadata: call_metadata,
|
2037
|
+
retry_policy: @config.rpcs.get_schedule.retry_policy
|
2038
|
+
|
2039
|
+
options.apply_defaults timeout: @config.timeout,
|
2040
|
+
metadata: @config.metadata,
|
2041
|
+
retry_policy: @config.retry_policy
|
2042
|
+
|
2043
|
+
@notebook_service_stub.get_schedule request, options do |result, operation|
|
2044
|
+
yield result, operation if block_given?
|
2045
|
+
return result
|
2046
|
+
end
|
2047
|
+
rescue ::Gapic::Rest::Error => e
|
2048
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2049
|
+
end
|
2050
|
+
|
2051
|
+
##
|
2052
|
+
# Deletes schedule and all underlying jobs
|
2053
|
+
#
|
2054
|
+
# @overload delete_schedule(request, options = nil)
|
2055
|
+
# Pass arguments to `delete_schedule` via a request object, either of type
|
2056
|
+
# {::Google::Cloud::Notebooks::V1::DeleteScheduleRequest} or an equivalent Hash.
|
2057
|
+
#
|
2058
|
+
# @param request [::Google::Cloud::Notebooks::V1::DeleteScheduleRequest, ::Hash]
|
2059
|
+
# A request object representing the call parameters. Required. To specify no
|
2060
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2061
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2062
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2063
|
+
#
|
2064
|
+
# @overload delete_schedule(name: nil)
|
2065
|
+
# Pass arguments to `delete_schedule` via keyword arguments. Note that at
|
2066
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2067
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2068
|
+
#
|
2069
|
+
# @param name [::String]
|
2070
|
+
# Required. Format:
|
2071
|
+
# `projects/{project_id}/locations/{location}/schedules/{schedule_id}`
|
2072
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2073
|
+
# @yieldparam result [::Gapic::Operation]
|
2074
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2075
|
+
#
|
2076
|
+
# @return [::Gapic::Operation]
|
2077
|
+
#
|
2078
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2079
|
+
def delete_schedule request, options = nil
|
2080
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2081
|
+
|
2082
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::DeleteScheduleRequest
|
2083
|
+
|
2084
|
+
# Converts hash and nil to an options object
|
2085
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2086
|
+
|
2087
|
+
# Customize the options with defaults
|
2088
|
+
call_metadata = @config.rpcs.delete_schedule.metadata.to_h
|
2089
|
+
|
2090
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2091
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2092
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2093
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
2094
|
+
transports_version_send: [:rest]
|
2095
|
+
|
2096
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2097
|
+
|
2098
|
+
options.apply_defaults timeout: @config.rpcs.delete_schedule.timeout,
|
2099
|
+
metadata: call_metadata,
|
2100
|
+
retry_policy: @config.rpcs.delete_schedule.retry_policy
|
2101
|
+
|
2102
|
+
options.apply_defaults timeout: @config.timeout,
|
2103
|
+
metadata: @config.metadata,
|
2104
|
+
retry_policy: @config.retry_policy
|
2105
|
+
|
2106
|
+
@notebook_service_stub.delete_schedule request, options do |result, operation|
|
2107
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2108
|
+
yield result, operation if block_given?
|
2109
|
+
return result
|
2110
|
+
end
|
2111
|
+
rescue ::Gapic::Rest::Error => e
|
2112
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2113
|
+
end
|
2114
|
+
|
2115
|
+
##
|
2116
|
+
# Creates a new Scheduled Notebook in a given project and location.
|
2117
|
+
#
|
2118
|
+
# @overload create_schedule(request, options = nil)
|
2119
|
+
# Pass arguments to `create_schedule` via a request object, either of type
|
2120
|
+
# {::Google::Cloud::Notebooks::V1::CreateScheduleRequest} or an equivalent Hash.
|
2121
|
+
#
|
2122
|
+
# @param request [::Google::Cloud::Notebooks::V1::CreateScheduleRequest, ::Hash]
|
2123
|
+
# A request object representing the call parameters. Required. To specify no
|
2124
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2125
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2126
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2127
|
+
#
|
2128
|
+
# @overload create_schedule(parent: nil, schedule_id: nil, schedule: nil)
|
2129
|
+
# Pass arguments to `create_schedule` via keyword arguments. Note that at
|
2130
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2131
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2132
|
+
#
|
2133
|
+
# @param parent [::String]
|
2134
|
+
# Required. Format:
|
2135
|
+
# `parent=projects/{project_id}/locations/{location}`
|
2136
|
+
# @param schedule_id [::String]
|
2137
|
+
# Required. User-defined unique ID of this schedule.
|
2138
|
+
# @param schedule [::Google::Cloud::Notebooks::V1::Schedule, ::Hash]
|
2139
|
+
# Required. The schedule to be created.
|
2140
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2141
|
+
# @yieldparam result [::Gapic::Operation]
|
2142
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2143
|
+
#
|
2144
|
+
# @return [::Gapic::Operation]
|
2145
|
+
#
|
2146
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2147
|
+
def create_schedule request, options = nil
|
2148
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2149
|
+
|
2150
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::CreateScheduleRequest
|
2151
|
+
|
2152
|
+
# Converts hash and nil to an options object
|
2153
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2154
|
+
|
2155
|
+
# Customize the options with defaults
|
2156
|
+
call_metadata = @config.rpcs.create_schedule.metadata.to_h
|
2157
|
+
|
2158
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2159
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2160
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2161
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
2162
|
+
transports_version_send: [:rest]
|
2163
|
+
|
2164
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2165
|
+
|
2166
|
+
options.apply_defaults timeout: @config.rpcs.create_schedule.timeout,
|
2167
|
+
metadata: call_metadata,
|
2168
|
+
retry_policy: @config.rpcs.create_schedule.retry_policy
|
2169
|
+
|
2170
|
+
options.apply_defaults timeout: @config.timeout,
|
2171
|
+
metadata: @config.metadata,
|
2172
|
+
retry_policy: @config.retry_policy
|
2173
|
+
|
2174
|
+
@notebook_service_stub.create_schedule request, options do |result, operation|
|
2175
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2176
|
+
yield result, operation if block_given?
|
2177
|
+
return result
|
2178
|
+
end
|
2179
|
+
rescue ::Gapic::Rest::Error => e
|
2180
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2181
|
+
end
|
2182
|
+
|
2183
|
+
##
|
2184
|
+
# Triggers execution of an existing schedule.
|
2185
|
+
#
|
2186
|
+
# @overload trigger_schedule(request, options = nil)
|
2187
|
+
# Pass arguments to `trigger_schedule` via a request object, either of type
|
2188
|
+
# {::Google::Cloud::Notebooks::V1::TriggerScheduleRequest} or an equivalent Hash.
|
2189
|
+
#
|
2190
|
+
# @param request [::Google::Cloud::Notebooks::V1::TriggerScheduleRequest, ::Hash]
|
2191
|
+
# A request object representing the call parameters. Required. To specify no
|
2192
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2193
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2194
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2195
|
+
#
|
2196
|
+
# @overload trigger_schedule(name: nil)
|
2197
|
+
# Pass arguments to `trigger_schedule` via keyword arguments. Note that at
|
2198
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2199
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2200
|
+
#
|
2201
|
+
# @param name [::String]
|
2202
|
+
# Required. Format:
|
2203
|
+
# `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`
|
2204
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2205
|
+
# @yieldparam result [::Gapic::Operation]
|
2206
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2207
|
+
#
|
2208
|
+
# @return [::Gapic::Operation]
|
2209
|
+
#
|
2210
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2211
|
+
def trigger_schedule request, options = nil
|
2212
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2213
|
+
|
2214
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::TriggerScheduleRequest
|
2215
|
+
|
2216
|
+
# Converts hash and nil to an options object
|
2217
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2218
|
+
|
2219
|
+
# Customize the options with defaults
|
2220
|
+
call_metadata = @config.rpcs.trigger_schedule.metadata.to_h
|
2221
|
+
|
2222
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2223
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2224
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2225
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
2226
|
+
transports_version_send: [:rest]
|
2227
|
+
|
2228
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2229
|
+
|
2230
|
+
options.apply_defaults timeout: @config.rpcs.trigger_schedule.timeout,
|
2231
|
+
metadata: call_metadata,
|
2232
|
+
retry_policy: @config.rpcs.trigger_schedule.retry_policy
|
2233
|
+
|
2234
|
+
options.apply_defaults timeout: @config.timeout,
|
2235
|
+
metadata: @config.metadata,
|
2236
|
+
retry_policy: @config.retry_policy
|
2237
|
+
|
2238
|
+
@notebook_service_stub.trigger_schedule request, options do |result, operation|
|
2239
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2240
|
+
yield result, operation if block_given?
|
2241
|
+
return result
|
2242
|
+
end
|
2243
|
+
rescue ::Gapic::Rest::Error => e
|
2244
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2245
|
+
end
|
2246
|
+
|
2247
|
+
##
|
2248
|
+
# Lists executions in a given project and location
|
2249
|
+
#
|
2250
|
+
# @overload list_executions(request, options = nil)
|
2251
|
+
# Pass arguments to `list_executions` via a request object, either of type
|
2252
|
+
# {::Google::Cloud::Notebooks::V1::ListExecutionsRequest} or an equivalent Hash.
|
2253
|
+
#
|
2254
|
+
# @param request [::Google::Cloud::Notebooks::V1::ListExecutionsRequest, ::Hash]
|
2255
|
+
# A request object representing the call parameters. Required. To specify no
|
2256
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2257
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2258
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2259
|
+
#
|
2260
|
+
# @overload list_executions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2261
|
+
# Pass arguments to `list_executions` via keyword arguments. Note that at
|
2262
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2263
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2264
|
+
#
|
2265
|
+
# @param parent [::String]
|
2266
|
+
# Required. Format:
|
2267
|
+
# `parent=projects/{project_id}/locations/{location}`
|
2268
|
+
# @param page_size [::Integer]
|
2269
|
+
# Maximum return size of the list call.
|
2270
|
+
# @param page_token [::String]
|
2271
|
+
# A previous returned page token that can be used to continue listing
|
2272
|
+
# from the last result.
|
2273
|
+
# @param filter [::String]
|
2274
|
+
# Filter applied to resulting executions. Currently only supports filtering
|
2275
|
+
# executions by a specified `schedule_id`.
|
2276
|
+
# Format: `schedule_id=<Schedule_ID>`
|
2277
|
+
# @param order_by [::String]
|
2278
|
+
# Sort by field.
|
2279
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2280
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::ListExecutionsResponse]
|
2281
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2282
|
+
#
|
2283
|
+
# @return [::Google::Cloud::Notebooks::V1::ListExecutionsResponse]
|
2284
|
+
#
|
2285
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2286
|
+
def list_executions request, options = nil
|
2287
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2288
|
+
|
2289
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::ListExecutionsRequest
|
2290
|
+
|
2291
|
+
# Converts hash and nil to an options object
|
2292
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2293
|
+
|
2294
|
+
# Customize the options with defaults
|
2295
|
+
call_metadata = @config.rpcs.list_executions.metadata.to_h
|
2296
|
+
|
2297
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2298
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2299
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2300
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
2301
|
+
transports_version_send: [:rest]
|
2302
|
+
|
2303
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2304
|
+
|
2305
|
+
options.apply_defaults timeout: @config.rpcs.list_executions.timeout,
|
2306
|
+
metadata: call_metadata,
|
2307
|
+
retry_policy: @config.rpcs.list_executions.retry_policy
|
2308
|
+
|
2309
|
+
options.apply_defaults timeout: @config.timeout,
|
2310
|
+
metadata: @config.metadata,
|
2311
|
+
retry_policy: @config.retry_policy
|
2312
|
+
|
2313
|
+
@notebook_service_stub.list_executions request, options do |result, operation|
|
2314
|
+
yield result, operation if block_given?
|
2315
|
+
return result
|
2316
|
+
end
|
2317
|
+
rescue ::Gapic::Rest::Error => e
|
2318
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2319
|
+
end
|
2320
|
+
|
2321
|
+
##
|
2322
|
+
# Gets details of executions
|
2323
|
+
#
|
2324
|
+
# @overload get_execution(request, options = nil)
|
2325
|
+
# Pass arguments to `get_execution` via a request object, either of type
|
2326
|
+
# {::Google::Cloud::Notebooks::V1::GetExecutionRequest} or an equivalent Hash.
|
2327
|
+
#
|
2328
|
+
# @param request [::Google::Cloud::Notebooks::V1::GetExecutionRequest, ::Hash]
|
2329
|
+
# A request object representing the call parameters. Required. To specify no
|
2330
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2331
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2332
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2333
|
+
#
|
2334
|
+
# @overload get_execution(name: nil)
|
2335
|
+
# Pass arguments to `get_execution` via keyword arguments. Note that at
|
2336
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2337
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2338
|
+
#
|
2339
|
+
# @param name [::String]
|
2340
|
+
# Required. Format:
|
2341
|
+
# `projects/{project_id}/locations/{location}/executions/{execution_id}`
|
2342
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2343
|
+
# @yieldparam result [::Google::Cloud::Notebooks::V1::Execution]
|
2344
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2345
|
+
#
|
2346
|
+
# @return [::Google::Cloud::Notebooks::V1::Execution]
|
2347
|
+
#
|
2348
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2349
|
+
def get_execution request, options = nil
|
2350
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2351
|
+
|
2352
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::GetExecutionRequest
|
2353
|
+
|
2354
|
+
# Converts hash and nil to an options object
|
2355
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2356
|
+
|
2357
|
+
# Customize the options with defaults
|
2358
|
+
call_metadata = @config.rpcs.get_execution.metadata.to_h
|
2359
|
+
|
2360
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2361
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2362
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2363
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
2364
|
+
transports_version_send: [:rest]
|
2365
|
+
|
2366
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2367
|
+
|
2368
|
+
options.apply_defaults timeout: @config.rpcs.get_execution.timeout,
|
2369
|
+
metadata: call_metadata,
|
2370
|
+
retry_policy: @config.rpcs.get_execution.retry_policy
|
2371
|
+
|
2372
|
+
options.apply_defaults timeout: @config.timeout,
|
2373
|
+
metadata: @config.metadata,
|
2374
|
+
retry_policy: @config.retry_policy
|
2375
|
+
|
2376
|
+
@notebook_service_stub.get_execution request, options do |result, operation|
|
2377
|
+
yield result, operation if block_given?
|
2378
|
+
return result
|
2379
|
+
end
|
2380
|
+
rescue ::Gapic::Rest::Error => e
|
2381
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2382
|
+
end
|
2383
|
+
|
2384
|
+
##
|
2385
|
+
# Deletes execution
|
2386
|
+
#
|
2387
|
+
# @overload delete_execution(request, options = nil)
|
2388
|
+
# Pass arguments to `delete_execution` via a request object, either of type
|
2389
|
+
# {::Google::Cloud::Notebooks::V1::DeleteExecutionRequest} or an equivalent Hash.
|
2390
|
+
#
|
2391
|
+
# @param request [::Google::Cloud::Notebooks::V1::DeleteExecutionRequest, ::Hash]
|
2392
|
+
# A request object representing the call parameters. Required. To specify no
|
2393
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2394
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2395
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2396
|
+
#
|
2397
|
+
# @overload delete_execution(name: nil)
|
2398
|
+
# Pass arguments to `delete_execution` via keyword arguments. Note that at
|
2399
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2400
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2401
|
+
#
|
2402
|
+
# @param name [::String]
|
2403
|
+
# Required. Format:
|
2404
|
+
# `projects/{project_id}/locations/{location}/executions/{execution_id}`
|
2405
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2406
|
+
# @yieldparam result [::Gapic::Operation]
|
2407
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2408
|
+
#
|
2409
|
+
# @return [::Gapic::Operation]
|
2410
|
+
#
|
2411
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2412
|
+
def delete_execution request, options = nil
|
2413
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2414
|
+
|
2415
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::DeleteExecutionRequest
|
2416
|
+
|
2417
|
+
# Converts hash and nil to an options object
|
2418
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2419
|
+
|
2420
|
+
# Customize the options with defaults
|
2421
|
+
call_metadata = @config.rpcs.delete_execution.metadata.to_h
|
2422
|
+
|
2423
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2424
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2425
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2426
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
2427
|
+
transports_version_send: [:rest]
|
2428
|
+
|
2429
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2430
|
+
|
2431
|
+
options.apply_defaults timeout: @config.rpcs.delete_execution.timeout,
|
2432
|
+
metadata: call_metadata,
|
2433
|
+
retry_policy: @config.rpcs.delete_execution.retry_policy
|
2434
|
+
|
2435
|
+
options.apply_defaults timeout: @config.timeout,
|
2436
|
+
metadata: @config.metadata,
|
2437
|
+
retry_policy: @config.retry_policy
|
2438
|
+
|
2439
|
+
@notebook_service_stub.delete_execution request, options do |result, operation|
|
2440
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2441
|
+
yield result, operation if block_given?
|
2442
|
+
return result
|
2443
|
+
end
|
2444
|
+
rescue ::Gapic::Rest::Error => e
|
2445
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2446
|
+
end
|
2447
|
+
|
2448
|
+
##
|
2449
|
+
# Creates a new Execution in a given project and location.
|
2450
|
+
#
|
2451
|
+
# @overload create_execution(request, options = nil)
|
2452
|
+
# Pass arguments to `create_execution` via a request object, either of type
|
2453
|
+
# {::Google::Cloud::Notebooks::V1::CreateExecutionRequest} or an equivalent Hash.
|
2454
|
+
#
|
2455
|
+
# @param request [::Google::Cloud::Notebooks::V1::CreateExecutionRequest, ::Hash]
|
2456
|
+
# A request object representing the call parameters. Required. To specify no
|
2457
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2458
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2459
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2460
|
+
#
|
2461
|
+
# @overload create_execution(parent: nil, execution_id: nil, execution: nil)
|
2462
|
+
# Pass arguments to `create_execution` via keyword arguments. Note that at
|
2463
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2464
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2465
|
+
#
|
2466
|
+
# @param parent [::String]
|
2467
|
+
# Required. Format:
|
2468
|
+
# `parent=projects/{project_id}/locations/{location}`
|
2469
|
+
# @param execution_id [::String]
|
2470
|
+
# Required. User-defined unique ID of this execution.
|
2471
|
+
# @param execution [::Google::Cloud::Notebooks::V1::Execution, ::Hash]
|
2472
|
+
# Required. The execution to be created.
|
2473
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2474
|
+
# @yieldparam result [::Gapic::Operation]
|
2475
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2476
|
+
#
|
2477
|
+
# @return [::Gapic::Operation]
|
2478
|
+
#
|
2479
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2480
|
+
def create_execution request, options = nil
|
2481
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2482
|
+
|
2483
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Notebooks::V1::CreateExecutionRequest
|
2484
|
+
|
2485
|
+
# Converts hash and nil to an options object
|
2486
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2487
|
+
|
2488
|
+
# Customize the options with defaults
|
2489
|
+
call_metadata = @config.rpcs.create_execution.metadata.to_h
|
2490
|
+
|
2491
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2492
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2493
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2494
|
+
gapic_version: ::Google::Cloud::Notebooks::V1::VERSION,
|
2495
|
+
transports_version_send: [:rest]
|
2496
|
+
|
2497
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2498
|
+
|
2499
|
+
options.apply_defaults timeout: @config.rpcs.create_execution.timeout,
|
2500
|
+
metadata: call_metadata,
|
2501
|
+
retry_policy: @config.rpcs.create_execution.retry_policy
|
2502
|
+
|
2503
|
+
options.apply_defaults timeout: @config.timeout,
|
2504
|
+
metadata: @config.metadata,
|
2505
|
+
retry_policy: @config.retry_policy
|
2506
|
+
|
2507
|
+
@notebook_service_stub.create_execution request, options do |result, operation|
|
2508
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2509
|
+
yield result, operation if block_given?
|
2510
|
+
return result
|
2511
|
+
end
|
2512
|
+
rescue ::Gapic::Rest::Error => e
|
2513
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2514
|
+
end
|
2515
|
+
|
2516
|
+
##
|
2517
|
+
# Configuration class for the NotebookService REST API.
|
2518
|
+
#
|
2519
|
+
# This class represents the configuration for NotebookService REST,
|
2520
|
+
# providing control over timeouts, retry behavior, logging, transport
|
2521
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
2522
|
+
# applied individually to specific RPCs. See
|
2523
|
+
# {::Google::Cloud::Notebooks::V1::NotebookService::Rest::Client::Configuration::Rpcs}
|
2524
|
+
# for a list of RPCs that can be configured independently.
|
2525
|
+
#
|
2526
|
+
# Configuration can be applied globally to all clients, or to a single client
|
2527
|
+
# on construction.
|
2528
|
+
#
|
2529
|
+
# @example
|
2530
|
+
#
|
2531
|
+
# # Modify the global config, setting the timeout for
|
2532
|
+
# # list_instances to 20 seconds,
|
2533
|
+
# # and all remaining timeouts to 10 seconds.
|
2534
|
+
# ::Google::Cloud::Notebooks::V1::NotebookService::Rest::Client.configure do |config|
|
2535
|
+
# config.timeout = 10.0
|
2536
|
+
# config.rpcs.list_instances.timeout = 20.0
|
2537
|
+
# end
|
2538
|
+
#
|
2539
|
+
# # Apply the above configuration only to a new client.
|
2540
|
+
# client = ::Google::Cloud::Notebooks::V1::NotebookService::Rest::Client.new do |config|
|
2541
|
+
# config.timeout = 10.0
|
2542
|
+
# config.rpcs.list_instances.timeout = 20.0
|
2543
|
+
# end
|
2544
|
+
#
|
2545
|
+
# @!attribute [rw] endpoint
|
2546
|
+
# The hostname or hostname:port of the service endpoint.
|
2547
|
+
# Defaults to `"notebooks.googleapis.com"`.
|
2548
|
+
# @return [::String]
|
2549
|
+
# @!attribute [rw] credentials
|
2550
|
+
# Credentials to send with calls. You may provide any of the following types:
|
2551
|
+
# * (`String`) The path to a service account key file in JSON format
|
2552
|
+
# * (`Hash`) A service account key as a Hash
|
2553
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2554
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
2555
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2556
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
2557
|
+
# * (`nil`) indicating no credentials
|
2558
|
+
# @return [::Object]
|
2559
|
+
# @!attribute [rw] scope
|
2560
|
+
# The OAuth scopes
|
2561
|
+
# @return [::Array<::String>]
|
2562
|
+
# @!attribute [rw] lib_name
|
2563
|
+
# The library name as recorded in instrumentation and logging
|
2564
|
+
# @return [::String]
|
2565
|
+
# @!attribute [rw] lib_version
|
2566
|
+
# The library version as recorded in instrumentation and logging
|
2567
|
+
# @return [::String]
|
2568
|
+
# @!attribute [rw] timeout
|
2569
|
+
# The call timeout in seconds.
|
2570
|
+
# @return [::Numeric]
|
2571
|
+
# @!attribute [rw] metadata
|
2572
|
+
# Additional headers to be sent with the call.
|
2573
|
+
# @return [::Hash{::Symbol=>::String}]
|
2574
|
+
# @!attribute [rw] retry_policy
|
2575
|
+
# The retry policy. The value is a hash with the following keys:
|
2576
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2577
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2578
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2579
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2580
|
+
# trigger a retry.
|
2581
|
+
# @return [::Hash]
|
2582
|
+
# @!attribute [rw] quota_project
|
2583
|
+
# A separate project against which to charge quota.
|
2584
|
+
# @return [::String]
|
2585
|
+
#
|
2586
|
+
class Configuration
|
2587
|
+
extend ::Gapic::Config
|
2588
|
+
|
2589
|
+
config_attr :endpoint, "notebooks.googleapis.com", ::String
|
2590
|
+
config_attr :credentials, nil do |value|
|
2591
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2592
|
+
allowed.any? { |klass| klass === value }
|
2593
|
+
end
|
2594
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
2595
|
+
config_attr :lib_name, nil, ::String, nil
|
2596
|
+
config_attr :lib_version, nil, ::String, nil
|
2597
|
+
config_attr :timeout, nil, ::Numeric, nil
|
2598
|
+
config_attr :metadata, nil, ::Hash, nil
|
2599
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2600
|
+
config_attr :quota_project, nil, ::String, nil
|
2601
|
+
|
2602
|
+
# @private
|
2603
|
+
# Overrides for http bindings for the RPCs of this service
|
2604
|
+
# are only used when this service is used as mixin, and only
|
2605
|
+
# by the host service.
|
2606
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
2607
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
2608
|
+
|
2609
|
+
# @private
|
2610
|
+
def initialize parent_config = nil
|
2611
|
+
@parent_config = parent_config unless parent_config.nil?
|
2612
|
+
|
2613
|
+
yield self if block_given?
|
2614
|
+
end
|
2615
|
+
|
2616
|
+
##
|
2617
|
+
# Configurations for individual RPCs
|
2618
|
+
# @return [Rpcs]
|
2619
|
+
#
|
2620
|
+
def rpcs
|
2621
|
+
@rpcs ||= begin
|
2622
|
+
parent_rpcs = nil
|
2623
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2624
|
+
Rpcs.new parent_rpcs
|
2625
|
+
end
|
2626
|
+
end
|
2627
|
+
|
2628
|
+
##
|
2629
|
+
# Configuration RPC class for the NotebookService API.
|
2630
|
+
#
|
2631
|
+
# Includes fields providing the configuration for each RPC in this service.
|
2632
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
2633
|
+
# the following configuration fields:
|
2634
|
+
#
|
2635
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
2636
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
2637
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
2638
|
+
# include the following keys:
|
2639
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2640
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2641
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2642
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2643
|
+
# trigger a retry.
|
2644
|
+
#
|
2645
|
+
class Rpcs
|
2646
|
+
##
|
2647
|
+
# RPC-specific configuration for `list_instances`
|
2648
|
+
# @return [::Gapic::Config::Method]
|
2649
|
+
#
|
2650
|
+
attr_reader :list_instances
|
2651
|
+
##
|
2652
|
+
# RPC-specific configuration for `get_instance`
|
2653
|
+
# @return [::Gapic::Config::Method]
|
2654
|
+
#
|
2655
|
+
attr_reader :get_instance
|
2656
|
+
##
|
2657
|
+
# RPC-specific configuration for `create_instance`
|
2658
|
+
# @return [::Gapic::Config::Method]
|
2659
|
+
#
|
2660
|
+
attr_reader :create_instance
|
2661
|
+
##
|
2662
|
+
# RPC-specific configuration for `register_instance`
|
2663
|
+
# @return [::Gapic::Config::Method]
|
2664
|
+
#
|
2665
|
+
attr_reader :register_instance
|
2666
|
+
##
|
2667
|
+
# RPC-specific configuration for `set_instance_accelerator`
|
2668
|
+
# @return [::Gapic::Config::Method]
|
2669
|
+
#
|
2670
|
+
attr_reader :set_instance_accelerator
|
2671
|
+
##
|
2672
|
+
# RPC-specific configuration for `set_instance_machine_type`
|
2673
|
+
# @return [::Gapic::Config::Method]
|
2674
|
+
#
|
2675
|
+
attr_reader :set_instance_machine_type
|
2676
|
+
##
|
2677
|
+
# RPC-specific configuration for `update_instance_config`
|
2678
|
+
# @return [::Gapic::Config::Method]
|
2679
|
+
#
|
2680
|
+
attr_reader :update_instance_config
|
2681
|
+
##
|
2682
|
+
# RPC-specific configuration for `update_shielded_instance_config`
|
2683
|
+
# @return [::Gapic::Config::Method]
|
2684
|
+
#
|
2685
|
+
attr_reader :update_shielded_instance_config
|
2686
|
+
##
|
2687
|
+
# RPC-specific configuration for `set_instance_labels`
|
2688
|
+
# @return [::Gapic::Config::Method]
|
2689
|
+
#
|
2690
|
+
attr_reader :set_instance_labels
|
2691
|
+
##
|
2692
|
+
# RPC-specific configuration for `update_instance_metadata_items`
|
2693
|
+
# @return [::Gapic::Config::Method]
|
2694
|
+
#
|
2695
|
+
attr_reader :update_instance_metadata_items
|
2696
|
+
##
|
2697
|
+
# RPC-specific configuration for `delete_instance`
|
2698
|
+
# @return [::Gapic::Config::Method]
|
2699
|
+
#
|
2700
|
+
attr_reader :delete_instance
|
2701
|
+
##
|
2702
|
+
# RPC-specific configuration for `start_instance`
|
2703
|
+
# @return [::Gapic::Config::Method]
|
2704
|
+
#
|
2705
|
+
attr_reader :start_instance
|
2706
|
+
##
|
2707
|
+
# RPC-specific configuration for `stop_instance`
|
2708
|
+
# @return [::Gapic::Config::Method]
|
2709
|
+
#
|
2710
|
+
attr_reader :stop_instance
|
2711
|
+
##
|
2712
|
+
# RPC-specific configuration for `reset_instance`
|
2713
|
+
# @return [::Gapic::Config::Method]
|
2714
|
+
#
|
2715
|
+
attr_reader :reset_instance
|
2716
|
+
##
|
2717
|
+
# RPC-specific configuration for `report_instance_info`
|
2718
|
+
# @return [::Gapic::Config::Method]
|
2719
|
+
#
|
2720
|
+
attr_reader :report_instance_info
|
2721
|
+
##
|
2722
|
+
# RPC-specific configuration for `is_instance_upgradeable`
|
2723
|
+
# @return [::Gapic::Config::Method]
|
2724
|
+
#
|
2725
|
+
attr_reader :is_instance_upgradeable
|
2726
|
+
##
|
2727
|
+
# RPC-specific configuration for `get_instance_health`
|
2728
|
+
# @return [::Gapic::Config::Method]
|
2729
|
+
#
|
2730
|
+
attr_reader :get_instance_health
|
2731
|
+
##
|
2732
|
+
# RPC-specific configuration for `upgrade_instance`
|
2733
|
+
# @return [::Gapic::Config::Method]
|
2734
|
+
#
|
2735
|
+
attr_reader :upgrade_instance
|
2736
|
+
##
|
2737
|
+
# RPC-specific configuration for `rollback_instance`
|
2738
|
+
# @return [::Gapic::Config::Method]
|
2739
|
+
#
|
2740
|
+
attr_reader :rollback_instance
|
2741
|
+
##
|
2742
|
+
# RPC-specific configuration for `diagnose_instance`
|
2743
|
+
# @return [::Gapic::Config::Method]
|
2744
|
+
#
|
2745
|
+
attr_reader :diagnose_instance
|
2746
|
+
##
|
2747
|
+
# RPC-specific configuration for `upgrade_instance_internal`
|
2748
|
+
# @return [::Gapic::Config::Method]
|
2749
|
+
#
|
2750
|
+
attr_reader :upgrade_instance_internal
|
2751
|
+
##
|
2752
|
+
# RPC-specific configuration for `list_environments`
|
2753
|
+
# @return [::Gapic::Config::Method]
|
2754
|
+
#
|
2755
|
+
attr_reader :list_environments
|
2756
|
+
##
|
2757
|
+
# RPC-specific configuration for `get_environment`
|
2758
|
+
# @return [::Gapic::Config::Method]
|
2759
|
+
#
|
2760
|
+
attr_reader :get_environment
|
2761
|
+
##
|
2762
|
+
# RPC-specific configuration for `create_environment`
|
2763
|
+
# @return [::Gapic::Config::Method]
|
2764
|
+
#
|
2765
|
+
attr_reader :create_environment
|
2766
|
+
##
|
2767
|
+
# RPC-specific configuration for `delete_environment`
|
2768
|
+
# @return [::Gapic::Config::Method]
|
2769
|
+
#
|
2770
|
+
attr_reader :delete_environment
|
2771
|
+
##
|
2772
|
+
# RPC-specific configuration for `list_schedules`
|
2773
|
+
# @return [::Gapic::Config::Method]
|
2774
|
+
#
|
2775
|
+
attr_reader :list_schedules
|
2776
|
+
##
|
2777
|
+
# RPC-specific configuration for `get_schedule`
|
2778
|
+
# @return [::Gapic::Config::Method]
|
2779
|
+
#
|
2780
|
+
attr_reader :get_schedule
|
2781
|
+
##
|
2782
|
+
# RPC-specific configuration for `delete_schedule`
|
2783
|
+
# @return [::Gapic::Config::Method]
|
2784
|
+
#
|
2785
|
+
attr_reader :delete_schedule
|
2786
|
+
##
|
2787
|
+
# RPC-specific configuration for `create_schedule`
|
2788
|
+
# @return [::Gapic::Config::Method]
|
2789
|
+
#
|
2790
|
+
attr_reader :create_schedule
|
2791
|
+
##
|
2792
|
+
# RPC-specific configuration for `trigger_schedule`
|
2793
|
+
# @return [::Gapic::Config::Method]
|
2794
|
+
#
|
2795
|
+
attr_reader :trigger_schedule
|
2796
|
+
##
|
2797
|
+
# RPC-specific configuration for `list_executions`
|
2798
|
+
# @return [::Gapic::Config::Method]
|
2799
|
+
#
|
2800
|
+
attr_reader :list_executions
|
2801
|
+
##
|
2802
|
+
# RPC-specific configuration for `get_execution`
|
2803
|
+
# @return [::Gapic::Config::Method]
|
2804
|
+
#
|
2805
|
+
attr_reader :get_execution
|
2806
|
+
##
|
2807
|
+
# RPC-specific configuration for `delete_execution`
|
2808
|
+
# @return [::Gapic::Config::Method]
|
2809
|
+
#
|
2810
|
+
attr_reader :delete_execution
|
2811
|
+
##
|
2812
|
+
# RPC-specific configuration for `create_execution`
|
2813
|
+
# @return [::Gapic::Config::Method]
|
2814
|
+
#
|
2815
|
+
attr_reader :create_execution
|
2816
|
+
|
2817
|
+
# @private
|
2818
|
+
def initialize parent_rpcs = nil
|
2819
|
+
list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
|
2820
|
+
@list_instances = ::Gapic::Config::Method.new list_instances_config
|
2821
|
+
get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
|
2822
|
+
@get_instance = ::Gapic::Config::Method.new get_instance_config
|
2823
|
+
create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance
|
2824
|
+
@create_instance = ::Gapic::Config::Method.new create_instance_config
|
2825
|
+
register_instance_config = parent_rpcs.register_instance if parent_rpcs.respond_to? :register_instance
|
2826
|
+
@register_instance = ::Gapic::Config::Method.new register_instance_config
|
2827
|
+
set_instance_accelerator_config = parent_rpcs.set_instance_accelerator if parent_rpcs.respond_to? :set_instance_accelerator
|
2828
|
+
@set_instance_accelerator = ::Gapic::Config::Method.new set_instance_accelerator_config
|
2829
|
+
set_instance_machine_type_config = parent_rpcs.set_instance_machine_type if parent_rpcs.respond_to? :set_instance_machine_type
|
2830
|
+
@set_instance_machine_type = ::Gapic::Config::Method.new set_instance_machine_type_config
|
2831
|
+
update_instance_config_config = parent_rpcs.update_instance_config if parent_rpcs.respond_to? :update_instance_config
|
2832
|
+
@update_instance_config = ::Gapic::Config::Method.new update_instance_config_config
|
2833
|
+
update_shielded_instance_config_config = parent_rpcs.update_shielded_instance_config if parent_rpcs.respond_to? :update_shielded_instance_config
|
2834
|
+
@update_shielded_instance_config = ::Gapic::Config::Method.new update_shielded_instance_config_config
|
2835
|
+
set_instance_labels_config = parent_rpcs.set_instance_labels if parent_rpcs.respond_to? :set_instance_labels
|
2836
|
+
@set_instance_labels = ::Gapic::Config::Method.new set_instance_labels_config
|
2837
|
+
update_instance_metadata_items_config = parent_rpcs.update_instance_metadata_items if parent_rpcs.respond_to? :update_instance_metadata_items
|
2838
|
+
@update_instance_metadata_items = ::Gapic::Config::Method.new update_instance_metadata_items_config
|
2839
|
+
delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
|
2840
|
+
@delete_instance = ::Gapic::Config::Method.new delete_instance_config
|
2841
|
+
start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance
|
2842
|
+
@start_instance = ::Gapic::Config::Method.new start_instance_config
|
2843
|
+
stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance
|
2844
|
+
@stop_instance = ::Gapic::Config::Method.new stop_instance_config
|
2845
|
+
reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance
|
2846
|
+
@reset_instance = ::Gapic::Config::Method.new reset_instance_config
|
2847
|
+
report_instance_info_config = parent_rpcs.report_instance_info if parent_rpcs.respond_to? :report_instance_info
|
2848
|
+
@report_instance_info = ::Gapic::Config::Method.new report_instance_info_config
|
2849
|
+
is_instance_upgradeable_config = parent_rpcs.is_instance_upgradeable if parent_rpcs.respond_to? :is_instance_upgradeable
|
2850
|
+
@is_instance_upgradeable = ::Gapic::Config::Method.new is_instance_upgradeable_config
|
2851
|
+
get_instance_health_config = parent_rpcs.get_instance_health if parent_rpcs.respond_to? :get_instance_health
|
2852
|
+
@get_instance_health = ::Gapic::Config::Method.new get_instance_health_config
|
2853
|
+
upgrade_instance_config = parent_rpcs.upgrade_instance if parent_rpcs.respond_to? :upgrade_instance
|
2854
|
+
@upgrade_instance = ::Gapic::Config::Method.new upgrade_instance_config
|
2855
|
+
rollback_instance_config = parent_rpcs.rollback_instance if parent_rpcs.respond_to? :rollback_instance
|
2856
|
+
@rollback_instance = ::Gapic::Config::Method.new rollback_instance_config
|
2857
|
+
diagnose_instance_config = parent_rpcs.diagnose_instance if parent_rpcs.respond_to? :diagnose_instance
|
2858
|
+
@diagnose_instance = ::Gapic::Config::Method.new diagnose_instance_config
|
2859
|
+
upgrade_instance_internal_config = parent_rpcs.upgrade_instance_internal if parent_rpcs.respond_to? :upgrade_instance_internal
|
2860
|
+
@upgrade_instance_internal = ::Gapic::Config::Method.new upgrade_instance_internal_config
|
2861
|
+
list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments
|
2862
|
+
@list_environments = ::Gapic::Config::Method.new list_environments_config
|
2863
|
+
get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment
|
2864
|
+
@get_environment = ::Gapic::Config::Method.new get_environment_config
|
2865
|
+
create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment
|
2866
|
+
@create_environment = ::Gapic::Config::Method.new create_environment_config
|
2867
|
+
delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment
|
2868
|
+
@delete_environment = ::Gapic::Config::Method.new delete_environment_config
|
2869
|
+
list_schedules_config = parent_rpcs.list_schedules if parent_rpcs.respond_to? :list_schedules
|
2870
|
+
@list_schedules = ::Gapic::Config::Method.new list_schedules_config
|
2871
|
+
get_schedule_config = parent_rpcs.get_schedule if parent_rpcs.respond_to? :get_schedule
|
2872
|
+
@get_schedule = ::Gapic::Config::Method.new get_schedule_config
|
2873
|
+
delete_schedule_config = parent_rpcs.delete_schedule if parent_rpcs.respond_to? :delete_schedule
|
2874
|
+
@delete_schedule = ::Gapic::Config::Method.new delete_schedule_config
|
2875
|
+
create_schedule_config = parent_rpcs.create_schedule if parent_rpcs.respond_to? :create_schedule
|
2876
|
+
@create_schedule = ::Gapic::Config::Method.new create_schedule_config
|
2877
|
+
trigger_schedule_config = parent_rpcs.trigger_schedule if parent_rpcs.respond_to? :trigger_schedule
|
2878
|
+
@trigger_schedule = ::Gapic::Config::Method.new trigger_schedule_config
|
2879
|
+
list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions
|
2880
|
+
@list_executions = ::Gapic::Config::Method.new list_executions_config
|
2881
|
+
get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution
|
2882
|
+
@get_execution = ::Gapic::Config::Method.new get_execution_config
|
2883
|
+
delete_execution_config = parent_rpcs.delete_execution if parent_rpcs.respond_to? :delete_execution
|
2884
|
+
@delete_execution = ::Gapic::Config::Method.new delete_execution_config
|
2885
|
+
create_execution_config = parent_rpcs.create_execution if parent_rpcs.respond_to? :create_execution
|
2886
|
+
@create_execution = ::Gapic::Config::Method.new create_execution_config
|
2887
|
+
|
2888
|
+
yield self if block_given?
|
2889
|
+
end
|
2890
|
+
end
|
2891
|
+
end
|
2892
|
+
end
|
2893
|
+
end
|
2894
|
+
end
|
2895
|
+
end
|
2896
|
+
end
|
2897
|
+
end
|
2898
|
+
end
|