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