google-apis-baremetalsolution_v2 0.1.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123,7 +123,7 @@ module Google
123
123
  execute_or_queue_command(command, &block)
124
124
  end
125
125
 
126
- # Gets details of a single Instance.
126
+ # Get details about a single server.
127
127
  # @param [String] name
128
128
  # Required. Name of the resource.
129
129
  # @param [String] fields
@@ -153,19 +153,14 @@ module Google
153
153
  execute_or_queue_command(command, &block)
154
154
  end
155
155
 
156
- # Gets the access control policy for a resource. Returns an empty policy if the
157
- # resource exists and does not have a policy set.
158
- # @param [String] resource
159
- # REQUIRED: The resource for which the policy is being requested. See the
160
- # operation documentation for the appropriate value for this field.
161
- # @param [Fixnum] options_requested_policy_version
162
- # Optional. The policy format version to be returned. Valid values are 0, 1, and
163
- # 3. Requests specifying an invalid value will be rejected. Requests for
164
- # policies with any conditional bindings must specify version 3. Policies
165
- # without any conditional bindings may specify any valid value or leave the
166
- # field unset. To learn which resources support conditions in their IAM policies,
167
- # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
168
- # resource-policies).
156
+ # List servers in a given project and location.
157
+ # @param [String] parent
158
+ # Required. Parent value for ListInstancesRequest.
159
+ # @param [Fixnum] page_size
160
+ # Requested page size. Server may return fewer items than requested. If
161
+ # unspecified, the server will pick an appropriate default.
162
+ # @param [String] page_token
163
+ # A token identifying a page of results from the server.
169
164
  # @param [String] fields
170
165
  # Selector specifying which fields to include in a partial response.
171
166
  # @param [String] quota_user
@@ -175,37 +170,31 @@ module Google
175
170
  # Request-specific options
176
171
  #
177
172
  # @yield [result, err] Result & error if block supplied
178
- # @yieldparam result [Google::Apis::BaremetalsolutionV2::Policy] parsed result object
173
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListInstancesResponse] parsed result object
179
174
  # @yieldparam err [StandardError] error object if request failed
180
175
  #
181
- # @return [Google::Apis::BaremetalsolutionV2::Policy]
176
+ # @return [Google::Apis::BaremetalsolutionV2::ListInstancesResponse]
182
177
  #
183
178
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
184
179
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
185
180
  # @raise [Google::Apis::AuthorizationError] Authorization is required
186
- def get_project_location_instance_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
187
- command = make_simple_command(:get, 'v2/{+resource}:getIamPolicy', options)
188
- command.response_representation = Google::Apis::BaremetalsolutionV2::Policy::Representation
189
- command.response_class = Google::Apis::BaremetalsolutionV2::Policy
190
- command.params['resource'] = resource unless resource.nil?
191
- command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
181
+ def list_project_location_instances(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
182
+ command = make_simple_command(:get, 'v2/{+parent}/instances', options)
183
+ command.response_representation = Google::Apis::BaremetalsolutionV2::ListInstancesResponse::Representation
184
+ command.response_class = Google::Apis::BaremetalsolutionV2::ListInstancesResponse
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?
192
188
  command.query['fields'] = fields unless fields.nil?
193
189
  command.query['quotaUser'] = quota_user unless quota_user.nil?
194
190
  execute_or_queue_command(command, &block)
195
191
  end
196
192
 
197
- # Lists Instances in a given project and location.
198
- # @param [String] parent
199
- # Required. Parent value for ListInstancesRequest.
200
- # @param [String] filter
201
- # Filtering results.
202
- # @param [String] order_by
203
- # Hint for how to order the results.
204
- # @param [Fixnum] page_size
205
- # Requested page size. Server may return fewer items than requested. If
206
- # unspecified, server will pick an appropriate default.
207
- # @param [String] page_token
208
- # A token identifying a page of results the server should return.
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
209
198
  # @param [String] fields
210
199
  # Selector specifying which fields to include in a partial response.
211
200
  # @param [String] quota_user
@@ -215,35 +204,29 @@ module Google
215
204
  # Request-specific options
216
205
  #
217
206
  # @yield [result, err] Result & error if block supplied
218
- # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListInstancesResponse] parsed result object
207
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Operation] parsed result object
219
208
  # @yieldparam err [StandardError] error object if request failed
220
209
  #
