google-cloud-netapp-v1 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/netapp/v1/backup_vault_pb.rb +2 -1
- data/lib/google/cloud/netapp/v1/cloud_netapp_service_pb.rb +2 -1
- data/lib/google/cloud/netapp/v1/cloud_netapp_service_services_pb.rb +13 -0
- data/lib/google/cloud/netapp/v1/common_pb.rb +3 -1
- data/lib/google/cloud/netapp/v1/host_group_pb.rb +58 -0
- data/lib/google/cloud/netapp/v1/kms_pb.rb +1 -1
- data/lib/google/cloud/netapp/v1/netapp/client.rb +630 -0
- data/lib/google/cloud/netapp/v1/netapp/paths.rb +19 -0
- data/lib/google/cloud/netapp/v1/netapp/rest/client.rb +588 -0
- data/lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb +369 -0
- data/lib/google/cloud/netapp/v1/storage_pool_pb.rb +1 -1
- data/lib/google/cloud/netapp/v1/version.rb +1 -1
- data/lib/google/cloud/netapp/v1/volume_pb.rb +9 -1
- data/proto_docs/google/cloud/netapp/v1/backup_vault.rb +32 -1
- data/proto_docs/google/cloud/netapp/v1/common.rb +33 -0
- data/proto_docs/google/cloud/netapp/v1/host_group.rb +193 -0
- data/proto_docs/google/cloud/netapp/v1/kms.rb +4 -3
- data/proto_docs/google/cloud/netapp/v1/storage_pool.rb +7 -0
- data/proto_docs/google/cloud/netapp/v1/volume.rb +202 -5
- metadata +3 -1
|
@@ -6177,6 +6177,594 @@ module Google
|
|
|
6177
6177
|
raise ::Google::Cloud::Error.from_error(e)
|
|
6178
6178
|
end
|
|
6179
6179
|
|
|
6180
|
+
##
|
|
6181
|
+
# Restore files from a backup to a volume.
|
|
6182
|
+
#
|
|
6183
|
+
# @overload restore_backup_files(request, options = nil)
|
|
6184
|
+
# Pass arguments to `restore_backup_files` via a request object, either of type
|
|
6185
|
+
# {::Google::Cloud::NetApp::V1::RestoreBackupFilesRequest} or an equivalent Hash.
|
|
6186
|
+
#
|
|
6187
|
+
# @param request [::Google::Cloud::NetApp::V1::RestoreBackupFilesRequest, ::Hash]
|
|
6188
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6189
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6190
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6191
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
6192
|
+
#
|
|
6193
|
+
# @overload restore_backup_files(name: nil, backup: nil, file_list: nil, restore_destination_path: nil)
|
|
6194
|
+
# Pass arguments to `restore_backup_files` via keyword arguments. Note that at
|
|
6195
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6196
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6197
|
+
#
|
|
6198
|
+
# @param name [::String]
|
|
6199
|
+
# Required. The volume resource name, in the format
|
|
6200
|
+
# `projects/{project_id}/locations/{location}/volumes/{volume_id}`
|
|
6201
|
+
# @param backup [::String]
|
|
6202
|
+
# Required. The backup resource name, in the format
|
|
6203
|
+
# `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
|
|
6204
|
+
# @param file_list [::Array<::String>]
|
|
6205
|
+
# Required. List of files to be restored, specified by their absolute path in
|
|
6206
|
+
# the source volume.
|
|
6207
|
+
# @param restore_destination_path [::String]
|
|
6208
|
+
# Optional. Absolute directory path in the destination volume. This is
|
|
6209
|
+
# required if the `file_list` is provided.
|
|
6210
|
+
#
|
|
6211
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
6212
|
+
# @yieldparam response [::Gapic::Operation]
|
|
6213
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
6214
|
+
#
|
|
6215
|
+
# @return [::Gapic::Operation]
|
|
6216
|
+
#
|
|
6217
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
6218
|
+
#
|
|
6219
|
+
# @example Basic example
|
|
6220
|
+
# require "google/cloud/netapp/v1"
|
|
6221
|
+
#
|
|
6222
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6223
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
|
6224
|
+
#
|
|
6225
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6226
|
+
# request = Google::Cloud::NetApp::V1::RestoreBackupFilesRequest.new
|
|
6227
|
+
#
|
|
6228
|
+
# # Call the restore_backup_files method.
|
|
6229
|
+
# result = client.restore_backup_files request
|
|
6230
|
+
#
|
|
6231
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
6232
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
6233
|
+
# # Here is how to wait for a response.
|
|
6234
|
+
# result.wait_until_done! timeout: 60
|
|
6235
|
+
# if result.response?
|
|
6236
|
+
# p result.response
|
|
6237
|
+
# else
|
|
6238
|
+
# puts "No response received."
|
|
6239
|
+
# end
|
|
6240
|
+
#
|
|
6241
|
+
def restore_backup_files request, options = nil
|
|
6242
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6243
|
+
|
|
6244
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::RestoreBackupFilesRequest
|
|
6245
|
+
|
|
6246
|
+
# Converts hash and nil to an options object
|
|
6247
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6248
|
+
|
|
6249
|
+
# Customize the options with defaults
|
|
6250
|
+
metadata = @config.rpcs.restore_backup_files.metadata.to_h
|
|
6251
|
+
|
|
6252
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6253
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6254
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6255
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
|
6256
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6257
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6258
|
+
|
|
6259
|
+
header_params = {}
|
|
6260
|
+
if request.name
|
|
6261
|
+
header_params["name"] = request.name
|
|
6262
|
+
end
|
|
6263
|
+
|
|
6264
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
6265
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
6266
|
+
|
|
6267
|
+
options.apply_defaults timeout: @config.rpcs.restore_backup_files.timeout,
|
|
6268
|
+
metadata: metadata,
|
|
6269
|
+
retry_policy: @config.rpcs.restore_backup_files.retry_policy
|
|
6270
|
+
|
|
6271
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6272
|
+
metadata: @config.metadata,
|
|
6273
|
+
retry_policy: @config.retry_policy
|
|
6274
|
+
|
|
6275
|
+
@net_app_stub.call_rpc :restore_backup_files, request, options: options do |response, operation|
|
|
6276
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
6277
|
+
yield response, operation if block_given?
|
|
6278
|
+
throw :response, response
|
|
6279
|
+
end
|
|
6280
|
+
rescue ::GRPC::BadStatus => e
|
|
6281
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6282
|
+
end
|
|
6283
|
+
|
|
6284
|
+
##
|
|
6285
|
+
# Returns a list of host groups in a `location`. Use `-` as location to list
|
|
6286
|
+
# host groups across all locations.
|
|
6287
|
+
#
|
|
6288
|
+
# @overload list_host_groups(request, options = nil)
|
|
6289
|
+
# Pass arguments to `list_host_groups` via a request object, either of type
|
|
6290
|
+
# {::Google::Cloud::NetApp::V1::ListHostGroupsRequest} or an equivalent Hash.
|
|
6291
|
+
#
|
|
6292
|
+
# @param request [::Google::Cloud::NetApp::V1::ListHostGroupsRequest, ::Hash]
|
|
6293
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6294
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6295
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6296
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
6297
|
+
#
|
|
6298
|
+
# @overload list_host_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
|
6299
|
+
# Pass arguments to `list_host_groups` via keyword arguments. Note that at
|
|
6300
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6301
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6302
|
+
#
|
|
6303
|
+
# @param parent [::String]
|
|
6304
|
+
# Required. Parent value for ListHostGroupsRequest
|
|
6305
|
+
# @param page_size [::Integer]
|
|
6306
|
+
# Optional. Requested page size. Server may return fewer items than
|
|
6307
|
+
# requested. If unspecified, the server will pick an appropriate default.
|
|
6308
|
+
# @param page_token [::String]
|
|
6309
|
+
# Optional. A token identifying a page of results the server should return.
|
|
6310
|
+
# @param filter [::String]
|
|
6311
|
+
# Optional. Filter to apply to the request.
|
|
6312
|
+
# @param order_by [::String]
|
|
6313
|
+
# Optional. Hint for how to order the results
|
|
6314
|
+
#
|
|
6315
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
6316
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::HostGroup>]
|
|
6317
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
6318
|
+
#
|
|
6319
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::NetApp::V1::HostGroup>]
|
|
6320
|
+
#
|
|
6321
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
6322
|
+
#
|
|
6323
|
+
# @example Basic example
|
|
6324
|
+
# require "google/cloud/netapp/v1"
|
|
6325
|
+
#
|
|
6326
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6327
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
|
6328
|
+
#
|
|
6329
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6330
|
+
# request = Google::Cloud::NetApp::V1::ListHostGroupsRequest.new
|
|
6331
|
+
#
|
|
6332
|
+
# # Call the list_host_groups method.
|
|
6333
|
+
# result = client.list_host_groups request
|
|
6334
|
+
#
|
|
6335
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
6336
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
6337
|
+
# result.each do |item|
|
|
6338
|
+
# # Each element is of type ::Google::Cloud::NetApp::V1::HostGroup.
|
|
6339
|
+
# p item
|
|
6340
|
+
# end
|
|
6341
|
+
#
|
|
6342
|
+
def list_host_groups request, options = nil
|
|
6343
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6344
|
+
|
|
6345
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListHostGroupsRequest
|
|
6346
|
+
|
|
6347
|
+
# Converts hash and nil to an options object
|
|
6348
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6349
|
+
|
|
6350
|
+
# Customize the options with defaults
|
|
6351
|
+
metadata = @config.rpcs.list_host_groups.metadata.to_h
|
|
6352
|
+
|
|
6353
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6354
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6355
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6356
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
|
6357
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6358
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6359
|
+
|
|
6360
|
+
header_params = {}
|
|
6361
|
+
if request.parent
|
|
6362
|
+
header_params["parent"] = request.parent
|
|
6363
|
+
end
|
|
6364
|
+
|
|
6365
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
6366
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
6367
|
+
|
|
6368
|
+
options.apply_defaults timeout: @config.rpcs.list_host_groups.timeout,
|
|
6369
|
+
metadata: metadata,
|
|
6370
|
+
retry_policy: @config.rpcs.list_host_groups.retry_policy
|
|
6371
|
+
|
|
6372
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6373
|
+
metadata: @config.metadata,
|
|
6374
|
+
retry_policy: @config.retry_policy
|
|
6375
|
+
|
|
6376
|
+
@net_app_stub.call_rpc :list_host_groups, request, options: options do |response, operation|
|
|
6377
|
+
response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_host_groups, request, response, operation, options
|
|
6378
|
+
yield response, operation if block_given?
|
|
6379
|
+
throw :response, response
|
|
6380
|
+
end
|
|
6381
|
+
rescue ::GRPC::BadStatus => e
|
|
6382
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6383
|
+
end
|
|
6384
|
+
|
|
6385
|
+
##
|
|
6386
|
+
# Returns details of the specified host group.
|
|
6387
|
+
#
|
|
6388
|
+
# @overload get_host_group(request, options = nil)
|
|
6389
|
+
# Pass arguments to `get_host_group` via a request object, either of type
|
|
6390
|
+
# {::Google::Cloud::NetApp::V1::GetHostGroupRequest} or an equivalent Hash.
|
|
6391
|
+
#
|
|
6392
|
+
# @param request [::Google::Cloud::NetApp::V1::GetHostGroupRequest, ::Hash]
|
|
6393
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6394
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6395
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6396
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
6397
|
+
#
|
|
6398
|
+
# @overload get_host_group(name: nil)
|
|
6399
|
+
# Pass arguments to `get_host_group` via keyword arguments. Note that at
|
|
6400
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6401
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6402
|
+
#
|
|
6403
|
+
# @param name [::String]
|
|
6404
|
+
# Required. The resource name of the host group.
|
|
6405
|
+
# Format:
|
|
6406
|
+
# `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.
|
|
6407
|
+
#
|
|
6408
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
6409
|
+
# @yieldparam response [::Google::Cloud::NetApp::V1::HostGroup]
|
|
6410
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
6411
|
+
#
|
|
6412
|
+
# @return [::Google::Cloud::NetApp::V1::HostGroup]
|
|
6413
|
+
#
|
|
6414
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
6415
|
+
#
|
|
6416
|
+
# @example Basic example
|
|
6417
|
+
# require "google/cloud/netapp/v1"
|
|
6418
|
+
#
|
|
6419
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6420
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
|
6421
|
+
#
|
|
6422
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6423
|
+
# request = Google::Cloud::NetApp::V1::GetHostGroupRequest.new
|
|
6424
|
+
#
|
|
6425
|
+
# # Call the get_host_group method.
|
|
6426
|
+
# result = client.get_host_group request
|
|
6427
|
+
#
|
|
6428
|
+
# # The returned object is of type Google::Cloud::NetApp::V1::HostGroup.
|
|
6429
|
+
# p result
|
|
6430
|
+
#
|
|
6431
|
+
def get_host_group request, options = nil
|
|
6432
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6433
|
+
|
|
6434
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetHostGroupRequest
|
|
6435
|
+
|
|
6436
|
+
# Converts hash and nil to an options object
|
|
6437
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6438
|
+
|
|
6439
|
+
# Customize the options with defaults
|
|
6440
|
+
metadata = @config.rpcs.get_host_group.metadata.to_h
|
|
6441
|
+
|
|
6442
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6443
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6444
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6445
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
|
6446
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6447
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6448
|
+
|
|
6449
|
+
header_params = {}
|
|
6450
|
+
if request.name
|
|
6451
|
+
header_params["name"] = request.name
|
|
6452
|
+
end
|
|
6453
|
+
|
|
6454
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
6455
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
6456
|
+
|
|
6457
|
+
options.apply_defaults timeout: @config.rpcs.get_host_group.timeout,
|
|
6458
|
+
metadata: metadata,
|
|
6459
|
+
retry_policy: @config.rpcs.get_host_group.retry_policy
|
|
6460
|
+
|
|
6461
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6462
|
+
metadata: @config.metadata,
|
|
6463
|
+
retry_policy: @config.retry_policy
|
|
6464
|
+
|
|
6465
|
+
@net_app_stub.call_rpc :get_host_group, request, options: options do |response, operation|
|
|
6466
|
+
yield response, operation if block_given?
|
|
6467
|
+
end
|
|
6468
|
+
rescue ::GRPC::BadStatus => e
|
|
6469
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6470
|
+
end
|
|
6471
|
+
|
|
6472
|
+
##
|
|
6473
|
+
# Creates a new host group.
|
|
6474
|
+
#
|
|
6475
|
+
# @overload create_host_group(request, options = nil)
|
|
6476
|
+
# Pass arguments to `create_host_group` via a request object, either of type
|
|
6477
|
+
# {::Google::Cloud::NetApp::V1::CreateHostGroupRequest} or an equivalent Hash.
|
|
6478
|
+
#
|
|
6479
|
+
# @param request [::Google::Cloud::NetApp::V1::CreateHostGroupRequest, ::Hash]
|
|
6480
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6481
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6482
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6483
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
6484
|
+
#
|
|
6485
|
+
# @overload create_host_group(parent: nil, host_group: nil, host_group_id: nil)
|
|
6486
|
+
# Pass arguments to `create_host_group` via keyword arguments. Note that at
|
|
6487
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6488
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6489
|
+
#
|
|
6490
|
+
# @param parent [::String]
|
|
6491
|
+
# Required. Parent value for CreateHostGroupRequest
|
|
6492
|
+
# @param host_group [::Google::Cloud::NetApp::V1::HostGroup, ::Hash]
|
|
6493
|
+
# Required. Fields of the host group to create.
|
|
6494
|
+
# @param host_group_id [::String]
|
|
6495
|
+
# Required. ID of the host group to create. Must be unique within the parent
|
|
6496
|
+
# resource. Must contain only letters, numbers, and hyphen, with
|
|
6497
|
+
# the first character a letter or underscore, the last a letter or underscore
|
|
6498
|
+
# or a number, and a 63 character maximum.
|
|
6499
|
+
#
|
|
6500
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
6501
|
+
# @yieldparam response [::Gapic::Operation]
|
|
6502
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
6503
|
+
#
|
|
6504
|
+
# @return [::Gapic::Operation]
|
|
6505
|
+
#
|
|
6506
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
6507
|
+
#
|
|
6508
|
+
# @example Basic example
|
|
6509
|
+
# require "google/cloud/netapp/v1"
|
|
6510
|
+
#
|
|
6511
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6512
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
|
6513
|
+
#
|
|
6514
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6515
|
+
# request = Google::Cloud::NetApp::V1::CreateHostGroupRequest.new
|
|
6516
|
+
#
|
|
6517
|
+
# # Call the create_host_group method.
|
|
6518
|
+
# result = client.create_host_group request
|
|
6519
|
+
#
|
|
6520
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
6521
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
6522
|
+
# # Here is how to wait for a response.
|
|
6523
|
+
# result.wait_until_done! timeout: 60
|
|
6524
|
+
# if result.response?
|
|
6525
|
+
# p result.response
|
|
6526
|
+
# else
|
|
6527
|
+
# puts "No response received."
|
|
6528
|
+
# end
|
|
6529
|
+
#
|
|
6530
|
+
def create_host_group request, options = nil
|
|
6531
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6532
|
+
|
|
6533
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateHostGroupRequest
|
|
6534
|
+
|
|
6535
|
+
# Converts hash and nil to an options object
|
|
6536
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6537
|
+
|
|
6538
|
+
# Customize the options with defaults
|
|
6539
|
+
metadata = @config.rpcs.create_host_group.metadata.to_h
|
|
6540
|
+
|
|
6541
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6542
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6543
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6544
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
|
6545
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6546
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6547
|
+
|
|
6548
|
+
header_params = {}
|
|
6549
|
+
if request.parent
|
|
6550
|
+
header_params["parent"] = request.parent
|
|
6551
|
+
end
|
|
6552
|
+
|
|
6553
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
6554
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
6555
|
+
|
|
6556
|
+
options.apply_defaults timeout: @config.rpcs.create_host_group.timeout,
|
|
6557
|
+
metadata: metadata,
|
|
6558
|
+
retry_policy: @config.rpcs.create_host_group.retry_policy
|
|
6559
|
+
|
|
6560
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6561
|
+
metadata: @config.metadata,
|
|
6562
|
+
retry_policy: @config.retry_policy
|
|
6563
|
+
|
|
6564
|
+
@net_app_stub.call_rpc :create_host_group, request, options: options do |response, operation|
|
|
6565
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
6566
|
+
yield response, operation if block_given?
|
|
6567
|
+
throw :response, response
|
|
6568
|
+
end
|
|
6569
|
+
rescue ::GRPC::BadStatus => e
|
|
6570
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6571
|
+
end
|
|
6572
|
+
|
|
6573
|
+
##
|
|
6574
|
+
# Updates an existing host group.
|
|
6575
|
+
#
|
|
6576
|
+
# @overload update_host_group(request, options = nil)
|
|
6577
|
+
# Pass arguments to `update_host_group` via a request object, either of type
|
|
6578
|
+
# {::Google::Cloud::NetApp::V1::UpdateHostGroupRequest} or an equivalent Hash.
|
|
6579
|
+
#
|
|
6580
|
+
# @param request [::Google::Cloud::NetApp::V1::UpdateHostGroupRequest, ::Hash]
|
|
6581
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6582
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6583
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6584
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
6585
|
+
#
|
|
6586
|
+
# @overload update_host_group(host_group: nil, update_mask: nil)
|
|
6587
|
+
# Pass arguments to `update_host_group` via keyword arguments. Note that at
|
|
6588
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6589
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6590
|
+
#
|
|
6591
|
+
# @param host_group [::Google::Cloud::NetApp::V1::HostGroup, ::Hash]
|
|
6592
|
+
# Required. The host group to update.
|
|
6593
|
+
# The host group's `name` field is used to identify the host group.
|
|
6594
|
+
# Format:
|
|
6595
|
+
# `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.
|
|
6596
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
6597
|
+
# Optional. The list of fields to update.
|
|
6598
|
+
#
|
|
6599
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
6600
|
+
# @yieldparam response [::Gapic::Operation]
|
|
6601
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
6602
|
+
#
|
|
6603
|
+
# @return [::Gapic::Operation]
|
|
6604
|
+
#
|
|
6605
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
6606
|
+
#
|
|
6607
|
+
# @example Basic example
|
|
6608
|
+
# require "google/cloud/netapp/v1"
|
|
6609
|
+
#
|
|
6610
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6611
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
|
6612
|
+
#
|
|
6613
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6614
|
+
# request = Google::Cloud::NetApp::V1::UpdateHostGroupRequest.new
|
|
6615
|
+
#
|
|
6616
|
+
# # Call the update_host_group method.
|
|
6617
|
+
# result = client.update_host_group request
|
|
6618
|
+
#
|
|
6619
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
6620
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
6621
|
+
# # Here is how to wait for a response.
|
|
6622
|
+
# result.wait_until_done! timeout: 60
|
|
6623
|
+
# if result.response?
|
|
6624
|
+
# p result.response
|
|
6625
|
+
# else
|
|
6626
|
+
# puts "No response received."
|
|
6627
|
+
# end
|
|
6628
|
+
#
|
|
6629
|
+
def update_host_group request, options = nil
|
|
6630
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6631
|
+
|
|
6632
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateHostGroupRequest
|
|
6633
|
+
|
|
6634
|
+
# Converts hash and nil to an options object
|
|
6635
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6636
|
+
|
|
6637
|
+
# Customize the options with defaults
|
|
6638
|
+
metadata = @config.rpcs.update_host_group.metadata.to_h
|
|
6639
|
+
|
|
6640
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6641
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6642
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6643
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
|
6644
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6645
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6646
|
+
|
|
6647
|
+
header_params = {}
|
|
6648
|
+
if request.host_group&.name
|
|
6649
|
+
header_params["host_group.name"] = request.host_group.name
|
|
6650
|
+
end
|
|
6651
|
+
|
|
6652
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
6653
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
6654
|
+
|
|
6655
|
+
options.apply_defaults timeout: @config.rpcs.update_host_group.timeout,
|
|
6656
|
+
metadata: metadata,
|
|
6657
|
+
retry_policy: @config.rpcs.update_host_group.retry_policy
|
|
6658
|
+
|
|
6659
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6660
|
+
metadata: @config.metadata,
|
|
6661
|
+
retry_policy: @config.retry_policy
|
|
6662
|
+
|
|
6663
|
+
@net_app_stub.call_rpc :update_host_group, request, options: options do |response, operation|
|
|
6664
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
6665
|
+
yield response, operation if block_given?
|
|
6666
|
+
throw :response, response
|
|
6667
|
+
end
|
|
6668
|
+
rescue ::GRPC::BadStatus => e
|
|
6669
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6670
|
+
end
|
|
6671
|
+
|
|
6672
|
+
##
|
|
6673
|
+
# Deletes a host group.
|
|
6674
|
+
#
|
|
6675
|
+
# @overload delete_host_group(request, options = nil)
|
|
6676
|
+
# Pass arguments to `delete_host_group` via a request object, either of type
|
|
6677
|
+
# {::Google::Cloud::NetApp::V1::DeleteHostGroupRequest} or an equivalent Hash.
|
|
6678
|
+
#
|
|
6679
|
+
# @param request [::Google::Cloud::NetApp::V1::DeleteHostGroupRequest, ::Hash]
|
|
6680
|
+
# A request object representing the call parameters. Required. To specify no
|
|
6681
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
6682
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
6683
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
6684
|
+
#
|
|
6685
|
+
# @overload delete_host_group(name: nil)
|
|
6686
|
+
# Pass arguments to `delete_host_group` via keyword arguments. Note that at
|
|
6687
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
6688
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
6689
|
+
#
|
|
6690
|
+
# @param name [::String]
|
|
6691
|
+
# Required. The resource name of the host group.
|
|
6692
|
+
# Format:
|
|
6693
|
+
# `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.
|
|
6694
|
+
#
|
|
6695
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
6696
|
+
# @yieldparam response [::Gapic::Operation]
|
|
6697
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
6698
|
+
#
|
|
6699
|
+
# @return [::Gapic::Operation]
|
|
6700
|
+
#
|
|
6701
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
6702
|
+
#
|
|
6703
|
+
# @example Basic example
|
|
6704
|
+
# require "google/cloud/netapp/v1"
|
|
6705
|
+
#
|
|
6706
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
6707
|
+
# client = Google::Cloud::NetApp::V1::NetApp::Client.new
|
|
6708
|
+
#
|
|
6709
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
6710
|
+
# request = Google::Cloud::NetApp::V1::DeleteHostGroupRequest.new
|
|
6711
|
+
#
|
|
6712
|
+
# # Call the delete_host_group method.
|
|
6713
|
+
# result = client.delete_host_group request
|
|
6714
|
+
#
|
|
6715
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
6716
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
6717
|
+
# # Here is how to wait for a response.
|
|
6718
|
+
# result.wait_until_done! timeout: 60
|
|
6719
|
+
# if result.response?
|
|
6720
|
+
# p result.response
|
|
6721
|
+
# else
|
|
6722
|
+
# puts "No response received."
|
|
6723
|
+
# end
|
|
6724
|
+
#
|
|
6725
|
+
def delete_host_group request, options = nil
|
|
6726
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
6727
|
+
|
|
6728
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteHostGroupRequest
|
|
6729
|
+
|
|
6730
|
+
# Converts hash and nil to an options object
|
|
6731
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
6732
|
+
|
|
6733
|
+
# Customize the options with defaults
|
|
6734
|
+
metadata = @config.rpcs.delete_host_group.metadata.to_h
|
|
6735
|
+
|
|
6736
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
6737
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
6738
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
6739
|
+
gapic_version: ::Google::Cloud::NetApp::V1::VERSION
|
|
6740
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
6741
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
6742
|
+
|
|
6743
|
+
header_params = {}
|
|
6744
|
+
if request.name
|
|
6745
|
+
header_params["name"] = request.name
|
|
6746
|
+
end
|
|
6747
|
+
|
|
6748
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
6749
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
6750
|
+
|
|
6751
|
+
options.apply_defaults timeout: @config.rpcs.delete_host_group.timeout,
|
|
6752
|
+
metadata: metadata,
|
|
6753
|
+
retry_policy: @config.rpcs.delete_host_group.retry_policy
|
|
6754
|
+
|
|
6755
|
+
options.apply_defaults timeout: @config.timeout,
|
|
6756
|
+
metadata: @config.metadata,
|
|
6757
|
+
retry_policy: @config.retry_policy
|
|
6758
|
+
|
|
6759
|
+
@net_app_stub.call_rpc :delete_host_group, request, options: options do |response, operation|
|
|
6760
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
6761
|
+
yield response, operation if block_given?
|
|
6762
|
+
throw :response, response
|
|
6763
|
+
end
|
|
6764
|
+
rescue ::GRPC::BadStatus => e
|
|
6765
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
6766
|
+
end
|
|
6767
|
+
|
|
6180
6768
|
##
|
|
6181
6769
|
# Configuration class for the NetApp API.
|
|
6182
6770
|
#
|
|
@@ -6660,6 +7248,36 @@ module Google
|
|
|
6660
7248
|
# @return [::Gapic::Config::Method]
|
|
6661
7249
|
#
|
|
6662
7250
|
attr_reader :delete_quota_rule
|
|
7251
|
+
##
|
|
7252
|
+
# RPC-specific configuration for `restore_backup_files`
|
|
7253
|
+
# @return [::Gapic::Config::Method]
|
|
7254
|
+
#
|
|
7255
|
+
attr_reader :restore_backup_files
|
|
7256
|
+
##
|
|
7257
|
+
# RPC-specific configuration for `list_host_groups`
|
|
7258
|
+
# @return [::Gapic::Config::Method]
|
|
7259
|
+
#
|
|
7260
|
+
attr_reader :list_host_groups
|
|
7261
|
+
##
|
|
7262
|
+
# RPC-specific configuration for `get_host_group`
|
|
7263
|
+
# @return [::Gapic::Config::Method]
|
|
7264
|
+
#
|
|
7265
|
+
attr_reader :get_host_group
|
|
7266
|
+
##
|
|
7267
|
+
# RPC-specific configuration for `create_host_group`
|
|
7268
|
+
# @return [::Gapic::Config::Method]
|
|
7269
|
+
#
|
|
7270
|
+
attr_reader :create_host_group
|
|
7271
|
+
##
|
|
7272
|
+
# RPC-specific configuration for `update_host_group`
|
|
7273
|
+
# @return [::Gapic::Config::Method]
|
|
7274
|
+
#
|
|
7275
|
+
attr_reader :update_host_group
|
|
7276
|
+
##
|
|
7277
|
+
# RPC-specific configuration for `delete_host_group`
|
|
7278
|
+
# @return [::Gapic::Config::Method]
|
|
7279
|
+
#
|
|
7280
|
+
attr_reader :delete_host_group
|
|
6663
7281
|
|
|
6664
7282
|
# @private
|
|
6665
7283
|
def initialize parent_rpcs = nil
|
|
@@ -6783,6 +7401,18 @@ module Google
|
|
|
6783
7401
|
@update_quota_rule = ::Gapic::Config::Method.new update_quota_rule_config
|
|
6784
7402
|
delete_quota_rule_config = parent_rpcs.delete_quota_rule if parent_rpcs.respond_to? :delete_quota_rule
|
|
6785
7403
|
@delete_quota_rule = ::Gapic::Config::Method.new delete_quota_rule_config
|
|
7404
|
+
restore_backup_files_config = parent_rpcs.restore_backup_files if parent_rpcs.respond_to? :restore_backup_files
|
|
7405
|
+
@restore_backup_files = ::Gapic::Config::Method.new restore_backup_files_config
|
|
7406
|
+
list_host_groups_config = parent_rpcs.list_host_groups if parent_rpcs.respond_to? :list_host_groups
|
|
7407
|
+
@list_host_groups = ::Gapic::Config::Method.new list_host_groups_config
|
|
7408
|
+
get_host_group_config = parent_rpcs.get_host_group if parent_rpcs.respond_to? :get_host_group
|
|
7409
|
+
@get_host_group = ::Gapic::Config::Method.new get_host_group_config
|
|
7410
|
+
create_host_group_config = parent_rpcs.create_host_group if parent_rpcs.respond_to? :create_host_group
|
|
7411
|
+
@create_host_group = ::Gapic::Config::Method.new create_host_group_config
|
|
7412
|
+
update_host_group_config = parent_rpcs.update_host_group if parent_rpcs.respond_to? :update_host_group
|
|
7413
|
+
@update_host_group = ::Gapic::Config::Method.new update_host_group_config
|
|
7414
|
+
delete_host_group_config = parent_rpcs.delete_host_group if parent_rpcs.respond_to? :delete_host_group
|
|
7415
|
+
@delete_host_group = ::Gapic::Config::Method.new delete_host_group_config
|
|
6786
7416
|
|
|
6787
7417
|
yield self if block_given?
|
|
6788
7418
|
end
|
|
@@ -102,6 +102,25 @@ module Google
|
|
|
102
102
|
"projects/#{project}/locations/#{location}/backupVaults/#{backup_vault}"
|
|
103
103
|
end
|
|
104
104
|
|
|
105
|
+
##
|
|
106
|
+
# Create a fully-qualified HostGroup resource string.
|
|
107
|
+
#
|
|
108
|
+
# The resource will be in the following format:
|
|
109
|
+
#
|
|
110
|
+
# `projects/{project}/locations/{location}/hostGroups/{host_group}`
|
|
111
|
+
#
|
|
112
|
+
# @param project [String]
|
|
113
|
+
# @param location [String]
|
|
114
|
+
# @param host_group [String]
|
|
115
|
+
#
|
|
116
|
+
# @return [::String]
|
|
117
|
+
def host_group_path project:, location:, host_group:
|
|
118
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
119
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
120
|
+
|
|
121
|
+
"projects/#{project}/locations/#{location}/hostGroups/#{host_group}"
|
|
122
|
+
end
|
|
123
|
+
|
|
105
124
|
##
|
|
106
125
|
# Create a fully-qualified KmsConfig resource string.
|
|
107
126
|
#
|