google-apis-baremetalsolution_v2 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -156,10 +156,6 @@ module Google
156
156
  # List servers in a given project and location.
157
157
  # @param [String] parent
158
158
  # Required. Parent value for ListInstancesRequest.
159
- # @param [String] filter
160
- # Filtering results.
161
- # @param [String] order_by
162
- # Hint for how to order the results.
163
159
  # @param [Fixnum] page_size
164
160
  # Requested page size. Server may return fewer items than requested. If
165
161
  # unspecified, the server will pick an appropriate default.
@@ -182,13 +178,262 @@ module Google
182
178
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
183
179
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
184
180
  # @raise [Google::Apis::AuthorizationError] Authorization is required
185
- def list_project_location_instances(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
181
+ def list_project_location_instances(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
186
182
  command = make_simple_command(:get, 'v2/{+parent}/instances', options)
187
183
  command.response_representation = Google::Apis::BaremetalsolutionV2::ListInstancesResponse::Representation
188
184
  command.response_class = Google::Apis::BaremetalsolutionV2::ListInstancesResponse
189
185
  command.params['parent'] = parent unless parent.nil?
186
+ command.query['pageSize'] = page_size unless page_size.nil?
187
+ command.query['pageToken'] = page_token unless page_token.nil?
188
+ command.query['fields'] = fields unless fields.nil?
189
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
190
+ execute_or_queue_command(command, &block)
191
+ end
192
+
193
+ # Perform an ungraceful, hard reset on a server. Equivalent to shutting the
194
+ # power off and then turning it back on.
195
+ # @param [String] name
196
+ # Required. Name of the resource.
197
+ # @param [Google::Apis::BaremetalsolutionV2::ResetInstanceRequest] reset_instance_request_object
198
+ # @param [String] fields
199
+ # Selector specifying which fields to include in a partial response.
200
+ # @param [String] quota_user
201
+ # Available to use for quota purposes for server-side applications. Can be any
202
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
203
+ # @param [Google::Apis::RequestOptions] options
204
+ # Request-specific options
205
+ #
206
+ # @yield [result, err] Result & error if block supplied
207
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Operation] parsed result object
208
+ # @yieldparam err [StandardError] error object if request failed
209
+ #
210
+ # @return [Google::Apis::BaremetalsolutionV2::Operation]
211
+ #
212
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
213
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
214
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
215
+ def reset_instance(name, reset_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
216
+ command = make_simple_command(:post, 'v2/{+name}:reset', options)
217
+ command.request_representation = Google::Apis::BaremetalsolutionV2::ResetInstanceRequest::Representation
218
+ command.request_object = reset_instance_request_object
219
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Operation::Representation
220
+ command.response_class = Google::Apis::BaremetalsolutionV2::Operation
221
+ command.params['name'] = name unless name.nil?
222
+ command.query['fields'] = fields unless fields.nil?
223
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
224
+ execute_or_queue_command(command, &block)
225
+ end
226
+
227
+ # Get details of a single network.
228
+ # @param [String] name
229
+ # Required. Name of the resource.
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::BaremetalsolutionV2::Network] parsed result object
240
+ # @yieldparam err [StandardError] error object if request failed
241
+ #
242
+ # @return [Google::Apis::BaremetalsolutionV2::Network]
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 get_project_location_network(name, fields: nil, quota_user: nil, options: nil, &block)
248
+ command = make_simple_command(:get, 'v2/{+name}', options)
249
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Network::Representation
250
+ command.response_class = Google::Apis::BaremetalsolutionV2::Network
251
+ command.params['name'] = name unless name.nil?
252
+ command.query['fields'] = fields unless fields.nil?
253
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
254
+ execute_or_queue_command(command, &block)
255
+ end
256
+
257
+ # List network in a given project and location.
258
+ # @param [String] parent
259
+ # Required. Parent value for ListNetworksRequest.
260
+ # @param [Fixnum] page_size
261
+ # Requested page size. The server might return fewer items than requested. If
262
+ # unspecified, server will pick an appropriate default.
263
+ # @param [String] page_token
264
+ # A token identifying a page of results from the server.
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::BaremetalsolutionV2::ListNetworksResponse] parsed result object
275
+ # @yieldparam err [StandardError] error object if request failed
276
+ #
277
+ # @return [Google::Apis::BaremetalsolutionV2::ListNetworksResponse]
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 list_project_location_networks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
283
+ command = make_simple_command(:get, 'v2/{+parent}/networks', options)
284
+ command.response_representation = Google::Apis::BaremetalsolutionV2::ListNetworksResponse::Representation
285
+ command.response_class = Google::Apis::BaremetalsolutionV2::ListNetworksResponse
286
+ command.params['parent'] = parent unless parent.nil?
287
+ command.query['pageSize'] = page_size unless page_size.nil?
288
+ command.query['pageToken'] = page_token unless page_token.nil?
289
+ command.query['fields'] = fields unless fields.nil?
290
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
291
+ execute_or_queue_command(command, &block)
292
+ end
293
+
294
+ # Starts asynchronous cancellation on a long-running operation. The server makes
295
+ # a best effort to cancel the operation, but success is not guaranteed. If the
296
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
297
+ # Clients can use Operations.GetOperation or other methods to check whether the
298
+ # cancellation succeeded or whether the operation completed despite cancellation.
299
+ # On successful cancellation, the operation is not deleted; instead, it becomes
300
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
301
+ # corresponding to `Code.CANCELLED`.
302
+ # @param [String] name
303
+ # The name of the operation resource to be cancelled.
304
+ # @param [Google::Apis::BaremetalsolutionV2::CancelOperationRequest] cancel_operation_request_object
305
+ # @param [String] fields
306
+ # Selector specifying which fields to include in a partial response.
307
+ # @param [String] quota_user
308
+ # Available to use for quota purposes for server-side applications. Can be any
309
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
310
+ # @param [Google::Apis::RequestOptions] options
311
+ # Request-specific options
312
+ #
313
+ # @yield [result, err] Result & error if block supplied
314
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Empty] parsed result object
315
+ # @yieldparam err [StandardError] error object if request failed
316
+ #
317
+ # @return [Google::Apis::BaremetalsolutionV2::Empty]
318
+ #
319
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
320
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
321
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
322
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
323
+ command = make_simple_command(:post, 'v2/{+name}:cancel', options)
324
+ command.request_representation = Google::Apis::BaremetalsolutionV2::CancelOperationRequest::Representation
325
+ command.request_object = cancel_operation_request_object
326
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Empty::Representation
327
+ command.response_class = Google::Apis::BaremetalsolutionV2::Empty
328
+ command.params['name'] = name unless name.nil?
329
+ command.query['fields'] = fields unless fields.nil?
330
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
331
+ execute_or_queue_command(command, &block)
332
+ end
333
+
334
+ # Deletes a long-running operation. This method indicates that the client is no
335
+ # longer interested in the operation result. It does not cancel the operation.
336
+ # If the server doesn't support this method, it returns `google.rpc.Code.
337
+ # UNIMPLEMENTED`.
338
+ # @param [String] name
339
+ # The name of the operation resource to be deleted.
340
+ # @param [String] fields
341
+ # Selector specifying which fields to include in a partial response.
342
+ # @param [String] quota_user
343
+ # Available to use for quota purposes for server-side applications. Can be any
344
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
345
+ # @param [Google::Apis::RequestOptions] options
346
+ # Request-specific options
347
+ #
348
+ # @yield [result, err] Result & error if block supplied
349
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Empty] parsed result object
350
+ # @yieldparam err [StandardError] error object if request failed
351
+ #
352
+ # @return [Google::Apis::BaremetalsolutionV2::Empty]
353
+ #
354
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
355
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
356
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
357
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
358
+ command = make_simple_command(:delete, 'v2/{+name}', options)
359
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Empty::Representation
360
+ command.response_class = Google::Apis::BaremetalsolutionV2::Empty
361
+ command.params['name'] = name unless name.nil?
362
+ command.query['fields'] = fields unless fields.nil?
363
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
364
+ execute_or_queue_command(command, &block)
365
+ end
366
+
367
+ # Gets the latest state of a long-running operation. Clients can use this method
368
+ # to poll the operation result at intervals as recommended by the API service.
369
+ # @param [String] name
370
+ # The name of the operation resource.
371
+ # @param [String] fields
372
+ # Selector specifying which fields to include in a partial response.
373
+ # @param [String] quota_user
374
+ # Available to use for quota purposes for server-side applications. Can be any
375
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
376
+ # @param [Google::Apis::RequestOptions] options
377
+ # Request-specific options
378
+ #
379
+ # @yield [result, err] Result & error if block supplied
380
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Operation] parsed result object
381
+ # @yieldparam err [StandardError] error object if request failed
382
+ #
383
+ # @return [Google::Apis::BaremetalsolutionV2::Operation]
384
+ #
385
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
386
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
387
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
388
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
389
+ command = make_simple_command(:get, 'v2/{+name}', options)
390
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Operation::Representation
391
+ command.response_class = Google::Apis::BaremetalsolutionV2::Operation
392
+ command.params['name'] = name unless name.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
+ # Lists operations that match the specified filter in the request. If the server
399
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
400
+ # binding allows API services to override the binding to use different resource
401
+ # name schemes, such as `users/*/operations`. To override the binding, API
402
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
403
+ # service configuration. For backwards compatibility, the default name includes
404
+ # the operations collection id, however overriding users must ensure the name
405
+ # binding is the parent resource, without the operations collection id.
406
+ # @param [String] name
407
+ # The name of the operation's parent resource.
408
+ # @param [String] filter
409
+ # The standard list filter.
410
+ # @param [Fixnum] page_size
411
+ # The standard list page size.
412
+ # @param [String] page_token
413
+ # The standard list page token.
414
+ # @param [String] fields
415
+ # Selector specifying which fields to include in a partial response.
416
+ # @param [String] quota_user
417
+ # Available to use for quota purposes for server-side applications. Can be any
418
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
419
+ # @param [Google::Apis::RequestOptions] options
420
+ # Request-specific options
421
+ #
422
+ # @yield [result, err] Result & error if block supplied
423
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListOperationsResponse] parsed result object
424
+ # @yieldparam err [StandardError] error object if request failed
425
+ #
426
+ # @return [Google::Apis::BaremetalsolutionV2::ListOperationsResponse]
427
+ #
428
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
429
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
430
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
431
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
432
+ command = make_simple_command(:get, 'v2/{+name}/operations', options)
433
+ command.response_representation = Google::Apis::BaremetalsolutionV2::ListOperationsResponse::Representation
434
+ command.response_class = Google::Apis::BaremetalsolutionV2::ListOperationsResponse
435
+ command.params['name'] = name unless name.nil?
190
436
  command.query['filter'] = filter unless filter.nil?
