google-cloud-netapp-v1 1.2.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -321,14 +321,26 @@ module Google
321
321
  universe_domain: @config.universe_domain,
322
322
  channel_args: @config.channel_args,
323
323
  interceptors: @config.interceptors,
324
- channel_pool_config: @config.channel_pool
324
+ channel_pool_config: @config.channel_pool,
325
+ logger: @config.logger
325
326
  )
326
327
 
328
+ @net_app_stub.stub_logger&.info do |entry|
329
+ entry.set_system_name
330
+ entry.set_service
331
+ entry.message = "Created client for #{entry.service}"
332
+ entry.set_credentials_fields credentials
333
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
334
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
335
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
336
+ end
337
+
327
338
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
328
339
  config.credentials = credentials
329
340
  config.quota_project = @quota_project_id
330
341
  config.endpoint = @net_app_stub.endpoint
331
342
  config.universe_domain = @net_app_stub.universe_domain
343
+ config.logger = @net_app_stub.logger if config.respond_to? :logger=
332
344
  end
333
345
  end
334
346
 
@@ -346,6 +358,15 @@ module Google
346
358
  #
347
359
  attr_reader :location_client
348
360
 
361
+ ##
362
+ # The logger used for request/response debug logging.
363
+ #
364
+ # @return [Logger]
365
+ #
366
+ def logger
367
+ @net_app_stub.logger
368
+ end
369
+
349
370
  # Service calls
350
371
 
351
372
  ##
@@ -443,7 +464,7 @@ module Google
443
464
  @net_app_stub.call_rpc :list_storage_pools, request, options: options do |response, operation|
444
465
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_storage_pools, request, response, operation, options
445
466
  yield response, operation if block_given?
446
- return response
467
+ throw :response, response
447
468
  end
448
469
  rescue ::GRPC::BadStatus => e
449
470
  raise ::Google::Cloud::Error.from_error(e)
@@ -471,9 +492,9 @@ module Google
471
492
  # Required. Value for parent.
472
493
  # @param storage_pool_id [::String]
473
494
  # Required. Id of the requesting storage pool. Must be unique within the
474
- # parent resource. Must contain only letters, numbers, underscore and hyphen,
475
- # with the first character a letter or underscore, the last a letter or
476
- # underscore or a number, and a 63 character maximum.
495
+ # parent resource. Must contain only letters, numbers and hyphen, with the
496
+ # first character a letter, the last a letter or a number, and a 63 character
497
+ # maximum.
477
498
  # @param storage_pool [::Google::Cloud::NetApp::V1::StoragePool, ::Hash]
478
499
  # Required. The required parameters to create a new storage pool.
479
500
  #
@@ -544,7 +565,7 @@ module Google
544
565
  @net_app_stub.call_rpc :create_storage_pool, request, options: options do |response, operation|
545
566
  response = ::Gapic::Operation.new response, @operations_client, options: options
546
567
  yield response, operation if block_given?
547
- return response
568
+ throw :response, response
548
569
  end
549
570
  rescue ::GRPC::BadStatus => e
550
571
  raise ::Google::Cloud::Error.from_error(e)
@@ -630,7 +651,6 @@ module Google
630
651
 
631
652
  @net_app_stub.call_rpc :get_storage_pool, request, options: options do |response, operation|
632
653
  yield response, operation if block_given?
633
- return response
634
654
  end
635
655
  rescue ::GRPC::BadStatus => e
636
656
  raise ::Google::Cloud::Error.from_error(e)
@@ -730,7 +750,7 @@ module Google
730
750
  @net_app_stub.call_rpc :update_storage_pool, request, options: options do |response, operation|
731
751
  response = ::Gapic::Operation.new response, @operations_client, options: options
732
752
  yield response, operation if block_given?
733
- return response
753
+ throw :response, response
734
754
  end
735
755
  rescue ::GRPC::BadStatus => e
736
756
  raise ::Google::Cloud::Error.from_error(e)
@@ -824,7 +844,7 @@ module Google
824
844
  @net_app_stub.call_rpc :delete_storage_pool, request, options: options do |response, operation|
825
845
  response = ::Gapic::Operation.new response, @operations_client, options: options
826
846
  yield response, operation if block_given?
827
- return response
847
+ throw :response, response
828
848
  end
829
849
  rescue ::GRPC::BadStatus => e
830
850
  raise ::Google::Cloud::Error.from_error(e)
@@ -919,7 +939,7 @@ module Google
919
939
  @net_app_stub.call_rpc :switch_active_replica_zone, request, options: options do |response, operation|
920
940
  response = ::Gapic::Operation.new response, @operations_client, options: options
921
941
  yield response, operation if block_given?
922
- return response
942
+ throw :response, response
923
943
  end
924
944
  rescue ::GRPC::BadStatus => e
925
945
  raise ::Google::Cloud::Error.from_error(e)
@@ -1019,7 +1039,7 @@ module Google
1019
1039
  @net_app_stub.call_rpc :list_volumes, request, options: options do |response, operation|
1020
1040
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_volumes, request, response, operation, options
1021
1041
  yield response, operation if block_given?
1022
- return response
1042
+ throw :response, response
1023
1043
  end
1024
1044
  rescue ::GRPC::BadStatus => e
1025
1045
  raise ::Google::Cloud::Error.from_error(e)
@@ -1105,7 +1125,6 @@ module Google
1105
1125
 
