google-cloud-gke_backup-v1 0.5.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -99
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb +44 -9
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb +38 -7
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb +528 -7
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb +108 -8
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb +14 -2
- data/lib/google/cloud/gke_backup/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- metadata +9 -9
@@ -35,6 +35,9 @@ module Google
|
|
35
35
|
# manage backup and restore operations for their GKE clusters.
|
36
36
|
#
|
37
37
|
class Client
|
38
|
+
# @private
|
39
|
+
DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$"
|
40
|
+
|
38
41
|
include Paths
|
39
42
|
|
40
43
|
# @private
|
@@ -179,6 +182,15 @@ module Google
|
|
179
182
|
@config
|
180
183
|
end
|
181
184
|
|
185
|
+
##
|
186
|
+
# The effective universe domain
|
187
|
+
#
|
188
|
+
# @return [String]
|
189
|
+
#
|
190
|
+
def universe_domain
|
191
|
+
@backup_for_gke_stub.universe_domain
|
192
|
+
end
|
193
|
+
|
182
194
|
##
|
183
195
|
# Create a new BackupForGKE REST client object.
|
184
196
|
#
|
@@ -206,8 +218,9 @@ module Google
|
|
206
218
|
credentials = @config.credentials
|
207
219
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
208
220
|
# but only if the default endpoint does not have a region prefix.
|
209
|
-
enable_self_signed_jwt = @config.endpoint
|
210
|
-
|
221
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
222
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
223
|
+
!@config.endpoint.split(".").first.include?("-"))
|
211
224
|
credentials ||= Credentials.default scope: @config.scope,
|
212
225
|
enable_self_signed_jwt: enable_self_signed_jwt
|
213
226
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -221,12 +234,14 @@ module Google
|
|
221
234
|
config.credentials = credentials
|
222
235
|
config.quota_project = @quota_project_id
|
223
236
|
config.endpoint = @config.endpoint
|
237
|
+
config.universe_domain = @config.universe_domain
|
224
238
|
end
|
225
239
|
|
226
240
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
227
241
|
config.credentials = credentials
|
228
242
|
config.quota_project = @quota_project_id
|
229
243
|
config.endpoint = @config.endpoint
|
244
|
+
config.universe_domain = @config.universe_domain
|
230
245
|
config.bindings_override = @config.bindings_override
|
231
246
|
end
|
232
247
|
|
@@ -234,10 +249,16 @@ module Google
|
|
234
249
|
config.credentials = credentials
|
235
250
|
config.quota_project = @quota_project_id
|
236
251
|
config.endpoint = @config.endpoint
|
252
|
+
config.universe_domain = @config.universe_domain
|
237
253
|
config.bindings_override = @config.bindings_override
|
238
254
|
end
|
239
255
|
|
240
|
-
@backup_for_gke_stub = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.new
|
256
|
+
@backup_for_gke_stub = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.new(
|
257
|
+
endpoint: @config.endpoint,
|
258
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
259
|
+
universe_domain: @config.universe_domain,
|
260
|
+
credentials: credentials
|
261
|
+
)
|
241
262
|
end
|
242
263
|
|
243
264
|
##
|
@@ -302,6 +323,29 @@ module Google
|
|
302
323
|
# @return [::Gapic::Operation]
|
303
324
|
#
|
304
325
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
326
|
+
#
|
327
|
+
# @example Basic example
|
328
|
+
# require "google/cloud/gke_backup/v1"
|
329
|
+
#
|
330
|
+
# # Create a client object. The client can be reused for multiple calls.
|
331
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
332
|
+
#
|
333
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
334
|
+
# request = Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new
|
335
|
+
#
|
336
|
+
# # Call the create_backup_plan method.
|
337
|
+
# result = client.create_backup_plan request
|
338
|
+
#
|
339
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
340
|
+
# # check the status of an operation, cancel it, or wait for results.
|
341
|
+
# # Here is how to wait for a response.
|
342
|
+
# result.wait_until_done! timeout: 60
|
343
|
+
# if result.response?
|
344
|
+
# p result.response
|
345
|
+
# else
|
346
|
+
# puts "No response received."
|
347
|
+
# end
|
348
|
+
#
|
305
349
|
def create_backup_plan request, options = nil
|
306
350
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
307
351
|
|
@@ -384,6 +428,26 @@ module Google
|
|
384
428
|
# @return [::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse]
|
385
429
|
#
|
386
430
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
431
|
+
#
|
432
|
+
# @example Basic example
|
433
|
+
# require "google/cloud/gke_backup/v1"
|
434
|
+
#
|
435
|
+
# # Create a client object. The client can be reused for multiple calls.
|
436
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
437
|
+
#
|
438
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
439
|
+
# request = Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.new
|
440
|
+
#
|
441
|
+
# # Call the list_backup_plans method.
|
442
|
+
# result = client.list_backup_plans request
|
443
|
+
#
|
444
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
445
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
446
|
+
# result.each do |item|
|
447
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlan.
|
448
|
+
# p item
|
449
|
+
# end
|
450
|
+
#
|
387
451
|
def list_backup_plans request, options = nil
|
388
452
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
389
453
|
|
@@ -447,6 +511,22 @@ module Google
|
|
447
511
|
# @return [::Google::Cloud::GkeBackup::V1::BackupPlan]
|
448
512
|
#
|
449
513
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
514
|
+
#
|
515
|
+
# @example Basic example
|
516
|
+
# require "google/cloud/gke_backup/v1"
|
517
|
+
#
|
518
|
+
# # Create a client object. The client can be reused for multiple calls.
|
519
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
520
|
+
#
|
521
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
522
|
+
# request = Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new
|
523
|
+
#
|
524
|
+
# # Call the get_backup_plan method.
|
525
|
+
# result = client.get_backup_plan request
|
526
|
+
#
|
527
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlan.
|
528
|
+
# p result
|
529
|
+
#
|
450
530
|
def get_backup_plan request, options = nil
|
451
531
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
452
532
|
|
@@ -520,6 +600,29 @@ module Google
|
|
520
600
|
# @return [::Gapic::Operation]
|
521
601
|
#
|
522
602
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
603
|
+
#
|
604
|
+
# @example Basic example
|
605
|
+
# require "google/cloud/gke_backup/v1"
|
606
|
+
#
|
607
|
+
# # Create a client object. The client can be reused for multiple calls.
|
608
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
609
|
+
#
|
610
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
611
|
+
# request = Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new
|
612
|
+
#
|
613
|
+
# # Call the update_backup_plan method.
|
614
|
+
# result = client.update_backup_plan request
|
615
|
+
#
|
616
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
617
|
+
# # check the status of an operation, cancel it, or wait for results.
|
618
|
+
# # Here is how to wait for a response.
|
619
|
+
# result.wait_until_done! timeout: 60
|
620
|
+
# if result.response?
|
621
|
+
# p result.response
|
622
|
+
# else
|
623
|
+
# puts "No response received."
|
624
|
+
# end
|
625
|
+
#
|
523
626
|
def update_backup_plan request, options = nil
|
524
627
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
525
628
|
|
@@ -588,6 +691,29 @@ module Google
|
|
588
691
|
# @return [::Gapic::Operation]
|
589
692
|
#
|
590
693
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
694
|
+
#
|
695
|
+
# @example Basic example
|
696
|
+
# require "google/cloud/gke_backup/v1"
|
697
|
+
#
|
698
|
+
# # Create a client object. The client can be reused for multiple calls.
|
699
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
700
|
+
#
|
701
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
702
|
+
# request = Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.new
|
703
|
+
#
|
704
|
+
# # Call the delete_backup_plan method.
|
705
|
+
# result = client.delete_backup_plan request
|
706
|
+
#
|
707
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
708
|
+
# # check the status of an operation, cancel it, or wait for results.
|
709
|
+
# # Here is how to wait for a response.
|
710
|
+
# result.wait_until_done! timeout: 60
|
711
|
+
# if result.response?
|
712
|
+
# p result.response
|
713
|
+
# else
|
714
|
+
# puts "No response received."
|
715
|
+
# end
|
716
|
+
#
|
591
717
|
def delete_backup_plan request, options = nil
|
592
718
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
593
719
|
|
@@ -663,6 +789,29 @@ module Google
|
|
663
789
|
# @return [::Gapic::Operation]
|
664
790
|
#
|
665
791
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
792
|
+
#
|
793
|
+
# @example Basic example
|
794
|
+
# require "google/cloud/gke_backup/v1"
|
795
|
+
#
|
796
|
+
# # Create a client object. The client can be reused for multiple calls.
|
797
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
798
|
+
#
|
799
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
800
|
+
# request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new
|
801
|
+
#
|
802
|
+
# # Call the create_backup method.
|
803
|
+
# result = client.create_backup request
|
804
|
+
#
|
805
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
806
|
+
# # check the status of an operation, cancel it, or wait for results.
|
807
|
+
# # Here is how to wait for a response.
|
808
|
+
# result.wait_until_done! timeout: 60
|
809
|
+
# if result.response?
|
810
|
+
# p result.response
|
811
|
+
# else
|
812
|
+
# puts "No response received."
|
813
|
+
# end
|
814
|
+
#
|
666
815
|
def create_backup request, options = nil
|
667
816
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
668
817
|
|
@@ -745,6 +894,26 @@ module Google
|
|
745
894
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
|
746
895
|
#
|
747
896
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
897
|
+
#
|
898
|
+
# @example Basic example
|
899
|
+
# require "google/cloud/gke_backup/v1"
|
900
|
+
#
|
901
|
+
# # Create a client object. The client can be reused for multiple calls.
|
902
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
903
|
+
#
|
904
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
905
|
+
# request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new
|
906
|
+
#
|
907
|
+
# # Call the list_backups method.
|
908
|
+
# result = client.list_backups request
|
909
|
+
#
|
910
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
911
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
912
|
+
# result.each do |item|
|
913
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup.
|
914
|
+
# p item
|
915
|
+
# end
|
916
|
+
#
|
748
917
|
def list_backups request, options = nil
|
749
918
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
750
919
|
|
@@ -809,6 +978,22 @@ module Google
|
|
809
978
|
# @return [::Google::Cloud::GkeBackup::V1::Backup]
|
810
979
|
#
|
811
980
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
981
|
+
#
|
982
|
+
# @example Basic example
|
983
|
+
# require "google/cloud/gke_backup/v1"
|
984
|
+
#
|
985
|
+
# # Create a client object. The client can be reused for multiple calls.
|
986
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
987
|
+
#
|
988
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
989
|
+
# request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new
|
990
|
+
#
|
991
|
+
# # Call the get_backup method.
|
992
|
+
# result = client.get_backup request
|
993
|
+
#
|
994
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::Backup.
|
995
|
+
# p result
|
996
|
+
#
|
812
997
|
def get_backup request, options = nil
|
813
998
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
814
999
|
|
@@ -881,6 +1066,29 @@ module Google
|
|
881
1066
|
# @return [::Gapic::Operation]
|
882
1067
|
#
|
883
1068
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1069
|
+
#
|
1070
|
+
# @example Basic example
|
1071
|
+
# require "google/cloud/gke_backup/v1"
|
1072
|
+
#
|
1073
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1074
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1075
|
+
#
|
1076
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1077
|
+
# request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new
|
1078
|
+
#
|
1079
|
+
# # Call the update_backup method.
|
1080
|
+
# result = client.update_backup request
|
1081
|
+
#
|
1082
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1083
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1084
|
+
# # Here is how to wait for a response.
|
1085
|
+
# result.wait_until_done! timeout: 60
|
1086
|
+
# if result.response?
|
1087
|
+
# p result.response
|
1088
|
+
# else
|
1089
|
+
# puts "No response received."
|
1090
|
+
# end
|
1091
|
+
#
|
884
1092
|
def update_backup request, options = nil
|
885
1093
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
886
1094
|
|
@@ -953,6 +1161,29 @@ module Google
|
|
953
1161
|
# @return [::Gapic::Operation]
|
954
1162
|
#
|
955
1163
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1164
|
+
#
|
1165
|
+
# @example Basic example
|
1166
|
+
# require "google/cloud/gke_backup/v1"
|
1167
|
+
#
|
1168
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1169
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1170
|
+
#
|
1171
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1172
|
+
# request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new
|
1173
|
+
#
|
1174
|
+
# # Call the delete_backup method.
|
1175
|
+
# result = client.delete_backup request
|
1176
|
+
#
|
1177
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1178
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1179
|
+
# # Here is how to wait for a response.
|
1180
|
+
# result.wait_until_done! timeout: 60
|
1181
|
+
# if result.response?
|
1182
|
+
# p result.response
|
1183
|
+
# else
|
1184
|
+
# puts "No response received."
|
1185
|
+
# end
|
1186
|
+
#
|
956
1187
|
def delete_backup request, options = nil
|
957
1188
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
958
1189
|
|
@@ -1035,6 +1266,26 @@ module Google
|
|
1035
1266
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
|
1036
1267
|
#
|
1037
1268
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1269
|
+
#
|
1270
|
+
# @example Basic example
|
1271
|
+
# require "google/cloud/gke_backup/v1"
|
1272
|
+
#
|
1273
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1274
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1275
|
+
#
|
1276
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1277
|
+
# request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new
|
1278
|
+
#
|
1279
|
+
# # Call the list_volume_backups method.
|
1280
|
+
# result = client.list_volume_backups request
|
1281
|
+
#
|
1282
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1283
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1284
|
+
# result.each do |item|
|
1285
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup.
|
1286
|
+
# p item
|
1287
|
+
# end
|
1288
|
+
#
|
1038
1289
|
def list_volume_backups request, options = nil
|
1039
1290
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1040
1291
|
|
@@ -1099,6 +1350,22 @@ module Google
|
|
1099
1350
|
# @return [::Google::Cloud::GkeBackup::V1::VolumeBackup]
|
1100
1351
|
#
|
1101
1352
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1353
|
+
#
|
1354
|
+
# @example Basic example
|
1355
|
+
# require "google/cloud/gke_backup/v1"
|
1356
|
+
#
|
1357
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1358
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1359
|
+
#
|
1360
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1361
|
+
# request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new
|
1362
|
+
#
|
1363
|
+
# # Call the get_volume_backup method.
|
1364
|
+
# result = client.get_volume_backup request
|
1365
|
+
#
|
1366
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup.
|
1367
|
+
# p result
|
1368
|
+
#
|
1102
1369
|
def get_volume_backup request, options = nil
|
1103
1370
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1104
1371
|
|
@@ -1173,6 +1440,29 @@ module Google
|
|
1173
1440
|
# @return [::Gapic::Operation]
|
1174
1441
|
#
|
1175
1442
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1443
|
+
#
|
1444
|
+
# @example Basic example
|
1445
|
+
# require "google/cloud/gke_backup/v1"
|
1446
|
+
#
|
1447
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1448
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1449
|
+
#
|
1450
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1451
|
+
# request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new
|
1452
|
+
#
|
1453
|
+
# # Call the create_restore_plan method.
|
1454
|
+
# result = client.create_restore_plan request
|
1455
|
+
#
|
1456
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1457
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1458
|
+
# # Here is how to wait for a response.
|
1459
|
+
# result.wait_until_done! timeout: 60
|
1460
|
+
# if result.response?
|
1461
|
+
# p result.response
|
1462
|
+
# else
|
1463
|
+
# puts "No response received."
|
1464
|
+
# end
|
1465
|
+
#
|
1176
1466
|
def create_restore_plan request, options = nil
|
1177
1467
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1178
1468
|
|
@@ -1255,6 +1545,26 @@ module Google
|
|
1255
1545
|
# @return [::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse]
|
1256
1546
|
#
|
1257
1547
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1548
|
+
#
|
1549
|
+
# @example Basic example
|
1550
|
+
# require "google/cloud/gke_backup/v1"
|
1551
|
+
#
|
1552
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1553
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1554
|
+
#
|
1555
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1556
|
+
# request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new
|
1557
|
+
#
|
1558
|
+
# # Call the list_restore_plans method.
|
1559
|
+
# result = client.list_restore_plans request
|
1560
|
+
#
|
1561
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1562
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1563
|
+
# result.each do |item|
|
1564
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan.
|
1565
|
+
# p item
|
1566
|
+
# end
|
1567
|
+
#
|
1258
1568
|
def list_restore_plans request, options = nil
|
1259
1569
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1260
1570
|
|
@@ -1318,6 +1628,22 @@ module Google
|
|
1318
1628
|
# @return [::Google::Cloud::GkeBackup::V1::RestorePlan]
|
1319
1629
|
#
|
1320
1630
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1631
|
+
#
|
1632
|
+
# @example Basic example
|
1633
|
+
# require "google/cloud/gke_backup/v1"
|
1634
|
+
#
|
1635
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1636
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1637
|
+
#
|
1638
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1639
|
+
# request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new
|
1640
|
+
#
|
1641
|
+
# # Call the get_restore_plan method.
|
1642
|
+
# result = client.get_restore_plan request
|
1643
|
+
#
|
1644
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan.
|
1645
|
+
# p result
|
1646
|
+
#
|
1321
1647
|
def get_restore_plan request, options = nil
|
1322
1648
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1323
1649
|
|
@@ -1390,6 +1716,29 @@ module Google
|
|
1390
1716
|
# @return [::Gapic::Operation]
|
1391
1717
|
#
|
1392
1718
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1719
|
+
#
|
1720
|
+
# @example Basic example
|
1721
|
+
# require "google/cloud/gke_backup/v1"
|
1722
|
+
#
|
1723
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1724
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1725
|
+
#
|
1726
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1727
|
+
# request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new
|
1728
|
+
#
|
1729
|
+
# # Call the update_restore_plan method.
|
1730
|
+
# result = client.update_restore_plan request
|
1731
|
+
#
|
1732
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1733
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1734
|
+
# # Here is how to wait for a response.
|
1735
|
+
# result.wait_until_done! timeout: 60
|
1736
|
+
# if result.response?
|
1737
|
+
# p result.response
|
1738
|
+
# else
|
1739
|
+
# puts "No response received."
|
1740
|
+
# end
|
1741
|
+
#
|
1393
1742
|
def update_restore_plan request, options = nil
|
1394
1743
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1395
1744
|
|
@@ -1462,6 +1811,29 @@ module Google
|
|
1462
1811
|
# @return [::Gapic::Operation]
|
1463
1812
|
#
|
1464
1813
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1814
|
+
#
|
1815
|
+
# @example Basic example
|
1816
|
+
# require "google/cloud/gke_backup/v1"
|
1817
|
+
#
|
1818
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1819
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1820
|
+
#
|
1821
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1822
|
+
# request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new
|
1823
|
+
#
|
1824
|
+
# # Call the delete_restore_plan method.
|
1825
|
+
# result = client.delete_restore_plan request
|
1826
|
+
#
|
1827
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1828
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1829
|
+
# # Here is how to wait for a response.
|
1830
|
+
# result.wait_until_done! timeout: 60
|
1831
|
+
# if result.response?
|
1832
|
+
# p result.response
|
1833
|
+
# else
|
1834
|
+
# puts "No response received."
|
1835
|
+
# end
|
1836
|
+
#
|
1465
1837
|
def delete_restore_plan request, options = nil
|
1466
1838
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1467
1839
|
|
@@ -1537,6 +1909,29 @@ module Google
|
|
1537
1909
|
# @return [::Gapic::Operation]
|
1538
1910
|
#
|
1539
1911
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1912
|
+
#
|
1913
|
+
# @example Basic example
|
1914
|
+
# require "google/cloud/gke_backup/v1"
|
1915
|
+
#
|
1916
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1917
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1918
|
+
#
|
1919
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1920
|
+
# request = Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new
|
1921
|
+
#
|
1922
|
+
# # Call the create_restore method.
|
1923
|
+
# result = client.create_restore request
|
1924
|
+
#
|
1925
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1926
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1927
|
+
# # Here is how to wait for a response.
|
1928
|
+
# result.wait_until_done! timeout: 60
|
1929
|
+
# if result.response?
|
1930
|
+
# p result.response
|
1931
|
+
# else
|
1932
|
+
# puts "No response received."
|
1933
|
+
# end
|
1934
|
+
#
|
1540
1935
|
def create_restore request, options = nil
|
1541
1936
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1542
1937
|
|
@@ -1619,6 +2014,26 @@ module Google
|
|
1619
2014
|
# @return [::Google::Cloud::GkeBackup::V1::ListRestoresResponse]
|
1620
2015
|
#
|
1621
2016
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2017
|
+
#
|
2018
|
+
# @example Basic example
|
2019
|
+
# require "google/cloud/gke_backup/v1"
|
2020
|
+
#
|
2021
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2022
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2023
|
+
#
|
2024
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2025
|
+
# request = Google::Cloud::GkeBackup::V1::ListRestoresRequest.new
|
2026
|
+
#
|
2027
|
+
# # Call the list_restores method.
|
2028
|
+
# result = client.list_restores request
|
2029
|
+
#
|
2030
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2031
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2032
|
+
# result.each do |item|
|
2033
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::Restore.
|
2034
|
+
# p item
|
2035
|
+
# end
|
2036
|
+
#
|
1622
2037
|
def list_restores request, options = nil
|
1623
2038
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1624
2039
|
|
@@ -1682,6 +2097,22 @@ module Google
|
|
1682
2097
|
# @return [::Google::Cloud::GkeBackup::V1::Restore]
|
1683
2098
|
#
|
1684
2099
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2100
|
+
#
|
2101
|
+
# @example Basic example
|
2102
|
+
# require "google/cloud/gke_backup/v1"
|
2103
|
+
#
|
2104
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2105
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2106
|
+
#
|
2107
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2108
|
+
# request = Google::Cloud::GkeBackup::V1::GetRestoreRequest.new
|
2109
|
+
#
|
2110
|
+
# # Call the get_restore method.
|
2111
|
+
# result = client.get_restore request
|
2112
|
+
#
|
2113
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::Restore.
|
2114
|
+
# p result
|
2115
|
+
#
|
1685
2116
|
def get_restore request, options = nil
|
1686
2117
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1687
2118
|
|
@@ -1754,6 +2185,29 @@ module Google
|
|
1754
2185
|
# @return [::Gapic::Operation]
|
1755
2186
|
#
|
1756
2187
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2188
|
+
#
|
2189
|
+
# @example Basic example
|
2190
|
+
# require "google/cloud/gke_backup/v1"
|
2191
|
+
#
|
2192
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2193
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2194
|
+
#
|
2195
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2196
|
+
# request = Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new
|
2197
|
+
#
|
2198
|
+
# # Call the update_restore method.
|
2199
|
+
# result = client.update_restore request
|
2200
|
+
#
|
2201
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2202
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2203
|
+
# # Here is how to wait for a response.
|
2204
|
+
# result.wait_until_done! timeout: 60
|
2205
|
+
# if result.response?
|
2206
|
+
# p result.response
|
2207
|
+
# else
|
2208
|
+
# puts "No response received."
|
2209
|
+
# end
|
2210
|
+
#
|
1757
2211
|
def update_restore request, options = nil
|
1758
2212
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1759
2213
|
|
@@ -1826,6 +2280,29 @@ module Google
|
|
1826
2280
|
# @return [::Gapic::Operation]
|
1827
2281
|
#
|
1828
2282
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2283
|
+
#
|
2284
|
+
# @example Basic example
|
2285
|
+
# require "google/cloud/gke_backup/v1"
|
2286
|
+
#
|
2287
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2288
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2289
|
+
#
|
2290
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2291
|
+
# request = Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new
|
2292
|
+
#
|
2293
|
+
# # Call the delete_restore method.
|
2294
|
+
# result = client.delete_restore request
|
2295
|
+
#
|
2296
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2297
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2298
|
+
# # Here is how to wait for a response.
|
2299
|
+
# result.wait_until_done! timeout: 60
|
2300
|
+
# if result.response?
|
2301
|
+
# p result.response
|
2302
|
+
# else
|
2303
|
+
# puts "No response received."
|
2304
|
+
# end
|
2305
|
+
#
|
1829
2306
|
def delete_restore request, options = nil
|
1830
2307
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1831
2308
|
|
@@ -1908,6 +2385,26 @@ module Google
|
|
1908
2385
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>]
|
1909
2386
|
#
|
1910
2387
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2388
|
+
#
|
2389
|
+
# @example Basic example
|
2390
|
+
# require "google/cloud/gke_backup/v1"
|
2391
|
+
#
|
2392
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2393
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2394
|
+
#
|
2395
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2396
|
+
# request = Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.new
|
2397
|
+
#
|
2398
|
+
# # Call the list_volume_restores method.
|
2399
|
+
# result = client.list_volume_restores request
|
2400
|
+
#
|
2401
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2402
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2403
|
+
# result.each do |item|
|
2404
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeRestore.
|
2405
|
+
# p item
|
2406
|
+
# end
|
2407
|
+
#
|
1911
2408
|
def list_volume_restores request, options = nil
|
1912
2409
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1913
2410
|
|
@@ -1972,6 +2469,22 @@ module Google
|
|
1972
2469
|
# @return [::Google::Cloud::GkeBackup::V1::VolumeRestore]
|
1973
2470
|
#
|
1974
2471
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2472
|
+
#
|
2473
|
+
# @example Basic example
|
2474
|
+
# require "google/cloud/gke_backup/v1"
|
2475
|
+
#
|
2476
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2477
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2478
|
+
#
|
2479
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2480
|
+
# request = Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new
|
2481
|
+
#
|
2482
|
+
# # Call the get_volume_restore method.
|
2483
|
+
# result = client.get_volume_restore request
|
2484
|
+
#
|
2485
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeRestore.
|
2486
|
+
# p result
|
2487
|
+
#
|
1975
2488
|
def get_volume_restore request, options = nil
|
1976
2489
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1977
2490
|
|
@@ -2037,9 +2550,9 @@ module Google
|
|
2037
2550
|
# end
|
2038
2551
|
#
|
2039
2552
|
# @!attribute [rw] endpoint
|
2040
|
-
#
|
2041
|
-
#
|
2042
|
-
# @return [::String]
|
2553
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
2554
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
2555
|
+
# @return [::String,nil]
|
2043
2556
|
# @!attribute [rw] credentials
|
2044
2557
|
# Credentials to send with calls. You may provide any of the following types:
|
2045
2558
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -2076,13 +2589,20 @@ module Google
|
|
2076
2589
|
# @!attribute [rw] quota_project
|
2077
2590
|
# A separate project against which to charge quota.
|
2078
2591
|
# @return [::String]
|
2592
|
+
# @!attribute [rw] universe_domain
|
2593
|
+
# The universe domain within which to make requests. This determines the
|
2594
|
+
# default endpoint URL. The default value of nil uses the environment
|
2595
|
+
# universe (usually the default "googleapis.com" universe).
|
2596
|
+
# @return [::String,nil]
|
2079
2597
|
#
|
2080
2598
|
class Configuration
|
2081
2599
|
extend ::Gapic::Config
|
2082
2600
|
|
2601
|
+
# @private
|
2602
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
2083
2603
|
DEFAULT_ENDPOINT = "gkebackup.googleapis.com"
|
2084
2604
|
|
2085
|
-
config_attr :endpoint,
|
2605
|
+
config_attr :endpoint, nil, ::String, nil
|
2086
2606
|
config_attr :credentials, nil do |value|
|
2087
2607
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2088
2608
|
allowed.any? { |klass| klass === value }
|
@@ -2094,6 +2614,7 @@ module Google
|
|
2094
2614
|
config_attr :metadata, nil, ::Hash, nil
|
2095
2615
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2096
2616
|
config_attr :quota_project, nil, ::String, nil
|
2617
|
+
config_attr :universe_domain, nil, ::String, nil
|
2097
2618
|
|
2098
2619
|
# @private
|
2099
2620
|
# Overrides for http bindings for the RPCs of this service
|