google-apis-notebooks_v1 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module NotebooksV1
18
18
  # Version of the google-apis-notebooks_v1 gem
19
- GEM_VERSION = "0.5.0"
19
+ GEM_VERSION = "0.6.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.2.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20210305"
25
+ REVISION = "20210323"
26
26
  end
27
27
  end
28
28
  end
@@ -58,6 +58,12 @@ module Google
58
58
  include Google::Apis::Core::JsonObjectSupport
59
59
  end
60
60
 
61
+ class EncryptionConfig
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
61
67
  class Environment
62
68
  class Representation < Google::Apis::Core::JsonRepresentation; end
63
69
 
@@ -136,12 +142,30 @@ module Google
136
142
  include Google::Apis::Core::JsonObjectSupport
137
143
  end
138
144
 
145
+ class ListRuntimesResponse
146
+ class Representation < Google::Apis::Core::JsonRepresentation; end
147
+
148
+ include Google::Apis::Core::JsonObjectSupport
149
+ end
150
+
139
151
  class ListSchedulesResponse
140
152
  class Representation < Google::Apis::Core::JsonRepresentation; end
141
153
 
142
154
  include Google::Apis::Core::JsonObjectSupport
143
155
  end
144
156
 
157
+ class LocalDisk
158
+ class Representation < Google::Apis::Core::JsonRepresentation; end
159
+
160
+ include Google::Apis::Core::JsonObjectSupport
161
+ end
162
+
163
+ class LocalDiskInitializeParams
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
145
169
  class Location
146
170
  class Representation < Google::Apis::Core::JsonRepresentation; end
147
171
 
@@ -184,6 +208,54 @@ module Google
184
208
  include Google::Apis::Core::JsonObjectSupport
185
209
  end
186
210
 
211
+ class ResetRuntimeRequest
212
+ class Representation < Google::Apis::Core::JsonRepresentation; end
213
+
214
+ include Google::Apis::Core::JsonObjectSupport
215
+ end
216
+
217
+ class Runtime
218
+ class Representation < Google::Apis::Core::JsonRepresentation; end
219
+
220
+ include Google::Apis::Core::JsonObjectSupport
221
+ end
222
+
223
+ class RuntimeAcceleratorConfig
224
+ class Representation < Google::Apis::Core::JsonRepresentation; end
225
+
226
+ include Google::Apis::Core::JsonObjectSupport
227
+ end
228
+
229
+ class RuntimeAccessConfig
230
+ class Representation < Google::Apis::Core::JsonRepresentation; end
231
+
232
+ include Google::Apis::Core::JsonObjectSupport
233
+ end
234
+
235
+ class RuntimeGuestOsFeature
236
+ class Representation < Google::Apis::Core::JsonRepresentation; end
237
+
238
+ include Google::Apis::Core::JsonObjectSupport
239
+ end
240
+
241
+ class RuntimeMetrics
242
+ class Representation < Google::Apis::Core::JsonRepresentation; end
243
+
244
+ include Google::Apis::Core::JsonObjectSupport
245
+ end
246
+
247
+ class RuntimeShieldedInstanceConfig
248
+ class Representation < Google::Apis::Core::JsonRepresentation; end
249
+
250
+ include Google::Apis::Core::JsonObjectSupport
251
+ end
252
+
253
+ class RuntimeSoftwareConfig
254
+ class Representation < Google::Apis::Core::JsonRepresentation; end
255
+
256
+ include Google::Apis::Core::JsonObjectSupport
257
+ end
258
+
187
259
  class Schedule
188
260
  class Representation < Google::Apis::Core::JsonRepresentation; end
189
261
 
@@ -232,6 +304,12 @@ module Google
232
304
  include Google::Apis::Core::JsonObjectSupport
233
305
  end
234
306
 
307
+ class StartRuntimeRequest
308
+ class Representation < Google::Apis::Core::JsonRepresentation; end
309
+
310
+ include Google::Apis::Core::JsonObjectSupport
311
+ end
312
+
235
313
  class Status
236
314
  class Representation < Google::Apis::Core::JsonRepresentation; end
237
315
 