1106
1126
  @net_app_stub.call_rpc :get_volume, request, options: options do |response, operation|
1107
1127
  yield response, operation if block_given?
1108
- return response
1109
1128
  end
1110
1129
  rescue ::GRPC::BadStatus => e
1111
1130
  raise ::Google::Cloud::Error.from_error(e)
@@ -1133,9 +1152,9 @@ module Google
1133
1152
  # Required. Value for parent.
1134
1153
  # @param volume_id [::String]
1135
1154
  # Required. Id of the requesting volume. Must be unique within the parent
1136
- # resource. Must contain only letters, numbers, underscore and hyphen, with
1137
- # the first character a letter or underscore, the last a letter or underscore
1138
- # or a number, and a 63 character maximum.
1155
+ # resource. Must contain only letters, numbers and hyphen, with the first
1156
+ # character a letter, the last a letter or a number,
1157
+ # and a 63 character maximum.
1139
1158
  # @param volume [::Google::Cloud::NetApp::V1::Volume, ::Hash]
1140
1159
  # Required. The volume being created.
1141
1160
  #
@@ -1206,7 +1225,7 @@ module Google
1206
1225
  @net_app_stub.call_rpc :create_volume, request, options: options do |response, operation|
1207
1226
  response = ::Gapic::Operation.new response, @operations_client, options: options
1208
1227
  yield response, operation if block_given?
1209
- return response
1228
+ throw :response, response
1210
1229
  end
1211
1230
  rescue ::GRPC::BadStatus => e
1212
1231
  raise ::Google::Cloud::Error.from_error(e)
@@ -1306,7 +1325,7 @@ module Google
1306
1325
  @net_app_stub.call_rpc :update_volume, request, options: options do |response, operation|
1307
1326
  response = ::Gapic::Operation.new response, @operations_client, options: options
1308
1327
  yield response, operation if block_given?
1309
- return response
1328
+ throw :response, response
1310
1329
  end
1311
1330
  rescue ::GRPC::BadStatus => e
1312
1331
  raise ::Google::Cloud::Error.from_error(e)
@@ -1404,7 +1423,7 @@ module Google
1404
1423
  @net_app_stub.call_rpc :delete_volume, request, options: options do |response, operation|
1405
1424
  response = ::Gapic::Operation.new response, @operations_client, options: options
1406
1425
  yield response, operation if block_given?
1407
- return response
1426
+ throw :response, response
1408
1427
  end
1409
1428
  rescue ::GRPC::BadStatus => e
1410
1429
  raise ::Google::Cloud::Error.from_error(e)
@@ -1505,7 +1524,7 @@ module Google
1505
1524
  @net_app_stub.call_rpc :revert_volume, request, options: options do |response, operation|
1506
1525
  response = ::Gapic::Operation.new response, @operations_client, options: options
1507
1526
  yield response, operation if block_given?
1508
- return response
1527
+ throw :response, response
1509
1528
  end
1510
1529
  rescue ::GRPC::BadStatus => e
1511
1530
  raise ::Google::Cloud::Error.from_error(e)
@@ -1607,7 +1626,7 @@ module Google
1607
1626
  @net_app_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
1608
1627
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_snapshots, request, response, operation, options
1609
1628
  yield response, operation if block_given?
1610
- return response
1629
+ throw :response, response
1611
1630
  end
1612
1631
  rescue ::GRPC::BadStatus => e
1613
1632
  raise ::Google::Cloud::Error.from_error(e)
@@ -1694,7 +1713,6 @@ module Google
1694
1713
 
1695
1714
  @net_app_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
1696
1715
  yield response, operation if block_given?
1697
- return response
1698
1716
  end
1699
1717
  rescue ::GRPC::BadStatus => e
1700
1718
  raise ::Google::Cloud::Error.from_error(e)
@@ -1725,9 +1743,9 @@ module Google
1725
1743
  # Required. A snapshot resource
1726
1744
  # @param snapshot_id [::String]
1727
1745
  # Required. ID of the snapshot to create. Must be unique within the parent
1728
- # resource. Must contain only letters, numbers, underscore and hyphen, with
1729
- # the first character a letter or underscore, the last a letter or underscore
1730
- # or a number, and a 63 character maximum.
1746
+ # resource. Must contain only letters, numbers and hyphen, with the first
1747
+ # character a letter, the last a letter or a
1748
+ # number, and a 63 character maximum.
1731
1749
  #
1732
1750
  # @yield [response, operation] Access the result along with the RPC operation
1733
1751
  # @yieldparam response [::Gapic::Operation]
@@ -1796,7 +1814,7 @@ module Google
1796
1814
  @net_app_stub.call_rpc :create_snapshot, request, options: options do |response, operation|
1797
1815
  response = ::Gapic::Operation.new response, @operations_client, options: options
1798
1816
  yield response, operation if block_given?
1799
- return response
1817
+ throw :response, response
1800
1818
  end
1801
1819
  rescue ::GRPC::BadStatus => e
1802
1820
  raise ::Google::Cloud::Error.from_error(e)
@@ -1891,7 +1909,7 @@ module Google
1891
1909
  @net_app_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
1892
1910
  response = ::Gapic::Operation.new response, @operations_client, options: options
1893
1911
  yield response, operation if block_given?
1894
- return response
1912
+ throw :response, response
1895
1913
  end
1896
1914
  rescue ::GRPC::BadStatus => e
