google-cloud-backupdr-v1 0.2.1 → 0.4.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/README.md +30 -20
- data/lib/google/cloud/backupdr/v1/backupdr/client.rb +2850 -156
- data/lib/google/cloud/backupdr/v1/backupdr/operations.rb +12 -15
- data/lib/google/cloud/backupdr/v1/backupdr/paths.rb +101 -0
- data/lib/google/cloud/backupdr/v1/backupdr/rest/client.rb +2676 -156
- data/lib/google/cloud/backupdr/v1/backupdr/rest/operations.rb +43 -38
- data/lib/google/cloud/backupdr/v1/backupdr/rest/service_stub.rb +1514 -83
- data/lib/google/cloud/backupdr/v1/backupdr_pb.rb +5 -1
- data/lib/google/cloud/backupdr/v1/backupdr_services_pb.rb +48 -0
- data/lib/google/cloud/backupdr/v1/backupplan_pb.rb +62 -0
- data/lib/google/cloud/backupdr/v1/backupplanassociation_pb.rb +59 -0
- data/lib/google/cloud/backupdr/v1/backupvault_ba_pb.rb +46 -0
- data/lib/google/cloud/backupdr/v1/backupvault_gce_pb.rb +87 -0
- data/lib/google/cloud/backupdr/v1/backupvault_pb.rb +99 -0
- data/lib/google/cloud/backupdr/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/cloud/backupdr/v1/backupdr.rb +11 -10
- data/proto_docs/google/cloud/backupdr/v1/backupplan.rb +414 -0
- data/proto_docs/google/cloud/backupdr/v1/backupplanassociation.rb +272 -0
- data/proto_docs/google/cloud/backupdr/v1/backupvault.rb +1103 -0
- data/proto_docs/google/cloud/backupdr/v1/backupvault_ba.rb +47 -0
- data/proto_docs/google/cloud/backupdr/v1/backupvault_gce.rb +993 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- data/proto_docs/google/type/dayofweek.rb +49 -0
- data/proto_docs/google/type/month.rb +64 -0
- metadata +18 -5
@@ -88,6 +88,59 @@ module Google
|
|
88
88
|
|
89
89
|
default_config.rpcs.delete_management_server.timeout = 60.0
|
90
90
|
|
91
|
+
default_config.rpcs.create_backup_vault.timeout = 60.0
|
92
|
+
default_config.rpcs.create_backup_vault.retry_policy = {
|
93
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
94
|
+
}
|
95
|
+
|
96
|
+
default_config.rpcs.list_backup_vaults.timeout = 60.0
|
97
|
+
default_config.rpcs.list_backup_vaults.retry_policy = {
|
98
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
99
|
+
}
|
100
|
+
|
101
|
+
default_config.rpcs.fetch_usable_backup_vaults.timeout = 60.0
|
102
|
+
default_config.rpcs.fetch_usable_backup_vaults.retry_policy = {
|
103
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
104
|
+
}
|
105
|
+
|
106
|
+
default_config.rpcs.get_backup_vault.timeout = 60.0
|
107
|
+
default_config.rpcs.get_backup_vault.retry_policy = {
|
108
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
109
|
+
}
|
110
|
+
|
111
|
+
default_config.rpcs.update_backup_vault.timeout = 60.0
|
112
|
+
|
113
|
+
default_config.rpcs.delete_backup_vault.timeout = 60.0
|
114
|
+
default_config.rpcs.delete_backup_vault.retry_policy = {
|
115
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
116
|
+
}
|
117
|
+
|
118
|
+
default_config.rpcs.list_data_sources.timeout = 60.0
|
119
|
+
default_config.rpcs.list_data_sources.retry_policy = {
|
120
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
121
|
+
}
|
122
|
+
|
123
|
+
default_config.rpcs.get_data_source.timeout = 60.0
|
124
|
+
default_config.rpcs.get_data_source.retry_policy = {
|
125
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
126
|
+
}
|
127
|
+
|
128
|
+
default_config.rpcs.update_data_source.timeout = 60.0
|
129
|
+
|
130
|
+
default_config.rpcs.list_backups.timeout = 60.0
|
131
|
+
default_config.rpcs.list_backups.retry_policy = {
|
132
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
133
|
+
}
|
134
|
+
|
135
|
+
default_config.rpcs.get_backup.timeout = 60.0
|
136
|
+
default_config.rpcs.get_backup.retry_policy = {
|
137
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
138
|
+
}
|
139
|
+
|
140
|
+
default_config.rpcs.update_backup.timeout = 60.0
|
141
|
+
|
142
|
+
default_config.rpcs.restore_backup.timeout = 60.0
|
143
|
+
|
91
144
|
default_config
|
92
145
|
end
|
93
146
|
yield @configure if block_given?
|
@@ -173,15 +226,27 @@ module Google
|
|
173
226
|
endpoint: @config.endpoint,
|
174
227
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
175
228
|
universe_domain: @config.universe_domain,
|
176
|
-
credentials: credentials
|
229
|
+
credentials: credentials,
|
230
|
+
logger: @config.logger
|
177
231
|
)
|
178
232
|
|
233
|
+
@backup_dr_stub.logger(stub: true)&.info do |entry|
|
234
|
+
entry.set_system_name
|
235
|
+
entry.set_service
|
236
|
+
entry.message = "Created client for #{entry.service}"
|
237
|
+
entry.set_credentials_fields credentials
|
238
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
239
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
240
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
241
|
+
end
|
242
|
+
|
179
243
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
180
244
|
config.credentials = credentials
|
181
245
|
config.quota_project = @quota_project_id
|
182
246
|
config.endpoint = @backup_dr_stub.endpoint
|
183
247
|
config.universe_domain = @backup_dr_stub.universe_domain
|
184
248
|
config.bindings_override = @config.bindings_override
|
249
|
+
config.logger = @backup_dr_stub.logger if config.respond_to? :logger=
|
185
250
|
end
|
186
251
|
|
187
252
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -190,6 +255,7 @@ module Google
|
|
190
255
|
config.endpoint = @backup_dr_stub.endpoint
|
191
256
|
config.universe_domain = @backup_dr_stub.universe_domain
|
192
257
|
config.bindings_override = @config.bindings_override
|
258
|
+
config.logger = @backup_dr_stub.logger if config.respond_to? :logger=
|
193
259
|
end
|
194
260
|
end
|
195
261
|
|
@@ -214,6 +280,15 @@ module Google
|
|
214
280
|
#
|
215
281
|
attr_reader :iam_policy_client
|
216
282
|
|
283
|
+
##
|
284
|
+
# The logger used for request/response debug logging.
|
285
|
+
#
|
286
|
+
# @return [Logger]
|
287
|
+
#
|
288
|
+
def logger
|
289
|
+
@backup_dr_stub.logger
|
290
|
+
end
|
291
|
+
|
217
292
|
# Service calls
|
218
293
|
|
219
294
|
##
|
@@ -236,10 +311,11 @@ module Google
|
|
236
311
|
#
|
237
312
|
# @param parent [::String]
|
238
313
|
# Required. The project and location for which to retrieve management servers
|
239
|
-
# information, in the format
|
240
|
-
# Cloud BackupDR, locations map to
|
241
|
-
# To retrieve management servers for all locations, use "-"
|
242
|
-
#
|
314
|
+
# information, in the format 'projects/\\{project_id}/locations/\\{location}'. In
|
315
|
+
# Cloud BackupDR, locations map to Google Cloud regions, for example
|
316
|
+
# **us-central1**. To retrieve management servers for all locations, use "-"
|
317
|
+
# for the
|
318
|
+
# '\\{location}' value.
|
243
319
|
# @param page_size [::Integer]
|
244
320
|
# Optional. Requested page size. Server may return fewer items than
|
245
321
|
# requested. If unspecified, server will pick an appropriate default.
|
@@ -306,7 +382,6 @@ module Google
|
|
306
382
|
|
307
383
|
@backup_dr_stub.list_management_servers request, options do |result, operation|
|
308
384
|
yield result, operation if block_given?
|
309
|
-
return result
|
310
385
|
end
|
311
386
|
rescue ::Gapic::Rest::Error => e
|
312
387
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -332,7 +407,7 @@ module Google
|
|
332
407
|
#
|
333
408
|
# @param name [::String]
|
334
409
|
# Required. Name of the management server resource name, in the format
|
335
|
-
#
|
410
|
+
# 'projects/\\{project_id}/locations/\\{location}/managementServers/\\{resource_name}'
|
336
411
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
337
412
|
# @yieldparam result [::Google::Cloud::BackupDR::V1::ManagementServer]
|
338
413
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -386,7 +461,6 @@ module Google
|
|
386
461
|
|
387
462
|
@backup_dr_stub.get_management_server request, options do |result, operation|
|
388
463
|
yield result, operation if block_given?
|
389
|
-
return result
|
390
464
|
end
|
391
465
|
rescue ::Gapic::Rest::Error => e
|
392
466
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -412,8 +486,8 @@ module Google
|
|
412
486
|
#
|
413
487
|
# @param parent [::String]
|
414
488
|
# Required. The management server project and location in the format
|
415
|
-
#
|
416
|
-
# locations map to
|
489
|
+
# 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR
|
490
|
+
# locations map to Google Cloud regions, for example **us-central1**.
|
417
491
|
# @param management_server_id [::String]
|
418
492
|
# Required. The name of the management server to create. The name must be
|
419
493
|
# unique for the specified project and location.
|
@@ -495,7 +569,7 @@ module Google
|
|
495
569
|
@backup_dr_stub.create_management_server request, options do |result, operation|
|
496
570
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
497
571
|
yield result, operation if block_given?
|
498
|
-
|
572
|
+
throw :response, result
|
499
573
|
end
|
500
574
|
rescue ::Gapic::Rest::Error => e
|
501
575
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -596,172 +670,2572 @@ module Google
|
|
596
670
|
@backup_dr_stub.delete_management_server request, options do |result, operation|
|
597
671
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
598
672
|
yield result, operation if block_given?
|
599
|
-
|
673
|
+
throw :response, result
|
600
674
|
end
|
601
675
|
rescue ::Gapic::Rest::Error => e
|
602
676
|
raise ::Google::Cloud::Error.from_error(e)
|
603
677
|
end
|
604
678
|
|
605
679
|
##
|
606
|
-
#
|
680
|
+
# Creates a new BackupVault in a given project and location.
|
607
681
|
#
|
608
|
-
#
|
609
|
-
#
|
610
|
-
#
|
611
|
-
# applied individually to specific RPCs. See
|
612
|
-
# {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration::Rpcs}
|
613
|
-
# for a list of RPCs that can be configured independently.
|
682
|
+
# @overload create_backup_vault(request, options = nil)
|
683
|
+
# Pass arguments to `create_backup_vault` via a request object, either of type
|
684
|
+
# {::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest} or an equivalent Hash.
|
614
685
|
#
|
615
|
-
#
|
616
|
-
#
|
686
|
+
# @param request [::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::Hash]
|
687
|
+
# A request object representing the call parameters. Required. To specify no
|
688
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
689
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
690
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
617
691
|
#
|
618
|
-
# @
|
692
|
+
# @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil)
|
693
|
+
# Pass arguments to `create_backup_vault` via keyword arguments. Note that at
|
694
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
695
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
619
696
|
#
|
620
|
-
#
|
621
|
-
#
|
622
|
-
#
|
623
|
-
#
|
624
|
-
#
|
625
|
-
#
|
626
|
-
#
|
697
|
+
# @param parent [::String]
|
698
|
+
# Required. Value for parent.
|
699
|
+
# @param backup_vault_id [::String]
|
700
|
+
# Required. ID of the requesting object
|
701
|
+
# If auto-generating ID server-side, remove this field and
|
702
|
+
# backup_vault_id from the method_signature of Create RPC
|
703
|
+
# @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash]
|
704
|
+
# Required. The resource being created
|
705
|
+
# @param request_id [::String]
|
706
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
707
|
+
# request ID so that if you must retry your request, the server will know to
|
708
|
+
# ignore the request if it has already been completed. The server will
|
709
|
+
# guarantee that for at least 60 minutes since the first request.
|
627
710
|
#
|
628
|
-
#
|
629
|
-
#
|
630
|
-
#
|
631
|
-
#
|
632
|
-
#
|
711
|
+
# For example, consider a situation where you make an initial request and
|
712
|
+
# the request times out. If you make the request again with the same request
|
713
|
+
# ID, the server can check if original operation with the same request ID
|
714
|
+
# was received, and if so, will ignore the second request. This prevents
|
715
|
+
# clients from accidentally creating duplicate commitments.
|
633
716
|
#
|
634
|
-
#
|
635
|
-
#
|
636
|
-
#
|
637
|
-
#
|
638
|
-
#
|
639
|
-
#
|
640
|
-
#
|
641
|
-
#
|
642
|
-
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
643
|
-
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
644
|
-
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
645
|
-
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
646
|
-
# * (`nil`) indicating no credentials
|
647
|
-
# @return [::Object]
|
648
|
-
# @!attribute [rw] scope
|
649
|
-
# The OAuth scopes
|
650
|
-
# @return [::Array<::String>]
|
651
|
-
# @!attribute [rw] lib_name
|
652
|
-
# The library name as recorded in instrumentation and logging
|
653
|
-
# @return [::String]
|
654
|
-
# @!attribute [rw] lib_version
|
655
|
-
# The library version as recorded in instrumentation and logging
|
656
|
-
# @return [::String]
|
657
|
-
# @!attribute [rw] timeout
|
658
|
-
# The call timeout in seconds.
|
659
|
-
# @return [::Numeric]
|
660
|
-
# @!attribute [rw] metadata
|
661
|
-
# Additional headers to be sent with the call.
|
662
|
-
# @return [::Hash{::Symbol=>::String}]
|
663
|
-
# @!attribute [rw] retry_policy
|
664
|
-
# The retry policy. The value is a hash with the following keys:
|
665
|
-
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
666
|
-
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
667
|
-
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
668
|
-
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
669
|
-
# trigger a retry.
|
670
|
-
# @return [::Hash]
|
671
|
-
# @!attribute [rw] quota_project
|
672
|
-
# A separate project against which to charge quota.
|
673
|
-
# @return [::String]
|
674
|
-
# @!attribute [rw] universe_domain
|
675
|
-
# The universe domain within which to make requests. This determines the
|
676
|
-
# default endpoint URL. The default value of nil uses the environment
|
677
|
-
# universe (usually the default "googleapis.com" universe).
|
678
|
-
# @return [::String,nil]
|
717
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
718
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
719
|
+
# @param validate_only [::Boolean]
|
720
|
+
# Optional. Only validate the request, but do not perform mutations.
|
721
|
+
# The default is 'false'.
|
722
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
723
|
+
# @yieldparam result [::Gapic::Operation]
|
724
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
679
725
|
#
|
680
|
-
|
681
|
-
|
726
|
+
# @return [::Gapic::Operation]
|
727
|
+
#
|
728
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
729
|
+
#
|
730
|
+
# @example Basic example
|
731
|
+
# require "google/cloud/backupdr/v1"
|
732
|
+
#
|
733
|
+
# # Create a client object. The client can be reused for multiple calls.
|
734
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
735
|
+
#
|
736
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
737
|
+
# request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new
|
738
|
+
#
|
739
|
+
# # Call the create_backup_vault method.
|
740
|
+
# result = client.create_backup_vault request
|
741
|
+
#
|
742
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
743
|
+
# # check the status of an operation, cancel it, or wait for results.
|
744
|
+
# # Here is how to wait for a response.
|
745
|
+
# result.wait_until_done! timeout: 60
|
746
|
+
# if result.response?
|
747
|
+
# p result.response
|
748
|
+
# else
|
749
|
+
# puts "No response received."
|
750
|
+
# end
|
751
|
+
#
|
752
|
+
def create_backup_vault request, options = nil
|
753
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
682
754
|
|
683
|
-
|
684
|
-
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
685
|
-
DEFAULT_ENDPOINT = "backupdr.googleapis.com"
|
755
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest
|
686
756
|
|
687
|
-
|
688
|
-
|
689
|
-
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
690
|
-
allowed.any? { |klass| klass === value }
|
691
|
-
end
|
692
|
-
config_attr :scope, nil, ::String, ::Array, nil
|
693
|
-
config_attr :lib_name, nil, ::String, nil
|
694
|
-
config_attr :lib_version, nil, ::String, nil
|
695
|
-
config_attr :timeout, nil, ::Numeric, nil
|
696
|
-
config_attr :metadata, nil, ::Hash, nil
|
697
|
-
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
698
|
-
config_attr :quota_project, nil, ::String, nil
|
699
|
-
config_attr :universe_domain, nil, ::String, nil
|
757
|
+
# Converts hash and nil to an options object
|
758
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
700
759
|
|
701
|
-
#
|
702
|
-
|
703
|
-
# are only used when this service is used as mixin, and only
|
704
|
-
# by the host service.
|
705
|
-
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
706
|
-
config_attr :bindings_override, {}, ::Hash, nil
|
760
|
+
# Customize the options with defaults
|
761
|
+
call_metadata = @config.rpcs.create_backup_vault.metadata.to_h
|
707
762
|
|
708
|
-
#
|
709
|
-
|
710
|
-
@
|
763
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
764
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
765
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
766
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
767
|
+
transports_version_send: [:rest]
|
711
768
|
|
712
|
-
|
713
|
-
|
769
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
770
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
714
771
|
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
772
|
+
options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout,
|
773
|
+
metadata: call_metadata,
|
774
|
+
retry_policy: @config.rpcs.create_backup_vault.retry_policy
|
775
|
+
|
776
|
+
options.apply_defaults timeout: @config.timeout,
|
777
|
+
metadata: @config.metadata,
|
778
|
+
retry_policy: @config.retry_policy
|
779
|
+
|
780
|
+
@backup_dr_stub.create_backup_vault request, options do |result, operation|
|
781
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
782
|
+
yield result, operation if block_given?
|
783
|
+
throw :response, result
|
725
784
|
end
|
785
|
+
rescue ::Gapic::Rest::Error => e
|
786
|
+
raise ::Google::Cloud::Error.from_error(e)
|
787
|
+
end
|
726
788
|
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
789
|
+
##
|
790
|
+
# Lists BackupVaults in a given project and location.
|
791
|
+
#
|
792
|
+
# @overload list_backup_vaults(request, options = nil)
|
793
|
+
# Pass arguments to `list_backup_vaults` via a request object, either of type
|
794
|
+
# {::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest} or an equivalent Hash.
|
795
|
+
#
|
796
|
+
# @param request [::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::Hash]
|
797
|
+
# A request object representing the call parameters. Required. To specify no
|
798
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
799
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
800
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
801
|
+
#
|
802
|
+
# @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil)
|
803
|
+
# Pass arguments to `list_backup_vaults` via keyword arguments. Note that at
|
804
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
805
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
806
|
+
#
|
807
|
+
# @param parent [::String]
|
808
|
+
# Required. The project and location for which to retrieve backupvault stores
|
809
|
+
# information, in the format 'projects/\\{project_id}/locations/\\{location}'. In
|
810
|
+
# Cloud Backup and DR, locations map to Google Cloud regions, for example
|
811
|
+
# **us-central1**.
|
812
|
+
# To retrieve backupvault stores for all locations, use "-" for the
|
813
|
+
# '\\{location}' value.
|
814
|
+
# @param page_size [::Integer]
|
815
|
+
# Optional. Requested page size. Server may return fewer items than
|
816
|
+
# requested. If unspecified, server will pick an appropriate default.
|
817
|
+
# @param page_token [::String]
|
818
|
+
# Optional. A token identifying a page of results the server should return.
|
819
|
+
# @param filter [::String]
|
820
|
+
# Optional. Filtering results.
|
821
|
+
# @param order_by [::String]
|
822
|
+
# Optional. Hint for how to order the results.
|
823
|
+
# @param view [::Google::Cloud::BackupDR::V1::BackupVaultView]
|
824
|
+
# Optional. Reserved for future use to provide a BASIC & FULL view of Backup
|
825
|
+
# Vault.
|
826
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
827
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse]
|
828
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
829
|
+
#
|
830
|
+
# @return [::Google::Cloud::BackupDR::V1::ListBackupVaultsResponse]
|
831
|
+
#
|
832
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
833
|
+
#
|
834
|
+
# @example Basic example
|
835
|
+
# require "google/cloud/backupdr/v1"
|
836
|
+
#
|
837
|
+
# # Create a client object. The client can be reused for multiple calls.
|
838
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
839
|
+
#
|
840
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
841
|
+
# request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new
|
842
|
+
#
|
843
|
+
# # Call the list_backup_vaults method.
|
844
|
+
# result = client.list_backup_vaults request
|
845
|
+
#
|
846
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
847
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
848
|
+
# result.each do |item|
|
849
|
+
# # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault.
|
850
|
+
# p item
|
851
|
+
# end
|
852
|
+
#
|
853
|
+
def list_backup_vaults request, options = nil
|
854
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
855
|
+
|
856
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest
|
857
|
+
|
858
|
+
# Converts hash and nil to an options object
|
859
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
860
|
+
|
861
|
+
# Customize the options with defaults
|
862
|
+
call_metadata = @config.rpcs.list_backup_vaults.metadata.to_h
|
863
|
+
|
864
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
865
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
866
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
867
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
868
|
+
transports_version_send: [:rest]
|
869
|
+
|
870
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
871
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
872
|
+
|
873
|
+
options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout,
|
874
|
+
metadata: call_metadata,
|
875
|
+
retry_policy: @config.rpcs.list_backup_vaults.retry_policy
|
876
|
+
|
877
|
+
options.apply_defaults timeout: @config.timeout,
|
878
|
+
metadata: @config.metadata,
|
879
|
+
retry_policy: @config.retry_policy
|
880
|
+
|
881
|
+
@backup_dr_stub.list_backup_vaults request, options do |result, operation|
|
882
|
+
yield result, operation if block_given?
|
883
|
+
end
|
884
|
+
rescue ::Gapic::Rest::Error => e
|
885
|
+
raise ::Google::Cloud::Error.from_error(e)
|
886
|
+
end
|
887
|
+
|
888
|
+
##
|
889
|
+
# FetchUsableBackupVaults lists usable BackupVaults in a given project and
|
890
|
+
# location. Usable BackupVault are the ones that user has
|
891
|
+
# backupdr.backupVaults.get permission.
|
892
|
+
#
|
893
|
+
# @overload fetch_usable_backup_vaults(request, options = nil)
|
894
|
+
# Pass arguments to `fetch_usable_backup_vaults` via a request object, either of type
|
895
|
+
# {::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest} or an equivalent Hash.
|
896
|
+
#
|
897
|
+
# @param request [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::Hash]
|
898
|
+
# A request object representing the call parameters. Required. To specify no
|
899
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
900
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
901
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
902
|
+
#
|
903
|
+
# @overload fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
904
|
+
# Pass arguments to `fetch_usable_backup_vaults` via keyword arguments. Note that at
|
905
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
906
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
907
|
+
#
|
908
|
+
# @param parent [::String]
|
909
|
+
# Required. The project and location for which to retrieve backupvault stores
|
910
|
+
# information, in the format 'projects/\\{project_id}/locations/\\{location}'. In
|
911
|
+
# Cloud Backup and DR, locations map to Google Cloud regions, for example
|
912
|
+
# **us-central1**.
|
913
|
+
# To retrieve backupvault stores for all locations, use "-" for the
|
914
|
+
# '\\{location}' value.
|
915
|
+
# @param page_size [::Integer]
|
916
|
+
# Optional. Requested page size. Server may return fewer items than
|
917
|
+
# requested. If unspecified, server will pick an appropriate default.
|
918
|
+
# @param page_token [::String]
|
919
|
+
# Optional. A token identifying a page of results the server should return.
|
920
|
+
# @param filter [::String]
|
921
|
+
# Optional. Filtering results.
|
922
|
+
# @param order_by [::String]
|
923
|
+
# Optional. Hint for how to order the results.
|
924
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
925
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse]
|
926
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
927
|
+
#
|
928
|
+
# @return [::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsResponse]
|
929
|
+
#
|
930
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
931
|
+
#
|
932
|
+
# @example Basic example
|
933
|
+
# require "google/cloud/backupdr/v1"
|
934
|
+
#
|
935
|
+
# # Create a client object. The client can be reused for multiple calls.
|
936
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
937
|
+
#
|
938
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
939
|
+
# request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new
|
940
|
+
#
|
941
|
+
# # Call the fetch_usable_backup_vaults method.
|
942
|
+
# result = client.fetch_usable_backup_vaults request
|
943
|
+
#
|
944
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
945
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
946
|
+
# result.each do |item|
|
947
|
+
# # Each element is of type ::Google::Cloud::BackupDR::V1::BackupVault.
|
948
|
+
# p item
|
949
|
+
# end
|
950
|
+
#
|
951
|
+
def fetch_usable_backup_vaults request, options = nil
|
952
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
953
|
+
|
954
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest
|
955
|
+
|
956
|
+
# Converts hash and nil to an options object
|
957
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
958
|
+
|
959
|
+
# Customize the options with defaults
|
960
|
+
call_metadata = @config.rpcs.fetch_usable_backup_vaults.metadata.to_h
|
961
|
+
|
962
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
963
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
964
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
965
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
966
|
+
transports_version_send: [:rest]
|
967
|
+
|
968
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
969
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
970
|
+
|
971
|
+
options.apply_defaults timeout: @config.rpcs.fetch_usable_backup_vaults.timeout,
|
972
|
+
metadata: call_metadata,
|
973
|
+
retry_policy: @config.rpcs.fetch_usable_backup_vaults.retry_policy
|
974
|
+
|
975
|
+
options.apply_defaults timeout: @config.timeout,
|
976
|
+
metadata: @config.metadata,
|
977
|
+
retry_policy: @config.retry_policy
|
978
|
+
|
979
|
+
@backup_dr_stub.fetch_usable_backup_vaults request, options do |result, operation|
|
980
|
+
yield result, operation if block_given?
|
981
|
+
end
|
982
|
+
rescue ::Gapic::Rest::Error => e
|
983
|
+
raise ::Google::Cloud::Error.from_error(e)
|
984
|
+
end
|
985
|
+
|
986
|
+
##
|
987
|
+
# Gets details of a BackupVault.
|
988
|
+
#
|
989
|
+
# @overload get_backup_vault(request, options = nil)
|
990
|
+
# Pass arguments to `get_backup_vault` via a request object, either of type
|
991
|
+
# {::Google::Cloud::BackupDR::V1::GetBackupVaultRequest} or an equivalent Hash.
|
992
|
+
#
|
993
|
+
# @param request [::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::Hash]
|
994
|
+
# A request object representing the call parameters. Required. To specify no
|
995
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
996
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
997
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
998
|
+
#
|
999
|
+
# @overload get_backup_vault(name: nil, view: nil)
|
1000
|
+
# Pass arguments to `get_backup_vault` via keyword arguments. Note that at
|
1001
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1002
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1003
|
+
#
|
1004
|
+
# @param name [::String]
|
1005
|
+
# Required. Name of the backupvault store resource name, in the format
|
1006
|
+
# 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}'
|
1007
|
+
# @param view [::Google::Cloud::BackupDR::V1::BackupVaultView]
|
1008
|
+
# Optional. Reserved for future use to provide a BASIC & FULL view of Backup
|
1009
|
+
# Vault
|
1010
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1011
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::BackupVault]
|
1012
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1013
|
+
#
|
1014
|
+
# @return [::Google::Cloud::BackupDR::V1::BackupVault]
|
1015
|
+
#
|
1016
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1017
|
+
#
|
1018
|
+
# @example Basic example
|
1019
|
+
# require "google/cloud/backupdr/v1"
|
1020
|
+
#
|
1021
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1022
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
1023
|
+
#
|
1024
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1025
|
+
# request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new
|
1026
|
+
#
|
1027
|
+
# # Call the get_backup_vault method.
|
1028
|
+
# result = client.get_backup_vault request
|
1029
|
+
#
|
1030
|
+
# # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault.
|
1031
|
+
# p result
|
1032
|
+
#
|
1033
|
+
def get_backup_vault request, options = nil
|
1034
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1035
|
+
|
1036
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupVaultRequest
|
1037
|
+
|
1038
|
+
# Converts hash and nil to an options object
|
1039
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1040
|
+
|
1041
|
+
# Customize the options with defaults
|
1042
|
+
call_metadata = @config.rpcs.get_backup_vault.metadata.to_h
|
1043
|
+
|
1044
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1045
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1046
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1047
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
1048
|
+
transports_version_send: [:rest]
|
1049
|
+
|
1050
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1051
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1052
|
+
|
1053
|
+
options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout,
|
1054
|
+
metadata: call_metadata,
|
1055
|
+
retry_policy: @config.rpcs.get_backup_vault.retry_policy
|
1056
|
+
|
1057
|
+
options.apply_defaults timeout: @config.timeout,
|
1058
|
+
metadata: @config.metadata,
|
1059
|
+
retry_policy: @config.retry_policy
|
1060
|
+
|
1061
|
+
@backup_dr_stub.get_backup_vault request, options do |result, operation|
|
1062
|
+
yield result, operation if block_given?
|
1063
|
+
end
|
1064
|
+
rescue ::Gapic::Rest::Error => e
|
1065
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1066
|
+
end
|
1067
|
+
|
1068
|
+
##
|
1069
|
+
# Updates the settings of a BackupVault.
|
1070
|
+
#
|
1071
|
+
# @overload update_backup_vault(request, options = nil)
|
1072
|
+
# Pass arguments to `update_backup_vault` via a request object, either of type
|
1073
|
+
# {::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest} or an equivalent Hash.
|
1074
|
+
#
|
1075
|
+
# @param request [::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::Hash]
|
1076
|
+
# A request object representing the call parameters. Required. To specify no
|
1077
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1078
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1079
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1080
|
+
#
|
1081
|
+
# @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil)
|
1082
|
+
# Pass arguments to `update_backup_vault` via keyword arguments. Note that at
|
1083
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1084
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1085
|
+
#
|
1086
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1087
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
1088
|
+
# BackupVault resource by the update.
|
1089
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1090
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
1091
|
+
# user does not provide a mask then the request will fail.
|
1092
|
+
# @param backup_vault [::Google::Cloud::BackupDR::V1::BackupVault, ::Hash]
|
1093
|
+
# Required. The resource being updated
|
1094
|
+
# @param request_id [::String]
|
1095
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1096
|
+
# request ID so that if you must retry your request, the server will know to
|
1097
|
+
# ignore the request if it has already been completed. The server will
|
1098
|
+
# guarantee that for at least 60 minutes since the first request.
|
1099
|
+
#
|
1100
|
+
# For example, consider a situation where you make an initial request and
|
1101
|
+
# the request times out. If you make the request again with the same request
|
1102
|
+
# ID, the server can check if original operation with the same request ID
|
1103
|
+
# was received, and if so, will ignore the second request. This prevents
|
1104
|
+
# clients from accidentally creating duplicate commitments.
|
1105
|
+
#
|
1106
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1107
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1108
|
+
# @param validate_only [::Boolean]
|
1109
|
+
# Optional. Only validate the request, but do not perform mutations.
|
1110
|
+
# The default is 'false'.
|
1111
|
+
# @param force [::Boolean]
|
1112
|
+
# Optional. If set to true, will not check plan duration against backup vault
|
1113
|
+
# enforcement duration.
|
1114
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1115
|
+
# @yieldparam result [::Gapic::Operation]
|
1116
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1117
|
+
#
|
1118
|
+
# @return [::Gapic::Operation]
|
1119
|
+
#
|
1120
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1121
|
+
#
|
1122
|
+
# @example Basic example
|
1123
|
+
# require "google/cloud/backupdr/v1"
|
1124
|
+
#
|
1125
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1126
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
1127
|
+
#
|
1128
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1129
|
+
# request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new
|
1130
|
+
#
|
1131
|
+
# # Call the update_backup_vault method.
|
1132
|
+
# result = client.update_backup_vault request
|
1133
|
+
#
|
1134
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1135
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1136
|
+
# # Here is how to wait for a response.
|
1137
|
+
# result.wait_until_done! timeout: 60
|
1138
|
+
# if result.response?
|
1139
|
+
# p result.response
|
1140
|
+
# else
|
1141
|
+
# puts "No response received."
|
1142
|
+
# end
|
1143
|
+
#
|
1144
|
+
def update_backup_vault request, options = nil
|
1145
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1146
|
+
|
1147
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest
|
1148
|
+
|
1149
|
+
# Converts hash and nil to an options object
|
1150
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1151
|
+
|
1152
|
+
# Customize the options with defaults
|
1153
|
+
call_metadata = @config.rpcs.update_backup_vault.metadata.to_h
|
1154
|
+
|
1155
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1156
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1157
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1158
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
1159
|
+
transports_version_send: [:rest]
|
1160
|
+
|
1161
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1162
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1163
|
+
|
1164
|
+
options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout,
|
1165
|
+
metadata: call_metadata,
|
1166
|
+
retry_policy: @config.rpcs.update_backup_vault.retry_policy
|
1167
|
+
|
1168
|
+
options.apply_defaults timeout: @config.timeout,
|
1169
|
+
metadata: @config.metadata,
|
1170
|
+
retry_policy: @config.retry_policy
|
1171
|
+
|
1172
|
+
@backup_dr_stub.update_backup_vault request, options do |result, operation|
|
1173
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1174
|
+
yield result, operation if block_given?
|
1175
|
+
throw :response, result
|
1176
|
+
end
|
1177
|
+
rescue ::Gapic::Rest::Error => e
|
1178
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1179
|
+
end
|
1180
|
+
|
1181
|
+
##
|
1182
|
+
# Deletes a BackupVault.
|
1183
|
+
#
|
1184
|
+
# @overload delete_backup_vault(request, options = nil)
|
1185
|
+
# Pass arguments to `delete_backup_vault` via a request object, either of type
|
1186
|
+
# {::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest} or an equivalent Hash.
|
1187
|
+
#
|
1188
|
+
# @param request [::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::Hash]
|
1189
|
+
# A request object representing the call parameters. Required. To specify no
|
1190
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1191
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1192
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1193
|
+
#
|
1194
|
+
# @overload delete_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil)
|
1195
|
+
# Pass arguments to `delete_backup_vault` via keyword arguments. Note that at
|
1196
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1197
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1198
|
+
#
|
1199
|
+
# @param name [::String]
|
1200
|
+
# Required. Name of the resource.
|
1201
|
+
# @param request_id [::String]
|
1202
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1203
|
+
# request ID so that if you must retry your request, the server will know to
|
1204
|
+
# ignore the request if it has already been completed. The server will
|
1205
|
+
# guarantee that for at least 60 minutes after the first request.
|
1206
|
+
#
|
1207
|
+
# For example, consider a situation where you make an initial request and
|
1208
|
+
# the request times out. If you make the request again with the same request
|
1209
|
+
# ID, the server can check if original operation with the same request ID
|
1210
|
+
# was received, and if so, will ignore the second request. This prevents
|
1211
|
+
# clients from accidentally creating duplicate commitments.
|
1212
|
+
#
|
1213
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1214
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1215
|
+
# @param force [::Boolean]
|
1216
|
+
# Optional. If set to true, any data source from this backup vault will also
|
1217
|
+
# be deleted.
|
1218
|
+
# @param etag [::String]
|
1219
|
+
# The current etag of the backup vault.
|
1220
|
+
# If an etag is provided and does not match the current etag of the
|
1221
|
+
# connection, deletion will be blocked.
|
1222
|
+
# @param validate_only [::Boolean]
|
1223
|
+
# Optional. Only validate the request, but do not perform mutations.
|
1224
|
+
# The default is 'false'.
|
1225
|
+
# @param allow_missing [::Boolean]
|
1226
|
+
# Optional. If true and the BackupVault is not found, the request will
|
1227
|
+
# succeed but no action will be taken.
|
1228
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1229
|
+
# @yieldparam result [::Gapic::Operation]
|
1230
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1231
|
+
#
|
1232
|
+
# @return [::Gapic::Operation]
|
1233
|
+
#
|
1234
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1235
|
+
#
|
1236
|
+
# @example Basic example
|
1237
|
+
# require "google/cloud/backupdr/v1"
|
1238
|
+
#
|
1239
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1240
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
1241
|
+
#
|
1242
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1243
|
+
# request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new
|
1244
|
+
#
|
1245
|
+
# # Call the delete_backup_vault method.
|
1246
|
+
# result = client.delete_backup_vault request
|
1247
|
+
#
|
1248
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1249
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1250
|
+
# # Here is how to wait for a response.
|
1251
|
+
# result.wait_until_done! timeout: 60
|
1252
|
+
# if result.response?
|
1253
|
+
# p result.response
|
1254
|
+
# else
|
1255
|
+
# puts "No response received."
|
1256
|
+
# end
|
1257
|
+
#
|
1258
|
+
def delete_backup_vault request, options = nil
|
1259
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1260
|
+
|
1261
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest
|
1262
|
+
|
1263
|
+
# Converts hash and nil to an options object
|
1264
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1265
|
+
|
1266
|
+
# Customize the options with defaults
|
1267
|
+
call_metadata = @config.rpcs.delete_backup_vault.metadata.to_h
|
1268
|
+
|
1269
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1270
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1271
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1272
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
1273
|
+
transports_version_send: [:rest]
|
1274
|
+
|
1275
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1276
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1277
|
+
|
1278
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout,
|
1279
|
+
metadata: call_metadata,
|
1280
|
+
retry_policy: @config.rpcs.delete_backup_vault.retry_policy
|
1281
|
+
|
1282
|
+
options.apply_defaults timeout: @config.timeout,
|
1283
|
+
metadata: @config.metadata,
|
1284
|
+
retry_policy: @config.retry_policy
|
1285
|
+
|
1286
|
+
@backup_dr_stub.delete_backup_vault request, options do |result, operation|
|
1287
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1288
|
+
yield result, operation if block_given?
|
1289
|
+
throw :response, result
|
1290
|
+
end
|
1291
|
+
rescue ::Gapic::Rest::Error => e
|
1292
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1293
|
+
end
|
1294
|
+
|
1295
|
+
##
|
1296
|
+
# Lists DataSources in a given project and location.
|
1297
|
+
#
|
1298
|
+
# @overload list_data_sources(request, options = nil)
|
1299
|
+
# Pass arguments to `list_data_sources` via a request object, either of type
|
1300
|
+
# {::Google::Cloud::BackupDR::V1::ListDataSourcesRequest} or an equivalent Hash.
|
1301
|
+
#
|
1302
|
+
# @param request [::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::Hash]
|
1303
|
+
# A request object representing the call parameters. Required. To specify no
|
1304
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1305
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1306
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1307
|
+
#
|
1308
|
+
# @overload list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1309
|
+
# Pass arguments to `list_data_sources` via keyword arguments. Note that at
|
1310
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1311
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1312
|
+
#
|
1313
|
+
# @param parent [::String]
|
1314
|
+
# Required. The project and location for which to retrieve data
|
1315
|
+
# sources information, in the format
|
1316
|
+
# 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR,
|
1317
|
+
# locations map to Google Cloud regions, for example **us-central1**.
|
1318
|
+
# To retrieve data sources for all locations, use "-" for the
|
1319
|
+
# '\\{location}' value.
|
1320
|
+
# @param page_size [::Integer]
|
1321
|
+
# Optional. Requested page size. Server may return fewer items than
|
1322
|
+
# requested. If unspecified, server will pick an appropriate default.
|
1323
|
+
# @param page_token [::String]
|
1324
|
+
# Optional. A token identifying a page of results the server should return.
|
1325
|
+
# @param filter [::String]
|
1326
|
+
# Optional. Filtering results.
|
1327
|
+
# @param order_by [::String]
|
1328
|
+
# Optional. Hint for how to order the results.
|
1329
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1330
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse]
|
1331
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1332
|
+
#
|
1333
|
+
# @return [::Google::Cloud::BackupDR::V1::ListDataSourcesResponse]
|
1334
|
+
#
|
1335
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1336
|
+
#
|
1337
|
+
# @example Basic example
|
1338
|
+
# require "google/cloud/backupdr/v1"
|
1339
|
+
#
|
1340
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1341
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
1342
|
+
#
|
1343
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1344
|
+
# request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new
|
1345
|
+
#
|
1346
|
+
# # Call the list_data_sources method.
|
1347
|
+
# result = client.list_data_sources request
|
1348
|
+
#
|
1349
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1350
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1351
|
+
# result.each do |item|
|
1352
|
+
# # Each element is of type ::Google::Cloud::BackupDR::V1::DataSource.
|
1353
|
+
# p item
|
1354
|
+
# end
|
1355
|
+
#
|
1356
|
+
def list_data_sources request, options = nil
|
1357
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1358
|
+
|
1359
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListDataSourcesRequest
|
1360
|
+
|
1361
|
+
# Converts hash and nil to an options object
|
1362
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1363
|
+
|
1364
|
+
# Customize the options with defaults
|
1365
|
+
call_metadata = @config.rpcs.list_data_sources.metadata.to_h
|
1366
|
+
|
1367
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1368
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1369
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1370
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
1371
|
+
transports_version_send: [:rest]
|
1372
|
+
|
1373
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1374
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1375
|
+
|
1376
|
+
options.apply_defaults timeout: @config.rpcs.list_data_sources.timeout,
|
1377
|
+
metadata: call_metadata,
|
1378
|
+
retry_policy: @config.rpcs.list_data_sources.retry_policy
|
1379
|
+
|
1380
|
+
options.apply_defaults timeout: @config.timeout,
|
1381
|
+
metadata: @config.metadata,
|
1382
|
+
retry_policy: @config.retry_policy
|
1383
|
+
|
1384
|
+
@backup_dr_stub.list_data_sources request, options do |result, operation|
|
1385
|
+
yield result, operation if block_given?
|
1386
|
+
end
|
1387
|
+
rescue ::Gapic::Rest::Error => e
|
1388
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1389
|
+
end
|
1390
|
+
|
1391
|
+
##
|
1392
|
+
# Gets details of a DataSource.
|
1393
|
+
#
|
1394
|
+
# @overload get_data_source(request, options = nil)
|
1395
|
+
# Pass arguments to `get_data_source` via a request object, either of type
|
1396
|
+
# {::Google::Cloud::BackupDR::V1::GetDataSourceRequest} or an equivalent Hash.
|
1397
|
+
#
|
1398
|
+
# @param request [::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::Hash]
|
1399
|
+
# A request object representing the call parameters. Required. To specify no
|
1400
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1401
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1402
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1403
|
+
#
|
1404
|
+
# @overload get_data_source(name: nil)
|
1405
|
+
# Pass arguments to `get_data_source` via keyword arguments. Note that at
|
1406
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1407
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1408
|
+
#
|
1409
|
+
# @param name [::String]
|
1410
|
+
# Required. Name of the data source resource name, in the format
|
1411
|
+
# 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{resource_name}/dataSource/\\{resource_name}'
|
1412
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1413
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::DataSource]
|
1414
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1415
|
+
#
|
1416
|
+
# @return [::Google::Cloud::BackupDR::V1::DataSource]
|
1417
|
+
#
|
1418
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1419
|
+
#
|
1420
|
+
# @example Basic example
|
1421
|
+
# require "google/cloud/backupdr/v1"
|
1422
|
+
#
|
1423
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1424
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
1425
|
+
#
|
1426
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1427
|
+
# request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new
|
1428
|
+
#
|
1429
|
+
# # Call the get_data_source method.
|
1430
|
+
# result = client.get_data_source request
|
1431
|
+
#
|
1432
|
+
# # The returned object is of type Google::Cloud::BackupDR::V1::DataSource.
|
1433
|
+
# p result
|
1434
|
+
#
|
1435
|
+
def get_data_source request, options = nil
|
1436
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1437
|
+
|
1438
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceRequest
|
1439
|
+
|
1440
|
+
# Converts hash and nil to an options object
|
1441
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1442
|
+
|
1443
|
+
# Customize the options with defaults
|
1444
|
+
call_metadata = @config.rpcs.get_data_source.metadata.to_h
|
1445
|
+
|
1446
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1447
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1448
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1449
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
1450
|
+
transports_version_send: [:rest]
|
1451
|
+
|
1452
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1453
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1454
|
+
|
1455
|
+
options.apply_defaults timeout: @config.rpcs.get_data_source.timeout,
|
1456
|
+
metadata: call_metadata,
|
1457
|
+
retry_policy: @config.rpcs.get_data_source.retry_policy
|
1458
|
+
|
1459
|
+
options.apply_defaults timeout: @config.timeout,
|
1460
|
+
metadata: @config.metadata,
|
1461
|
+
retry_policy: @config.retry_policy
|
1462
|
+
|
1463
|
+
@backup_dr_stub.get_data_source request, options do |result, operation|
|
1464
|
+
yield result, operation if block_given?
|
1465
|
+
end
|
1466
|
+
rescue ::Gapic::Rest::Error => e
|
1467
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1468
|
+
end
|
1469
|
+
|
1470
|
+
##
|
1471
|
+
# Updates the settings of a DataSource.
|
1472
|
+
#
|
1473
|
+
# @overload update_data_source(request, options = nil)
|
1474
|
+
# Pass arguments to `update_data_source` via a request object, either of type
|
1475
|
+
# {::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest} or an equivalent Hash.
|
1476
|
+
#
|
1477
|
+
# @param request [::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::Hash]
|
1478
|
+
# A request object representing the call parameters. Required. To specify no
|
1479
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1480
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1481
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1482
|
+
#
|
1483
|
+
# @overload update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil)
|
1484
|
+
# Pass arguments to `update_data_source` via keyword arguments. Note that at
|
1485
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1486
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1487
|
+
#
|
1488
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1489
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
1490
|
+
# DataSource resource by the update.
|
1491
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1492
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
1493
|
+
# user does not provide a mask then the request will fail.
|
1494
|
+
# @param data_source [::Google::Cloud::BackupDR::V1::DataSource, ::Hash]
|
1495
|
+
# Required. The resource being updated
|
1496
|
+
# @param request_id [::String]
|
1497
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1498
|
+
# request ID so that if you must retry your request, the server will know to
|
1499
|
+
# ignore the request if it has already been completed. The server will
|
1500
|
+
# guarantee that for at least 60 minutes since the first request.
|
1501
|
+
#
|
1502
|
+
# For example, consider a situation where you make an initial request and
|
1503
|
+
# the request times out. If you make the request again with the same request
|
1504
|
+
# ID, the server can check if original operation with the same request ID
|
1505
|
+
# was received, and if so, will ignore the second request. This prevents
|
1506
|
+
# clients from accidentally creating duplicate commitments.
|
1507
|
+
#
|
1508
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1509
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1510
|
+
# @param allow_missing [::Boolean]
|
1511
|
+
# Optional. Enable upsert.
|
1512
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1513
|
+
# @yieldparam result [::Gapic::Operation]
|
1514
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1515
|
+
#
|
1516
|
+
# @return [::Gapic::Operation]
|
1517
|
+
#
|
1518
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1519
|
+
#
|
1520
|
+
# @example Basic example
|
1521
|
+
# require "google/cloud/backupdr/v1"
|
1522
|
+
#
|
1523
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1524
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
1525
|
+
#
|
1526
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1527
|
+
# request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new
|
1528
|
+
#
|
1529
|
+
# # Call the update_data_source method.
|
1530
|
+
# result = client.update_data_source request
|
1531
|
+
#
|
1532
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1533
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1534
|
+
# # Here is how to wait for a response.
|
1535
|
+
# result.wait_until_done! timeout: 60
|
1536
|
+
# if result.response?
|
1537
|
+
# p result.response
|
1538
|
+
# else
|
1539
|
+
# puts "No response received."
|
1540
|
+
# end
|
1541
|
+
#
|
1542
|
+
def update_data_source request, options = nil
|
1543
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1544
|
+
|
1545
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest
|
1546
|
+
|
1547
|
+
# Converts hash and nil to an options object
|
1548
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1549
|
+
|
1550
|
+
# Customize the options with defaults
|
1551
|
+
call_metadata = @config.rpcs.update_data_source.metadata.to_h
|
1552
|
+
|
1553
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1554
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1555
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1556
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
1557
|
+
transports_version_send: [:rest]
|
1558
|
+
|
1559
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1560
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1561
|
+
|
1562
|
+
options.apply_defaults timeout: @config.rpcs.update_data_source.timeout,
|
1563
|
+
metadata: call_metadata,
|
1564
|
+
retry_policy: @config.rpcs.update_data_source.retry_policy
|
1565
|
+
|
1566
|
+
options.apply_defaults timeout: @config.timeout,
|
1567
|
+
metadata: @config.metadata,
|
1568
|
+
retry_policy: @config.retry_policy
|
1569
|
+
|
1570
|
+
@backup_dr_stub.update_data_source request, options do |result, operation|
|
1571
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1572
|
+
yield result, operation if block_given?
|
1573
|
+
throw :response, result
|
1574
|
+
end
|
1575
|
+
rescue ::Gapic::Rest::Error => e
|
1576
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1577
|
+
end
|
1578
|
+
|
1579
|
+
##
|
1580
|
+
# Lists Backups in a given project and location.
|
1581
|
+
#
|
1582
|
+
# @overload list_backups(request, options = nil)
|
1583
|
+
# Pass arguments to `list_backups` via a request object, either of type
|
1584
|
+
# {::Google::Cloud::BackupDR::V1::ListBackupsRequest} or an equivalent Hash.
|
1585
|
+
#
|
1586
|
+
# @param request [::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::Hash]
|
1587
|
+
# A request object representing the call parameters. Required. To specify no
|
1588
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1589
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1590
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1591
|
+
#
|
1592
|
+
# @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil)
|
1593
|
+
# Pass arguments to `list_backups` via keyword arguments. Note that at
|
1594
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1595
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1596
|
+
#
|
1597
|
+
# @param parent [::String]
|
1598
|
+
# Required. The project and location for which to retrieve backup
|
1599
|
+
# information, in the format
|
1600
|
+
# 'projects/\\{project_id}/locations/\\{location}'. In Cloud Backup and DR,
|
1601
|
+
# locations map to Google Cloud regions, for example **us-central1**.
|
1602
|
+
# To retrieve data sources for all locations, use "-" for the
|
1603
|
+
# '\\{location}' value.
|
1604
|
+
# @param page_size [::Integer]
|
1605
|
+
# Optional. Requested page size. Server may return fewer items than
|
1606
|
+
# requested. If unspecified, server will pick an appropriate default.
|
1607
|
+
# @param page_token [::String]
|
1608
|
+
# Optional. A token identifying a page of results the server should return.
|
1609
|
+
# @param filter [::String]
|
1610
|
+
# Optional. Filtering results.
|
1611
|
+
# @param order_by [::String]
|
1612
|
+
# Optional. Hint for how to order the results.
|
1613
|
+
# @param view [::Google::Cloud::BackupDR::V1::BackupView]
|
1614
|
+
# Optional. Reserved for future use to provide a BASIC & FULL view of Backup
|
1615
|
+
# resource.
|
1616
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1617
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupsResponse]
|
1618
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1619
|
+
#
|
1620
|
+
# @return [::Google::Cloud::BackupDR::V1::ListBackupsResponse]
|
1621
|
+
#
|
1622
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1623
|
+
#
|
1624
|
+
# @example Basic example
|
1625
|
+
# require "google/cloud/backupdr/v1"
|
1626
|
+
#
|
1627
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1628
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
1629
|
+
#
|
1630
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1631
|
+
# request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new
|
1632
|
+
#
|
1633
|
+
# # Call the list_backups method.
|
1634
|
+
# result = client.list_backups request
|
1635
|
+
#
|
1636
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1637
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1638
|
+
# result.each do |item|
|
1639
|
+
# # Each element is of type ::Google::Cloud::BackupDR::V1::Backup.
|
1640
|
+
# p item
|
1641
|
+
# end
|
1642
|
+
#
|
1643
|
+
def list_backups request, options = nil
|
1644
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1645
|
+
|
1646
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupsRequest
|
1647
|
+
|
1648
|
+
# Converts hash and nil to an options object
|
1649
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1650
|
+
|
1651
|
+
# Customize the options with defaults
|
1652
|
+
call_metadata = @config.rpcs.list_backups.metadata.to_h
|
1653
|
+
|
1654
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1655
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1656
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1657
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
1658
|
+
transports_version_send: [:rest]
|
1659
|
+
|
1660
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1661
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1662
|
+
|
1663
|
+
options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
|
1664
|
+
metadata: call_metadata,
|
1665
|
+
retry_policy: @config.rpcs.list_backups.retry_policy
|
1666
|
+
|
1667
|
+
options.apply_defaults timeout: @config.timeout,
|
1668
|
+
metadata: @config.metadata,
|
1669
|
+
retry_policy: @config.retry_policy
|
1670
|
+
|
1671
|
+
@backup_dr_stub.list_backups request, options do |result, operation|
|
1672
|
+
yield result, operation if block_given?
|
1673
|
+
end
|
1674
|
+
rescue ::Gapic::Rest::Error => e
|
1675
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1676
|
+
end
|
1677
|
+
|
1678
|
+
##
|
1679
|
+
# Gets details of a Backup.
|
1680
|
+
#
|
1681
|
+
# @overload get_backup(request, options = nil)
|
1682
|
+
# Pass arguments to `get_backup` via a request object, either of type
|
1683
|
+
# {::Google::Cloud::BackupDR::V1::GetBackupRequest} or an equivalent Hash.
|
1684
|
+
#
|
1685
|
+
# @param request [::Google::Cloud::BackupDR::V1::GetBackupRequest, ::Hash]
|
1686
|
+
# A request object representing the call parameters. Required. To specify no
|
1687
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1688
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1689
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1690
|
+
#
|
1691
|
+
# @overload get_backup(name: nil, view: nil)
|
1692
|
+
# Pass arguments to `get_backup` via keyword arguments. Note that at
|
1693
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1694
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1695
|
+
#
|
1696
|
+
# @param name [::String]
|
1697
|
+
# Required. Name of the data source resource name, in the format
|
1698
|
+
# 'projects/\\{project_id}/locations/\\{location}/backupVaults/\\{backupVault}/dataSources/\\{datasource}/backups/\\{backup}'
|
1699
|
+
# @param view [::Google::Cloud::BackupDR::V1::BackupView]
|
1700
|
+
# Optional. Reserved for future use to provide a BASIC & FULL view of Backup
|
1701
|
+
# resource.
|
1702
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1703
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::Backup]
|
1704
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1705
|
+
#
|
1706
|
+
# @return [::Google::Cloud::BackupDR::V1::Backup]
|
1707
|
+
#
|
1708
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1709
|
+
#
|
1710
|
+
# @example Basic example
|
1711
|
+
# require "google/cloud/backupdr/v1"
|
1712
|
+
#
|
1713
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1714
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
1715
|
+
#
|
1716
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1717
|
+
# request = Google::Cloud::BackupDR::V1::GetBackupRequest.new
|
1718
|
+
#
|
1719
|
+
# # Call the get_backup method.
|
1720
|
+
# result = client.get_backup request
|
1721
|
+
#
|
1722
|
+
# # The returned object is of type Google::Cloud::BackupDR::V1::Backup.
|
1723
|
+
# p result
|
1724
|
+
#
|
1725
|
+
def get_backup request, options = nil
|
1726
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1727
|
+
|
1728
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupRequest
|
1729
|
+
|
1730
|
+
# Converts hash and nil to an options object
|
1731
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1732
|
+
|
1733
|
+
# Customize the options with defaults
|
1734
|
+
call_metadata = @config.rpcs.get_backup.metadata.to_h
|
1735
|
+
|
1736
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1737
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1738
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1739
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
1740
|
+
transports_version_send: [:rest]
|
1741
|
+
|
1742
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1743
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1744
|
+
|
1745
|
+
options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
|
1746
|
+
metadata: call_metadata,
|
1747
|
+
retry_policy: @config.rpcs.get_backup.retry_policy
|
1748
|
+
|
1749
|
+
options.apply_defaults timeout: @config.timeout,
|
1750
|
+
metadata: @config.metadata,
|
1751
|
+
retry_policy: @config.retry_policy
|
1752
|
+
|
1753
|
+
@backup_dr_stub.get_backup request, options do |result, operation|
|
1754
|
+
yield result, operation if block_given?
|
1755
|
+
end
|
1756
|
+
rescue ::Gapic::Rest::Error => e
|
1757
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1758
|
+
end
|
1759
|
+
|
1760
|
+
##
|
1761
|
+
# Updates the settings of a Backup.
|
1762
|
+
#
|
1763
|
+
# @overload update_backup(request, options = nil)
|
1764
|
+
# Pass arguments to `update_backup` via a request object, either of type
|
1765
|
+
# {::Google::Cloud::BackupDR::V1::UpdateBackupRequest} or an equivalent Hash.
|
1766
|
+
#
|
1767
|
+
# @param request [::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::Hash]
|
1768
|
+
# A request object representing the call parameters. Required. To specify no
|
1769
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1770
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1771
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1772
|
+
#
|
1773
|
+
# @overload update_backup(update_mask: nil, backup: nil, request_id: nil)
|
1774
|
+
# Pass arguments to `update_backup` via keyword arguments. Note that at
|
1775
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1776
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1777
|
+
#
|
1778
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1779
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
1780
|
+
# Backup resource by the update.
|
1781
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1782
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
1783
|
+
# user does not provide a mask then the request will fail.
|
1784
|
+
# @param backup [::Google::Cloud::BackupDR::V1::Backup, ::Hash]
|
1785
|
+
# Required. The resource being updated
|
1786
|
+
# @param request_id [::String]
|
1787
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1788
|
+
# request ID so that if you must retry your request, the server will know to
|
1789
|
+
# ignore the request if it has already been completed. The server will
|
1790
|
+
# guarantee that for at least 60 minutes since the first request.
|
1791
|
+
#
|
1792
|
+
# For example, consider a situation where you make an initial request and
|
1793
|
+
# the request times out. If you make the request again with the same request
|
1794
|
+
# ID, the server can check if original operation with the same request ID
|
1795
|
+
# was received, and if so, will ignore the second request. This prevents
|
1796
|
+
# clients from accidentally creating duplicate commitments.
|
1797
|
+
#
|
1798
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1799
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1800
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1801
|
+
# @yieldparam result [::Gapic::Operation]
|
1802
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1803
|
+
#
|
1804
|
+
# @return [::Gapic::Operation]
|
1805
|
+
#
|
1806
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1807
|
+
#
|
1808
|
+
# @example Basic example
|
1809
|
+
# require "google/cloud/backupdr/v1"
|
1810
|
+
#
|
1811
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1812
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
1813
|
+
#
|
1814
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1815
|
+
# request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new
|
1816
|
+
#
|
1817
|
+
# # Call the update_backup method.
|
1818
|
+
# result = client.update_backup request
|
1819
|
+
#
|
1820
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1821
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1822
|
+
# # Here is how to wait for a response.
|
1823
|
+
# result.wait_until_done! timeout: 60
|
1824
|
+
# if result.response?
|
1825
|
+
# p result.response
|
1826
|
+
# else
|
1827
|
+
# puts "No response received."
|
1828
|
+
# end
|
1829
|
+
#
|
1830
|
+
def update_backup request, options = nil
|
1831
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1832
|
+
|
1833
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupRequest
|
1834
|
+
|
1835
|
+
# Converts hash and nil to an options object
|
1836
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1837
|
+
|
1838
|
+
# Customize the options with defaults
|
1839
|
+
call_metadata = @config.rpcs.update_backup.metadata.to_h
|
1840
|
+
|
1841
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1842
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1843
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1844
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
1845
|
+
transports_version_send: [:rest]
|
1846
|
+
|
1847
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1848
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1849
|
+
|
1850
|
+
options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
|
1851
|
+
metadata: call_metadata,
|
1852
|
+
retry_policy: @config.rpcs.update_backup.retry_policy
|
1853
|
+
|
1854
|
+
options.apply_defaults timeout: @config.timeout,
|
1855
|
+
metadata: @config.metadata,
|
1856
|
+
retry_policy: @config.retry_policy
|
1857
|
+
|
1858
|
+
@backup_dr_stub.update_backup request, options do |result, operation|
|
1859
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1860
|
+
yield result, operation if block_given?
|
1861
|
+
throw :response, result
|
1862
|
+
end
|
1863
|
+
rescue ::Gapic::Rest::Error => e
|
1864
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1865
|
+
end
|
1866
|
+
|
1867
|
+
##
|
1868
|
+
# Deletes a Backup.
|
1869
|
+
#
|
1870
|
+
# @overload delete_backup(request, options = nil)
|
1871
|
+
# Pass arguments to `delete_backup` via a request object, either of type
|
1872
|
+
# {::Google::Cloud::BackupDR::V1::DeleteBackupRequest} or an equivalent Hash.
|
1873
|
+
#
|
1874
|
+
# @param request [::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::Hash]
|
1875
|
+
# A request object representing the call parameters. Required. To specify no
|
1876
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1877
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1878
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1879
|
+
#
|
1880
|
+
# @overload delete_backup(name: nil, request_id: nil)
|
1881
|
+
# Pass arguments to `delete_backup` via keyword arguments. Note that at
|
1882
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1883
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1884
|
+
#
|
1885
|
+
# @param name [::String]
|
1886
|
+
# Required. Name of the resource.
|
1887
|
+
# @param request_id [::String]
|
1888
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1889
|
+
# request ID so that if you must retry your request, the server will know to
|
1890
|
+
# ignore the request if it has already been completed. The server will
|
1891
|
+
# guarantee that for at least 60 minutes after the first request.
|
1892
|
+
#
|
1893
|
+
# For example, consider a situation where you make an initial request and
|
1894
|
+
# the request times out. If you make the request again with the same request
|
1895
|
+
# ID, the server can check if original operation with the same request ID
|
1896
|
+
# was received, and if so, will ignore the second request. This prevents
|
1897
|
+
# clients from accidentally creating duplicate commitments.
|
1898
|
+
#
|
1899
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1900
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1901
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1902
|
+
# @yieldparam result [::Gapic::Operation]
|
1903
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1904
|
+
#
|
1905
|
+
# @return [::Gapic::Operation]
|
1906
|
+
#
|
1907
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1908
|
+
#
|
1909
|
+
# @example Basic example
|
1910
|
+
# require "google/cloud/backupdr/v1"
|
1911
|
+
#
|
1912
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1913
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
1914
|
+
#
|
1915
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1916
|
+
# request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new
|
1917
|
+
#
|
1918
|
+
# # Call the delete_backup method.
|
1919
|
+
# result = client.delete_backup request
|
1920
|
+
#
|
1921
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1922
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1923
|
+
# # Here is how to wait for a response.
|
1924
|
+
# result.wait_until_done! timeout: 60
|
1925
|
+
# if result.response?
|
1926
|
+
# p result.response
|
1927
|
+
# else
|
1928
|
+
# puts "No response received."
|
1929
|
+
# end
|
1930
|
+
#
|
1931
|
+
def delete_backup request, options = nil
|
1932
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1933
|
+
|
1934
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupRequest
|
1935
|
+
|
1936
|
+
# Converts hash and nil to an options object
|
1937
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1938
|
+
|
1939
|
+
# Customize the options with defaults
|
1940
|
+
call_metadata = @config.rpcs.delete_backup.metadata.to_h
|
1941
|
+
|
1942
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1943
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1944
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1945
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
1946
|
+
transports_version_send: [:rest]
|
1947
|
+
|
1948
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1949
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1950
|
+
|
1951
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
|
1952
|
+
metadata: call_metadata,
|
1953
|
+
retry_policy: @config.rpcs.delete_backup.retry_policy
|
1954
|
+
|
1955
|
+
options.apply_defaults timeout: @config.timeout,
|
1956
|
+
metadata: @config.metadata,
|
1957
|
+
retry_policy: @config.retry_policy
|
1958
|
+
|
1959
|
+
@backup_dr_stub.delete_backup request, options do |result, operation|
|
1960
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1961
|
+
yield result, operation if block_given?
|
1962
|
+
throw :response, result
|
1963
|
+
end
|
1964
|
+
rescue ::Gapic::Rest::Error => e
|
1965
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1966
|
+
end
|
1967
|
+
|
1968
|
+
##
|
1969
|
+
# Restore from a Backup
|
1970
|
+
#
|
1971
|
+
# @overload restore_backup(request, options = nil)
|
1972
|
+
# Pass arguments to `restore_backup` via a request object, either of type
|
1973
|
+
# {::Google::Cloud::BackupDR::V1::RestoreBackupRequest} or an equivalent Hash.
|
1974
|
+
#
|
1975
|
+
# @param request [::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::Hash]
|
1976
|
+
# A request object representing the call parameters. Required. To specify no
|
1977
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1978
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1979
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1980
|
+
#
|
1981
|
+
# @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, compute_instance_restore_properties: nil)
|
1982
|
+
# Pass arguments to `restore_backup` via keyword arguments. Note that at
|
1983
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1984
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1985
|
+
#
|
1986
|
+
# @param name [::String]
|
1987
|
+
# Required. The resource name of the Backup instance, in the format
|
1988
|
+
# 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
|
1989
|
+
# @param request_id [::String]
|
1990
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1991
|
+
# request ID so that if you must retry your request, the server will know to
|
1992
|
+
# ignore the request if it has already been completed. The server will
|
1993
|
+
# guarantee that for at least 60 minutes after the first request.
|
1994
|
+
#
|
1995
|
+
# For example, consider a situation where you make an initial request and
|
1996
|
+
# the request times out. If you make the request again with the same request
|
1997
|
+
# ID, the server can check if original operation with the same request ID
|
1998
|
+
# was received, and if so, will ignore the second request. This prevents
|
1999
|
+
# clients from accidentally creating duplicate commitments.
|
2000
|
+
#
|
2001
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2002
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2003
|
+
# @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash]
|
2004
|
+
# Compute Engine target environment to be used during restore.
|
2005
|
+
# @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash]
|
2006
|
+
# Compute Engine instance properties to be overridden during restore.
|
2007
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2008
|
+
# @yieldparam result [::Gapic::Operation]
|
2009
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2010
|
+
#
|
2011
|
+
# @return [::Gapic::Operation]
|
2012
|
+
#
|
2013
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2014
|
+
#
|
2015
|
+
# @example Basic example
|
2016
|
+
# require "google/cloud/backupdr/v1"
|
2017
|
+
#
|
2018
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2019
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
2020
|
+
#
|
2021
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2022
|
+
# request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new
|
2023
|
+
#
|
2024
|
+
# # Call the restore_backup method.
|
2025
|
+
# result = client.restore_backup request
|
2026
|
+
#
|
2027
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2028
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2029
|
+
# # Here is how to wait for a response.
|
2030
|
+
# result.wait_until_done! timeout: 60
|
2031
|
+
# if result.response?
|
2032
|
+
# p result.response
|
2033
|
+
# else
|
2034
|
+
# puts "No response received."
|
2035
|
+
# end
|
2036
|
+
#
|
2037
|
+
def restore_backup request, options = nil
|
2038
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2039
|
+
|
2040
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::RestoreBackupRequest
|
2041
|
+
|
2042
|
+
# Converts hash and nil to an options object
|
2043
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2044
|
+
|
2045
|
+
# Customize the options with defaults
|
2046
|
+
call_metadata = @config.rpcs.restore_backup.metadata.to_h
|
2047
|
+
|
2048
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2049
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2050
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2051
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
2052
|
+
transports_version_send: [:rest]
|
2053
|
+
|
2054
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2055
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2056
|
+
|
2057
|
+
options.apply_defaults timeout: @config.rpcs.restore_backup.timeout,
|
2058
|
+
metadata: call_metadata,
|
2059
|
+
retry_policy: @config.rpcs.restore_backup.retry_policy
|
2060
|
+
|
2061
|
+
options.apply_defaults timeout: @config.timeout,
|
2062
|
+
metadata: @config.metadata,
|
2063
|
+
retry_policy: @config.retry_policy
|
2064
|
+
|
2065
|
+
@backup_dr_stub.restore_backup request, options do |result, operation|
|
2066
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2067
|
+
yield result, operation if block_given?
|
2068
|
+
throw :response, result
|
2069
|
+
end
|
2070
|
+
rescue ::Gapic::Rest::Error => e
|
2071
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2072
|
+
end
|
2073
|
+
|
2074
|
+
##
|
2075
|
+
# Create a BackupPlan
|
2076
|
+
#
|
2077
|
+
# @overload create_backup_plan(request, options = nil)
|
2078
|
+
# Pass arguments to `create_backup_plan` via a request object, either of type
|
2079
|
+
# {::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest} or an equivalent Hash.
|
2080
|
+
#
|
2081
|
+
# @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::Hash]
|
2082
|
+
# A request object representing the call parameters. Required. To specify no
|
2083
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2084
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2085
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2086
|
+
#
|
2087
|
+
# @overload create_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil)
|
2088
|
+
# Pass arguments to `create_backup_plan` via keyword arguments. Note that at
|
2089
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2090
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2091
|
+
#
|
2092
|
+
# @param parent [::String]
|
2093
|
+
# Required. The `BackupPlan` project and location in the format
|
2094
|
+
# `projects/{project}/locations/{location}`. In Cloud BackupDR locations
|
2095
|
+
# map to GCP regions, for example **us-central1**.
|
2096
|
+
# @param backup_plan_id [::String]
|
2097
|
+
# Required. The name of the `BackupPlan` to create. The name must be unique
|
2098
|
+
# for the specified project and location.The name must start with a lowercase
|
2099
|
+
# letter followed by up to 62 lowercase letters, numbers, or hyphens.
|
2100
|
+
# Pattern, /[a-z][a-z0-9-]\\{,62}/.
|
2101
|
+
# @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash]
|
2102
|
+
# Required. The `BackupPlan` resource object to create.
|
2103
|
+
# @param request_id [::String]
|
2104
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2105
|
+
# request ID so that if you must retry your request, the server will know to
|
2106
|
+
# ignore the request if it has already been completed. The server will
|
2107
|
+
# guarantee that for at least 60 minutes since the first request.
|
2108
|
+
#
|
2109
|
+
# For example, consider a situation where you make an initial request and t
|
2110
|
+
# he request times out. If you make the request again with the same request
|
2111
|
+
# ID, the server can check if original operation with the same request ID
|
2112
|
+
# was received, and if so, will ignore the second request. This prevents
|
2113
|
+
# clients from accidentally creating duplicate commitments.
|
2114
|
+
#
|
2115
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2116
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2117
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2118
|
+
# @yieldparam result [::Gapic::Operation]
|
2119
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2120
|
+
#
|
2121
|
+
# @return [::Gapic::Operation]
|
2122
|
+
#
|
2123
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2124
|
+
#
|
2125
|
+
# @example Basic example
|
2126
|
+
# require "google/cloud/backupdr/v1"
|
2127
|
+
#
|
2128
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2129
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
2130
|
+
#
|
2131
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2132
|
+
# request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new
|
2133
|
+
#
|
2134
|
+
# # Call the create_backup_plan method.
|
2135
|
+
# result = client.create_backup_plan request
|
2136
|
+
#
|
2137
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2138
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2139
|
+
# # Here is how to wait for a response.
|
2140
|
+
# result.wait_until_done! timeout: 60
|
2141
|
+
# if result.response?
|
2142
|
+
# p result.response
|
2143
|
+
# else
|
2144
|
+
# puts "No response received."
|
2145
|
+
# end
|
2146
|
+
#
|
2147
|
+
def create_backup_plan request, options = nil
|
2148
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2149
|
+
|
2150
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest
|
2151
|
+
|
2152
|
+
# Converts hash and nil to an options object
|
2153
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2154
|
+
|
2155
|
+
# Customize the options with defaults
|
2156
|
+
call_metadata = @config.rpcs.create_backup_plan.metadata.to_h
|
2157
|
+
|
2158
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2159
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2160
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2161
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
2162
|
+
transports_version_send: [:rest]
|
2163
|
+
|
2164
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2165
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2166
|
+
|
2167
|
+
options.apply_defaults timeout: @config.rpcs.create_backup_plan.timeout,
|
2168
|
+
metadata: call_metadata,
|
2169
|
+
retry_policy: @config.rpcs.create_backup_plan.retry_policy
|
2170
|
+
|
2171
|
+
options.apply_defaults timeout: @config.timeout,
|
2172
|
+
metadata: @config.metadata,
|
2173
|
+
retry_policy: @config.retry_policy
|
2174
|
+
|
2175
|
+
@backup_dr_stub.create_backup_plan request, options do |result, operation|
|
2176
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2177
|
+
yield result, operation if block_given?
|
2178
|
+
throw :response, result
|
2179
|
+
end
|
2180
|
+
rescue ::Gapic::Rest::Error => e
|
2181
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2182
|
+
end
|
2183
|
+
|
2184
|
+
##
|
2185
|
+
# Gets details of a single BackupPlan.
|
2186
|
+
#
|
2187
|
+
# @overload get_backup_plan(request, options = nil)
|
2188
|
+
# Pass arguments to `get_backup_plan` via a request object, either of type
|
2189
|
+
# {::Google::Cloud::BackupDR::V1::GetBackupPlanRequest} or an equivalent Hash.
|
2190
|
+
#
|
2191
|
+
# @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::Hash]
|
2192
|
+
# A request object representing the call parameters. Required. To specify no
|
2193
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2194
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2195
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2196
|
+
#
|
2197
|
+
# @overload get_backup_plan(name: nil)
|
2198
|
+
# Pass arguments to `get_backup_plan` via keyword arguments. Note that at
|
2199
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2200
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2201
|
+
#
|
2202
|
+
# @param name [::String]
|
2203
|
+
# Required. The resource name of the `BackupPlan` to retrieve.
|
2204
|
+
#
|
2205
|
+
# Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
|
2206
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2207
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlan]
|
2208
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2209
|
+
#
|
2210
|
+
# @return [::Google::Cloud::BackupDR::V1::BackupPlan]
|
2211
|
+
#
|
2212
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2213
|
+
#
|
2214
|
+
# @example Basic example
|
2215
|
+
# require "google/cloud/backupdr/v1"
|
2216
|
+
#
|
2217
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2218
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
2219
|
+
#
|
2220
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2221
|
+
# request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new
|
2222
|
+
#
|
2223
|
+
# # Call the get_backup_plan method.
|
2224
|
+
# result = client.get_backup_plan request
|
2225
|
+
#
|
2226
|
+
# # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan.
|
2227
|
+
# p result
|
2228
|
+
#
|
2229
|
+
def get_backup_plan request, options = nil
|
2230
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2231
|
+
|
2232
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRequest
|
2233
|
+
|
2234
|
+
# Converts hash and nil to an options object
|
2235
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2236
|
+
|
2237
|
+
# Customize the options with defaults
|
2238
|
+
call_metadata = @config.rpcs.get_backup_plan.metadata.to_h
|
2239
|
+
|
2240
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2241
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2242
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2243
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
2244
|
+
transports_version_send: [:rest]
|
2245
|
+
|
2246
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2247
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2248
|
+
|
2249
|
+
options.apply_defaults timeout: @config.rpcs.get_backup_plan.timeout,
|
2250
|
+
metadata: call_metadata,
|
2251
|
+
retry_policy: @config.rpcs.get_backup_plan.retry_policy
|
2252
|
+
|
2253
|
+
options.apply_defaults timeout: @config.timeout,
|
2254
|
+
metadata: @config.metadata,
|
2255
|
+
retry_policy: @config.retry_policy
|
2256
|
+
|
2257
|
+
@backup_dr_stub.get_backup_plan request, options do |result, operation|
|
2258
|
+
yield result, operation if block_given?
|
2259
|
+
end
|
2260
|
+
rescue ::Gapic::Rest::Error => e
|
2261
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2262
|
+
end
|
2263
|
+
|
2264
|
+
##
|
2265
|
+
# Lists BackupPlans in a given project and location.
|
2266
|
+
#
|
2267
|
+
# @overload list_backup_plans(request, options = nil)
|
2268
|
+
# Pass arguments to `list_backup_plans` via a request object, either of type
|
2269
|
+
# {::Google::Cloud::BackupDR::V1::ListBackupPlansRequest} or an equivalent Hash.
|
2270
|
+
#
|
2271
|
+
# @param request [::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::Hash]
|
2272
|
+
# A request object representing the call parameters. Required. To specify no
|
2273
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2274
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2275
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2276
|
+
#
|
2277
|
+
# @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2278
|
+
# Pass arguments to `list_backup_plans` via keyword arguments. Note that at
|
2279
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2280
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2281
|
+
#
|
2282
|
+
# @param parent [::String]
|
2283
|
+
# Required. The project and location for which to retrieve `BackupPlans`
|
2284
|
+
# information. Format: `projects/{project}/locations/{location}`. In Cloud
|
2285
|
+
# BackupDR, locations map to GCP regions, for e.g. **us-central1**. To
|
2286
|
+
# retrieve backup plans for all locations, use "-" for the
|
2287
|
+
# `{location}` value.
|
2288
|
+
# @param page_size [::Integer]
|
2289
|
+
# Optional. The maximum number of `BackupPlans` to return in a single
|
2290
|
+
# response. If not specified, a default value will be chosen by the service.
|
2291
|
+
# Note that the response may include a partial list and a caller should
|
2292
|
+
# only rely on the response's
|
2293
|
+
# {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token}
|
2294
|
+
# to determine if there are more instances left to be queried.
|
2295
|
+
# @param page_token [::String]
|
2296
|
+
# Optional. The value of
|
2297
|
+
# {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token}
|
2298
|
+
# received from a previous `ListBackupPlans` call.
|
2299
|
+
# Provide this to retrieve the subsequent page in a multi-page list of
|
2300
|
+
# results. When paginating, all other parameters provided to
|
2301
|
+
# `ListBackupPlans` must match the call that provided the page token.
|
2302
|
+
# @param filter [::String]
|
2303
|
+
# Optional. Field match expression used to filter the results.
|
2304
|
+
# @param order_by [::String]
|
2305
|
+
# Optional. Field by which to sort the results.
|
2306
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2307
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse]
|
2308
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2309
|
+
#
|
2310
|
+
# @return [::Google::Cloud::BackupDR::V1::ListBackupPlansResponse]
|
2311
|
+
#
|
2312
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2313
|
+
#
|
2314
|
+
# @example Basic example
|
2315
|
+
# require "google/cloud/backupdr/v1"
|
2316
|
+
#
|
2317
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2318
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
2319
|
+
#
|
2320
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2321
|
+
# request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new
|
2322
|
+
#
|
2323
|
+
# # Call the list_backup_plans method.
|
2324
|
+
# result = client.list_backup_plans request
|
2325
|
+
#
|
2326
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2327
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2328
|
+
# result.each do |item|
|
2329
|
+
# # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlan.
|
2330
|
+
# p item
|
2331
|
+
# end
|
2332
|
+
#
|
2333
|
+
def list_backup_plans request, options = nil
|
2334
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2335
|
+
|
2336
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlansRequest
|
2337
|
+
|
2338
|
+
# Converts hash and nil to an options object
|
2339
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2340
|
+
|
2341
|
+
# Customize the options with defaults
|
2342
|
+
call_metadata = @config.rpcs.list_backup_plans.metadata.to_h
|
2343
|
+
|
2344
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2345
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2346
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2347
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
2348
|
+
transports_version_send: [:rest]
|
2349
|
+
|
2350
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2351
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2352
|
+
|
2353
|
+
options.apply_defaults timeout: @config.rpcs.list_backup_plans.timeout,
|
2354
|
+
metadata: call_metadata,
|
2355
|
+
retry_policy: @config.rpcs.list_backup_plans.retry_policy
|
2356
|
+
|
2357
|
+
options.apply_defaults timeout: @config.timeout,
|
2358
|
+
metadata: @config.metadata,
|
2359
|
+
retry_policy: @config.retry_policy
|
2360
|
+
|
2361
|
+
@backup_dr_stub.list_backup_plans request, options do |result, operation|
|
2362
|
+
yield result, operation if block_given?
|
2363
|
+
end
|
2364
|
+
rescue ::Gapic::Rest::Error => e
|
2365
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2366
|
+
end
|
2367
|
+
|
2368
|
+
##
|
2369
|
+
# Deletes a single BackupPlan.
|
2370
|
+
#
|
2371
|
+
# @overload delete_backup_plan(request, options = nil)
|
2372
|
+
# Pass arguments to `delete_backup_plan` via a request object, either of type
|
2373
|
+
# {::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest} or an equivalent Hash.
|
2374
|
+
#
|
2375
|
+
# @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::Hash]
|
2376
|
+
# A request object representing the call parameters. Required. To specify no
|
2377
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2378
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2379
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2380
|
+
#
|
2381
|
+
# @overload delete_backup_plan(name: nil, request_id: nil)
|
2382
|
+
# Pass arguments to `delete_backup_plan` via keyword arguments. Note that at
|
2383
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2384
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2385
|
+
#
|
2386
|
+
# @param name [::String]
|
2387
|
+
# Required. The resource name of the `BackupPlan` to delete.
|
2388
|
+
#
|
2389
|
+
# Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
|
2390
|
+
# @param request_id [::String]
|
2391
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2392
|
+
# request ID so that if you must retry your request, the server will know to
|
2393
|
+
# ignore the request if it has already been completed. The server will
|
2394
|
+
# guarantee that for at least 60 minutes after the first request.
|
2395
|
+
#
|
2396
|
+
# For example, consider a situation where you make an initial request and
|
2397
|
+
# the request times out. If you make the request again with the same request
|
2398
|
+
# ID, the server can check if original operation with the same request ID
|
2399
|
+
# was received, and if so, will ignore the second request. This prevents
|
2400
|
+
# clients from accidentally creating duplicate commitments.
|
2401
|
+
#
|
2402
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2403
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2404
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2405
|
+
# @yieldparam result [::Gapic::Operation]
|
2406
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2407
|
+
#
|
2408
|
+
# @return [::Gapic::Operation]
|
2409
|
+
#
|
2410
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2411
|
+
#
|
2412
|
+
# @example Basic example
|
2413
|
+
# require "google/cloud/backupdr/v1"
|
2414
|
+
#
|
2415
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2416
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
2417
|
+
#
|
2418
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2419
|
+
# request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new
|
2420
|
+
#
|
2421
|
+
# # Call the delete_backup_plan method.
|
2422
|
+
# result = client.delete_backup_plan request
|
2423
|
+
#
|
2424
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2425
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2426
|
+
# # Here is how to wait for a response.
|
2427
|
+
# result.wait_until_done! timeout: 60
|
2428
|
+
# if result.response?
|
2429
|
+
# p result.response
|
2430
|
+
# else
|
2431
|
+
# puts "No response received."
|
2432
|
+
# end
|
2433
|
+
#
|
2434
|
+
def delete_backup_plan request, options = nil
|
2435
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2436
|
+
|
2437
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest
|
2438
|
+
|
2439
|
+
# Converts hash and nil to an options object
|
2440
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2441
|
+
|
2442
|
+
# Customize the options with defaults
|
2443
|
+
call_metadata = @config.rpcs.delete_backup_plan.metadata.to_h
|
2444
|
+
|
2445
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2446
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2447
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2448
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
2449
|
+
transports_version_send: [:rest]
|
2450
|
+
|
2451
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2452
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2453
|
+
|
2454
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout,
|
2455
|
+
metadata: call_metadata,
|
2456
|
+
retry_policy: @config.rpcs.delete_backup_plan.retry_policy
|
2457
|
+
|
2458
|
+
options.apply_defaults timeout: @config.timeout,
|
2459
|
+
metadata: @config.metadata,
|
2460
|
+
retry_policy: @config.retry_policy
|
2461
|
+
|
2462
|
+
@backup_dr_stub.delete_backup_plan request, options do |result, operation|
|
2463
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2464
|
+
yield result, operation if block_given?
|
2465
|
+
throw :response, result
|
2466
|
+
end
|
2467
|
+
rescue ::Gapic::Rest::Error => e
|
2468
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2469
|
+
end
|
2470
|
+
|
2471
|
+
##
|
2472
|
+
# Create a BackupPlanAssociation
|
2473
|
+
#
|
2474
|
+
# @overload create_backup_plan_association(request, options = nil)
|
2475
|
+
# Pass arguments to `create_backup_plan_association` via a request object, either of type
|
2476
|
+
# {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash.
|
2477
|
+
#
|
2478
|
+
# @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash]
|
2479
|
+
# A request object representing the call parameters. Required. To specify no
|
2480
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2481
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2482
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2483
|
+
#
|
2484
|
+
# @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil)
|
2485
|
+
# Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at
|
2486
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2487
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2488
|
+
#
|
2489
|
+
# @param parent [::String]
|
2490
|
+
# Required. The backup plan association project and location in the format
|
2491
|
+
# `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations
|
2492
|
+
# map to GCP regions, for example **us-central1**.
|
2493
|
+
# @param backup_plan_association_id [::String]
|
2494
|
+
# Required. The name of the backup plan association to create. The name must
|
2495
|
+
# be unique for the specified project and location.
|
2496
|
+
# @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash]
|
2497
|
+
# Required. The resource being created
|
2498
|
+
# @param request_id [::String]
|
2499
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2500
|
+
# request ID so that if you must retry your request, the server will know to
|
2501
|
+
# ignore the request if it has already been completed. The server will
|
2502
|
+
# guarantee that for at least 60 minutes since the first request.
|
2503
|
+
#
|
2504
|
+
# For example, consider a situation where you make an initial request and t
|
2505
|
+
# he request times out. If you make the request again with the same request
|
2506
|
+
# ID, the server can check if original operation with the same request ID
|
2507
|
+
# was received, and if so, will ignore the second request. This prevents
|
2508
|
+
# clients from accidentally creating duplicate commitments.
|
2509
|
+
#
|
2510
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2511
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2512
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2513
|
+
# @yieldparam result [::Gapic::Operation]
|
2514
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2515
|
+
#
|
2516
|
+
# @return [::Gapic::Operation]
|
2517
|
+
#
|
2518
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2519
|
+
#
|
2520
|
+
# @example Basic example
|
2521
|
+
# require "google/cloud/backupdr/v1"
|
2522
|
+
#
|
2523
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2524
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
2525
|
+
#
|
2526
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2527
|
+
# request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new
|
2528
|
+
#
|
2529
|
+
# # Call the create_backup_plan_association method.
|
2530
|
+
# result = client.create_backup_plan_association request
|
2531
|
+
#
|
2532
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2533
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2534
|
+
# # Here is how to wait for a response.
|
2535
|
+
# result.wait_until_done! timeout: 60
|
2536
|
+
# if result.response?
|
2537
|
+
# p result.response
|
2538
|
+
# else
|
2539
|
+
# puts "No response received."
|
2540
|
+
# end
|
2541
|
+
#
|
2542
|
+
def create_backup_plan_association request, options = nil
|
2543
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2544
|
+
|
2545
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest
|
2546
|
+
|
2547
|
+
# Converts hash and nil to an options object
|
2548
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2549
|
+
|
2550
|
+
# Customize the options with defaults
|
2551
|
+
call_metadata = @config.rpcs.create_backup_plan_association.metadata.to_h
|
2552
|
+
|
2553
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2554
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2555
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2556
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
2557
|
+
transports_version_send: [:rest]
|
2558
|
+
|
2559
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2560
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2561
|
+
|
2562
|
+
options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout,
|
2563
|
+
metadata: call_metadata,
|
2564
|
+
retry_policy: @config.rpcs.create_backup_plan_association.retry_policy
|
2565
|
+
|
2566
|
+
options.apply_defaults timeout: @config.timeout,
|
2567
|
+
metadata: @config.metadata,
|
2568
|
+
retry_policy: @config.retry_policy
|
2569
|
+
|
2570
|
+
@backup_dr_stub.create_backup_plan_association request, options do |result, operation|
|
2571
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2572
|
+
yield result, operation if block_given?
|
2573
|
+
throw :response, result
|
2574
|
+
end
|
2575
|
+
rescue ::Gapic::Rest::Error => e
|
2576
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2577
|
+
end
|
2578
|
+
|
2579
|
+
##
|
2580
|
+
# Gets details of a single BackupPlanAssociation.
|
2581
|
+
#
|
2582
|
+
# @overload get_backup_plan_association(request, options = nil)
|
2583
|
+
# Pass arguments to `get_backup_plan_association` via a request object, either of type
|
2584
|
+
# {::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest} or an equivalent Hash.
|
2585
|
+
#
|
2586
|
+
# @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::Hash]
|
2587
|
+
# A request object representing the call parameters. Required. To specify no
|
2588
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2589
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2590
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2591
|
+
#
|
2592
|
+
# @overload get_backup_plan_association(name: nil)
|
2593
|
+
# Pass arguments to `get_backup_plan_association` via keyword arguments. Note that at
|
2594
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2595
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2596
|
+
#
|
2597
|
+
# @param name [::String]
|
2598
|
+
# Required. Name of the backup plan association resource, in the format
|
2599
|
+
# `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
|
2600
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2601
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanAssociation]
|
2602
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2603
|
+
#
|
2604
|
+
# @return [::Google::Cloud::BackupDR::V1::BackupPlanAssociation]
|
2605
|
+
#
|
2606
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2607
|
+
#
|
2608
|
+
# @example Basic example
|
2609
|
+
# require "google/cloud/backupdr/v1"
|
2610
|
+
#
|
2611
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2612
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
2613
|
+
#
|
2614
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2615
|
+
# request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new
|
2616
|
+
#
|
2617
|
+
# # Call the get_backup_plan_association method.
|
2618
|
+
# result = client.get_backup_plan_association request
|
2619
|
+
#
|
2620
|
+
# # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation.
|
2621
|
+
# p result
|
2622
|
+
#
|
2623
|
+
def get_backup_plan_association request, options = nil
|
2624
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2625
|
+
|
2626
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest
|
2627
|
+
|
2628
|
+
# Converts hash and nil to an options object
|
2629
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2630
|
+
|
2631
|
+
# Customize the options with defaults
|
2632
|
+
call_metadata = @config.rpcs.get_backup_plan_association.metadata.to_h
|
2633
|
+
|
2634
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2635
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2636
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2637
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
2638
|
+
transports_version_send: [:rest]
|
2639
|
+
|
2640
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2641
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2642
|
+
|
2643
|
+
options.apply_defaults timeout: @config.rpcs.get_backup_plan_association.timeout,
|
2644
|
+
metadata: call_metadata,
|
2645
|
+
retry_policy: @config.rpcs.get_backup_plan_association.retry_policy
|
2646
|
+
|
2647
|
+
options.apply_defaults timeout: @config.timeout,
|
2648
|
+
metadata: @config.metadata,
|
2649
|
+
retry_policy: @config.retry_policy
|
2650
|
+
|
2651
|
+
@backup_dr_stub.get_backup_plan_association request, options do |result, operation|
|
2652
|
+
yield result, operation if block_given?
|
2653
|
+
end
|
2654
|
+
rescue ::Gapic::Rest::Error => e
|
2655
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2656
|
+
end
|
2657
|
+
|
2658
|
+
##
|
2659
|
+
# Lists BackupPlanAssociations in a given project and location.
|
2660
|
+
#
|
2661
|
+
# @overload list_backup_plan_associations(request, options = nil)
|
2662
|
+
# Pass arguments to `list_backup_plan_associations` via a request object, either of type
|
2663
|
+
# {::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest} or an equivalent Hash.
|
2664
|
+
#
|
2665
|
+
# @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::Hash]
|
2666
|
+
# A request object representing the call parameters. Required. To specify no
|
2667
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2668
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2669
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2670
|
+
#
|
2671
|
+
# @overload list_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
2672
|
+
# Pass arguments to `list_backup_plan_associations` via keyword arguments. Note that at
|
2673
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2674
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2675
|
+
#
|
2676
|
+
# @param parent [::String]
|
2677
|
+
# Required. The project and location for which to retrieve backup Plan
|
2678
|
+
# Associations information, in the format
|
2679
|
+
# `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations
|
2680
|
+
# map to GCP regions, for example **us-central1**. To retrieve backup plan
|
2681
|
+
# associations for all locations, use "-" for the
|
2682
|
+
# `{location}` value.
|
2683
|
+
# @param page_size [::Integer]
|
2684
|
+
# Optional. Requested page size. Server may return fewer items than
|
2685
|
+
# requested. If unspecified, server will pick an appropriate default.
|
2686
|
+
# @param page_token [::String]
|
2687
|
+
# Optional. A token identifying a page of results the server should return.
|
2688
|
+
# @param filter [::String]
|
2689
|
+
# Optional. Filtering results
|
2690
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2691
|
+
# @yieldparam result [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse]
|
2692
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2693
|
+
#
|
2694
|
+
# @return [::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsResponse]
|
2695
|
+
#
|
2696
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2697
|
+
#
|
2698
|
+
# @example Basic example
|
2699
|
+
# require "google/cloud/backupdr/v1"
|
2700
|
+
#
|
2701
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2702
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
2703
|
+
#
|
2704
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2705
|
+
# request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new
|
2706
|
+
#
|
2707
|
+
# # Call the list_backup_plan_associations method.
|
2708
|
+
# result = client.list_backup_plan_associations request
|
2709
|
+
#
|
2710
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2711
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2712
|
+
# result.each do |item|
|
2713
|
+
# # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.
|
2714
|
+
# p item
|
2715
|
+
# end
|
2716
|
+
#
|
2717
|
+
def list_backup_plan_associations request, options = nil
|
2718
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2719
|
+
|
2720
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest
|
2721
|
+
|
2722
|
+
# Converts hash and nil to an options object
|
2723
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2724
|
+
|
2725
|
+
# Customize the options with defaults
|
2726
|
+
call_metadata = @config.rpcs.list_backup_plan_associations.metadata.to_h
|
2727
|
+
|
2728
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2729
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2730
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2731
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
2732
|
+
transports_version_send: [:rest]
|
2733
|
+
|
2734
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2735
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2736
|
+
|
2737
|
+
options.apply_defaults timeout: @config.rpcs.list_backup_plan_associations.timeout,
|
2738
|
+
metadata: call_metadata,
|
2739
|
+
retry_policy: @config.rpcs.list_backup_plan_associations.retry_policy
|
2740
|
+
|
2741
|
+
options.apply_defaults timeout: @config.timeout,
|
2742
|
+
metadata: @config.metadata,
|
2743
|
+
retry_policy: @config.retry_policy
|
2744
|
+
|
2745
|
+
@backup_dr_stub.list_backup_plan_associations request, options do |result, operation|
|
2746
|
+
yield result, operation if block_given?
|
2747
|
+
end
|
2748
|
+
rescue ::Gapic::Rest::Error => e
|
2749
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2750
|
+
end
|
2751
|
+
|
2752
|
+
##
|
2753
|
+
# Deletes a single BackupPlanAssociation.
|
2754
|
+
#
|
2755
|
+
# @overload delete_backup_plan_association(request, options = nil)
|
2756
|
+
# Pass arguments to `delete_backup_plan_association` via a request object, either of type
|
2757
|
+
# {::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest} or an equivalent Hash.
|
2758
|
+
#
|
2759
|
+
# @param request [::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::Hash]
|
2760
|
+
# A request object representing the call parameters. Required. To specify no
|
2761
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2762
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2763
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2764
|
+
#
|
2765
|
+
# @overload delete_backup_plan_association(name: nil, request_id: nil)
|
2766
|
+
# Pass arguments to `delete_backup_plan_association` via keyword arguments. Note that at
|
2767
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2768
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2769
|
+
#
|
2770
|
+
# @param name [::String]
|
2771
|
+
# Required. Name of the backup plan association resource, in the format
|
2772
|
+
# `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
|
2773
|
+
# @param request_id [::String]
|
2774
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2775
|
+
# request ID so that if you must retry your request, the server will know to
|
2776
|
+
# ignore the request if it has already been completed. The server will
|
2777
|
+
# guarantee that for at least 60 minutes after the first request.
|
2778
|
+
#
|
2779
|
+
# For example, consider a situation where you make an initial request and
|
2780
|
+
# the request times out. If you make the request again with the same request
|
2781
|
+
# ID, the server can check if original operation with the same request ID
|
2782
|
+
# was received, and if so, will ignore the second request. This prevents
|
2783
|
+
# clients from accidentally creating duplicate commitments.
|
2784
|
+
#
|
2785
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2786
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2787
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2788
|
+
# @yieldparam result [::Gapic::Operation]
|
2789
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2790
|
+
#
|
2791
|
+
# @return [::Gapic::Operation]
|
2792
|
+
#
|
2793
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2794
|
+
#
|
2795
|
+
# @example Basic example
|
2796
|
+
# require "google/cloud/backupdr/v1"
|
2797
|
+
#
|
2798
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2799
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
2800
|
+
#
|
2801
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2802
|
+
# request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new
|
2803
|
+
#
|
2804
|
+
# # Call the delete_backup_plan_association method.
|
2805
|
+
# result = client.delete_backup_plan_association request
|
2806
|
+
#
|
2807
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2808
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2809
|
+
# # Here is how to wait for a response.
|
2810
|
+
# result.wait_until_done! timeout: 60
|
2811
|
+
# if result.response?
|
2812
|
+
# p result.response
|
2813
|
+
# else
|
2814
|
+
# puts "No response received."
|
2815
|
+
# end
|
2816
|
+
#
|
2817
|
+
def delete_backup_plan_association request, options = nil
|
2818
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2819
|
+
|
2820
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest
|
2821
|
+
|
2822
|
+
# Converts hash and nil to an options object
|
2823
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2824
|
+
|
2825
|
+
# Customize the options with defaults
|
2826
|
+
call_metadata = @config.rpcs.delete_backup_plan_association.metadata.to_h
|
2827
|
+
|
2828
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2829
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2830
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2831
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
2832
|
+
transports_version_send: [:rest]
|
2833
|
+
|
2834
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2835
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2836
|
+
|
2837
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup_plan_association.timeout,
|
2838
|
+
metadata: call_metadata,
|
2839
|
+
retry_policy: @config.rpcs.delete_backup_plan_association.retry_policy
|
2840
|
+
|
2841
|
+
options.apply_defaults timeout: @config.timeout,
|
2842
|
+
metadata: @config.metadata,
|
2843
|
+
retry_policy: @config.retry_policy
|
2844
|
+
|
2845
|
+
@backup_dr_stub.delete_backup_plan_association request, options do |result, operation|
|
2846
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2847
|
+
yield result, operation if block_given?
|
2848
|
+
throw :response, result
|
2849
|
+
end
|
2850
|
+
rescue ::Gapic::Rest::Error => e
|
2851
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2852
|
+
end
|
2853
|
+
|
2854
|
+
##
|
2855
|
+
# Triggers a new Backup.
|
2856
|
+
#
|
2857
|
+
# @overload trigger_backup(request, options = nil)
|
2858
|
+
# Pass arguments to `trigger_backup` via a request object, either of type
|
2859
|
+
# {::Google::Cloud::BackupDR::V1::TriggerBackupRequest} or an equivalent Hash.
|
2860
|
+
#
|
2861
|
+
# @param request [::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::Hash]
|
2862
|
+
# A request object representing the call parameters. Required. To specify no
|
2863
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2864
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2865
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2866
|
+
#
|
2867
|
+
# @overload trigger_backup(name: nil, rule_id: nil, request_id: nil)
|
2868
|
+
# Pass arguments to `trigger_backup` via keyword arguments. Note that at
|
2869
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2870
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2871
|
+
#
|
2872
|
+
# @param name [::String]
|
2873
|
+
# Required. Name of the backup plan association resource, in the format
|
2874
|
+
# `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
|
2875
|
+
# @param rule_id [::String]
|
2876
|
+
# Required. backup rule_id for which a backup needs to be triggered.
|
2877
|
+
# @param request_id [::String]
|
2878
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2879
|
+
# request ID so that if you must retry your request, the server will know to
|
2880
|
+
# ignore the request if it has already been completed. The server will
|
2881
|
+
# guarantee that for at least 60 minutes after the first request.
|
2882
|
+
#
|
2883
|
+
# For example, consider a situation where you make an initial request and
|
2884
|
+
# the request times out. If you make the request again with the same request
|
2885
|
+
# ID, the server can check if original operation with the same request ID
|
2886
|
+
# was received, and if so, will ignore the second request. This prevents
|
2887
|
+
# clients from accidentally creating duplicate commitments.
|
2888
|
+
#
|
2889
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2890
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2891
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2892
|
+
# @yieldparam result [::Gapic::Operation]
|
2893
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2894
|
+
#
|
2895
|
+
# @return [::Gapic::Operation]
|
2896
|
+
#
|
2897
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2898
|
+
#
|
2899
|
+
# @example Basic example
|
2900
|
+
# require "google/cloud/backupdr/v1"
|
2901
|
+
#
|
2902
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2903
|
+
# client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
|
2904
|
+
#
|
2905
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2906
|
+
# request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new
|
2907
|
+
#
|
2908
|
+
# # Call the trigger_backup method.
|
2909
|
+
# result = client.trigger_backup request
|
2910
|
+
#
|
2911
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2912
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2913
|
+
# # Here is how to wait for a response.
|
2914
|
+
# result.wait_until_done! timeout: 60
|
2915
|
+
# if result.response?
|
2916
|
+
# p result.response
|
2917
|
+
# else
|
2918
|
+
# puts "No response received."
|
2919
|
+
# end
|
2920
|
+
#
|
2921
|
+
def trigger_backup request, options = nil
|
2922
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2923
|
+
|
2924
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::TriggerBackupRequest
|
2925
|
+
|
2926
|
+
# Converts hash and nil to an options object
|
2927
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2928
|
+
|
2929
|
+
# Customize the options with defaults
|
2930
|
+
call_metadata = @config.rpcs.trigger_backup.metadata.to_h
|
2931
|
+
|
2932
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2933
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2934
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2935
|
+
gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
|
2936
|
+
transports_version_send: [:rest]
|
2937
|
+
|
2938
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2939
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2940
|
+
|
2941
|
+
options.apply_defaults timeout: @config.rpcs.trigger_backup.timeout,
|
2942
|
+
metadata: call_metadata,
|
2943
|
+
retry_policy: @config.rpcs.trigger_backup.retry_policy
|
2944
|
+
|
2945
|
+
options.apply_defaults timeout: @config.timeout,
|
2946
|
+
metadata: @config.metadata,
|
2947
|
+
retry_policy: @config.retry_policy
|
2948
|
+
|
2949
|
+
@backup_dr_stub.trigger_backup request, options do |result, operation|
|
2950
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2951
|
+
yield result, operation if block_given?
|
2952
|
+
throw :response, result
|
2953
|
+
end
|
2954
|
+
rescue ::Gapic::Rest::Error => e
|
2955
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2956
|
+
end
|
2957
|
+
|
2958
|
+
##
|
2959
|
+
# Configuration class for the BackupDR REST API.
|
2960
|
+
#
|
2961
|
+
# This class represents the configuration for BackupDR REST,
|
2962
|
+
# providing control over timeouts, retry behavior, logging, transport
|
2963
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
2964
|
+
# applied individually to specific RPCs. See
|
2965
|
+
# {::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client::Configuration::Rpcs}
|
2966
|
+
# for a list of RPCs that can be configured independently.
|
2967
|
+
#
|
2968
|
+
# Configuration can be applied globally to all clients, or to a single client
|
2969
|
+
# on construction.
|
2970
|
+
#
|
2971
|
+
# @example
|
2972
|
+
#
|
2973
|
+
# # Modify the global config, setting the timeout for
|
2974
|
+
# # list_management_servers to 20 seconds,
|
2975
|
+
# # and all remaining timeouts to 10 seconds.
|
2976
|
+
# ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config|
|
2977
|
+
# config.timeout = 10.0
|
2978
|
+
# config.rpcs.list_management_servers.timeout = 20.0
|
2979
|
+
# end
|
2980
|
+
#
|
2981
|
+
# # Apply the above configuration only to a new client.
|
2982
|
+
# client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config|
|
2983
|
+
# config.timeout = 10.0
|
2984
|
+
# config.rpcs.list_management_servers.timeout = 20.0
|
2985
|
+
# end
|
2986
|
+
#
|
2987
|
+
# @!attribute [rw] endpoint
|
2988
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
2989
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
2990
|
+
# @return [::String,nil]
|
2991
|
+
# @!attribute [rw] credentials
|
2992
|
+
# Credentials to send with calls. You may provide any of the following types:
|
2993
|
+
# * (`String`) The path to a service account key file in JSON format
|
2994
|
+
# * (`Hash`) A service account key as a Hash
|
2995
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2996
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
2997
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2998
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
2999
|
+
# * (`nil`) indicating no credentials
|
3000
|
+
# @return [::Object]
|
3001
|
+
# @!attribute [rw] scope
|
3002
|
+
# The OAuth scopes
|
3003
|
+
# @return [::Array<::String>]
|
3004
|
+
# @!attribute [rw] lib_name
|
3005
|
+
# The library name as recorded in instrumentation and logging
|
3006
|
+
# @return [::String]
|
3007
|
+
# @!attribute [rw] lib_version
|
3008
|
+
# The library version as recorded in instrumentation and logging
|
3009
|
+
# @return [::String]
|
3010
|
+
# @!attribute [rw] timeout
|
3011
|
+
# The call timeout in seconds.
|
3012
|
+
# @return [::Numeric]
|
3013
|
+
# @!attribute [rw] metadata
|
3014
|
+
# Additional headers to be sent with the call.
|
3015
|
+
# @return [::Hash{::Symbol=>::String}]
|
3016
|
+
# @!attribute [rw] retry_policy
|
3017
|
+
# The retry policy. The value is a hash with the following keys:
|
3018
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3019
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3020
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3021
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3022
|
+
# trigger a retry.
|
3023
|
+
# @return [::Hash]
|
3024
|
+
# @!attribute [rw] quota_project
|
3025
|
+
# A separate project against which to charge quota.
|
3026
|
+
# @return [::String]
|
3027
|
+
# @!attribute [rw] universe_domain
|
3028
|
+
# The universe domain within which to make requests. This determines the
|
3029
|
+
# default endpoint URL. The default value of nil uses the environment
|
3030
|
+
# universe (usually the default "googleapis.com" universe).
|
3031
|
+
# @return [::String,nil]
|
3032
|
+
# @!attribute [rw] logger
|
3033
|
+
# A custom logger to use for request/response debug logging, or the value
|
3034
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
3035
|
+
# explicitly disable logging.
|
3036
|
+
# @return [::Logger,:default,nil]
|
3037
|
+
#
|
3038
|
+
class Configuration
|
3039
|
+
extend ::Gapic::Config
|
3040
|
+
|
3041
|
+
# @private
|
3042
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
3043
|
+
DEFAULT_ENDPOINT = "backupdr.googleapis.com"
|
3044
|
+
|
3045
|
+
config_attr :endpoint, nil, ::String, nil
|
3046
|
+
config_attr :credentials, nil do |value|
|
3047
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
3048
|
+
allowed.any? { |klass| klass === value }
|
3049
|
+
end
|
3050
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
3051
|
+
config_attr :lib_name, nil, ::String, nil
|
3052
|
+
config_attr :lib_version, nil, ::String, nil
|
3053
|
+
config_attr :timeout, nil, ::Numeric, nil
|
3054
|
+
config_attr :metadata, nil, ::Hash, nil
|
3055
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3056
|
+
config_attr :quota_project, nil, ::String, nil
|
3057
|
+
config_attr :universe_domain, nil, ::String, nil
|
3058
|
+
|
3059
|
+
# @private
|
3060
|
+
# Overrides for http bindings for the RPCs of this service
|
3061
|
+
# are only used when this service is used as mixin, and only
|
3062
|
+
# by the host service.
|
3063
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
3064
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
3065
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
3066
|
+
|
3067
|
+
# @private
|
3068
|
+
def initialize parent_config = nil
|
3069
|
+
@parent_config = parent_config unless parent_config.nil?
|
3070
|
+
|
3071
|
+
yield self if block_given?
|
3072
|
+
end
|
3073
|
+
|
3074
|
+
##
|
3075
|
+
# Configurations for individual RPCs
|
3076
|
+
# @return [Rpcs]
|
3077
|
+
#
|
3078
|
+
def rpcs
|
3079
|
+
@rpcs ||= begin
|
3080
|
+
parent_rpcs = nil
|
3081
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
3082
|
+
Rpcs.new parent_rpcs
|
3083
|
+
end
|
3084
|
+
end
|
3085
|
+
|
3086
|
+
##
|
3087
|
+
# Configuration RPC class for the BackupDR API.
|
3088
|
+
#
|
3089
|
+
# Includes fields providing the configuration for each RPC in this service.
|
3090
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
3091
|
+
# the following configuration fields:
|
3092
|
+
#
|
3093
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
3094
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
3095
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
3096
|
+
# include the following keys:
|
3097
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3098
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3099
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3100
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3101
|
+
# trigger a retry.
|
3102
|
+
#
|
3103
|
+
class Rpcs
|
3104
|
+
##
|
3105
|
+
# RPC-specific configuration for `list_management_servers`
|
3106
|
+
# @return [::Gapic::Config::Method]
|
3107
|
+
#
|
3108
|
+
attr_reader :list_management_servers
|
3109
|
+
##
|
3110
|
+
# RPC-specific configuration for `get_management_server`
|
3111
|
+
# @return [::Gapic::Config::Method]
|
3112
|
+
#
|
3113
|
+
attr_reader :get_management_server
|
3114
|
+
##
|
3115
|
+
# RPC-specific configuration for `create_management_server`
|
3116
|
+
# @return [::Gapic::Config::Method]
|
3117
|
+
#
|
3118
|
+
attr_reader :create_management_server
|
3119
|
+
##
|
3120
|
+
# RPC-specific configuration for `delete_management_server`
|
3121
|
+
# @return [::Gapic::Config::Method]
|
3122
|
+
#
|
3123
|
+
attr_reader :delete_management_server
|
3124
|
+
##
|
3125
|
+
# RPC-specific configuration for `create_backup_vault`
|
3126
|
+
# @return [::Gapic::Config::Method]
|
3127
|
+
#
|
3128
|
+
attr_reader :create_backup_vault
|
3129
|
+
##
|
3130
|
+
# RPC-specific configuration for `list_backup_vaults`
|
3131
|
+
# @return [::Gapic::Config::Method]
|
3132
|
+
#
|
3133
|
+
attr_reader :list_backup_vaults
|
3134
|
+
##
|
3135
|
+
# RPC-specific configuration for `fetch_usable_backup_vaults`
|
3136
|
+
# @return [::Gapic::Config::Method]
|
3137
|
+
#
|
3138
|
+
attr_reader :fetch_usable_backup_vaults
|
3139
|
+
##
|
3140
|
+
# RPC-specific configuration for `get_backup_vault`
|
3141
|
+
# @return [::Gapic::Config::Method]
|
3142
|
+
#
|
3143
|
+
attr_reader :get_backup_vault
|
3144
|
+
##
|
3145
|
+
# RPC-specific configuration for `update_backup_vault`
|
3146
|
+
# @return [::Gapic::Config::Method]
|
3147
|
+
#
|
3148
|
+
attr_reader :update_backup_vault
|
3149
|
+
##
|
3150
|
+
# RPC-specific configuration for `delete_backup_vault`
|
3151
|
+
# @return [::Gapic::Config::Method]
|
3152
|
+
#
|
3153
|
+
attr_reader :delete_backup_vault
|
3154
|
+
##
|
3155
|
+
# RPC-specific configuration for `list_data_sources`
|
3156
|
+
# @return [::Gapic::Config::Method]
|
3157
|
+
#
|
3158
|
+
attr_reader :list_data_sources
|
3159
|
+
##
|
3160
|
+
# RPC-specific configuration for `get_data_source`
|
3161
|
+
# @return [::Gapic::Config::Method]
|
3162
|
+
#
|
3163
|
+
attr_reader :get_data_source
|
3164
|
+
##
|
3165
|
+
# RPC-specific configuration for `update_data_source`
|
3166
|
+
# @return [::Gapic::Config::Method]
|
3167
|
+
#
|
3168
|
+
attr_reader :update_data_source
|
3169
|
+
##
|
3170
|
+
# RPC-specific configuration for `list_backups`
|
3171
|
+
# @return [::Gapic::Config::Method]
|
3172
|
+
#
|
3173
|
+
attr_reader :list_backups
|
3174
|
+
##
|
3175
|
+
# RPC-specific configuration for `get_backup`
|
3176
|
+
# @return [::Gapic::Config::Method]
|
3177
|
+
#
|
3178
|
+
attr_reader :get_backup
|
3179
|
+
##
|
3180
|
+
# RPC-specific configuration for `update_backup`
|
3181
|
+
# @return [::Gapic::Config::Method]
|
3182
|
+
#
|
3183
|
+
attr_reader :update_backup
|
3184
|
+
##
|
3185
|
+
# RPC-specific configuration for `delete_backup`
|
3186
|
+
# @return [::Gapic::Config::Method]
|
3187
|
+
#
|
3188
|
+
attr_reader :delete_backup
|
3189
|
+
##
|
3190
|
+
# RPC-specific configuration for `restore_backup`
|
3191
|
+
# @return [::Gapic::Config::Method]
|
3192
|
+
#
|
3193
|
+
attr_reader :restore_backup
|
3194
|
+
##
|
3195
|
+
# RPC-specific configuration for `create_backup_plan`
|
3196
|
+
# @return [::Gapic::Config::Method]
|
3197
|
+
#
|
3198
|
+
attr_reader :create_backup_plan
|
3199
|
+
##
|
3200
|
+
# RPC-specific configuration for `get_backup_plan`
|
3201
|
+
# @return [::Gapic::Config::Method]
|
3202
|
+
#
|
3203
|
+
attr_reader :get_backup_plan
|
3204
|
+
##
|
3205
|
+
# RPC-specific configuration for `list_backup_plans`
|
3206
|
+
# @return [::Gapic::Config::Method]
|
3207
|
+
#
|
3208
|
+
attr_reader :list_backup_plans
|
3209
|
+
##
|
3210
|
+
# RPC-specific configuration for `delete_backup_plan`
|
3211
|
+
# @return [::Gapic::Config::Method]
|
3212
|
+
#
|
3213
|
+
attr_reader :delete_backup_plan
|
3214
|
+
##
|
3215
|
+
# RPC-specific configuration for `create_backup_plan_association`
|
3216
|
+
# @return [::Gapic::Config::Method]
|
3217
|
+
#
|
3218
|
+
attr_reader :create_backup_plan_association
|
3219
|
+
##
|
3220
|
+
# RPC-specific configuration for `get_backup_plan_association`
|
3221
|
+
# @return [::Gapic::Config::Method]
|
3222
|
+
#
|
3223
|
+
attr_reader :get_backup_plan_association
|
3224
|
+
##
|
3225
|
+
# RPC-specific configuration for `list_backup_plan_associations`
|
3226
|
+
# @return [::Gapic::Config::Method]
|
3227
|
+
#
|
3228
|
+
attr_reader :list_backup_plan_associations
|
3229
|
+
##
|
3230
|
+
# RPC-specific configuration for `delete_backup_plan_association`
|
3231
|
+
# @return [::Gapic::Config::Method]
|
3232
|
+
#
|
3233
|
+
attr_reader :delete_backup_plan_association
|
3234
|
+
##
|
3235
|
+
# RPC-specific configuration for `trigger_backup`
|
3236
|
+
# @return [::Gapic::Config::Method]
|
3237
|
+
#
|
3238
|
+
attr_reader :trigger_backup
|
765
3239
|
|
766
3240
|
# @private
|
767
3241
|
def initialize parent_rpcs = nil
|
@@ -773,6 +3247,52 @@ module Google
|
|
773
3247
|
@create_management_server = ::Gapic::Config::Method.new create_management_server_config
|
774
3248
|
delete_management_server_config = parent_rpcs.delete_management_server if parent_rpcs.respond_to? :delete_management_server
|
775
3249
|
@delete_management_server = ::Gapic::Config::Method.new delete_management_server_config
|
3250
|
+
create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault
|
3251
|
+
@create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config
|
3252
|
+
list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults
|
3253
|
+
@list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config
|
3254
|
+
fetch_usable_backup_vaults_config = parent_rpcs.fetch_usable_backup_vaults if parent_rpcs.respond_to? :fetch_usable_backup_vaults
|
3255
|
+
@fetch_usable_backup_vaults = ::Gapic::Config::Method.new fetch_usable_backup_vaults_config
|
3256
|
+
get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault
|
3257
|
+
@get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config
|
3258
|
+
update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault
|
3259
|
+
@update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config
|
3260
|
+
delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault
|
3261
|
+
@delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config
|
3262
|
+
list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources
|
3263
|
+
@list_data_sources = ::Gapic::Config::Method.new list_data_sources_config
|
3264
|
+
get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source
|
3265
|
+
@get_data_source = ::Gapic::Config::Method.new get_data_source_config
|
3266
|
+
update_data_source_config = parent_rpcs.update_data_source if parent_rpcs.respond_to? :update_data_source
|
3267
|
+
@update_data_source = ::Gapic::Config::Method.new update_data_source_config
|
3268
|
+
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|
3269
|
+
@list_backups = ::Gapic::Config::Method.new list_backups_config
|
3270
|
+
get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
|
3271
|
+
@get_backup = ::Gapic::Config::Method.new get_backup_config
|
3272
|
+
update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup
|
3273
|
+
@update_backup = ::Gapic::Config::Method.new update_backup_config
|
3274
|
+
delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
|
3275
|
+
@delete_backup = ::Gapic::Config::Method.new delete_backup_config
|
3276
|
+
restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup
|
3277
|
+
@restore_backup = ::Gapic::Config::Method.new restore_backup_config
|
3278
|
+
create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan
|
3279
|
+
@create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config
|
3280
|
+
get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan
|
3281
|
+
@get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config
|
3282
|
+
list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans
|
3283
|
+
@list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config
|
3284
|
+
delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan
|
3285
|
+
@delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config
|
3286
|
+
create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association
|
3287
|
+
@create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config
|
3288
|
+
get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association
|
3289
|
+
@get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config
|
3290
|
+
list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations
|
3291
|
+
@list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config
|
3292
|
+
delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association
|
3293
|
+
@delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config
|
3294
|
+
trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup
|
3295
|
+
@trigger_backup = ::Gapic::Config::Method.new trigger_backup_config
|
776
3296
|
|
777
3297
|
yield self if block_given?
|
778
3298
|
end
|