@@ -244,6 +322,18 @@ module Google
244
322
  include Google::Apis::Core::JsonObjectSupport
245
323
  end
246
324
 
325
+ class StopRuntimeRequest
326
+ class Representation < Google::Apis::Core::JsonRepresentation; end
327
+
328
+ include Google::Apis::Core::JsonObjectSupport
329
+ end
330
+
331
+ class SwitchRuntimeRequest
332
+ class Representation < Google::Apis::Core::JsonRepresentation; end
333
+
334
+ include Google::Apis::Core::JsonObjectSupport
335
+ end
336
+
247
337
  class TestIamPermissionsRequest
248
338
  class Representation < Google::Apis::Core::JsonRepresentation; end
249
339
 
@@ -262,6 +352,12 @@ module Google
262
352
  include Google::Apis::Core::JsonObjectSupport
263
353
  end
264
354
 
355
+ class UpdateShieldedInstanceConfigRequest
356
+ class Representation < Google::Apis::Core::JsonRepresentation; end
357
+
358
+ include Google::Apis::Core::JsonObjectSupport
359
+ end
360
+
265
361
  class UpgradeHistoryEntry
266
362
  class Representation < Google::Apis::Core::JsonRepresentation; end
267
363
 
@@ -280,6 +376,18 @@ module Google
280
376
  include Google::Apis::Core::JsonObjectSupport
281
377
  end
282
378
 
379
+ class VirtualMachine
380
+ class Representation < Google::Apis::Core::JsonRepresentation; end
381
+
382
+ include Google::Apis::Core::JsonObjectSupport
383
+ end
384
+
385
+ class VirtualMachineConfig
386
+ class Representation < Google::Apis::Core::JsonRepresentation; end
387
+
388
+ include Google::Apis::Core::JsonObjectSupport
389
+ end
390
+
283
391
  class VmImage
284
392
  class Representation < Google::Apis::Core::JsonRepresentation; end
285
393
 
@@ -343,6 +451,13 @@ module Google
343
451
  end
344
452
  end
345
453
 
454
+ class EncryptionConfig
455
+ # @private
456
+ class Representation < Google::Apis::Core::JsonRepresentation
457
+ property :kms_key, as: 'kmsKey'
458
+ end
459
+ end
460
+
346
461
  class Environment
347
462
  # @private
348
463
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -516,6 +631,16 @@ module Google
516
631
  end
517
632
  end
518
633
 
634
+ class ListRuntimesResponse
635
+ # @private
636
+ class Representation < Google::Apis::Core::JsonRepresentation
637
+ property :next_page_token, as: 'nextPageToken'
638
+ collection :runtimes, as: 'runtimes', class: Google::Apis::NotebooksV1::Runtime, decorator: Google::Apis::NotebooksV1::Runtime::Representation
639
+
640
+ collection :unreachable, as: 'unreachable'
641
+ end
642
+ end
643
+
519
644
  class ListSchedulesResponse
520
645
  # @private
521
646
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -526,6 +651,37 @@ module Google
526
651
  end
527
652
  end
528
653
 
654
+ class LocalDisk
655
+ # @private
656
+ class Representation < Google::Apis::Core::JsonRepresentation
657
+ property :auto_delete, as: 'autoDelete'
658
+ property :boot, as: 'boot'
659
+ property :device_name, as: 'deviceName'
660
+ collection :guest_os_features, as: 'guestOsFeatures', class: Google::Apis::NotebooksV1::RuntimeGuestOsFeature, decorator: Google::Apis::NotebooksV1::RuntimeGuestOsFeature::Representation
661
+
662
+ property :index, as: 'index'
663
+ property :initialize_params, as: 'initializeParams', class: Google::Apis::NotebooksV1::LocalDiskInitializeParams, decorator: Google::Apis::NotebooksV1::LocalDiskInitializeParams::Representation
664
+
665
+ property :interface, as: 'interface'
666
+ property :kind, as: 'kind'
667
+ collection :licenses, as: 'licenses'
668
+ property :mode, as: 'mode'
669
+ property :source, as: 'source'
670
+ property :type, as: 'type'
671
+ end
672
+ end
673
+
674
+ class LocalDiskInitializeParams
675
+ # @private
676
+ class Representation < Google::Apis::Core::JsonRepresentation
677
+ property :description, as: 'description'
678
+ property :disk_name, as: 'diskName'
679
+ property :disk_size_gb, :numeric_string => true, as: 'diskSizeGb'
680
+ property :disk_type, as: 'diskType'
681
+ hash :labels, as: 'labels'
682
+ end
683
+ end
684
+
529
685
  class Location