1897
1915
  raise ::Google::Cloud::Error.from_error(e)
@@ -1988,7 +2006,7 @@ module Google
1988
2006
  @net_app_stub.call_rpc :update_snapshot, request, options: options do |response, operation|
1989
2007
  response = ::Gapic::Operation.new response, @operations_client, options: options
1990
2008
  yield response, operation if block_given?
1991
- return response
2009
+ throw :response, response
1992
2010
  end
1993
2011
  rescue ::GRPC::BadStatus => e
1994
2012
  raise ::Google::Cloud::Error.from_error(e)
@@ -2088,7 +2106,7 @@ module Google
2088
2106
  @net_app_stub.call_rpc :list_active_directories, request, options: options do |response, operation|
2089
2107
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_active_directories, request, response, operation, options
2090
2108
  yield response, operation if block_given?
2091
- return response
2109
+ throw :response, response
2092
2110
  end
2093
2111
  rescue ::GRPC::BadStatus => e
2094
2112
  raise ::Google::Cloud::Error.from_error(e)
@@ -2174,7 +2192,6 @@ module Google
2174
2192
 
2175
2193
  @net_app_stub.call_rpc :get_active_directory, request, options: options do |response, operation|
2176
2194
  yield response, operation if block_given?
2177
- return response
2178
2195
  end
2179
2196
  rescue ::GRPC::BadStatus => e
2180
2197
  raise ::Google::Cloud::Error.from_error(e)
@@ -2205,9 +2222,9 @@ module Google
2205
2222
  # Required. Fields of the to be created active directory.
2206
2223
  # @param active_directory_id [::String]
2207
2224
  # Required. ID of the active directory to create. Must be unique within the
2208
- # parent resource. Must contain only letters, numbers, underscore and hyphen,
2209
- # with the first character a letter or underscore, the last a letter or
2210
- # underscore or a number, and a 63 character maximum.
2225
+ # parent resource. Must contain only letters, numbers and hyphen, with the
2226
+ # first character a letter , the last a letter or a number, and a 63
2227
+ # character maximum.
2211
2228
  #
2212
2229
  # @yield [response, operation] Access the result along with the RPC operation
2213
2230
  # @yieldparam response [::Gapic::Operation]
@@ -2276,7 +2293,7 @@ module Google
2276
2293
  @net_app_stub.call_rpc :create_active_directory, request, options: options do |response, operation|
2277
2294
  response = ::Gapic::Operation.new response, @operations_client, options: options
2278
2295
  yield response, operation if block_given?
2279
- return response
2296
+ throw :response, response
2280
2297
  end
2281
2298
  rescue ::GRPC::BadStatus => e
2282
2299
  raise ::Google::Cloud::Error.from_error(e)
@@ -2376,7 +2393,7 @@ module Google
2376
2393
  @net_app_stub.call_rpc :update_active_directory, request, options: options do |response, operation|
2377
2394
  response = ::Gapic::Operation.new response, @operations_client, options: options
2378
2395
  yield response, operation if block_given?
2379
- return response
2396
+ throw :response, response
2380
2397
  end
2381
2398
  rescue ::GRPC::BadStatus => e
2382
2399
  raise ::Google::Cloud::Error.from_error(e)
@@ -2470,7 +2487,7 @@ module Google
2470
2487
  @net_app_stub.call_rpc :delete_active_directory, request, options: options do |response, operation|
2471
2488
  response = ::Gapic::Operation.new response, @operations_client, options: options
2472
2489
  yield response, operation if block_given?
2473
- return response
2490
+ throw :response, response
2474
2491
  end
2475
2492
  rescue ::GRPC::BadStatus => e
2476
2493
  raise ::Google::Cloud::Error.from_error(e)
@@ -2570,7 +2587,7 @@ module Google
2570
2587
  @net_app_stub.call_rpc :list_kms_configs, request, options: options do |response, operation|
2571
2588
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_kms_configs, request, response, operation, options
2572
2589
  yield response, operation if block_given?
2573
- return response
2590
+ throw :response, response
2574
2591
  end
2575
2592
  rescue ::GRPC::BadStatus => e
2576
2593
  raise ::Google::Cloud::Error.from_error(e)
@@ -2598,9 +2615,9 @@ module Google
2598
2615
  # Required. Value for parent.
2599
2616
  # @param kms_config_id [::String]
2600
2617
  # Required. Id of the requesting KmsConfig. Must be unique within the parent
2601
- # resource. Must contain only letters, numbers, underscore and hyphen, with
2602
- # the first character a letter or underscore, the last a letter or underscore
2603
- # or a number, and a 63 character maximum.
2618
+ # resource. Must contain only letters, numbers and hyphen, with the first
2619
+ # character a letter, the last a letter or a
2620
+ # number, and a 63 character maximum.
2604
2621
  # @param kms_config [::Google::Cloud::NetApp::V1::KmsConfig, ::Hash]
2605
2622
  # Required. The required parameters to create a new KmsConfig.
2606
2623
  #
@@ -2671,7 +2688,7 @@ module Google
2671
2688
  @net_app_stub.call_rpc :create_kms_config, request, options: options do |response, operation|
2672
2689
  response = ::Gapic::Operation.new response, @operations_client, options: options
2673
2690
  yield response, operation if block_given?
2674
- return response
2691
+ throw :response, response
2675
2692
  end
2676
2693
  rescue ::GRPC::BadStatus => e
