google-apis-notebooks_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-notebooks_v1.rb +15 -0
- data/lib/google/apis/notebooks_v1.rb +36 -0
- data/lib/google/apis/notebooks_v1/classes.rb +1468 -0
- data/lib/google/apis/notebooks_v1/gem_version.rb +28 -0
- data/lib/google/apis/notebooks_v1/representations.rb +592 -0
- data/lib/google/apis/notebooks_v1/service.rb +1078 -0
- metadata +76 -0
@@ -0,0 +1,1078 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module NotebooksV1
|
23
|
+
# Notebooks API
|
24
|
+
#
|
25
|
+
# AI Platform Notebooks API is used to manage notebook resources in Google Cloud.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/notebooks_v1'
|
29
|
+
#
|
30
|
+
# Notebooks = Google::Apis::NotebooksV1 # Alias the module
|
31
|
+
# service = Notebooks::AIPlatformNotebooksService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/ai-platform/notebooks/docs/
|
34
|
+
class AIPlatformNotebooksService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://notebooks.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-notebooks_v1',
|
48
|
+
client_version: Google::Apis::NotebooksV1::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Gets information about a location.
|
53
|
+
# @param [String] name
|
54
|
+
# Resource name for the location.
|
55
|
+
# @param [String] fields
|
56
|
+
# Selector specifying which fields to include in a partial response.
|
57
|
+
# @param [String] quota_user
|
58
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
59
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
60
|
+
# @param [Google::Apis::RequestOptions] options
|
61
|
+
# Request-specific options
|
62
|
+
#
|
63
|
+
# @yield [result, err] Result & error if block supplied
|
64
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Location] parsed result object
|
65
|
+
# @yieldparam err [StandardError] error object if request failed
|
66
|
+
#
|
67
|
+
# @return [Google::Apis::NotebooksV1::Location]
|
68
|
+
#
|
69
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
70
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
71
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
72
|
+
def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
|
73
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
74
|
+
command.response_representation = Google::Apis::NotebooksV1::Location::Representation
|
75
|
+
command.response_class = Google::Apis::NotebooksV1::Location
|
76
|
+
command.params['name'] = name unless name.nil?
|
77
|
+
command.query['fields'] = fields unless fields.nil?
|
78
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
79
|
+
execute_or_queue_command(command, &block)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Lists information about the supported locations for this service.
|
83
|
+
# @param [String] name
|
84
|
+
# The resource that owns the locations collection, if applicable.
|
85
|
+
# @param [String] filter
|
86
|
+
# The standard list filter.
|
87
|
+
# @param [Fixnum] page_size
|
88
|
+
# The standard list page size.
|
89
|
+
# @param [String] page_token
|
90
|
+
# The standard list page token.
|
91
|
+
# @param [String] fields
|
92
|
+
# Selector specifying which fields to include in a partial response.
|
93
|
+
# @param [String] quota_user
|
94
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
95
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
96
|
+
# @param [Google::Apis::RequestOptions] options
|
97
|
+
# Request-specific options
|
98
|
+
#
|
99
|
+
# @yield [result, err] Result & error if block supplied
|
100
|
+
# @yieldparam result [Google::Apis::NotebooksV1::ListLocationsResponse] parsed result object
|
101
|
+
# @yieldparam err [StandardError] error object if request failed
|
102
|
+
#
|
103
|
+
# @return [Google::Apis::NotebooksV1::ListLocationsResponse]
|
104
|
+
#
|
105
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
106
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
107
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
108
|
+
def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
109
|
+
command = make_simple_command(:get, 'v1/{+name}/locations', options)
|
110
|
+
command.response_representation = Google::Apis::NotebooksV1::ListLocationsResponse::Representation
|
111
|
+
command.response_class = Google::Apis::NotebooksV1::ListLocationsResponse
|
112
|
+
command.params['name'] = name unless name.nil?
|
113
|
+
command.query['filter'] = filter unless filter.nil?
|
114
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
115
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
116
|
+
command.query['fields'] = fields unless fields.nil?
|
117
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
118
|
+
execute_or_queue_command(command, &block)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Creates a new Environment.
|
122
|
+
# @param [String] parent
|
123
|
+
# Required. Format: `projects/`project_id`/locations/`location``
|
124
|
+
# @param [Google::Apis::NotebooksV1::Environment] environment_object
|
125
|
+
# @param [String] environment_id
|
126
|
+
# Required. User-defined unique ID of this environment. The `environment_id`
|
127
|
+
# must be 1 to 63 characters long and contain only lowercase letters, numeric
|
128
|
+
# characters, and dashes. The first character must be a lowercase letter and the
|
129
|
+
# last character cannot be a dash.
|
130
|
+
# @param [String] fields
|
131
|
+
# Selector specifying which fields to include in a partial response.
|
132
|
+
# @param [String] quota_user
|
133
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
134
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
135
|
+
# @param [Google::Apis::RequestOptions] options
|
136
|
+
# Request-specific options
|
137
|
+
#
|
138
|
+
# @yield [result, err] Result & error if block supplied
|
139
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
140
|
+
# @yieldparam err [StandardError] error object if request failed
|
141
|
+
#
|
142
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
143
|
+
#
|
144
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
145
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
146
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
147
|
+
def create_project_location_environment(parent, environment_object = nil, environment_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
148
|
+
command = make_simple_command(:post, 'v1/{+parent}/environments', options)
|
149
|
+
command.request_representation = Google::Apis::NotebooksV1::Environment::Representation
|
150
|
+
command.request_object = environment_object
|
151
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
152
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
153
|
+
command.params['parent'] = parent unless parent.nil?
|
154
|
+
command.query['environmentId'] = environment_id unless environment_id.nil?
|
155
|
+
command.query['fields'] = fields unless fields.nil?
|
156
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
157
|
+
execute_or_queue_command(command, &block)
|
158
|
+
end
|
159
|
+
|
160
|
+
# Deletes a single Environment.
|
161
|
+
# @param [String] name
|
162
|
+
# Required. Format: `projects/`project_id`/locations/`location`/environments/`
|
163
|
+
# environment_id``
|
164
|
+
# @param [String] fields
|
165
|
+
# Selector specifying which fields to include in a partial response.
|
166
|
+
# @param [String] quota_user
|
167
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
168
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
169
|
+
# @param [Google::Apis::RequestOptions] options
|
170
|
+
# Request-specific options
|
171
|
+
#
|
172
|
+
# @yield [result, err] Result & error if block supplied
|
173
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
174
|
+
# @yieldparam err [StandardError] error object if request failed
|
175
|
+
#
|
176
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
177
|
+
#
|
178
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
179
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
180
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
181
|
+
def delete_project_location_environment(name, fields: nil, quota_user: nil, options: nil, &block)
|
182
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
183
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
184
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
185
|
+
command.params['name'] = name unless name.nil?
|
186
|
+
command.query['fields'] = fields unless fields.nil?
|
187
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
188
|
+
execute_or_queue_command(command, &block)
|
189
|
+
end
|
190
|
+
|
191
|
+
# Gets details of a single Environment.
|
192
|
+
# @param [String] name
|
193
|
+
# Required. Format: `projects/`project_id`/locations/`location`/environments/`
|
194
|
+
# environment_id``
|
195
|
+
# @param [String] fields
|
196
|
+
# Selector specifying which fields to include in a partial response.
|
197
|
+
# @param [String] quota_user
|
198
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
199
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
200
|
+
# @param [Google::Apis::RequestOptions] options
|
201
|
+
# Request-specific options
|
202
|
+
#
|
203
|
+
# @yield [result, err] Result & error if block supplied
|
204
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Environment] parsed result object
|
205
|
+
# @yieldparam err [StandardError] error object if request failed
|
206
|
+
#
|
207
|
+
# @return [Google::Apis::NotebooksV1::Environment]
|
208
|
+
#
|
209
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
210
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
211
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
212
|
+
def get_project_location_environment(name, fields: nil, quota_user: nil, options: nil, &block)
|
213
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
214
|
+
command.response_representation = Google::Apis::NotebooksV1::Environment::Representation
|
215
|
+
command.response_class = Google::Apis::NotebooksV1::Environment
|
216
|
+
command.params['name'] = name unless name.nil?
|
217
|
+
command.query['fields'] = fields unless fields.nil?
|
218
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
219
|
+
execute_or_queue_command(command, &block)
|
220
|
+
end
|
221
|
+
|
222
|
+
# Lists environments in a project.
|
223
|
+
# @param [String] parent
|
224
|
+
# Required. Format: `projects/`project_id`/locations/`location``
|
225
|
+
# @param [Fixnum] page_size
|
226
|
+
# Maximum return size of the list call.
|
227
|
+
# @param [String] page_token
|
228
|
+
# A previous returned page token that can be used to continue listing from the
|
229
|
+
# last result.
|
230
|
+
# @param [String] fields
|
231
|
+
# Selector specifying which fields to include in a partial response.
|
232
|
+
# @param [String] quota_user
|
233
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
234
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
235
|
+
# @param [Google::Apis::RequestOptions] options
|
236
|
+
# Request-specific options
|
237
|
+
#
|
238
|
+
# @yield [result, err] Result & error if block supplied
|
239
|
+
# @yieldparam result [Google::Apis::NotebooksV1::ListEnvironmentsResponse] parsed result object
|
240
|
+
# @yieldparam err [StandardError] error object if request failed
|
241
|
+
#
|
242
|
+
# @return [Google::Apis::NotebooksV1::ListEnvironmentsResponse]
|
243
|
+
#
|
244
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
245
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
246
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
247
|
+
def list_project_location_environments(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
248
|
+
command = make_simple_command(:get, 'v1/{+parent}/environments', options)
|
249
|
+
command.response_representation = Google::Apis::NotebooksV1::ListEnvironmentsResponse::Representation
|
250
|
+
command.response_class = Google::Apis::NotebooksV1::ListEnvironmentsResponse
|
251
|
+
command.params['parent'] = parent unless parent.nil?
|
252
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
253
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
254
|
+
command.query['fields'] = fields unless fields.nil?
|
255
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
256
|
+
execute_or_queue_command(command, &block)
|
257
|
+
end
|
258
|
+
|
259
|
+
# Creates a new Instance in a given project and location.
|
260
|
+
# @param [String] parent
|
261
|
+
# Required. Format: `parent=projects/`project_id`/locations/`location``
|
262
|
+
# @param [Google::Apis::NotebooksV1::Instance] instance_object
|
263
|
+
# @param [String] instance_id
|
264
|
+
# Required. User-defined unique ID of this instance.
|
265
|
+
# @param [String] fields
|
266
|
+
# Selector specifying which fields to include in a partial response.
|
267
|
+
# @param [String] quota_user
|
268
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
269
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
270
|
+
# @param [Google::Apis::RequestOptions] options
|
271
|
+
# Request-specific options
|
272
|
+
#
|
273
|
+
# @yield [result, err] Result & error if block supplied
|
274
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
275
|
+
# @yieldparam err [StandardError] error object if request failed
|
276
|
+
#
|
277
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
278
|
+
#
|
279
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
280
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
281
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
282
|
+
def create_project_location_instance(parent, instance_object = nil, instance_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
283
|
+
command = make_simple_command(:post, 'v1/{+parent}/instances', options)
|
284
|
+
command.request_representation = Google::Apis::NotebooksV1::Instance::Representation
|
285
|
+
command.request_object = instance_object
|
286
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
287
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
288
|
+
command.params['parent'] = parent unless parent.nil?
|
289
|
+
command.query['instanceId'] = instance_id unless instance_id.nil?
|
290
|
+
command.query['fields'] = fields unless fields.nil?
|
291
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
292
|
+
execute_or_queue_command(command, &block)
|
293
|
+
end
|
294
|
+
|
295
|
+
# Deletes a single Instance.
|
296
|
+
# @param [String] name
|
297
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
298
|
+
# instance_id``
|
299
|
+
# @param [String] fields
|
300
|
+
# Selector specifying which fields to include in a partial response.
|
301
|
+
# @param [String] quota_user
|
302
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
303
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
304
|
+
# @param [Google::Apis::RequestOptions] options
|
305
|
+
# Request-specific options
|
306
|
+
#
|
307
|
+
# @yield [result, err] Result & error if block supplied
|
308
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
309
|
+
# @yieldparam err [StandardError] error object if request failed
|
310
|
+
#
|
311
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
312
|
+
#
|
313
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
314
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
315
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
316
|
+
def delete_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block)
|
317
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
318
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
319
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
320
|
+
command.params['name'] = name unless name.nil?
|
321
|
+
command.query['fields'] = fields unless fields.nil?
|
322
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
323
|
+
execute_or_queue_command(command, &block)
|
324
|
+
end
|
325
|
+
|
326
|
+
# Gets details of a single Instance.
|
327
|
+
# @param [String] name
|
328
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
329
|
+
# instance_id``
|
330
|
+
# @param [String] fields
|
331
|
+
# Selector specifying which fields to include in a partial response.
|
332
|
+
# @param [String] quota_user
|
333
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
334
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
335
|
+
# @param [Google::Apis::RequestOptions] options
|
336
|
+
# Request-specific options
|
337
|
+
#
|
338
|
+
# @yield [result, err] Result & error if block supplied
|
339
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Instance] parsed result object
|
340
|
+
# @yieldparam err [StandardError] error object if request failed
|
341
|
+
#
|
342
|
+
# @return [Google::Apis::NotebooksV1::Instance]
|
343
|
+
#
|
344
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
345
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
346
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
347
|
+
def get_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block)
|
348
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
349
|
+
command.response_representation = Google::Apis::NotebooksV1::Instance::Representation
|
350
|
+
command.response_class = Google::Apis::NotebooksV1::Instance
|
351
|
+
command.params['name'] = name unless name.nil?
|
352
|
+
command.query['fields'] = fields unless fields.nil?
|
353
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
354
|
+
execute_or_queue_command(command, &block)
|
355
|
+
end
|
356
|
+
|
357
|
+
# Gets the access control policy for a resource. Returns an empty policy if the
|
358
|
+
# resource exists and does not have a policy set.
|
359
|
+
# @param [String] resource
|
360
|
+
# REQUIRED: The resource for which the policy is being requested. See the
|
361
|
+
# operation documentation for the appropriate value for this field.
|
362
|
+
# @param [Fixnum] options_requested_policy_version
|
363
|
+
# Optional. The policy format version to be returned. Valid values are 0, 1, and
|
364
|
+
# 3. Requests specifying an invalid value will be rejected. Requests for
|
365
|
+
# policies with any conditional bindings must specify version 3. Policies
|
366
|
+
# without any conditional bindings may specify any valid value or leave the
|
367
|
+
# field unset. To learn which resources support conditions in their IAM policies,
|
368
|
+
# see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
|
369
|
+
# resource-policies).
|
370
|
+
# @param [String] fields
|
371
|
+
# Selector specifying which fields to include in a partial response.
|
372
|
+
# @param [String] quota_user
|
373
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
374
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
375
|
+
# @param [Google::Apis::RequestOptions] options
|
376
|
+
# Request-specific options
|
377
|
+
#
|
378
|
+
# @yield [result, err] Result & error if block supplied
|
379
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Policy] parsed result object
|
380
|
+
# @yieldparam err [StandardError] error object if request failed
|
381
|
+
#
|
382
|
+
# @return [Google::Apis::NotebooksV1::Policy]
|
383
|
+
#
|
384
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
385
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
386
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
387
|
+
def get_project_location_instance_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
|
388
|
+
command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
|
389
|
+
command.response_representation = Google::Apis::NotebooksV1::Policy::Representation
|
390
|
+
command.response_class = Google::Apis::NotebooksV1::Policy
|
391
|
+
command.params['resource'] = resource unless resource.nil?
|
392
|
+
command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
|
393
|
+
command.query['fields'] = fields unless fields.nil?
|
394
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
395
|
+
execute_or_queue_command(command, &block)
|
396
|
+
end
|
397
|
+
|
398
|
+
# Check if a notebook instance is upgradable.
|
399
|
+
# @param [String] notebook_instance
|
400
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
401
|
+
# instance_id``
|
402
|
+
# @param [String] fields
|
403
|
+
# Selector specifying which fields to include in a partial response.
|
404
|
+
# @param [String] quota_user
|
405
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
406
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
407
|
+
# @param [Google::Apis::RequestOptions] options
|
408
|
+
# Request-specific options
|
409
|
+
#
|
410
|
+
# @yield [result, err] Result & error if block supplied
|
411
|
+
# @yieldparam result [Google::Apis::NotebooksV1::IsInstanceUpgradeableResponse] parsed result object
|
412
|
+
# @yieldparam err [StandardError] error object if request failed
|
413
|
+
#
|
414
|
+
# @return [Google::Apis::NotebooksV1::IsInstanceUpgradeableResponse]
|
415
|
+
#
|
416
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
417
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
418
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
419
|
+
def is_project_location_instance_upgradeable(notebook_instance, fields: nil, quota_user: nil, options: nil, &block)
|
420
|
+
command = make_simple_command(:get, 'v1/{+notebookInstance}:isUpgradeable', options)
|
421
|
+
command.response_representation = Google::Apis::NotebooksV1::IsInstanceUpgradeableResponse::Representation
|
422
|
+
command.response_class = Google::Apis::NotebooksV1::IsInstanceUpgradeableResponse
|
423
|
+
command.params['notebookInstance'] = notebook_instance unless notebook_instance.nil?
|
424
|
+
command.query['fields'] = fields unless fields.nil?
|
425
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
426
|
+
execute_or_queue_command(command, &block)
|
427
|
+
end
|
428
|
+
|
429
|
+
# Lists instances in a given project and location.
|
430
|
+
# @param [String] parent
|
431
|
+
# Required. Format: `parent=projects/`project_id`/locations/`location``
|
432
|
+
# @param [Fixnum] page_size
|
433
|
+
# Maximum return size of the list call.
|
434
|
+
# @param [String] page_token
|
435
|
+
# A previous returned page token that can be used to continue listing from the
|
436
|
+
# last result.
|
437
|
+
# @param [String] fields
|
438
|
+
# Selector specifying which fields to include in a partial response.
|
439
|
+
# @param [String] quota_user
|
440
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
441
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
442
|
+
# @param [Google::Apis::RequestOptions] options
|
443
|
+
# Request-specific options
|
444
|
+
#
|
445
|
+
# @yield [result, err] Result & error if block supplied
|
446
|
+
# @yieldparam result [Google::Apis::NotebooksV1::ListInstancesResponse] parsed result object
|
447
|
+
# @yieldparam err [StandardError] error object if request failed
|
448
|
+
#
|
449
|
+
# @return [Google::Apis::NotebooksV1::ListInstancesResponse]
|
450
|
+
#
|
451
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
452
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
453
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
454
|
+
def list_project_location_instances(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
455
|
+
command = make_simple_command(:get, 'v1/{+parent}/instances', options)
|
456
|
+
command.response_representation = Google::Apis::NotebooksV1::ListInstancesResponse::Representation
|
457
|
+
command.response_class = Google::Apis::NotebooksV1::ListInstancesResponse
|
458
|
+
command.params['parent'] = parent unless parent.nil?
|
459
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
460
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
461
|
+
command.query['fields'] = fields unless fields.nil?
|
462
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
463
|
+
execute_or_queue_command(command, &block)
|
464
|
+
end
|
465
|
+
|
466
|
+
# Registers an existing legacy notebook instance to the Notebooks API server.
|
467
|
+
# Legacy instances are instances created with the legacy Compute Engine calls.
|
468
|
+
# They are not manageable by the Notebooks API out of the box. This call makes
|
469
|
+
# these instances manageable by the Notebooks API.
|
470
|
+
# @param [String] parent
|
471
|
+
# Required. Format: `parent=projects/`project_id`/locations/`location``
|
472
|
+
# @param [Google::Apis::NotebooksV1::RegisterInstanceRequest] register_instance_request_object
|
473
|
+
# @param [String] fields
|
474
|
+
# Selector specifying which fields to include in a partial response.
|
475
|
+
# @param [String] quota_user
|
476
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
477
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
478
|
+
# @param [Google::Apis::RequestOptions] options
|
479
|
+
# Request-specific options
|
480
|
+
#
|
481
|
+
# @yield [result, err] Result & error if block supplied
|
482
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
483
|
+
# @yieldparam err [StandardError] error object if request failed
|
484
|
+
#
|
485
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
486
|
+
#
|
487
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
488
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
489
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
490
|
+
def register_instance(parent, register_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
491
|
+
command = make_simple_command(:post, 'v1/{+parent}/instances:register', options)
|
492
|
+
command.request_representation = Google::Apis::NotebooksV1::RegisterInstanceRequest::Representation
|
493
|
+
command.request_object = register_instance_request_object
|
494
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
495
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
496
|
+
command.params['parent'] = parent unless parent.nil?
|
497
|
+
command.query['fields'] = fields unless fields.nil?
|
498
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
499
|
+
execute_or_queue_command(command, &block)
|
500
|
+
end
|
501
|
+
|
502
|
+
# Allows notebook instances to report their latest instance information to the
|
503
|
+
# Notebooks API server. The server will merge the reported information to the
|
504
|
+
# instance metadata store. Do not use this method directly.
|
505
|
+
# @param [String] name
|
506
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
507
|
+
# instance_id``
|
508
|
+
# @param [Google::Apis::NotebooksV1::ReportInstanceInfoRequest] report_instance_info_request_object
|
509
|
+
# @param [String] fields
|
510
|
+
# Selector specifying which fields to include in a partial response.
|
511
|
+
# @param [String] quota_user
|
512
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
513
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
514
|
+
# @param [Google::Apis::RequestOptions] options
|
515
|
+
# Request-specific options
|
516
|
+
#
|
517
|
+
# @yield [result, err] Result & error if block supplied
|
518
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
519
|
+
# @yieldparam err [StandardError] error object if request failed
|
520
|
+
#
|
521
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
522
|
+
#
|
523
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
524
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
525
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
526
|
+
def report_instance_info(name, report_instance_info_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
527
|
+
command = make_simple_command(:post, 'v1/{+name}:report', options)
|
528
|
+
command.request_representation = Google::Apis::NotebooksV1::ReportInstanceInfoRequest::Representation
|
529
|
+
command.request_object = report_instance_info_request_object
|
530
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
531
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
532
|
+
command.params['name'] = name unless name.nil?
|
533
|
+
command.query['fields'] = fields unless fields.nil?
|
534
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
535
|
+
execute_or_queue_command(command, &block)
|
536
|
+
end
|
537
|
+
|
538
|
+
# Resets a notebook instance.
|
539
|
+
# @param [String] name
|
540
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
541
|
+
# instance_id``
|
542
|
+
# @param [Google::Apis::NotebooksV1::ResetInstanceRequest] reset_instance_request_object
|
543
|
+
# @param [String] fields
|
544
|
+
# Selector specifying which fields to include in a partial response.
|
545
|
+
# @param [String] quota_user
|
546
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
547
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
548
|
+
# @param [Google::Apis::RequestOptions] options
|
549
|
+
# Request-specific options
|
550
|
+
#
|
551
|
+
# @yield [result, err] Result & error if block supplied
|
552
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
553
|
+
# @yieldparam err [StandardError] error object if request failed
|
554
|
+
#
|
555
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
556
|
+
#
|
557
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
558
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
559
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
560
|
+
def reset_instance(name, reset_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
561
|
+
command = make_simple_command(:post, 'v1/{+name}:reset', options)
|
562
|
+
command.request_representation = Google::Apis::NotebooksV1::ResetInstanceRequest::Representation
|
563
|
+
command.request_object = reset_instance_request_object
|
564
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
565
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
566
|
+
command.params['name'] = name unless name.nil?
|
567
|
+
command.query['fields'] = fields unless fields.nil?
|
568
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
569
|
+
execute_or_queue_command(command, &block)
|
570
|
+
end
|
571
|
+
|
572
|
+
# Updates the guest accelerators of a single Instance.
|
573
|
+
# @param [String] name
|
574
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
575
|
+
# instance_id``
|
576
|
+
# @param [Google::Apis::NotebooksV1::SetInstanceAcceleratorRequest] set_instance_accelerator_request_object
|
577
|
+
# @param [String] fields
|
578
|
+
# Selector specifying which fields to include in a partial response.
|
579
|
+
# @param [String] quota_user
|
580
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
581
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
582
|
+
# @param [Google::Apis::RequestOptions] options
|
583
|
+
# Request-specific options
|
584
|
+
#
|
585
|
+
# @yield [result, err] Result & error if block supplied
|
586
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
587
|
+
# @yieldparam err [StandardError] error object if request failed
|
588
|
+
#
|
589
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
590
|
+
#
|
591
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
592
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
593
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
594
|
+
def set_project_location_instance_accelerator(name, set_instance_accelerator_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
595
|
+
command = make_simple_command(:patch, 'v1/{+name}:setAccelerator', options)
|
596
|
+
command.request_representation = Google::Apis::NotebooksV1::SetInstanceAcceleratorRequest::Representation
|
597
|
+
command.request_object = set_instance_accelerator_request_object
|
598
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
599
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
600
|
+
command.params['name'] = name unless name.nil?
|
601
|
+
command.query['fields'] = fields unless fields.nil?
|
602
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
603
|
+
execute_or_queue_command(command, &block)
|
604
|
+
end
|
605
|
+
|
606
|
+
# Sets the access control policy on the specified resource. Replaces any
|
607
|
+
# existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
|
608
|
+
# PERMISSION_DENIED` errors.
|
609
|
+
# @param [String] resource
|
610
|
+
# REQUIRED: The resource for which the policy is being specified. See the
|
611
|
+
# operation documentation for the appropriate value for this field.
|
612
|
+
# @param [Google::Apis::NotebooksV1::SetIamPolicyRequest] set_iam_policy_request_object
|
613
|
+
# @param [String] fields
|
614
|
+
# Selector specifying which fields to include in a partial response.
|
615
|
+
# @param [String] quota_user
|
616
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
617
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
618
|
+
# @param [Google::Apis::RequestOptions] options
|
619
|
+
# Request-specific options
|
620
|
+
#
|
621
|
+
# @yield [result, err] Result & error if block supplied
|
622
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Policy] parsed result object
|
623
|
+
# @yieldparam err [StandardError] error object if request failed
|
624
|
+
#
|
625
|
+
# @return [Google::Apis::NotebooksV1::Policy]
|
626
|
+
#
|
627
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
628
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
629
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
630
|
+
def set_instance_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
631
|
+
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
632
|
+
command.request_representation = Google::Apis::NotebooksV1::SetIamPolicyRequest::Representation
|
633
|
+
command.request_object = set_iam_policy_request_object
|
634
|
+
command.response_representation = Google::Apis::NotebooksV1::Policy::Representation
|
635
|
+
command.response_class = Google::Apis::NotebooksV1::Policy
|
636
|
+
command.params['resource'] = resource unless resource.nil?
|
637
|
+
command.query['fields'] = fields unless fields.nil?
|
638
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
639
|
+
execute_or_queue_command(command, &block)
|
640
|
+
end
|
641
|
+
|
642
|
+
# Replaces all the labels of an Instance.
|
643
|
+
# @param [String] name
|
644
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
645
|
+
# instance_id``
|
646
|
+
# @param [Google::Apis::NotebooksV1::SetInstanceLabelsRequest] set_instance_labels_request_object
|
647
|
+
# @param [String] fields
|
648
|
+
# Selector specifying which fields to include in a partial response.
|
649
|
+
# @param [String] quota_user
|
650
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
651
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
652
|
+
# @param [Google::Apis::RequestOptions] options
|
653
|
+
# Request-specific options
|
654
|
+
#
|
655
|
+
# @yield [result, err] Result & error if block supplied
|
656
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
657
|
+
# @yieldparam err [StandardError] error object if request failed
|
658
|
+
#
|
659
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
660
|
+
#
|
661
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
662
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
663
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
664
|
+
def set_project_location_instance_labels(name, set_instance_labels_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
665
|
+
command = make_simple_command(:patch, 'v1/{+name}:setLabels', options)
|
666
|
+
command.request_representation = Google::Apis::NotebooksV1::SetInstanceLabelsRequest::Representation
|
667
|
+
command.request_object = set_instance_labels_request_object
|
668
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
669
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
670
|
+
command.params['name'] = name unless name.nil?
|
671
|
+
command.query['fields'] = fields unless fields.nil?
|
672
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
673
|
+
execute_or_queue_command(command, &block)
|
674
|
+
end
|
675
|
+
|
676
|
+
# Updates the machine type of a single Instance.
|
677
|
+
# @param [String] name
|
678
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
679
|
+
# instance_id``
|
680
|
+
# @param [Google::Apis::NotebooksV1::SetInstanceMachineTypeRequest] set_instance_machine_type_request_object
|
681
|
+
# @param [String] fields
|
682
|
+
# Selector specifying which fields to include in a partial response.
|
683
|
+
# @param [String] quota_user
|
684
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
685
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
686
|
+
# @param [Google::Apis::RequestOptions] options
|
687
|
+
# Request-specific options
|
688
|
+
#
|
689
|
+
# @yield [result, err] Result & error if block supplied
|
690
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
691
|
+
# @yieldparam err [StandardError] error object if request failed
|
692
|
+
#
|
693
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
694
|
+
#
|
695
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
696
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
697
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
698
|
+
def set_project_location_instance_machine_type(name, set_instance_machine_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
699
|
+
command = make_simple_command(:patch, 'v1/{+name}:setMachineType', options)
|
700
|
+
command.request_representation = Google::Apis::NotebooksV1::SetInstanceMachineTypeRequest::Representation
|
701
|
+
command.request_object = set_instance_machine_type_request_object
|
702
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
703
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
704
|
+
command.params['name'] = name unless name.nil?
|
705
|
+
command.query['fields'] = fields unless fields.nil?
|
706
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
707
|
+
execute_or_queue_command(command, &block)
|
708
|
+
end
|
709
|
+
|
710
|
+
# Starts a notebook instance.
|
711
|
+
# @param [String] name
|
712
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
713
|
+
# instance_id``
|
714
|
+
# @param [Google::Apis::NotebooksV1::StartInstanceRequest] start_instance_request_object
|
715
|
+
# @param [String] fields
|
716
|
+
# Selector specifying which fields to include in a partial response.
|
717
|
+
# @param [String] quota_user
|
718
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
719
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
720
|
+
# @param [Google::Apis::RequestOptions] options
|
721
|
+
# Request-specific options
|
722
|
+
#
|
723
|
+
# @yield [result, err] Result & error if block supplied
|
724
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
725
|
+
# @yieldparam err [StandardError] error object if request failed
|
726
|
+
#
|
727
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
728
|
+
#
|
729
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
730
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
731
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
732
|
+
def start_instance(name, start_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
733
|
+
command = make_simple_command(:post, 'v1/{+name}:start', options)
|
734
|
+
command.request_representation = Google::Apis::NotebooksV1::StartInstanceRequest::Representation
|
735
|
+
command.request_object = start_instance_request_object
|
736
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
737
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
738
|
+
command.params['name'] = name unless name.nil?
|
739
|
+
command.query['fields'] = fields unless fields.nil?
|
740
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
741
|
+
execute_or_queue_command(command, &block)
|
742
|
+
end
|
743
|
+
|
744
|
+
# Stops a notebook instance.
|
745
|
+
# @param [String] name
|
746
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
747
|
+
# instance_id``
|
748
|
+
# @param [Google::Apis::NotebooksV1::StopInstanceRequest] stop_instance_request_object
|
749
|
+
# @param [String] fields
|
750
|
+
# Selector specifying which fields to include in a partial response.
|
751
|
+
# @param [String] quota_user
|
752
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
753
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
754
|
+
# @param [Google::Apis::RequestOptions] options
|
755
|
+
# Request-specific options
|
756
|
+
#
|
757
|
+
# @yield [result, err] Result & error if block supplied
|
758
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
759
|
+
# @yieldparam err [StandardError] error object if request failed
|
760
|
+
#
|
761
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
762
|
+
#
|
763
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
764
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
765
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
766
|
+
def stop_instance(name, stop_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
767
|
+
command = make_simple_command(:post, 'v1/{+name}:stop', options)
|
768
|
+
command.request_representation = Google::Apis::NotebooksV1::StopInstanceRequest::Representation
|
769
|
+
command.request_object = stop_instance_request_object
|
770
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
771
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
772
|
+
command.params['name'] = name unless name.nil?
|
773
|
+
command.query['fields'] = fields unless fields.nil?
|
774
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
775
|
+
execute_or_queue_command(command, &block)
|
776
|
+
end
|
777
|
+
|
778
|
+
# Returns permissions that a caller has on the specified resource. If the
|
779
|
+
# resource does not exist, this will return an empty set of permissions, not a `
|
780
|
+
# NOT_FOUND` error. Note: This operation is designed to be used for building
|
781
|
+
# permission-aware UIs and command-line tools, not for authorization checking.
|
782
|
+
# This operation may "fail open" without warning.
|
783
|
+
# @param [String] resource
|
784
|
+
# REQUIRED: The resource for which the policy detail is being requested. See the
|
785
|
+
# operation documentation for the appropriate value for this field.
|
786
|
+
# @param [Google::Apis::NotebooksV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
787
|
+
# @param [String] fields
|
788
|
+
# Selector specifying which fields to include in a partial response.
|
789
|
+
# @param [String] quota_user
|
790
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
791
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
792
|
+
# @param [Google::Apis::RequestOptions] options
|
793
|
+
# Request-specific options
|
794
|
+
#
|
795
|
+
# @yield [result, err] Result & error if block supplied
|
796
|
+
# @yieldparam result [Google::Apis::NotebooksV1::TestIamPermissionsResponse] parsed result object
|
797
|
+
# @yieldparam err [StandardError] error object if request failed
|
798
|
+
#
|
799
|
+
# @return [Google::Apis::NotebooksV1::TestIamPermissionsResponse]
|
800
|
+
#
|
801
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
802
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
803
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
804
|
+
def test_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
805
|
+
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
806
|
+
command.request_representation = Google::Apis::NotebooksV1::TestIamPermissionsRequest::Representation
|
807
|
+
command.request_object = test_iam_permissions_request_object
|
808
|
+
command.response_representation = Google::Apis::NotebooksV1::TestIamPermissionsResponse::Representation
|
809
|
+
command.response_class = Google::Apis::NotebooksV1::TestIamPermissionsResponse
|
810
|
+
command.params['resource'] = resource unless resource.nil?
|
811
|
+
command.query['fields'] = fields unless fields.nil?
|
812
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
813
|
+
execute_or_queue_command(command, &block)
|
814
|
+
end
|
815
|
+
|
816
|
+
# Upgrades a notebook instance to the latest version.
|
817
|
+
# @param [String] name
|
818
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
819
|
+
# instance_id``
|
820
|
+
# @param [Google::Apis::NotebooksV1::UpgradeInstanceRequest] upgrade_instance_request_object
|
821
|
+
# @param [String] fields
|
822
|
+
# Selector specifying which fields to include in a partial response.
|
823
|
+
# @param [String] quota_user
|
824
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
825
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
826
|
+
# @param [Google::Apis::RequestOptions] options
|
827
|
+
# Request-specific options
|
828
|
+
#
|
829
|
+
# @yield [result, err] Result & error if block supplied
|
830
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
831
|
+
# @yieldparam err [StandardError] error object if request failed
|
832
|
+
#
|
833
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
834
|
+
#
|
835
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
836
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
837
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
838
|
+
def upgrade_instance(name, upgrade_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
839
|
+
command = make_simple_command(:post, 'v1/{+name}:upgrade', options)
|
840
|
+
command.request_representation = Google::Apis::NotebooksV1::UpgradeInstanceRequest::Representation
|
841
|
+
command.request_object = upgrade_instance_request_object
|
842
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
843
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
844
|
+
command.params['name'] = name unless name.nil?
|
845
|
+
command.query['fields'] = fields unless fields.nil?
|
846
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
847
|
+
execute_or_queue_command(command, &block)
|
848
|
+
end
|
849
|
+
|
850
|
+
# Allows notebook instances to call this endpoint to upgrade themselves. Do not
|
851
|
+
# use this method directly.
|
852
|
+
# @param [String] name
|
853
|
+
# Required. Format: `projects/`project_id`/locations/`location`/instances/`
|
854
|
+
# instance_id``
|
855
|
+
# @param [Google::Apis::NotebooksV1::UpgradeInstanceInternalRequest] upgrade_instance_internal_request_object
|
856
|
+
# @param [String] fields
|
857
|
+
# Selector specifying which fields to include in a partial response.
|
858
|
+
# @param [String] quota_user
|
859
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
860
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
861
|
+
# @param [Google::Apis::RequestOptions] options
|
862
|
+
# Request-specific options
|
863
|
+
#
|
864
|
+
# @yield [result, err] Result & error if block supplied
|
865
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
866
|
+
# @yieldparam err [StandardError] error object if request failed
|
867
|
+
#
|
868
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
869
|
+
#
|
870
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
871
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
872
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
873
|
+
def upgrade_project_location_instance_internal(name, upgrade_instance_internal_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
874
|
+
command = make_simple_command(:post, 'v1/{+name}:upgradeInternal', options)
|
875
|
+
command.request_representation = Google::Apis::NotebooksV1::UpgradeInstanceInternalRequest::Representation
|
876
|
+
command.request_object = upgrade_instance_internal_request_object
|
877
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
878
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
879
|
+
command.params['name'] = name unless name.nil?
|
880
|
+
command.query['fields'] = fields unless fields.nil?
|
881
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
882
|
+
execute_or_queue_command(command, &block)
|
883
|
+
end
|
884
|
+
|
885
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
886
|
+
# a best effort to cancel the operation, but success is not guaranteed. If the
|
887
|
+
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
888
|
+
# Clients can use Operations.GetOperation or other methods to check whether the
|
889
|
+
# cancellation succeeded or whether the operation completed despite cancellation.
|
890
|
+
# On successful cancellation, the operation is not deleted; instead, it becomes
|
891
|
+
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
|
892
|
+
# corresponding to `Code.CANCELLED`.
|
893
|
+
# @param [String] name
|
894
|
+
# The name of the operation resource to be cancelled.
|
895
|
+
# @param [Google::Apis::NotebooksV1::CancelOperationRequest] cancel_operation_request_object
|
896
|
+
# @param [String] fields
|
897
|
+
# Selector specifying which fields to include in a partial response.
|
898
|
+
# @param [String] quota_user
|
899
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
900
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
901
|
+
# @param [Google::Apis::RequestOptions] options
|
902
|
+
# Request-specific options
|
903
|
+
#
|
904
|
+
# @yield [result, err] Result & error if block supplied
|
905
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Empty] parsed result object
|
906
|
+
# @yieldparam err [StandardError] error object if request failed
|
907
|
+
#
|
908
|
+
# @return [Google::Apis::NotebooksV1::Empty]
|
909
|
+
#
|
910
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
911
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
912
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
913
|
+
def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
914
|
+
command = make_simple_command(:post, 'v1/{+name}:cancel', options)
|
915
|
+
command.request_representation = Google::Apis::NotebooksV1::CancelOperationRequest::Representation
|
916
|
+
command.request_object = cancel_operation_request_object
|
917
|
+
command.response_representation = Google::Apis::NotebooksV1::Empty::Representation
|
918
|
+
command.response_class = Google::Apis::NotebooksV1::Empty
|
919
|
+
command.params['name'] = name unless name.nil?
|
920
|
+
command.query['fields'] = fields unless fields.nil?
|
921
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
922
|
+
execute_or_queue_command(command, &block)
|
923
|
+
end
|
924
|
+
|
925
|
+
# Deletes a long-running operation. This method indicates that the client is no
|
926
|
+
# longer interested in the operation result. It does not cancel the operation.
|
927
|
+
# If the server doesn't support this method, it returns `google.rpc.Code.
|
928
|
+
# UNIMPLEMENTED`.
|
929
|
+
# @param [String] name
|
930
|
+
# The name of the operation resource to be deleted.
|
931
|
+
# @param [String] fields
|
932
|
+
# Selector specifying which fields to include in a partial response.
|
933
|
+
# @param [String] quota_user
|
934
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
935
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
936
|
+
# @param [Google::Apis::RequestOptions] options
|
937
|
+
# Request-specific options
|
938
|
+
#
|
939
|
+
# @yield [result, err] Result & error if block supplied
|
940
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Empty] parsed result object
|
941
|
+
# @yieldparam err [StandardError] error object if request failed
|
942
|
+
#
|
943
|
+
# @return [Google::Apis::NotebooksV1::Empty]
|
944
|
+
#
|
945
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
946
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
947
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
948
|
+
def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
949
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
950
|
+
command.response_representation = Google::Apis::NotebooksV1::Empty::Representation
|
951
|
+
command.response_class = Google::Apis::NotebooksV1::Empty
|
952
|
+
command.params['name'] = name unless name.nil?
|
953
|
+
command.query['fields'] = fields unless fields.nil?
|
954
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
955
|
+
execute_or_queue_command(command, &block)
|
956
|
+
end
|
957
|
+
|
958
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
959
|
+
# to poll the operation result at intervals as recommended by the API service.
|
960
|
+
# @param [String] name
|
961
|
+
# The name of the operation resource.
|
962
|
+
# @param [String] fields
|
963
|
+
# Selector specifying which fields to include in a partial response.
|
964
|
+
# @param [String] quota_user
|
965
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
966
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
967
|
+
# @param [Google::Apis::RequestOptions] options
|
968
|
+
# Request-specific options
|
969
|
+
#
|
970
|
+
# @yield [result, err] Result & error if block supplied
|
971
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
972
|
+
# @yieldparam err [StandardError] error object if request failed
|
973
|
+
#
|
974
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
975
|
+
#
|
976
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
977
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
978
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
979
|
+
def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
980
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
981
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
982
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
983
|
+
command.params['name'] = name unless name.nil?
|
984
|
+
command.query['fields'] = fields unless fields.nil?
|
985
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
986
|
+
execute_or_queue_command(command, &block)
|
987
|
+
end
|
988
|
+
|
989
|
+
# Lists operations that match the specified filter in the request. If the server
|
990
|
+
# doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
|
991
|
+
# binding allows API services to override the binding to use different resource
|
992
|
+
# name schemes, such as `users/*/operations`. To override the binding, API
|
993
|
+
# services can add a binding such as `"/v1/`name=users/*`/operations"` to their
|
994
|
+
# service configuration. For backwards compatibility, the default name includes
|
995
|
+
# the operations collection id, however overriding users must ensure the name
|
996
|
+
# binding is the parent resource, without the operations collection id.
|
997
|
+
# @param [String] name
|
998
|
+
# The name of the operation's parent resource.
|
999
|
+
# @param [String] filter
|
1000
|
+
# The standard list filter.
|
1001
|
+
# @param [Fixnum] page_size
|
1002
|
+
# The standard list page size.
|
1003
|
+
# @param [String] page_token
|
1004
|
+
# The standard list page token.
|
1005
|
+
# @param [String] fields
|
1006
|
+
# Selector specifying which fields to include in a partial response.
|
1007
|
+
# @param [String] quota_user
|
1008
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1009
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1010
|
+
# @param [Google::Apis::RequestOptions] options
|
1011
|
+
# Request-specific options
|
1012
|
+
#
|
1013
|
+
# @yield [result, err] Result & error if block supplied
|
1014
|
+
# @yieldparam result [Google::Apis::NotebooksV1::ListOperationsResponse] parsed result object
|
1015
|
+
# @yieldparam err [StandardError] error object if request failed
|
1016
|
+
#
|
1017
|
+
# @return [Google::Apis::NotebooksV1::ListOperationsResponse]
|
1018
|
+
#
|
1019
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1020
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1021
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1022
|
+
def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1023
|
+
command = make_simple_command(:get, 'v1/{+name}/operations', options)
|
1024
|
+
command.response_representation = Google::Apis::NotebooksV1::ListOperationsResponse::Representation
|
1025
|
+
command.response_class = Google::Apis::NotebooksV1::ListOperationsResponse
|
1026
|
+
command.params['name'] = name unless name.nil?
|
1027
|
+
command.query['filter'] = filter unless filter.nil?
|
1028
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1029
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1030
|
+
command.query['fields'] = fields unless fields.nil?
|
1031
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1032
|
+
execute_or_queue_command(command, &block)
|
1033
|
+
end
|
1034
|
+
|
1035
|
+
# Triggers execution of an existing schedule.
|
1036
|
+
# @param [String] name
|
1037
|
+
# Required. Format: `parent=projects/`project_id`/locations/`location`/schedules/
|
1038
|
+
# `schedule_id``
|
1039
|
+
# @param [Google::Apis::NotebooksV1::TriggerScheduleRequest] trigger_schedule_request_object
|
1040
|
+
# @param [String] fields
|
1041
|
+
# Selector specifying which fields to include in a partial response.
|
1042
|
+
# @param [String] quota_user
|
1043
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1044
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1045
|
+
# @param [Google::Apis::RequestOptions] options
|
1046
|
+
# Request-specific options
|
1047
|
+
#
|
1048
|
+
# @yield [result, err] Result & error if block supplied
|
1049
|
+
# @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
|
1050
|
+
# @yieldparam err [StandardError] error object if request failed
|
1051
|
+
#
|
1052
|
+
# @return [Google::Apis::NotebooksV1::Operation]
|
1053
|
+
#
|
1054
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1055
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1056
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1057
|
+
def trigger_schedule(name, trigger_schedule_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1058
|
+
command = make_simple_command(:post, 'v1/{+name}:trigger', options)
|
1059
|
+
command.request_representation = Google::Apis::NotebooksV1::TriggerScheduleRequest::Representation
|
1060
|
+
command.request_object = trigger_schedule_request_object
|
1061
|
+
command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
|
1062
|
+
command.response_class = Google::Apis::NotebooksV1::Operation
|
1063
|
+
command.params['name'] = name unless name.nil?
|
1064
|
+
command.query['fields'] = fields unless fields.nil?
|
1065
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1066
|
+
execute_or_queue_command(command, &block)
|
1067
|
+
end
|
1068
|
+
|
1069
|
+
protected
|
1070
|
+
|
1071
|
+
def apply_command_defaults(command)
|
1072
|
+
command.query['key'] = key unless key.nil?
|
1073
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1074
|
+
end
|
1075
|
+
end
|
1076
|
+
end
|
1077
|
+
end
|
1078
|
+
end
|