530
686
  # @private
531
687
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -594,6 +750,84 @@ module Google
594
750
  end
595
751
  end
596
752
 
753
+ class ResetRuntimeRequest
754
+ # @private
755
+ class Representation < Google::Apis::Core::JsonRepresentation
756
+ end
757
+ end
758
+
759
+ class Runtime
760
+ # @private
761
+ class Representation < Google::Apis::Core::JsonRepresentation
762
+ property :access_config, as: 'accessConfig', class: Google::Apis::NotebooksV1::RuntimeAccessConfig, decorator: Google::Apis::NotebooksV1::RuntimeAccessConfig::Representation
763
+
764
+ property :create_time, as: 'createTime'
765
+ property :health_state, as: 'healthState'
766
+ property :metrics, as: 'metrics', class: Google::Apis::NotebooksV1::RuntimeMetrics, decorator: Google::Apis::NotebooksV1::RuntimeMetrics::Representation
767
+
768
+ property :name, as: 'name'
769
+ property :software_config, as: 'softwareConfig', class: Google::Apis::NotebooksV1::RuntimeSoftwareConfig, decorator: Google::Apis::NotebooksV1::RuntimeSoftwareConfig::Representation
770
+
771
+ property :state, as: 'state'
772
+ property :update_time, as: 'updateTime'
773
+ property :virtual_machine, as: 'virtualMachine', class: Google::Apis::NotebooksV1::VirtualMachine, decorator: Google::Apis::NotebooksV1::VirtualMachine::Representation
774
+
775
+ end
776
+ end
777
+
778
+ class RuntimeAcceleratorConfig
779
+ # @private
780
+ class Representation < Google::Apis::Core::JsonRepresentation
781
+ property :core_count, :numeric_string => true, as: 'coreCount'
782
+ property :type, as: 'type'
783
+ end
784
+ end
785
+
786
+ class RuntimeAccessConfig
787
+ # @private
788
+ class Representation < Google::Apis::Core::JsonRepresentation
789
+ property :access_type, as: 'accessType'
790
+ property :proxy_uri, as: 'proxyUri'
791
+ property :runtime_owner, as: 'runtimeOwner'
792
+ end
793
+ end
794
+
795
+ class RuntimeGuestOsFeature
796
+ # @private
797
+ class Representation < Google::Apis::Core::JsonRepresentation
798
+ property :type, as: 'type'
799
+ end
800
+ end
801
+
802
+ class RuntimeMetrics
803
+ # @private
804
+ class Representation < Google::Apis::Core::JsonRepresentation
805
+ hash :system_metrics, as: 'systemMetrics'
806
+ end
807
+ end
808
+
809
+ class RuntimeShieldedInstanceConfig
810
+ # @private
811
+ class Representation < Google::Apis::Core::JsonRepresentation
812
+ property :enable_integrity_monitoring, as: 'enableIntegrityMonitoring'
813
+ property :enable_secure_boot, as: 'enableSecureBoot'
814
+ property :enable_vtpm, as: 'enableVtpm'
815
+ end
816
+ end
817
+
818
+ class RuntimeSoftwareConfig
819
+ # @private
820
+ class Representation < Google::Apis::Core::JsonRepresentation
821
+ property :custom_gpu_driver_path, as: 'customGpuDriverPath'
822
+ property :enable_health_monitoring, as: 'enableHealthMonitoring'
823
+ property :idle_shutdown, as: 'idleShutdown'
824
+ property :idle_shutdown_timeout, as: 'idleShutdownTimeout'
825
+ property :install_gpu_driver, as: 'installGpuDriver'
826
+ property :notebook_upgrade_schedule, as: 'notebookUpgradeSchedule'
827
+ property :post_startup_script, as: 'postStartupScript'
828
+ end
829
+ end
830
+
597
831
  class Schedule