2677
2694
  raise ::Google::Cloud::Error.from_error(e)
@@ -2757,7 +2774,6 @@ module Google
2757
2774
 
2758
2775
  @net_app_stub.call_rpc :get_kms_config, request, options: options do |response, operation|
2759
2776
  yield response, operation if block_given?
2760
- return response
2761
2777
  end
2762
2778
  rescue ::GRPC::BadStatus => e
2763
2779
  raise ::Google::Cloud::Error.from_error(e)
@@ -2857,7 +2873,7 @@ module Google
2857
2873
  @net_app_stub.call_rpc :update_kms_config, request, options: options do |response, operation|
2858
2874
  response = ::Gapic::Operation.new response, @operations_client, options: options
2859
2875
  yield response, operation if block_given?
2860
- return response
2876
+ throw :response, response
2861
2877
  end
2862
2878
  rescue ::GRPC::BadStatus => e
2863
2879
  raise ::Google::Cloud::Error.from_error(e)
@@ -2952,7 +2968,7 @@ module Google
2952
2968
  @net_app_stub.call_rpc :encrypt_volumes, request, options: options do |response, operation|
2953
2969
  response = ::Gapic::Operation.new response, @operations_client, options: options
2954
2970
  yield response, operation if block_given?
2955
- return response
2971
+ throw :response, response
2956
2972
  end
2957
2973
  rescue ::GRPC::BadStatus => e
2958
2974
  raise ::Google::Cloud::Error.from_error(e)
@@ -3038,7 +3054,6 @@ module Google
3038
3054
 
3039
3055
  @net_app_stub.call_rpc :verify_kms_config, request, options: options do |response, operation|
3040
3056
  yield response, operation if block_given?
3041
- return response
3042
3057
  end
3043
3058
  rescue ::GRPC::BadStatus => e
3044
3059
  raise ::Google::Cloud::Error.from_error(e)
@@ -3132,7 +3147,7 @@ module Google
3132
3147
  @net_app_stub.call_rpc :delete_kms_config, request, options: options do |response, operation|
3133
3148
  response = ::Gapic::Operation.new response, @operations_client, options: options
3134
3149
  yield response, operation if block_given?
3135
- return response
3150
+ throw :response, response
3136
3151
  end
3137
3152
  rescue ::GRPC::BadStatus => e
3138
3153
  raise ::Google::Cloud::Error.from_error(e)
@@ -3234,7 +3249,7 @@ module Google
3234
3249
  @net_app_stub.call_rpc :list_replications, request, options: options do |response, operation|
3235
3250
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_replications, request, response, operation, options
3236
3251
  yield response, operation if block_given?
3237
- return response
3252
+ throw :response, response
3238
3253
  end
3239
3254
  rescue ::GRPC::BadStatus => e
3240
3255
  raise ::Google::Cloud::Error.from_error(e)
@@ -3321,7 +3336,6 @@ module Google
3321
3336
 
3322
3337
  @net_app_stub.call_rpc :get_replication, request, options: options do |response, operation|
3323
3338
  yield response, operation if block_given?
3324
- return response
3325
3339
  end
3326
3340
  rescue ::GRPC::BadStatus => e
3327
3341
  raise ::Google::Cloud::Error.from_error(e)
@@ -3352,9 +3366,9 @@ module Google
3352
3366
  # Required. A replication resource
3353
3367
  # @param replication_id [::String]
3354
3368
  # Required. ID of the replication to create. Must be unique within the parent
3355
- # resource. Must contain only letters, numbers, underscore and hyphen, with
3356
- # the first character a letter or underscore, the last a letter or underscore
3357
- # or a number, and a 63 character maximum.
3369
+ # resource. Must contain only letters, numbers and hyphen, with the first
3370
+ # character a letter, the last a letter or a
3371
+ # number, and a 63 character maximum.
3358
3372
  #
3359
3373
  # @yield [response, operation] Access the result along with the RPC operation
3360
3374
  # @yieldparam response [::Gapic::Operation]
@@ -3423,7 +3437,7 @@ module Google
3423
3437
  @net_app_stub.call_rpc :create_replication, request, options: options do |response, operation|
3424
3438
  response = ::Gapic::Operation.new response, @operations_client, options: options
3425
3439
  yield response, operation if block_given?
3426
- return response
3440
+ throw :response, response
3427
3441
  end
3428
3442
  rescue ::GRPC::BadStatus => e
3429
3443
  raise ::Google::Cloud::Error.from_error(e)
@@ -3518,7 +3532,7 @@ module Google
3518
3532
  @net_app_stub.call_rpc :delete_replication, request, options: options do |response, operation|
3519
3533
  response = ::Gapic::Operation.new response, @operations_client, options: options
3520
3534
  yield response, operation if block_given?
3521
- return response
3535
+ throw :response, response
3522
3536
  end
3523
3537
  rescue ::GRPC::BadStatus => e
3524
3538
  raise ::Google::Cloud::Error.from_error(e)
@@ -3615,7 +3629,7 @@ module Google
3615
3629
  @net_app_stub.call_rpc :update_replication, request, options: options do |response, operation|
3616
3630
  response = ::Gapic::Operation.new response, @operations_client, options: options
3617
3631
  yield response, operation if block_given?
3618
- return response
3632
+ throw :response, response
3619
3633
  end
3620
3634
  rescue ::GRPC::BadStatus => e
3621
3635
  raise ::Google::Cloud::Error.from_error(e)