221
- # @return [Google::Apis::BaremetalsolutionV2::ListInstancesResponse]
210
+ # @return [Google::Apis::BaremetalsolutionV2::Operation]
222
211
  #
223
212
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
224
213
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
225
214
  # @raise [Google::Apis::AuthorizationError] Authorization is required
226
- 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)
227
- command = make_simple_command(:get, 'v2/{+parent}/instances', options)
228
- command.response_representation = Google::Apis::BaremetalsolutionV2::ListInstancesResponse::Representation
229
- command.response_class = Google::Apis::BaremetalsolutionV2::ListInstancesResponse
230
- command.params['parent'] = parent unless parent.nil?
231
- command.query['filter'] = filter unless filter.nil?
232
- command.query['orderBy'] = order_by unless order_by.nil?
233
- command.query['pageSize'] = page_size unless page_size.nil?
234
- command.query['pageToken'] = page_token unless page_token.nil?
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?
235
222
  command.query['fields'] = fields unless fields.nil?
236
223
  command.query['quotaUser'] = quota_user unless quota_user.nil?
237
224
  execute_or_queue_command(command, &block)
238
225
  end
239
226
 
240
- # Sets the access control policy on the specified resource. Replaces any
241
- # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
242
- # PERMISSION_DENIED` errors.
243
- # @param [String] resource
244
- # REQUIRED: The resource for which the policy is being specified. See the
245
- # operation documentation for the appropriate value for this field.
246
- # @param [Google::Apis::BaremetalsolutionV2::SetIamPolicyRequest] set_iam_policy_request_object
227
+ # Get details of a single network.
228
+ # @param [String] name
229
+ # Required. Name of the resource.
247
230
  # @param [String] fields
248
231
  # Selector specifying which fields to include in a partial response.
249
232
  # @param [String] quota_user
@@ -253,35 +236,32 @@ module Google
253
236
  # Request-specific options
254
237
  #
255
238
  # @yield [result, err] Result & error if block supplied
256
- # @yieldparam result [Google::Apis::BaremetalsolutionV2::Policy] parsed result object
239
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Network] parsed result object
257
240
  # @yieldparam err [StandardError] error object if request failed
258
241
  #
259
- # @return [Google::Apis::BaremetalsolutionV2::Policy]
242
+ # @return [Google::Apis::BaremetalsolutionV2::Network]
260
243
  #
261
244
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
262
245
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
263
246
  # @raise [Google::Apis::AuthorizationError] Authorization is required
264
- def set_instance_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
265
- command = make_simple_command(:post, 'v2/{+resource}:setIamPolicy', options)
266
- command.request_representation = Google::Apis::BaremetalsolutionV2::SetIamPolicyRequest::Representation
267
- command.request_object = set_iam_policy_request_object
268
- command.response_representation = Google::Apis::BaremetalsolutionV2::Policy::Representation
269
- command.response_class = Google::Apis::BaremetalsolutionV2::Policy
270
- command.params['resource'] = resource unless resource.nil?
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?
271
252
  command.query['fields'] = fields unless fields.nil?
272
253
  command.query['quotaUser'] = quota_user unless quota_user.nil?
273
254
  execute_or_queue_command(command, &block)
274
255
  end
275
256
 
276
- # Returns permissions that a caller has on the specified resource. If the
277
- # resource does not exist, this will return an empty set of permissions, not a `
278
- # NOT_FOUND` error. Note: This operation is designed to be used for building
279
- # permission-aware UIs and command-line tools, not for authorization checking.
280
- # This operation may "fail open" without warning.
281
- # @param [String] resource
282
- # REQUIRED: The resource for which the policy detail is being requested. See the
283
- # operation documentation for the appropriate value for this field.
284
- # @param [Google::Apis::BaremetalsolutionV2::TestIamPermissionsRequest] test_iam_permissions_request_object
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.
285
265
  # @param [String] fields
286
266
  # Selector specifying which fields to include in a partial response.
287
267
  # @param [String] quota_user
@@ -291,21 +271,21 @@ module Google
291
271
  # Request-specific options
292
272
  #
293
273
  # @yield [result, err] Result & error if block supplied
294
- # @yieldparam result [Google::Apis::BaremetalsolutionV2::TestIamPermissionsResponse] parsed result object
274
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListNetworksResponse] parsed result object
295
275
  # @yieldparam err [StandardError] error object if request failed
296
276
  #