598
832
  # @private
599
833
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -665,6 +899,12 @@ module Google
665
899
  end
666
900
  end
667
901
 
902
+ class StartRuntimeRequest
903
+ # @private
904
+ class Representation < Google::Apis::Core::JsonRepresentation
905
+ end
906
+ end
907
+
668
908
  class Status
669
909
  # @private
670
910
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -680,6 +920,21 @@ module Google
680
920
  end
681
921
  end
682
922
 
923
+ class StopRuntimeRequest
924
+ # @private
925
+ class Representation < Google::Apis::Core::JsonRepresentation
926
+ end
927
+ end
928
+
929
+ class SwitchRuntimeRequest
930
+ # @private
931
+ class Representation < Google::Apis::Core::JsonRepresentation
932
+ property :accelerator_config, as: 'acceleratorConfig', class: Google::Apis::NotebooksV1::RuntimeAcceleratorConfig, decorator: Google::Apis::NotebooksV1::RuntimeAcceleratorConfig::Representation
933
+
934
+ property :machine_type, as: 'machineType'
935
+ end
936
+ end
937
+
683
938
  class TestIamPermissionsRequest
684
939
  # @private
685
940
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -700,6 +955,14 @@ module Google
700
955
  end
701
956
  end
702
957
 
958
+ class UpdateShieldedInstanceConfigRequest
959
+ # @private
960
+ class Representation < Google::Apis::Core::JsonRepresentation
961
+ property :shielded_instance_config, as: 'shieldedInstanceConfig', class: Google::Apis::NotebooksV1::ShieldedInstanceConfig, decorator: Google::Apis::NotebooksV1::ShieldedInstanceConfig::Representation
962
+
963
+ end
964
+ end
965
+
703
966
  class UpgradeHistoryEntry
704
967
  # @private
705
968
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -729,6 +992,41 @@ module Google
729
992
  end
730
993
  end
731
994
 
995
+ class VirtualMachine
996
+ # @private
997
+ class Representation < Google::Apis::Core::JsonRepresentation
998
+ property :instance_id, as: 'instanceId'
999
+ property :instance_name, as: 'instanceName'
1000
+ property :virtual_machine_config, as: 'virtualMachineConfig', class: Google::Apis::NotebooksV1::VirtualMachineConfig, decorator: Google::Apis::NotebooksV1::VirtualMachineConfig::Representation
1001
+
1002
+ end
1003
+ end
1004
+
1005
+ class VirtualMachineConfig
1006
+ # @private
1007
+ class Representation < Google::Apis::Core::JsonRepresentation
1008
+ property :accelerator_config, as: 'acceleratorConfig', class: Google::Apis::NotebooksV1::RuntimeAcceleratorConfig, decorator: Google::Apis::NotebooksV1::RuntimeAcceleratorConfig::Representation
1009
+
1010
+ collection :container_images, as: 'containerImages', class: Google::Apis::NotebooksV1::ContainerImage, decorator: Google::Apis::NotebooksV1::ContainerImage::Representation
1011
+
1012
+ property :data_disk, as: 'dataDisk', class: Google::Apis::NotebooksV1::LocalDisk, decorator: Google::Apis::NotebooksV1::LocalDisk::Representation
1013
+
1014
+ property :encryption_config, as: 'encryptionConfig', class: Google::Apis::NotebooksV1::EncryptionConfig, decorator: Google::Apis::NotebooksV1::EncryptionConfig::Representation
1015
+
1016
+ hash :guest_attributes, as: 'guestAttributes'
1017
+ property :internal_ip_only, as: 'internalIpOnly'
1018
+ hash :labels, as: 'labels'
1019
+ property :machine_type, as: 'machineType'
1020
+ hash :metadata, as: 'metadata'
1021
+ property :network, as: 'network'
1022
+ property :shielded_instance_config, as: 'shieldedInstanceConfig', class: Google::Apis::NotebooksV1::RuntimeShieldedInstanceConfig, decorator: Google::Apis::NotebooksV1::RuntimeShieldedInstanceConfig::Representation
1023
+
1024
+ property :subnet, as: 'subnet'
1025
+ collection :tags, as: 'tags'
1026
+ property :zone, as: 'zone'
1027
+ end
1028
+ end
1029
+
732
1030
  class VmImage