@@ -3717,7 +3731,7 @@ module Google
3717
3731
  @net_app_stub.call_rpc :stop_replication, request, options: options do |response, operation|
3718
3732
  response = ::Gapic::Operation.new response, @operations_client, options: options
3719
3733
  yield response, operation if block_given?
3720
- return response
3734
+ throw :response, response
3721
3735
  end
3722
3736
  rescue ::GRPC::BadStatus => e
3723
3737
  raise ::Google::Cloud::Error.from_error(e)
@@ -3812,7 +3826,7 @@ module Google
3812
3826
  @net_app_stub.call_rpc :resume_replication, request, options: options do |response, operation|
3813
3827
  response = ::Gapic::Operation.new response, @operations_client, options: options
3814
3828
  yield response, operation if block_given?
3815
- return response
3829
+ throw :response, response
3816
3830
  end
3817
3831
  rescue ::GRPC::BadStatus => e
3818
3832
  raise ::Google::Cloud::Error.from_error(e)
@@ -3908,7 +3922,209 @@ module Google
3908
3922
  @net_app_stub.call_rpc :reverse_replication_direction, request, options: options do |response, operation|
3909
3923
  response = ::Gapic::Operation.new response, @operations_client, options: options
3910
3924
  yield response, operation if block_given?
3911
- return response
3925
+ throw :response, response
3926
+ end
3927
+ rescue ::GRPC::BadStatus => e
3928
+ raise ::Google::Cloud::Error.from_error(e)
3929
+ end
3930
+
3931
+ ##
3932
+ # Establish replication peering.
3933
+ #
3934
+ # @overload establish_peering(request, options = nil)
3935
+ # Pass arguments to `establish_peering` via a request object, either of type
3936
+ # {::Google::Cloud::NetApp::V1::EstablishPeeringRequest} or an equivalent Hash.
3937
+ #
3938
+ # @param request [::Google::Cloud::NetApp::V1::EstablishPeeringRequest, ::Hash]
3939
+ # A request object representing the call parameters. Required. To specify no
3940
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3941
+ # @param options [::Gapic::CallOptions, ::Hash]
3942
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3943
+ #
3944
+ # @overload establish_peering(name: nil, peer_cluster_name: nil, peer_svm_name: nil, peer_ip_addresses: nil, peer_volume_name: nil)
3945
+ # Pass arguments to `establish_peering` via keyword arguments. Note that at
3946
+ # least one keyword argument is required. To specify no parameters, or to keep all
3947
+ # the default parameter values, pass an empty Hash as a request object (see above).
3948
+ #
3949
+ # @param name [::String]
3950
+ # Required. The resource name of the replication, in the format of
3951
+ # projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
3952
+ # @param peer_cluster_name [::String]
3953
+ # Required. Name of the user's local source cluster to be peered with the
3954
+ # destination cluster.
3955
+ # @param peer_svm_name [::String]
3956
+ # Required. Name of the user's local source vserver svm to be peered with the
3957
+ # destination vserver svm.
3958
+ # @param peer_ip_addresses [::Array<::String>]
3959
+ # Optional. List of IPv4 ip addresses to be used for peering.
3960
+ # @param peer_volume_name [::String]
3961
+ # Required. Name of the user's local source volume to be peered with the
3962
+ # destination volume.
3963
+ #
3964
+ # @yield [response, operation] Access the result along with the RPC operation
3965
+ # @yieldparam response [::Gapic::Operation]
3966
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3967
+ #
3968
+ # @return [::Gapic::Operation]
3969
+ #
3970
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3971
+ #
3972
+ # @example Basic example
3973
+ # require "google/cloud/netapp/v1"
3974
+ #
3975
+ # # Create a client object. The client can be reused for multiple calls.
3976
+ # client = Google::Cloud::NetApp::V1::NetApp::Client.new
3977
+ #
3978
+ # # Create a request. To set request fields, pass in keyword arguments.
3979
+ # request = Google::Cloud::NetApp::V1::EstablishPeeringRequest.new
3980
+ #
3981
+ # # Call the establish_peering method.
3982
+ # result = client.establish_peering request
3983
+ #
3984
+ # # The returned object is of type Gapic::Operation. You can use it to
3985
+ # # check the status of an operation, cancel it, or wait for results.
3986
+ # # Here is how to wait for a response.
3987
+ # result.wait_until_done! timeout: 60
3988
+ # if result.response?
3989
+ # p result.response
3990
+ # else
3991
+ # puts "No response received."
3992
+ # end
3993
+ #
3994
+ def establish_peering request, options = nil
3995
+ raise ::ArgumentError, "request must be provided" if request.nil?
3996
+
3997
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::EstablishPeeringRequest
3998
+
3999
+ # Converts hash and nil to an options object
4000
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4001
+
4002
+ # Customize the options with defaults
4003
+ metadata = @config.rpcs.establish_peering.metadata.to_h
4004
+
4005
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4006
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4007
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4008
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION
4009
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4010
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4011
+
4012
+ header_params = {}
4013
+ if request.name
4014
+ header_params["name"] = request.name
4015
+ end
4016
+
4017
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4018
+ metadata[:"x-goog-request-params"] ||= request_params_header
4019
+
4020
+ options.apply_defaults timeout: @config.rpcs.establish_peering.timeout,
4021
+ metadata: metadata,
4022
+ retry_policy: @config.rpcs.establish_peering.retry_policy
4023
+
4024
+ options.apply_defaults timeout: @config.timeout,
4025
+ metadata: @config.metadata,
4026
+ retry_policy: @config.retry_policy
4027
+
4028
+ @net_app_stub.call_rpc :establish_peering, request, options: options do |response, operation|
4029
+ response = ::Gapic::Operation.new response, @operations_client, options: options
4030
+ yield response, operation if block_given?
4031
+ throw :response, response
4032
+ end
4033
+ rescue ::GRPC::BadStatus => e
4034
+ raise ::Google::Cloud::Error.from_error(e)
4035
+ end
4036
+
4037
+ ##
4038
+ # Syncs the replication. This will invoke one time volume data transfer from
4039
+ # source to destination.
4040
+ #
4041
+ # @overload sync_replication(request, options = nil)
4042
+ # Pass arguments to `sync_replication` via a request object, either of type
4043
+ # {::Google::Cloud::NetApp::V1::SyncReplicationRequest} or an equivalent Hash.
4044
+ #
4045
+ # @param request [::Google::Cloud::NetApp::V1::SyncReplicationRequest, ::Hash]
4046
+ # A request object representing the call parameters. Required. To specify no
4047
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4048
+ # @param options [::Gapic::CallOptions, ::Hash]
4049
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4050
+ #
4051
+ # @overload sync_replication(name: nil)
4052
+ # Pass arguments to `sync_replication` via keyword arguments. Note that at
4053
+ # least one keyword argument is required. To specify no parameters, or to keep all
4054
+ # the default parameter values, pass an empty Hash as a request object (see above).
4055
+ #
4056
+ # @param name [::String]
4057
+ # Required. The resource name of the replication, in the format of
4058
+ # projects/\\{project_id}/locations/\\{location}/volumes/\\{volume_id}/replications/\\{replication_id}.
4059
+ #
4060
+ # @yield [response, operation] Access the result along with the RPC operation
4061
+ # @yieldparam response [::Gapic::Operation]
4062
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4063
+ #
4064
+ # @return [::Gapic::Operation]
4065
+ #
4066
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4067
+ #
4068
+ # @example Basic example
4069
+ # require "google/cloud/netapp/v1"
4070
+ #
4071
+ # # Create a client object. The client can be reused for multiple calls.
4072
+ # client = Google::Cloud::NetApp::V1::NetApp::Client.new
4073
+ #
4074
+ # # Create a request. To set request fields, pass in keyword arguments.
4075
+ # request = Google::Cloud::NetApp::V1::SyncReplicationRequest.new
4076
+ #
4077
+ # # Call the sync_replication method.
4078
+ # result = client.sync_replication request
4079
+ #
4080
+ # # The returned object is of type Gapic::Operation. You can use it to
4081
+ # # check the status of an operation, cancel it, or wait for results.
4082
+ # # Here is how to wait for a response.
4083
+ # result.wait_until_done! timeout: 60
4084
+ # if result.response?
4085
+ # p result.response
4086
+ # else
4087
+ # puts "No response received."
4088
+ # end
4089
+ #
4090
+ def sync_replication request, options = nil
4091
+ raise ::ArgumentError, "request must be provided" if request.nil?
4092
+
4093
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::SyncReplicationRequest
4094
+
4095
+ # Converts hash and nil to an options object
4096
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4097
+
4098
+ # Customize the options with defaults
4099
+ metadata = @config.rpcs.sync_replication.metadata.to_h
4100
+
4101
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4102
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4103
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4104
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION
4105
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4106
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4107
+
4108
+ header_params = {}
4109
+ if request.name
4110
+ header_params["name"] = request.name
4111
+ end
4112
+
4113
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4114
+ metadata[:"x-goog-request-params"] ||= request_params_header
4115
+
4116
+ options.apply_defaults timeout: @config.rpcs.sync_replication.timeout,
4117
+ metadata: metadata,
4118
+ retry_policy: @config.rpcs.sync_replication.retry_policy
4119
+
4120
+ options.apply_defaults timeout: @config.timeout,
4121
+ metadata: @config.metadata,
4122
+ retry_policy: @config.retry_policy
4123
+
4124
+ @net_app_stub.call_rpc :sync_replication, request, options: options do |response, operation|
4125
+ response = ::Gapic::Operation.new response, @operations_client, options: options
4126
+ yield response, operation if block_given?
4127
+ throw :response, response
3912
4128
  end