191
- command.query['orderBy'] = order_by unless order_by.nil?
192
437
  command.query['pageSize'] = page_size unless page_size.nil?
193
438
  command.query['pageToken'] = page_token unless page_token.nil?
194
439
  command.query['fields'] = fields unless fields.nil?
@@ -196,6 +441,282 @@ module Google
196
441
  execute_or_queue_command(command, &block)
197
442
  end
198
443
 
444
+ # Create a snapshot schedule policy in the specified project.
445
+ # @param [String] parent
446
+ # Required. The parent project and location containing the
447
+ # SnapshotSchedulePolicy.
448
+ # @param [Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy] snapshot_schedule_policy_object
449
+ # @param [String] snapshot_schedule_policy_id
450
+ # Required. Snapshot policy ID
451
+ # @param [String] fields
452
+ # Selector specifying which fields to include in a partial response.
453
+ # @param [String] quota_user
454
+ # Available to use for quota purposes for server-side applications. Can be any
455
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
456
+ # @param [Google::Apis::RequestOptions] options
457
+ # Request-specific options
458
+ #
459
+ # @yield [result, err] Result & error if block supplied
460
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy] parsed result object
461
+ # @yieldparam err [StandardError] error object if request failed
462
+ #
463
+ # @return [Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy]
464
+ #
465
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
466
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
467
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
468
+ def create_project_location_snapshot_schedule_policy(parent, snapshot_schedule_policy_object = nil, snapshot_schedule_policy_id: nil, fields: nil, quota_user: nil, options: nil, &block)
469
+ command = make_simple_command(:post, 'v2/{+parent}/snapshotSchedulePolicies', options)
470
+ command.request_representation = Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy::Representation
471
+ command.request_object = snapshot_schedule_policy_object
472
+ command.response_representation = Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy::Representation
473
+ command.response_class = Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy
474
+ command.params['parent'] = parent unless parent.nil?
475
+ command.query['snapshotSchedulePolicyId'] = snapshot_schedule_policy_id unless snapshot_schedule_policy_id.nil?
476
+ command.query['fields'] = fields unless fields.nil?
477
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
478
+ execute_or_queue_command(command, &block)
479
+ end
480
+
481
+ # Delete a named snapshot schedule policy.
482
+ # @param [String] name
483
+ # Required. The name of the snapshot schedule policy to delete.
484
+ # @param [String] fields
485
+ # Selector specifying which fields to include in a partial response.
486
+ # @param [String] quota_user
487
+ # Available to use for quota purposes for server-side applications. Can be any
488
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
489
+ # @param [Google::Apis::RequestOptions] options
490
+ # Request-specific options
491
+ #
492
+ # @yield [result, err] Result & error if block supplied
493
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Empty] parsed result object
494
+ # @yieldparam err [StandardError] error object if request failed
495
+ #
496
+ # @return [Google::Apis::BaremetalsolutionV2::Empty]
497
+ #
498
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
499
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
500
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
501
+ def delete_project_location_snapshot_schedule_policy(name, fields: nil, quota_user: nil, options: nil, &block)
502
+ command = make_simple_command(:delete, 'v2/{+name}', options)
503
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Empty::Representation
504
+ command.response_class = Google::Apis::BaremetalsolutionV2::Empty
505
+ command.params['name'] = name unless name.nil?
506
+ command.query['fields'] = fields unless fields.nil?
507
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
508
+ execute_or_queue_command(command, &block)
509
+ end
510
+
511
+ # Get details of a single snapshot schedule policy.
512
+ # @param [String] name
513
+ # Required. Name of the resource.
514
+ # @param [String] fields
515
+ # Selector specifying which fields to include in a partial response.
516
+ # @param [String] quota_user
517
+ # Available to use for quota purposes for server-side applications. Can be any
518
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
519
+ # @param [Google::Apis::RequestOptions] options
520
+ # Request-specific options
521
+ #
522
+ # @yield [result, err] Result & error if block supplied
523
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy] parsed result object
524
+ # @yieldparam err [StandardError] error object if request failed
525
+ #
526
+ # @return [Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy]
527
+ #
528
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
529
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
530
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
531
+ def get_project_location_snapshot_schedule_policy(name, fields: nil, quota_user: nil, options: nil, &block)
532
+ command = make_simple_command(:get, 'v2/{+name}', options)
533
+ command.response_representation = Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy::Representation
534
+ command.response_class = Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy
535
+ command.params['name'] = name unless name.nil?
536
+ command.query['fields'] = fields unless fields.nil?
537
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
538
+ execute_or_queue_command(command, &block)
539
+ end
540
+
541
+ # List snapshot schedule policies in a given project and location.
542
+ # @param [String] parent
543
+ # Required. The parent project containing the Snapshot Schedule Policies.
544
+ # @param [Fixnum] page_size
545
+ # The maximum number of items to return.
546
+ # @param [String] page_token
547
+ # The next_page_token value returned from a previous List request, if any.
548
+ # @param [String] fields
549
+ # Selector specifying which fields to include in a partial response.
550
+ # @param [String] quota_user
551
+ # Available to use for quota purposes for server-side applications. Can be any
552
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
553
+ # @param [Google::Apis::RequestOptions] options
554
+ # Request-specific options
555
+ #
556
+ # @yield [result, err] Result & error if block supplied
557
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListSnapshotSchedulePoliciesResponse] parsed result object
558
+ # @yieldparam err [StandardError] error object if request failed
559
+ #
560
+ # @return [Google::Apis::BaremetalsolutionV2::ListSnapshotSchedulePoliciesResponse]
561
+ #
562
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
563
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
564
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
565
+ def list_project_location_snapshot_schedule_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
566
+ command = make_simple_command(:get, 'v2/{+parent}/snapshotSchedulePolicies', options)
567
+ command.response_representation = Google::Apis::BaremetalsolutionV2::ListSnapshotSchedulePoliciesResponse::Representation
568
+ command.response_class = Google::Apis::BaremetalsolutionV2::ListSnapshotSchedulePoliciesResponse
569
+ command.params['parent'] = parent unless parent.nil?
570
+ command.query['pageSize'] = page_size unless page_size.nil?
571
+ command.query['pageToken'] = page_token unless page_token.nil?
572
+ command.query['fields'] = fields unless fields.nil?
573
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
574
+ execute_or_queue_command(command, &block)
575
+ end
576
+
577
+ # Update a snapshot schedule policy in the specified project.
578
+ # @param [String] name
579
+ # Output only. The name of the snapshot schedule policy.
580
+ # @param [Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy] snapshot_schedule_policy_object
581
+ # @param [String] update_mask
582
+ # Required. The list of fields to update.
583
+ # @param [String] fields
584
+ # Selector specifying which fields to include in a partial response.
585
+ # @param [String] quota_user
586
+ # Available to use for quota purposes for server-side applications. Can be any
587
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
588
+ # @param [Google::Apis::RequestOptions] options
589
+ # Request-specific options
590
+ #
591
+ # @yield [result, err] Result & error if block supplied
592
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy] parsed result object
593
+ # @yieldparam err [StandardError] error object if request failed
594
+ #
595
+ # @return [Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy]
596
+ #
597
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
598
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
599
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
600
+ def patch_project_location_snapshot_schedule_policy(name, snapshot_schedule_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
601
+ command = make_simple_command(:patch, 'v2/{+name}', options)
602
+ command.request_representation = Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy::Representation
603
+ command.request_object = snapshot_schedule_policy_object
604
+ command.response_representation = Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy::Representation
605
+ command.response_class = Google::Apis::BaremetalsolutionV2::SnapshotSchedulePolicy
606
+ command.params['name'] = name unless name.nil?
607
+ command.query['updateMask'] = update_mask unless update_mask.nil?
608
+ command.query['fields'] = fields unless fields.nil?
609
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
610
+ execute_or_queue_command(command, &block)
611
+ end
612
+
613
+ # Get details of a single storage volume.
614
+ # @param [String] name
615
+ # Required. Name of the resource.
616
+ # @param [String] fields
617
+ # Selector specifying which fields to include in a partial response.
618
+ # @param [String] quota_user
619
+ # Available to use for quota purposes for server-side applications. Can be any
620
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
621
+ # @param [Google::Apis::RequestOptions] options
622
+ # Request-specific options
623
+ #
624
+ # @yield [result, err] Result & error if block supplied
625
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Volume] parsed result object
626
+ # @yieldparam err [StandardError] error object if request failed
627
+ #
628
+ # @return [Google::Apis::BaremetalsolutionV2::Volume]
629
+ #
630
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
631
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
632
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
633
+ def get_project_location_volume(name, fields: nil, quota_user: nil, options: nil, &block)
634
+ command = make_simple_command(:get, 'v2/{+name}', options)
635
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Volume::Representation
636
+ command.response_class = Google::Apis::BaremetalsolutionV2::Volume
637
+ command.params['name'] = name unless name.nil?
638
+ command.query['fields'] = fields unless fields.nil?
639
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
640
+ execute_or_queue_command(command, &block)
641
+ end
642
+
643
+ # List storage volumes in a given project and location.
644
+ # @param [String] parent
645
+ # Required. Parent value for ListVolumesRequest.
646
+ # @param [Fixnum] page_size
647
+ # Requested page size. The server might return fewer items than requested. If
648
+ # unspecified, server will pick an appropriate default.
649
+ # @param [String] page_token
650
+ # A token identifying a page of results from the server.
651
+ # @param [String] fields
652
+ # Selector specifying which fields to include in a partial response.
653
+ # @param [String] quota_user
654
+ # Available to use for quota purposes for server-side applications. Can be any
655
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
656
+ # @param [Google::Apis::RequestOptions] options
657
+ # Request-specific options
658
+ #
659
+ # @yield [result, err] Result & error if block supplied
660
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListVolumesResponse] parsed result object
661
+ # @yieldparam err [StandardError] error object if request failed
662
+ #
663
+ # @return [Google::Apis::BaremetalsolutionV2::ListVolumesResponse]
664
+ #
665
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
666
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
667
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
668
+ def list_project_location_volumes(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
669
+ command = make_simple_command(:get, 'v2/{+parent}/volumes', options)
670
+ command.response_representation = Google::Apis::BaremetalsolutionV2::ListVolumesResponse::Representation
671
+ command.response_class = Google::Apis::BaremetalsolutionV2::ListVolumesResponse
672
+ command.params['parent'] = parent unless parent.nil?
673
+ command.query['pageSize'] = page_size unless page_size.nil?
674
+ command.query['pageToken'] = page_token unless page_token.nil?
675
+ command.query['fields'] = fields unless fields.nil?
676
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
677
+ execute_or_queue_command(command, &block)
678
+ end
679
+
680
+ # Update details of a single storage volume.
681
+ # @param [String] name
682
+ # Output only. The resource name of this `Volume`. Resource names are schemeless
683
+ # URIs that follow the conventions in https://cloud.google.com/apis/design/
684
+ # resource_names. Format: `projects/`project`/locations/`location`/volumes/`
685
+ # volume``
686
+ # @param [Google::Apis::BaremetalsolutionV2::Volume] volume_object
687
+ # @param [String] update_mask
688
+ # The list of fields to update. The only currently supported fields are: `
689
+ # snapshot_auto_delete_behavior` `snapshot_schedule_policy_name`
690
+ # @param [String] fields
691
+ # Selector specifying which fields to include in a partial response.
692
+ # @param [String] quota_user
693
+ # Available to use for quota purposes for server-side applications. Can be any
694
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
695
+ # @param [Google::Apis::RequestOptions] options
696
+ # Request-specific options
697
+ #
698
+ # @yield [result, err] Result & error if block supplied
699
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Operation] parsed result object
700
+ # @yieldparam err [StandardError] error object if request failed
701
+ #
702
+ # @return [Google::Apis::BaremetalsolutionV2::Operation]
703
+ #
704
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
705
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
706
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
707
+ def patch_project_location_volume(name, volume_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
708
+ command = make_simple_command(:patch, 'v2/{+name}', options)
709
+ command.request_representation = Google::Apis::BaremetalsolutionV2::Volume::Representation
710
+ command.request_object = volume_object
711
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Operation::Representation
712
+ command.response_class = Google::Apis::BaremetalsolutionV2::Operation
713
+ command.params['name'] = name unless name.nil?
714
+ command.query['updateMask'] = update_mask unless update_mask.nil?
715
+ command.query['fields'] = fields unless fields.nil?
716
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
717
+ execute_or_queue_command(command, &block)
718
+ end
719
+
199
720
  # Get details of a single storage lun.
200
721
  # @param [String] name
201
722
  # Required. Name of the resource.
@@ -229,10 +750,6 @@ module Google
229
750
  # List storage volume luns for given storage volume.
230
751
  # @param [String] parent
231
752
  # Required. Parent value for ListLunsRequest.
232
- # @param [String] filter
233
- # Filtering results.
234
- # @param [String] order_by
235
- # Hint for how to order the results.
236
753
  # @param [Fixnum] page_size
237
754
  # Requested page size. The server might return fewer items than requested. If
238
755
  # unspecified, server will pick an appropriate default.
@@ -255,19 +772,180 @@ module Google
255
772
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
256
773
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
257
774
  # @raise [Google::Apis::AuthorizationError] Authorization is required
258
- def list_project_location_volume_luns(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
775
+ def list_project_location_volume_luns(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
259
776
  command = make_simple_command(:get, 'v2/{+parent}/luns', options)
260
777
  command.response_representation = Google::Apis::BaremetalsolutionV2::ListLunsResponse::Representation
261
778
  command.response_class = Google::Apis::BaremetalsolutionV2::ListLunsResponse
262
779
  command.params['parent'] = parent unless parent.nil?
263
- command.query['filter'] = filter unless filter.nil?
264
- command.query['orderBy'] = order_by unless order_by.nil?
265
780
  command.query['pageSize'] = page_size unless page_size.nil?
266
781
  command.query['pageToken'] = page_token unless page_token.nil?
267
782
  command.query['fields'] = fields unless fields.nil?
268
783
  command.query['quotaUser'] = quota_user unless quota_user.nil?
269
784
  execute_or_queue_command(command, &block)
270
785
  end
786
+
787
+ # Create a storage volume snapshot in a containing volume.
788
+ # @param [String] parent
789
+ # Required. The volume to snapshot.
790
+ # @param [Google::Apis::BaremetalsolutionV2::VolumeSnapshot] volume_snapshot_object
791
+ # @param [String] fields
792
+ # Selector specifying which fields to include in a partial response.
793
+ # @param [String] quota_user
794
+ # Available to use for quota purposes for server-side applications. Can be any
795
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
796
+ # @param [Google::Apis::RequestOptions] options
797
+ # Request-specific options
798
+ #
799
+ # @yield [result, err] Result & error if block supplied
800
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::VolumeSnapshot] parsed result object
801
+ # @yieldparam err [StandardError] error object if request failed
802
+ #
803
+ # @return [Google::Apis::BaremetalsolutionV2::VolumeSnapshot]
804
+ #
805
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
806
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
807
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
808
+ def create_project_location_volume_snapshot(parent, volume_snapshot_object = nil, fields: nil, quota_user: nil, options: nil, &block)
809
+ command = make_simple_command(:post, 'v2/{+parent}/snapshots', options)
810
+ command.request_representation = Google::Apis::BaremetalsolutionV2::VolumeSnapshot::Representation
811
+ command.request_object = volume_snapshot_object
812
+ command.response_representation = Google::Apis::BaremetalsolutionV2::VolumeSnapshot::Representation
813
+ command.response_class = Google::Apis::BaremetalsolutionV2::VolumeSnapshot
814
+ command.params['parent'] = parent unless parent.nil?
815
+ command.query['fields'] = fields unless fields.nil?
816
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
817
+ execute_or_queue_command(command, &block)
818
+ end
819
+
820
+ # Deletes a storage volume snapshot for a given volume.
821
+ # @param [String] name
822
+ # Required. The name of the snapshot to delete.
823
+ # @param [String] fields
824
+ # Selector specifying which fields to include in a partial response.
825
+ # @param [String] quota_user
826
+ # Available to use for quota purposes for server-side applications. Can be any
827
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
828
+ # @param [Google::Apis::RequestOptions] options
829
+ # Request-specific options
830
+ #
831
+ # @yield [result, err] Result & error if block supplied
832
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Empty] parsed result object
833
+ # @yieldparam err [StandardError] error object if request failed
834
+ #
835
+ # @return [Google::Apis::BaremetalsolutionV2::Empty]
836
+ #
837
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
838
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
839
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
840
+ def delete_project_location_volume_snapshot(name, fields: nil, quota_user: nil, options: nil, &block)
841
+ command = make_simple_command(:delete, 'v2/{+name}', options)
842
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Empty::Representation
843
+ command.response_class = Google::Apis::BaremetalsolutionV2::Empty
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
+ # Get details of a single storage volume snapshot.
851
+ # @param [String] name
852
+ # Required. Name of the resource.
853
+ # @param [String] fields
854
+ # Selector specifying which fields to include in a partial response.
855
+ # @param [String] quota_user
856
+ # Available to use for quota purposes for server-side applications. Can be any
857
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
858
+ # @param [Google::Apis::RequestOptions] options
859
+ # Request-specific options
860
+ #
861
+ # @yield [result, err] Result & error if block supplied
862
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::VolumeSnapshot] parsed result object
863
+ # @yieldparam err [StandardError] error object if request failed
864
+ #
865
+ # @return [Google::Apis::BaremetalsolutionV2::VolumeSnapshot]
866
+ #
867
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
868
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
869
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
870
+ def get_project_location_volume_snapshot(name, fields: nil, quota_user: nil, options: nil, &block)
871
+ command = make_simple_command(:get, 'v2/{+name}', options)
872
+ command.response_representation = Google::Apis::BaremetalsolutionV2::VolumeSnapshot::Representation
873
+ command.response_class = Google::Apis::BaremetalsolutionV2::VolumeSnapshot
874
+ command.params['name'] = name unless name.nil?
875
+ command.query['fields'] = fields unless fields.nil?
876
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
877
+ execute_or_queue_command(command, &block)
878
+ end
879
+
880
+ # List storage volume snapshots for given storage volume.
881
+ # @param [String] parent
882
+ # Required. Parent value for ListVolumesRequest.
883
+ # @param [Fixnum] page_size
884
+ # Requested page size. The server might return fewer items than requested. If
885
+ # unspecified, server will pick an appropriate default.
886
+ # @param [String] page_token
887
+ # A token identifying a page of results from the server.
888
+ # @param [String] fields
889
+ # Selector specifying which fields to include in a partial response.
890
+ # @param [String] quota_user
891
+ # Available to use for quota purposes for server-side applications. Can be any
892
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
893
+ # @param [Google::Apis::RequestOptions] options
894
+ # Request-specific options
895
+ #
896
+ # @yield [result, err] Result & error if block supplied
897
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListVolumeSnapshotsResponse] parsed result object
898
+ # @yieldparam err [StandardError] error object if request failed
899
+ #
900
+ # @return [Google::Apis::BaremetalsolutionV2::ListVolumeSnapshotsResponse]
901
+ #
902
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
903
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
904
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
905
+ def list_project_location_volume_snapshots(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
906
+ command = make_simple_command(:get, 'v2/{+parent}/snapshots', options)
907
+ command.response_representation = Google::Apis::BaremetalsolutionV2::ListVolumeSnapshotsResponse::Representation
908
+ command.response_class = Google::Apis::BaremetalsolutionV2::ListVolumeSnapshotsResponse
909
+ command.params['parent'] = parent unless parent.nil?
910
+ command.query['pageSize'] = page_size unless page_size.nil?
911
+ command.query['pageToken'] = page_token unless page_token.nil?
912
+ command.query['fields'] = fields unless fields.nil?
913
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
914
+ execute_or_queue_command(command, &block)
915
+ end
916
+
917
+ # Restore a storage volume snapshot to its containing volume.
918
+ # @param [String] volume_snapshot
919
+ # Required. Name of the resource.
920
+ # @param [Google::Apis::BaremetalsolutionV2::RestoreVolumeSnapshotRequest] restore_volume_snapshot_request_object
921
+ # @param [String] fields
922
+ # Selector specifying which fields to include in a partial response.
923
+ # @param [String] quota_user
924
+ # Available to use for quota purposes for server-side applications. Can be any
925
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
926
+ # @param [Google::Apis::RequestOptions] options
927
+ # Request-specific options
928
+ #
929
+ # @yield [result, err] Result & error if block supplied
930
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Operation] parsed result object
931
+ # @yieldparam err [StandardError] error object if request failed
932
+ #
933
+ # @return [Google::Apis::BaremetalsolutionV2::Operation]
934
+ #
935
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
936
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
937
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
938
+ def restore_volume_snapshot(volume_snapshot, restore_volume_snapshot_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
939
+ command = make_simple_command(:post, 'v2/{+volumeSnapshot}:restoreVolumeSnapshot', options)
940
+ command.request_representation = Google::Apis::BaremetalsolutionV2::RestoreVolumeSnapshotRequest::Representation
941
+ command.request_object = restore_volume_snapshot_request_object
942
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Operation::Representation
943
+ command.response_class = Google::Apis::BaremetalsolutionV2::Operation
944
+ command.params['volumeSnapshot'] = volume_snapshot unless volume_snapshot.nil?
945
+ command.query['fields'] = fields unless fields.nil?
946
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
947
+ execute_or_queue_command(command, &block)
948
+ end
271
949
 
272
950
  protected
273
951