733
1031
  # @private
734
1032
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -83,11 +83,15 @@ module Google
83
83
  # @param [String] name
84
84
  # The resource that owns the locations collection, if applicable.
85
85
  # @param [String] filter
86
- # The standard list filter.
86
+ # A filter to narrow down results to a preferred subset. The filtering language
87
+ # accepts strings like "displayName=tokyo", and is documented in more detail in [
88
+ # AIP-160](https://google.aip.dev/160).
87
89
  # @param [Fixnum] page_size
88
- # The standard list page size.
90
+ # The maximum number of results to return. If not set, the service will select a
91
+ # default.
89
92
  # @param [String] page_token
90
- # The standard list page token.
93
+ # A page token received from the `next_page_token` field in the response. Send
94
+ # that page token to receive the subsequent page.
91
95
  # @param [String] fields
92
96
  # Selector specifying which fields to include in a partial response.
93
97
  # @param [String] quota_user
@@ -985,6 +989,40 @@ module Google
985
989
  execute_or_queue_command(command, &block)
986
990
  end
987
991
 
992
+ # Updates the Shielded instance configuration of a single Instance.
993
+ # @param [String] name
994
+ # Required. Format: `projects/`project_id`/locations/`location`/instances/`
995
+ # instance_id``
996
+ # @param [Google::Apis::NotebooksV1::UpdateShieldedInstanceConfigRequest] update_shielded_instance_config_request_object
997
+ # @param [String] fields
998
+ # Selector specifying which fields to include in a partial response.
999
+ # @param [String] quota_user
1000
+ # Available to use for quota purposes for server-side applications. Can be any
1001
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1002
+ # @param [Google::Apis::RequestOptions] options
1003
+ # Request-specific options
1004
+ #
1005
+ # @yield [result, err] Result & error if block supplied
1006
+ # @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
1007
+ # @yieldparam err [StandardError] error object if request failed
1008
+ #
1009
+ # @return [Google::Apis::NotebooksV1::Operation]
1010
+ #
1011
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1012
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1013
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1014
+ def update_shielded_instance_config(name, update_shielded_instance_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1015
+ command = make_simple_command(:patch, 'v1/{+name}:updateShieldedInstanceConfig', options)
1016
+ command.request_representation = Google::Apis::NotebooksV1::UpdateShieldedInstanceConfigRequest::Representation
1017
+ command.request_object = update_shielded_instance_config_request_object
1018
+ command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
1019
+ command.response_class = Google::Apis::NotebooksV1::Operation
1020
+ command.params['name'] = name unless name.nil?
1021
+ command.query['fields'] = fields unless fields.nil?
1022
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1023
+ execute_or_queue_command(command, &block)
1024
+ end
1025
+
988
1026
  # Upgrades a notebook instance to the latest version.
989
1027
  # @param [String] name
990
1028
  # Required. Format: `projects/`project_id`/locations/`location`/instances/`
@@ -1204,6 +1242,284 @@ module Google
1204
1242
  execute_or_queue_command(command, &block)
1205
1243
  end
1206
1244
 
1245
+ # Creates a new Runtime in a given project and location.
1246
+ # @param [String] parent
1247
+ # Required. Format: `parent=projects/`project_id`/locations/`location``
1248
+ # @param [Google::Apis::NotebooksV1::Runtime] runtime_object
1249
+ # @param [String] runtime_id
1250
+ # Required. User-defined unique ID of this Runtime.
1251
+ # @param [String] fields
1252
+ # Selector specifying which fields to include in a partial response.
1253
+ # @param [String] quota_user
1254
+ # Available to use for quota purposes for server-side applications. Can be any
1255
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1256
+ # @param [Google::Apis::RequestOptions] options
1257
+ # Request-specific options
1258
+ #
1259
+ # @yield [result, err] Result & error if block supplied
1260
+ # @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
1261
+ # @yieldparam err [StandardError] error object if request failed
1262
+ #
1263
+ # @return [Google::Apis::NotebooksV1::Operation]
1264
+ #
1265
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1266
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1267
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1268
+ def create_project_location_runtime(parent, runtime_object = nil, runtime_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1269
+ command = make_simple_command(:post, 'v1/{+parent}/runtimes', options)
1270
+ command.request_representation = Google::Apis::NotebooksV1::Runtime::Representation
1271
+ command.request_object = runtime_object
1272
+ command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
1273
+ command.response_class = Google::Apis::NotebooksV1::Operation
1274
+ command.params['parent'] = parent unless parent.nil?
1275
+ command.query['runtimeId'] = runtime_id unless runtime_id.nil?
1276
+ command.query['fields'] = fields unless fields.nil?
1277
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1278
+ execute_or_queue_command(command, &block)
1279
+ end
1280
+
1281
+ # Deletes a single Runtime.
1282
+ # @param [String] name
1283
+ # Required. Format: `projects/`project_id`/locations/`location`/runtimes/`
1284
+ # runtime_id``
1285
+ # @param [String] fields
1286
+ # Selector specifying which fields to include in a partial response.
1287
+ # @param [String] quota_user
1288
+ # Available to use for quota purposes for server-side applications. Can be any
1289
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1290
+ # @param [Google::Apis::RequestOptions] options
1291
+ # Request-specific options
1292
+ #
1293
+ # @yield [result, err] Result & error if block supplied
1294
+ # @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
1295
+ # @yieldparam err [StandardError] error object if request failed
1296
+ #
1297
+ # @return [Google::Apis::NotebooksV1::Operation]
1298
+ #
1299
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1300
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1301
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1302
+ def delete_project_location_runtime(name, fields: nil, quota_user: nil, options: nil, &block)
1303
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1304
+ command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
1305
+ command.response_class = Google::Apis::NotebooksV1::Operation
1306
+ command.params['name'] = name unless name.nil?
1307
+ command.query['fields'] = fields unless fields.nil?
1308
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1309
+ execute_or_queue_command(command, &block)
1310
+ end
1311
+
1312
+ # Gets details of a single Runtime. The location must be a regional endpoint
1313
+ # rather than zonal.
1314
+ # @param [String] name
1315
+ # Required. Format: `projects/`project_id`/locations/`location`/runtimes/`
1316
+ # runtime_id``
1317
+ # @param [String] fields
1318
+ # Selector specifying which fields to include in a partial response.
1319
+ # @param [String] quota_user
1320
+ # Available to use for quota purposes for server-side applications. Can be any
1321
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1322
+ # @param [Google::Apis::RequestOptions] options
1323
+ # Request-specific options
1324
+ #
1325
+ # @yield [result, err] Result & error if block supplied
1326
+ # @yieldparam result [Google::Apis::NotebooksV1::Runtime] parsed result object
1327
+ # @yieldparam err [StandardError] error object if request failed
1328
+ #
1329
+ # @return [Google::Apis::NotebooksV1::Runtime]
1330
+ #
1331
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1332
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1333
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1334
+ def get_project_location_runtime(name, fields: nil, quota_user: nil, options: nil, &block)
1335
+ command = make_simple_command(:get, 'v1/{+name}', options)
1336
+ command.response_representation = Google::Apis::NotebooksV1::Runtime::Representation
1337
+ command.response_class = Google::Apis::NotebooksV1::Runtime
1338
+ command.params['name'] = name unless name.nil?
1339
+ command.query['fields'] = fields unless fields.nil?
1340
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1341
+ execute_or_queue_command(command, &block)
1342
+ end
1343
+
1344
+ # Lists Runtimes in a given project and location.
1345
+ # @param [String] parent
1346
+ # Required. Format: `parent=projects/`project_id`/locations/`location``
1347
+ # @param [Fixnum] page_size
1348
+ # Maximum return size of the list call.
1349
+ # @param [String] page_token
1350
+ # A previous returned page token that can be used to continue listing from the
1351
+ # last result.
1352
+ # @param [String] fields
1353
+ # Selector specifying which fields to include in a partial response.
1354
+ # @param [String] quota_user
1355
+ # Available to use for quota purposes for server-side applications. Can be any
1356
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1357
+ # @param [Google::Apis::RequestOptions] options
1358
+ # Request-specific options
1359
+ #
1360
+ # @yield [result, err] Result & error if block supplied
1361
+ # @yieldparam result [Google::Apis::NotebooksV1::ListRuntimesResponse] parsed result object
1362
+ # @yieldparam err [StandardError] error object if request failed
1363
+ #
1364
+ # @return [Google::Apis::NotebooksV1::ListRuntimesResponse]
1365
+ #
1366
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1367
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1368
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1369
+ def list_project_location_runtimes(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1370
+ command = make_simple_command(:get, 'v1/{+parent}/runtimes', options)
1371
+ command.response_representation = Google::Apis::NotebooksV1::ListRuntimesResponse::Representation
1372
+ command.response_class = Google::Apis::NotebooksV1::ListRuntimesResponse
1373
+ command.params['parent'] = parent unless parent.nil?
1374
+ command.query['pageSize'] = page_size unless page_size.nil?
1375
+ command.query['pageToken'] = page_token unless page_token.nil?
1376
+ command.query['fields'] = fields unless fields.nil?
1377
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1378
+ execute_or_queue_command(command, &block)
1379
+ end
1380
+
1381
+ # Resets a Managed Notebook Runtime.
1382
+ # @param [String] name
1383
+ # Required. Format: `projects/`project_id`/locations/`location`/runtimes/`
1384
+ # runtime_id``
1385
+ # @param [Google::Apis::NotebooksV1::ResetRuntimeRequest] reset_runtime_request_object
1386
+ # @param [String] fields
1387
+ # Selector specifying which fields to include in a partial response.
1388
+ # @param [String] quota_user
1389
+ # Available to use for quota purposes for server-side applications. Can be any
1390
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1391
+ # @param [Google::Apis::RequestOptions] options
1392
+ # Request-specific options
1393
+ #
1394
+ # @yield [result, err] Result & error if block supplied
1395
+ # @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
1396
+ # @yieldparam err [StandardError] error object if request failed
1397
+ #
1398
+ # @return [Google::Apis::NotebooksV1::Operation]
1399
+ #
1400
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1401
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1402
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1403
+ def reset_runtime(name, reset_runtime_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1404
+ command = make_simple_command(:post, 'v1/{+name}:reset', options)
1405
+ command.request_representation = Google::Apis::NotebooksV1::ResetRuntimeRequest::Representation
1406
+ command.request_object = reset_runtime_request_object
1407
+ command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
1408
+ command.response_class = Google::Apis::NotebooksV1::Operation
1409
+ command.params['name'] = name unless name.nil?
1410
+ command.query['fields'] = fields unless fields.nil?
1411
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1412
+ execute_or_queue_command(command, &block)
1413
+ end
1414
+
1415
+ # Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume"
1416
+ # on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-
1417
+ # start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-
1418
+ # instance
1419
+ # @param [String] name
1420
+ # Required. Format: `projects/`project_id`/locations/`location`/runtimes/`
1421
+ # runtime_id``
1422
+ # @param [Google::Apis::NotebooksV1::StartRuntimeRequest] start_runtime_request_object
1423
+ # @param [String] fields
1424
+ # Selector specifying which fields to include in a partial response.
1425
+ # @param [String] quota_user
1426
+ # Available to use for quota purposes for server-side applications. Can be any
1427
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1428
+ # @param [Google::Apis::RequestOptions] options
1429
+ # Request-specific options
1430
+ #
1431
+ # @yield [result, err] Result & error if block supplied
1432
+ # @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
1433
+ # @yieldparam err [StandardError] error object if request failed
1434
+ #
1435
+ # @return [Google::Apis::NotebooksV1::Operation]
1436
+ #
1437
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1438
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1439
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1440
+ def start_runtime(name, start_runtime_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1441
+ command = make_simple_command(:post, 'v1/{+name}:start', options)
1442
+ command.request_representation = Google::Apis::NotebooksV1::StartRuntimeRequest::Representation
1443
+ command.request_object = start_runtime_request_object
1444
+ command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
1445
+ command.response_class = Google::Apis::NotebooksV1::Operation
1446
+ command.params['name'] = name unless name.nil?
1447
+ command.query['fields'] = fields unless fields.nil?
1448
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1449
+ execute_or_queue_command(command, &block)
1450
+ end
1451
+
1452
+ # Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend"
1453
+ # on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-
1454
+ # start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-
1455
+ # instance
1456
+ # @param [String] name
1457
+ # Required. Format: `projects/`project_id`/locations/`location`/runtimes/`
1458
+ # runtime_id``
1459
+ # @param [Google::Apis::NotebooksV1::StopRuntimeRequest] stop_runtime_request_object
1460
+ # @param [String] fields
1461
+ # Selector specifying which fields to include in a partial response.
1462
+ # @param [String] quota_user
1463
+ # Available to use for quota purposes for server-side applications. Can be any
1464
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1465
+ # @param [Google::Apis::RequestOptions] options
1466
+ # Request-specific options
1467
+ #
1468
+ # @yield [result, err] Result & error if block supplied
1469
+ # @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
1470
+ # @yieldparam err [StandardError] error object if request failed
1471
+ #
1472
+ # @return [Google::Apis::NotebooksV1::Operation]
1473
+ #
1474
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1475
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1476
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1477
+ def stop_runtime(name, stop_runtime_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1478
+ command = make_simple_command(:post, 'v1/{+name}:stop', options)
1479
+ command.request_representation = Google::Apis::NotebooksV1::StopRuntimeRequest::Representation
1480
+ command.request_object = stop_runtime_request_object
1481
+ command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
1482
+ command.response_class = Google::Apis::NotebooksV1::Operation
1483
+ command.params['name'] = name unless name.nil?
1484
+ command.query['fields'] = fields unless fields.nil?
1485
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1486
+ execute_or_queue_command(command, &block)
1487
+ end
1488
+
1489
+ # Switch a Managed Notebook Runtime.
1490
+ # @param [String] name
1491
+ # Required. Format: `projects/`project_id`/locations/`location`/runtimes/`
1492
+ # runtime_id``
1493
+ # @param [Google::Apis::NotebooksV1::SwitchRuntimeRequest] switch_runtime_request_object
1494
+ # @param [String] fields
1495
+ # Selector specifying which fields to include in a partial response.
1496
+ # @param [String] quota_user
1497
+ # Available to use for quota purposes for server-side applications. Can be any
1498
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1499
+ # @param [Google::Apis::RequestOptions] options
1500
+ # Request-specific options
1501
+ #
1502
+ # @yield [result, err] Result & error if block supplied
1503
+ # @yieldparam result [Google::Apis::NotebooksV1::Operation] parsed result object
1504
+ # @yieldparam err [StandardError] error object if request failed
1505
+ #
1506
+ # @return [Google::Apis::NotebooksV1::Operation]
1507
+ #
1508
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1509
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1510
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1511
+ def switch_runtime(name, switch_runtime_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1512
+ command = make_simple_command(:post, 'v1/{+name}:switch', options)
1513
+ command.request_representation = Google::Apis::NotebooksV1::SwitchRuntimeRequest::Representation
1514
+ command.request_object = switch_runtime_request_object
1515
+ command.response_representation = Google::Apis::NotebooksV1::Operation::Representation
1516
+ command.response_class = Google::Apis::NotebooksV1::Operation
1517
+ command.params['name'] = name unless name.nil?
1518
+ command.query['fields'] = fields unless fields.nil?
1519
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1520
+ execute_or_queue_command(command, &block)
1521
+ end
1522
+
1207
1523
  # Creates a new Scheduled Notebook in a given project and location.
1208
1524
  # @param [String] parent
1209
1525
  # Required. Format: `parent=projects/`project_id`/locations/`location``