3913
4129
  rescue ::GRPC::BadStatus => e
3914
4130
  raise ::Google::Cloud::Error.from_error(e)
@@ -3938,8 +4154,8 @@ module Google
3938
4154
  # @param backup_vault_id [::String]
3939
4155
  # Required. The ID to use for the backupVault.
3940
4156
  # The ID must be unique within the specified location.
3941
- # Must contain only letters, numbers, underscore and hyphen, with the first
3942
- # character a letter or underscore, the last a letter or underscore or a
4157
+ # Must contain only letters, numbers and hyphen, with the first
4158
+ # character a letter, the last a letter or a
3943
4159
  # number, and a 63 character maximum.
3944
4160
  # @param backup_vault [::Google::Cloud::NetApp::V1::BackupVault, ::Hash]
3945
4161
  # Required. A backupVault resource
@@ -4011,7 +4227,7 @@ module Google
4011
4227
  @net_app_stub.call_rpc :create_backup_vault, request, options: options do |response, operation|
4012
4228
  response = ::Gapic::Operation.new response, @operations_client, options: options
4013
4229
  yield response, operation if block_given?
4014
- return response
4230
+ throw :response, response
4015
4231
  end
4016
4232
  rescue ::GRPC::BadStatus => e
4017
4233
  raise ::Google::Cloud::Error.from_error(e)