297
- # @return [Google::Apis::BaremetalsolutionV2::TestIamPermissionsResponse]
277
+ # @return [Google::Apis::BaremetalsolutionV2::ListNetworksResponse]
298
278
  #
299
279
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
300
280
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
301
281
  # @raise [Google::Apis::AuthorizationError] Authorization is required
302
- def test_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
303
- command = make_simple_command(:post, 'v2/{+resource}:testIamPermissions', options)
304
- command.request_representation = Google::Apis::BaremetalsolutionV2::TestIamPermissionsRequest::Representation
305
- command.request_object = test_iam_permissions_request_object
306
- command.response_representation = Google::Apis::BaremetalsolutionV2::TestIamPermissionsResponse::Representation
307
- command.response_class = Google::Apis::BaremetalsolutionV2::TestIamPermissionsResponse
308
- command.params['resource'] = resource unless resource.nil?
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?
309
289
  command.query['fields'] = fields unless fields.nil?
310
290
  command.query['quotaUser'] = quota_user unless quota_user.nil?
311
291
  execute_or_queue_command(command, &block)
@@ -460,6 +440,512 @@ module Google
460
440
  command.query['quotaUser'] = quota_user unless quota_user.nil?
461
441
  execute_or_queue_command(command, &block)
462
442
  end
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
+
720
+ # Get details of a single storage lun.
721
+ # @param [String] name
722
+ # Required. Name of the resource.
723
+ # @param [String] fields
724
+ # Selector specifying which fields to include in a partial response.
725
+ # @param [String] quota_user
726
+ # Available to use for quota purposes for server-side applications. Can be any
727
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
728
+ # @param [Google::Apis::RequestOptions] options
729
+ # Request-specific options
730
+ #
731
+ # @yield [result, err] Result & error if block supplied
732
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::Lun] parsed result object
733
+ # @yieldparam err [StandardError] error object if request failed
734
+ #
735
+ # @return [Google::Apis::BaremetalsolutionV2::Lun]
736
+ #
737
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
738
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
739
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
740
+ def get_project_location_volume_lun(name, fields: nil, quota_user: nil, options: nil, &block)
741
+ command = make_simple_command(:get, 'v2/{+name}', options)
742
+ command.response_representation = Google::Apis::BaremetalsolutionV2::Lun::Representation
743
+ command.response_class = Google::Apis::BaremetalsolutionV2::Lun
744
+ command.params['name'] = name unless name.nil?
745
+ command.query['fields'] = fields unless fields.nil?
746
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
747
+ execute_or_queue_command(command, &block)
748
+ end
749
+
750
+ # List storage volume luns for given storage volume.
751
+ # @param [String] parent
752
+ # Required. Parent value for ListLunsRequest.
753
+ # @param [Fixnum] page_size
754
+ # Requested page size. The server might return fewer items than requested. If
755
+ # unspecified, server will pick an appropriate default.
756
+ # @param [String] page_token
757
+ # A token identifying a page of results from the server.
758
+ # @param [String] fields
759
+ # Selector specifying which fields to include in a partial response.
760
+ # @param [String] quota_user
761
+ # Available to use for quota purposes for server-side applications. Can be any
762
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
763
+ # @param [Google::Apis::RequestOptions] options
764
+ # Request-specific options
765
+ #
766
+ # @yield [result, err] Result & error if block supplied
767
+ # @yieldparam result [Google::Apis::BaremetalsolutionV2::ListLunsResponse] parsed result object
768
+ # @yieldparam err [StandardError] error object if request failed
769
+ #
770
+ # @return [Google::Apis::BaremetalsolutionV2::ListLunsResponse]
771
+ #
772
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
773
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
774
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
775
+ def list_project_location_volume_luns(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
776
+ command = make_simple_command(:get, 'v2/{+parent}/luns', options)
777
+ command.response_representation = Google::Apis::BaremetalsolutionV2::ListLunsResponse::Representation
778
+ command.response_class = Google::Apis::BaremetalsolutionV2::ListLunsResponse
779
+ command.params['parent'] = parent unless parent.nil?
780
+ command.query['pageSize'] = page_size unless page_size.nil?
781
+ command.query['pageToken'] = page_token unless page_token.nil?
782
+ command.query['fields'] = fields unless fields.nil?
783
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
784
+ execute_or_queue_command(command, &block)
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
463
949
 
464
950
  protected
465
951