@@ -4098,7 +4314,6 @@ module Google
4098
4314
 
4099
4315
  @net_app_stub.call_rpc :get_backup_vault, request, options: options do |response, operation|
4100
4316
  yield response, operation if block_given?
4101
- return response
4102
4317
  end
4103
4318
  rescue ::GRPC::BadStatus => e
4104
4319
  raise ::Google::Cloud::Error.from_error(e)
@@ -4200,7 +4415,7 @@ module Google
4200
4415
  @net_app_stub.call_rpc :list_backup_vaults, request, options: options do |response, operation|
4201
4416
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backup_vaults, request, response, operation, options
4202
4417
  yield response, operation if block_given?
4203
- return response
4418
+ throw :response, response
4204
4419
  end
4205
4420
  rescue ::GRPC::BadStatus => e
4206
4421
  raise ::Google::Cloud::Error.from_error(e)
@@ -4300,7 +4515,7 @@ module Google
4300
4515
  @net_app_stub.call_rpc :update_backup_vault, request, options: options do |response, operation|
4301
4516
  response = ::Gapic::Operation.new response, @operations_client, options: options
4302
4517
  yield response, operation if block_given?
4303
- return response
4518
+ throw :response, response
4304
4519
  end
4305
4520
  rescue ::GRPC::BadStatus => e
4306
4521
  raise ::Google::Cloud::Error.from_error(e)
@@ -4395,7 +4610,7 @@ module Google
4395
4610
  @net_app_stub.call_rpc :delete_backup_vault, request, options: options do |response, operation|
4396
4611
  response = ::Gapic::Operation.new response, @operations_client, options: options
4397
4612
  yield response, operation if block_given?
4398
- return response
4613
+ throw :response, response
4399
4614
  end
4400
4615
  rescue ::GRPC::BadStatus => e
4401
4616
  raise ::Google::Cloud::Error.from_error(e)
@@ -4428,8 +4643,8 @@ module Google
4428
4643
  # @param backup_id [::String]
4429
4644
  # Required. The ID to use for the backup.
4430
4645
  # The ID must be unique within the specified backupVault.
4431
- # Must contain only letters, numbers, underscore and hyphen, with the first
4432
- # character a letter or underscore, the last a letter or underscore or a
4646
+ # Must contain only letters, numbers and hyphen, with the first
4647
+ # character a letter, the last a letter or a
4433
4648
  # number, and a 63 character maximum.
4434
4649
  # @param backup [::Google::Cloud::NetApp::V1::Backup, ::Hash]
4435
4650
  # Required. A backup resource
@@ -4501,7 +4716,7 @@ module Google
4501
4716
  @net_app_stub.call_rpc :create_backup, request, options: options do |response, operation|
4502
4717
  response = ::Gapic::Operation.new response, @operations_client, options: options
4503
4718
  yield response, operation if block_given?
4504
- return response
4719
+ throw :response, response
4505
4720
  end
4506
4721
  rescue ::GRPC::BadStatus => e
4507
4722
  raise ::Google::Cloud::Error.from_error(e)
@@ -4588,7 +4803,6 @@ module Google
4588
4803
 
4589
4804
  @net_app_stub.call_rpc :get_backup, request, options: options do |response, operation|
4590
4805
  yield response, operation if block_given?
4591
- return response
4592
4806
  end
4593
4807
  rescue ::GRPC::BadStatus => e
4594
4808
  raise ::Google::Cloud::Error.from_error(e)
@@ -4701,7 +4915,7 @@ module Google
4701
4915
  @net_app_stub.call_rpc :list_backups, request, options: options do |response, operation|
4702
4916
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backups, request, response, operation, options
4703
4917
  yield response, operation if block_given?
4704
- return response
4918
+ throw :response, response
4705
4919
  end
4706
4920
  rescue ::GRPC::BadStatus => e
4707
4921
  raise ::Google::Cloud::Error.from_error(e)
@@ -4796,7 +5010,7 @@ module Google
4796
5010
  @net_app_stub.call_rpc :delete_backup, request, options: options do |response, operation|
4797
5011
  response = ::Gapic::Operation.new response, @operations_client, options: options
4798
5012
  yield response, operation if block_given?
4799
- return response
5013
+ throw :response, response
4800
5014
  end
4801
5015
  rescue ::GRPC::BadStatus => e
4802
5016
  raise ::Google::Cloud::Error.from_error(e)
@@ -4896,7 +5110,7 @@ module Google
4896
5110
  @net_app_stub.call_rpc :update_backup, request, options: options do |response, operation|
4897
5111
  response = ::Gapic::Operation.new response, @operations_client, options: options
4898
5112
  yield response, operation if block_given?
4899
- return response
5113
+ throw :response, response
4900
5114
  end
4901
5115
  rescue ::GRPC::BadStatus => e
4902
5116
  raise ::Google::Cloud::Error.from_error(e)
@@ -4928,8 +5142,8 @@ module Google
4928
5142
  # @param backup_policy_id [::String]
4929
5143
  # Required. The ID to use for the backup policy.
4930
5144
  # The ID must be unique within the specified location.
4931
- # Must contain only letters, numbers, underscore and hyphen, with the first
4932
- # character a letter or underscore, the last a letter or underscore or a
5145
+ # Must contain only letters, numbers and hyphen, with the first
5146
+ # character a letter, the last a letter or a
4933
5147
  # number, and a 63 character maximum.
4934
5148
  #
4935
5149
  # @yield [response, operation] Access the result along with the RPC operation
@@ -4999,7 +5213,7 @@ module Google
4999
5213
  @net_app_stub.call_rpc :create_backup_policy, request, options: options do |response, operation|
5000
5214
  response = ::Gapic::Operation.new response, @operations_client, options: options
5001
5215
  yield response, operation if block_given?
5002
- return response
5216
+ throw :response, response
5003
5217
  end
5004
5218
  rescue ::GRPC::BadStatus => e
5005
5219
  raise ::Google::Cloud::Error.from_error(e)
@@ -5086,7 +5300,6 @@ module Google
5086
5300
 
5087
5301
  @net_app_stub.call_rpc :get_backup_policy, request, options: options do |response, operation|
5088
5302
  yield response, operation if block_given?
5089
- return response
5090
5303
  end
5091
5304
  rescue ::GRPC::BadStatus => e
5092
5305
  raise ::Google::Cloud::Error.from_error(e)
@@ -5186,7 +5399,7 @@ module Google
5186
5399
  @net_app_stub.call_rpc :list_backup_policies, request, options: options do |response, operation|
5187
5400
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backup_policies, request, response, operation, options
5188
5401
  yield response, operation if block_given?
5189
- return response
5402
+ throw :response, response
5190
5403
  end
5191
5404
  rescue ::GRPC::BadStatus => e
5192
5405
  raise ::Google::Cloud::Error.from_error(e)
@@ -5286,7 +5499,7 @@ module Google
5286
5499
  @net_app_stub.call_rpc :update_backup_policy, request, options: options do |response, operation|
5287
5500
  response = ::Gapic::Operation.new response, @operations_client, options: options
5288
5501
  yield response, operation if block_given?
5289
- return response
5502
+ throw :response, response
5290
5503
  end
5291
5504
  rescue ::GRPC::BadStatus => e
5292
5505
  raise ::Google::Cloud::Error.from_error(e)
@@ -5381,7 +5594,7 @@ module Google
5381
5594
  @net_app_stub.call_rpc :delete_backup_policy, request, options: options do |response, operation|
5382
5595
  response = ::Gapic::Operation.new response, @operations_client, options: options
5383
5596
  yield response, operation if block_given?
5384
- return response
5597
+ throw :response, response
5385
5598
  end
5386
5599
  rescue ::GRPC::BadStatus => e
5387
5600
  raise ::Google::Cloud::Error.from_error(e)
@@ -5470,6 +5683,11 @@ module Google
5470
5683
  # default endpoint URL. The default value of nil uses the environment
5471
5684
  # universe (usually the default "googleapis.com" universe).
5472
5685
  # @return [::String,nil]
5686
+ # @!attribute [rw] logger
5687
+ # A custom logger to use for request/response debug logging, or the value
5688
+ # `:default` (the default) to construct a default logger, or `nil` to
5689
+ # explicitly disable logging.
5690
+ # @return [::Logger,:default,nil]
5473
5691
  #
5474
5692
  class Configuration
5475
5693
  extend ::Gapic::Config
@@ -5494,6 +5712,7 @@ module Google
5494
5712
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
5495
5713
  config_attr :quota_project, nil, ::String, nil
5496
5714
  config_attr :universe_domain, nil, ::String, nil
5715
+ config_attr :logger, :default, ::Logger, nil, :default
5497
5716
 
5498
5717
  # @private
5499
5718
  def initialize parent_config = nil
@@ -5726,6 +5945,16 @@ module Google
5726
5945
  #
5727
5946
  attr_reader :reverse_replication_direction
5728
5947
  ##
5948
+ # RPC-specific configuration for `establish_peering`
5949
+ # @return [::Gapic::Config::Method]
5950
+ #
5951
+ attr_reader :establish_peering
5952
+ ##
5953
+ # RPC-specific configuration for `sync_replication`
5954
+ # @return [::Gapic::Config::Method]
5955
+ #
5956
+ attr_reader :sync_replication
5957
+ ##
5729
5958
  # RPC-specific configuration for `create_backup_vault`
5730
5959
  # @return [::Gapic::Config::Method]
5731
5960
  #
@@ -5877,6 +6106,10 @@ module Google
5877
6106
  @resume_replication = ::Gapic::Config::Method.new resume_replication_config
5878
6107
  reverse_replication_direction_config = parent_rpcs.reverse_replication_direction if parent_rpcs.respond_to? :reverse_replication_direction
5879
6108
  @reverse_replication_direction = ::Gapic::Config::Method.new reverse_replication_direction_config
6109
+ establish_peering_config = parent_rpcs.establish_peering if parent_rpcs.respond_to? :establish_peering
6110
+ @establish_peering = ::Gapic::Config::Method.new establish_peering_config
6111
+ sync_replication_config = parent_rpcs.sync_replication if parent_rpcs.respond_to? :sync_replication
6112
+ @sync_replication = ::Gapic::Config::Method.new sync_replication_config
5880
6113
  create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault
5881
6114
  @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config
5882
6115
  get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault