google-cloud-gke_backup-v1 1.0.0 → 1.1.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/gke_backup/v1/backup_for_gke/client.rb +1910 -339
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb +80 -0
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb +1756 -283
- data/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb +878 -20
- data/lib/google/cloud/gke_backup/v1/version.rb +1 -1
- data/lib/google/cloud/gkebackup/v1/backup_channel_pb.rb +48 -0
- data/lib/google/cloud/gkebackup/v1/backup_pb.rb +1 -1
- data/lib/google/cloud/gkebackup/v1/backup_plan_binding_pb.rb +50 -0
- data/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb +1 -1
- data/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb +27 -1
- data/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb +28 -0
- data/lib/google/cloud/gkebackup/v1/restore_channel_pb.rb +48 -0
- data/lib/google/cloud/gkebackup/v1/restore_pb.rb +1 -1
- data/lib/google/cloud/gkebackup/v1/restore_plan_binding_pb.rb +48 -0
- data/lib/google/cloud/gkebackup/v1/volume_pb.rb +1 -1
- data/proto_docs/google/api/client.rb +6 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/cloud/gkebackup/v1/backup.rb +8 -1
- data/proto_docs/google/cloud/gkebackup/v1/backup_channel.rb +88 -0
- data/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb +8 -1
- data/proto_docs/google/cloud/gkebackup/v1/backup_plan_binding.rb +130 -0
- data/proto_docs/google/cloud/gkebackup/v1/common.rb +2 -2
- data/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb +389 -3
- data/proto_docs/google/cloud/gkebackup/v1/restore.rb +14 -6
- data/proto_docs/google/cloud/gkebackup/v1/restore_channel.rb +87 -0
- data/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb +3 -1
- data/proto_docs/google/cloud/gkebackup/v1/restore_plan_binding.rb +68 -0
- data/proto_docs/google/cloud/gkebackup/v1/volume.rb +13 -1
- metadata +12 -3
@@ -91,6 +91,32 @@ module Google
|
|
91
91
|
|
92
92
|
default_config.rpcs.delete_backup_plan.timeout = 60.0
|
93
93
|
|
94
|
+
default_config.rpcs.create_backup_channel.timeout = 60.0
|
95
|
+
|
96
|
+
default_config.rpcs.list_backup_channels.timeout = 60.0
|
97
|
+
default_config.rpcs.list_backup_channels.retry_policy = {
|
98
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
99
|
+
}
|
100
|
+
|
101
|
+
default_config.rpcs.get_backup_channel.timeout = 60.0
|
102
|
+
default_config.rpcs.get_backup_channel.retry_policy = {
|
103
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
104
|
+
}
|
105
|
+
|
106
|
+
default_config.rpcs.update_backup_channel.timeout = 60.0
|
107
|
+
|
108
|
+
default_config.rpcs.delete_backup_channel.timeout = 60.0
|
109
|
+
|
110
|
+
default_config.rpcs.list_backup_plan_bindings.timeout = 60.0
|
111
|
+
default_config.rpcs.list_backup_plan_bindings.retry_policy = {
|
112
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
113
|
+
}
|
114
|
+
|
115
|
+
default_config.rpcs.get_backup_plan_binding.timeout = 60.0
|
116
|
+
default_config.rpcs.get_backup_plan_binding.retry_policy = {
|
117
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
118
|
+
}
|
119
|
+
|
94
120
|
default_config.rpcs.create_backup.timeout = 120.0
|
95
121
|
|
96
122
|
default_config.rpcs.list_backups.timeout = 60.0
|
@@ -133,6 +159,32 @@ module Google
|
|
133
159
|
|
134
160
|
default_config.rpcs.delete_restore_plan.timeout = 60.0
|
135
161
|
|
162
|
+
default_config.rpcs.create_restore_channel.timeout = 60.0
|
163
|
+
|
164
|
+
default_config.rpcs.list_restore_channels.timeout = 60.0
|
165
|
+
default_config.rpcs.list_restore_channels.retry_policy = {
|
166
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
167
|
+
}
|
168
|
+
|
169
|
+
default_config.rpcs.get_restore_channel.timeout = 60.0
|
170
|
+
default_config.rpcs.get_restore_channel.retry_policy = {
|
171
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
172
|
+
}
|
173
|
+
|
174
|
+
default_config.rpcs.update_restore_channel.timeout = 60.0
|
175
|
+
|
176
|
+
default_config.rpcs.delete_restore_channel.timeout = 60.0
|
177
|
+
|
178
|
+
default_config.rpcs.list_restore_plan_bindings.timeout = 60.0
|
179
|
+
default_config.rpcs.list_restore_plan_bindings.retry_policy = {
|
180
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
181
|
+
}
|
182
|
+
|
183
|
+
default_config.rpcs.get_restore_plan_binding.timeout = 60.0
|
184
|
+
default_config.rpcs.get_restore_plan_binding.retry_policy = {
|
185
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
186
|
+
}
|
187
|
+
|
136
188
|
default_config.rpcs.create_restore.timeout = 120.0
|
137
189
|
|
138
190
|
default_config.rpcs.list_restores.timeout = 60.0
|
@@ -786,37 +838,38 @@ module Google
|
|
786
838
|
end
|
787
839
|
|
788
840
|
##
|
789
|
-
# Creates a
|
841
|
+
# Creates a new BackupChannel in a given location.
|
790
842
|
#
|
791
|
-
# @overload
|
792
|
-
# Pass arguments to `
|
793
|
-
# {::Google::Cloud::GkeBackup::V1::
|
843
|
+
# @overload create_backup_channel(request, options = nil)
|
844
|
+
# Pass arguments to `create_backup_channel` via a request object, either of type
|
845
|
+
# {::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest} or an equivalent Hash.
|
794
846
|
#
|
795
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
847
|
+
# @param request [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, ::Hash]
|
796
848
|
# A request object representing the call parameters. Required. To specify no
|
797
849
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
798
850
|
# @param options [::Gapic::CallOptions, ::Hash]
|
799
851
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
800
852
|
#
|
801
|
-
# @overload
|
802
|
-
# Pass arguments to `
|
853
|
+
# @overload create_backup_channel(parent: nil, backup_channel: nil, backup_channel_id: nil)
|
854
|
+
# Pass arguments to `create_backup_channel` via keyword arguments. Note that at
|
803
855
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
804
856
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
805
857
|
#
|
806
858
|
# @param parent [::String]
|
807
|
-
# Required. The
|
808
|
-
# Format: `projects/*/locations
|
809
|
-
# @param
|
810
|
-
#
|
811
|
-
# @param
|
812
|
-
# Optional. The client-provided short name for the
|
859
|
+
# Required. The location within which to create the BackupChannel.
|
860
|
+
# Format: `projects/*/locations/*`
|
861
|
+
# @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash]
|
862
|
+
# Required. The BackupChannel resource object to create.
|
863
|
+
# @param backup_channel_id [::String]
|
864
|
+
# Optional. The client-provided short name for the BackupChannel resource.
|
813
865
|
# This name must:
|
814
866
|
#
|
815
867
|
# - be between 1 and 63 characters long (inclusive)
|
816
868
|
# - consist of only lower-case ASCII letters, numbers, and dashes
|
817
869
|
# - start with a lower-case letter
|
818
870
|
# - end with a lower-case letter or number
|
819
|
-
# - be unique within the set of
|
871
|
+
# - be unique within the set of BackupChannels in this location
|
872
|
+
# If the user does not provide a name, a uuid will be used as the name.
|
820
873
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
821
874
|
# @yieldparam result [::Gapic::Operation]
|
822
875
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -832,10 +885,10 @@ module Google
|
|
832
885
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
833
886
|
#
|
834
887
|
# # Create a request. To set request fields, pass in keyword arguments.
|
835
|
-
# request = Google::Cloud::GkeBackup::V1::
|
888
|
+
# request = Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new
|
836
889
|
#
|
837
|
-
# # Call the
|
838
|
-
# result = client.
|
890
|
+
# # Call the create_backup_channel method.
|
891
|
+
# result = client.create_backup_channel request
|
839
892
|
#
|
840
893
|
# # The returned object is of type Gapic::Operation. You can use it to
|
841
894
|
# # check the status of an operation, cancel it, or wait for results.
|
@@ -847,16 +900,16 @@ module Google
|
|
847
900
|
# puts "No response received."
|
848
901
|
# end
|
849
902
|
#
|
850
|
-
def
|
903
|
+
def create_backup_channel request, options = nil
|
851
904
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
852
905
|
|
853
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
906
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest
|
854
907
|
|
855
908
|
# Converts hash and nil to an options object
|
856
909
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
857
910
|
|
858
911
|
# Customize the options with defaults
|
859
|
-
call_metadata = @config.rpcs.
|
912
|
+
call_metadata = @config.rpcs.create_backup_channel.metadata.to_h
|
860
913
|
|
861
914
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
862
915
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -867,15 +920,15 @@ module Google
|
|
867
920
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
868
921
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
869
922
|
|
870
|
-
options.apply_defaults timeout: @config.rpcs.
|
923
|
+
options.apply_defaults timeout: @config.rpcs.create_backup_channel.timeout,
|
871
924
|
metadata: call_metadata,
|
872
|
-
retry_policy: @config.rpcs.
|
925
|
+
retry_policy: @config.rpcs.create_backup_channel.retry_policy
|
873
926
|
|
874
927
|
options.apply_defaults timeout: @config.timeout,
|
875
928
|
metadata: @config.metadata,
|
876
929
|
retry_policy: @config.retry_policy
|
877
930
|
|
878
|
-
@backup_for_gke_stub.
|
931
|
+
@backup_for_gke_stub.create_backup_channel request, options do |result, operation|
|
879
932
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
880
933
|
yield result, operation if block_given?
|
881
934
|
throw :response, result
|
@@ -885,49 +938,50 @@ module Google
|
|
885
938
|
end
|
886
939
|
|
887
940
|
##
|
888
|
-
# Lists
|
941
|
+
# Lists BackupChannels in a given location.
|
889
942
|
#
|
890
|
-
# @overload
|
891
|
-
# Pass arguments to `
|
892
|
-
# {::Google::Cloud::GkeBackup::V1::
|
943
|
+
# @overload list_backup_channels(request, options = nil)
|
944
|
+
# Pass arguments to `list_backup_channels` via a request object, either of type
|
945
|
+
# {::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest} or an equivalent Hash.
|
893
946
|
#
|
894
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
947
|
+
# @param request [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, ::Hash]
|
895
948
|
# A request object representing the call parameters. Required. To specify no
|
896
949
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
897
950
|
# @param options [::Gapic::CallOptions, ::Hash]
|
898
951
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
899
952
|
#
|
900
|
-
# @overload
|
901
|
-
# Pass arguments to `
|
953
|
+
# @overload list_backup_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
954
|
+
# Pass arguments to `list_backup_channels` via keyword arguments. Note that at
|
902
955
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
903
956
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
904
957
|
#
|
905
958
|
# @param parent [::String]
|
906
|
-
# Required. The
|
907
|
-
# Format: `projects/*/locations
|
959
|
+
# Required. The location that contains the BackupChannels to list.
|
960
|
+
# Format: `projects/*/locations/*`
|
908
961
|
# @param page_size [::Integer]
|
909
962
|
# Optional. The target number of results to return in a single response.
|
910
963
|
# If not specified, a default value will be chosen by the service.
|
911
964
|
# Note that the response may include a partial list and a caller should
|
912
965
|
# only rely on the response's
|
913
|
-
# {::Google::Cloud::GkeBackup::V1::
|
966
|
+
# {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token}
|
914
967
|
# to determine if there are more instances left to be queried.
|
915
968
|
# @param page_token [::String]
|
916
969
|
# Optional. The value of
|
917
|
-
# {::Google::Cloud::GkeBackup::V1::
|
918
|
-
# received from a previous `
|
970
|
+
# {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token}
|
971
|
+
# received from a previous `ListBackupChannels` call.
|
919
972
|
# Provide this to retrieve the subsequent page in a multi-page list of
|
920
973
|
# results. When paginating, all other parameters provided to
|
921
|
-
# `
|
974
|
+
# `ListBackupChannels` must match the call that provided the page
|
975
|
+
# token.
|
922
976
|
# @param filter [::String]
|
923
977
|
# Optional. Field match expression used to filter the results.
|
924
978
|
# @param order_by [::String]
|
925
979
|
# Optional. Field by which to sort the results.
|
926
980
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
927
|
-
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::
|
981
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>]
|
928
982
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
929
983
|
#
|
930
|
-
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::
|
984
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>]
|
931
985
|
#
|
932
986
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
933
987
|
#
|
@@ -938,28 +992,28 @@ module Google
|
|
938
992
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
939
993
|
#
|
940
994
|
# # Create a request. To set request fields, pass in keyword arguments.
|
941
|
-
# request = Google::Cloud::GkeBackup::V1::
|
995
|
+
# request = Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.new
|
942
996
|
#
|
943
|
-
# # Call the
|
944
|
-
# result = client.
|
997
|
+
# # Call the list_backup_channels method.
|
998
|
+
# result = client.list_backup_channels request
|
945
999
|
#
|
946
1000
|
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
947
1001
|
# # over elements, and API calls will be issued to fetch pages as needed.
|
948
1002
|
# result.each do |item|
|
949
|
-
# # Each element is of type ::Google::Cloud::GkeBackup::V1::
|
1003
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupChannel.
|
950
1004
|
# p item
|
951
1005
|
# end
|
952
1006
|
#
|
953
|
-
def
|
1007
|
+
def list_backup_channels request, options = nil
|
954
1008
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
955
1009
|
|
956
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
1010
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest
|
957
1011
|
|
958
1012
|
# Converts hash and nil to an options object
|
959
1013
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
960
1014
|
|
961
1015
|
# Customize the options with defaults
|
962
|
-
call_metadata = @config.rpcs.
|
1016
|
+
call_metadata = @config.rpcs.list_backup_channels.metadata.to_h
|
963
1017
|
|
964
1018
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
965
1019
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -970,16 +1024,16 @@ module Google
|
|
970
1024
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
971
1025
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
972
1026
|
|
973
|
-
options.apply_defaults timeout: @config.rpcs.
|
1027
|
+
options.apply_defaults timeout: @config.rpcs.list_backup_channels.timeout,
|
974
1028
|
metadata: call_metadata,
|
975
|
-
retry_policy: @config.rpcs.
|
1029
|
+
retry_policy: @config.rpcs.list_backup_channels.retry_policy
|
976
1030
|
|
977
1031
|
options.apply_defaults timeout: @config.timeout,
|
978
1032
|
metadata: @config.metadata,
|
979
1033
|
retry_policy: @config.retry_policy
|
980
1034
|
|
981
|
-
@backup_for_gke_stub.
|
982
|
-
result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :
|
1035
|
+
@backup_for_gke_stub.list_backup_channels request, options do |result, operation|
|
1036
|
+
result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_channels, "backup_channels", request, result, options
|
983
1037
|
yield result, operation if block_given?
|
984
1038
|
throw :response, result
|
985
1039
|
end
|
@@ -988,31 +1042,31 @@ module Google
|
|
988
1042
|
end
|
989
1043
|
|
990
1044
|
##
|
991
|
-
# Retrieve the details of a single
|
1045
|
+
# Retrieve the details of a single BackupChannel.
|
992
1046
|
#
|
993
|
-
# @overload
|
994
|
-
# Pass arguments to `
|
995
|
-
# {::Google::Cloud::GkeBackup::V1::
|
1047
|
+
# @overload get_backup_channel(request, options = nil)
|
1048
|
+
# Pass arguments to `get_backup_channel` via a request object, either of type
|
1049
|
+
# {::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest} or an equivalent Hash.
|
996
1050
|
#
|
997
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
1051
|
+
# @param request [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, ::Hash]
|
998
1052
|
# A request object representing the call parameters. Required. To specify no
|
999
1053
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1000
1054
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1001
1055
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1002
1056
|
#
|
1003
|
-
# @overload
|
1004
|
-
# Pass arguments to `
|
1057
|
+
# @overload get_backup_channel(name: nil)
|
1058
|
+
# Pass arguments to `get_backup_channel` via keyword arguments. Note that at
|
1005
1059
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1006
1060
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1007
1061
|
#
|
1008
1062
|
# @param name [::String]
|
1009
|
-
# Required.
|
1010
|
-
# Format: `projects/*/locations/*/
|
1063
|
+
# Required. Fully qualified BackupChannel name.
|
1064
|
+
# Format: `projects/*/locations/*/backupChannels/*`
|
1011
1065
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1012
|
-
# @yieldparam result [::Google::Cloud::GkeBackup::V1::
|
1066
|
+
# @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupChannel]
|
1013
1067
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1014
1068
|
#
|
1015
|
-
# @return [::Google::Cloud::GkeBackup::V1::
|
1069
|
+
# @return [::Google::Cloud::GkeBackup::V1::BackupChannel]
|
1016
1070
|
#
|
1017
1071
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1018
1072
|
#
|
@@ -1023,24 +1077,24 @@ module Google
|
|
1023
1077
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1024
1078
|
#
|
1025
1079
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1026
|
-
# request = Google::Cloud::GkeBackup::V1::
|
1080
|
+
# request = Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new
|
1027
1081
|
#
|
1028
|
-
# # Call the
|
1029
|
-
# result = client.
|
1082
|
+
# # Call the get_backup_channel method.
|
1083
|
+
# result = client.get_backup_channel request
|
1030
1084
|
#
|
1031
|
-
# # The returned object is of type Google::Cloud::GkeBackup::V1::
|
1085
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::BackupChannel.
|
1032
1086
|
# p result
|
1033
1087
|
#
|
1034
|
-
def
|
1088
|
+
def get_backup_channel request, options = nil
|
1035
1089
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1036
1090
|
|
1037
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
1091
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest
|
1038
1092
|
|
1039
1093
|
# Converts hash and nil to an options object
|
1040
1094
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1041
1095
|
|
1042
1096
|
# Customize the options with defaults
|
1043
|
-
call_metadata = @config.rpcs.
|
1097
|
+
call_metadata = @config.rpcs.get_backup_channel.metadata.to_h
|
1044
1098
|
|
1045
1099
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1046
1100
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1051,15 +1105,15 @@ module Google
|
|
1051
1105
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1052
1106
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1053
1107
|
|
1054
|
-
options.apply_defaults timeout: @config.rpcs.
|
1108
|
+
options.apply_defaults timeout: @config.rpcs.get_backup_channel.timeout,
|
1055
1109
|
metadata: call_metadata,
|
1056
|
-
retry_policy: @config.rpcs.
|
1110
|
+
retry_policy: @config.rpcs.get_backup_channel.retry_policy
|
1057
1111
|
|
1058
1112
|
options.apply_defaults timeout: @config.timeout,
|
1059
1113
|
metadata: @config.metadata,
|
1060
1114
|
retry_policy: @config.retry_policy
|
1061
1115
|
|
1062
|
-
@backup_for_gke_stub.
|
1116
|
+
@backup_for_gke_stub.get_backup_channel request, options do |result, operation|
|
1063
1117
|
yield result, operation if block_given?
|
1064
1118
|
end
|
1065
1119
|
rescue ::Gapic::Rest::Error => e
|
@@ -1067,35 +1121,36 @@ module Google
|
|
1067
1121
|
end
|
1068
1122
|
|
1069
1123
|
##
|
1070
|
-
# Update a
|
1124
|
+
# Update a BackupChannel.
|
1071
1125
|
#
|
1072
|
-
# @overload
|
1073
|
-
# Pass arguments to `
|
1074
|
-
# {::Google::Cloud::GkeBackup::V1::
|
1126
|
+
# @overload update_backup_channel(request, options = nil)
|
1127
|
+
# Pass arguments to `update_backup_channel` via a request object, either of type
|
1128
|
+
# {::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest} or an equivalent Hash.
|
1075
1129
|
#
|
1076
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
1130
|
+
# @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, ::Hash]
|
1077
1131
|
# A request object representing the call parameters. Required. To specify no
|
1078
1132
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1079
1133
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1080
1134
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1081
1135
|
#
|
1082
|
-
# @overload
|
1083
|
-
# Pass arguments to `
|
1136
|
+
# @overload update_backup_channel(backup_channel: nil, update_mask: nil)
|
1137
|
+
# Pass arguments to `update_backup_channel` via keyword arguments. Note that at
|
1084
1138
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1085
1139
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1086
1140
|
#
|
1087
|
-
# @param
|
1088
|
-
# Required. A new version of the
|
1141
|
+
# @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash]
|
1142
|
+
# Required. A new version of the BackupChannel resource that contains updated
|
1089
1143
|
# fields. This may be sparsely populated if an `update_mask` is provided.
|
1090
1144
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1091
1145
|
# Optional. This is used to specify the fields to be overwritten in the
|
1092
|
-
#
|
1093
|
-
# updated fields will be taken from the `
|
1094
|
-
# with this request. Field names are relative to the root of the resource
|
1095
|
-
#
|
1096
|
-
#
|
1097
|
-
#
|
1098
|
-
# and
|
1146
|
+
# BackupChannel targeted for update. The values for each of these
|
1147
|
+
# updated fields will be taken from the `backup_channel` provided
|
1148
|
+
# with this request. Field names are relative to the root of the resource
|
1149
|
+
# (e.g., `description`, `labels`, etc.)
|
1150
|
+
# If no `update_mask` is provided, all fields in `backup_channel` will
|
1151
|
+
# be written to the target BackupChannel resource. Note that
|
1152
|
+
# OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and
|
1153
|
+
# are not used to update the target BackupChannel.
|
1099
1154
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1100
1155
|
# @yieldparam result [::Gapic::Operation]
|
1101
1156
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1111,10 +1166,10 @@ module Google
|
|
1111
1166
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1112
1167
|
#
|
1113
1168
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1114
|
-
# request = Google::Cloud::GkeBackup::V1::
|
1169
|
+
# request = Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new
|
1115
1170
|
#
|
1116
|
-
# # Call the
|
1117
|
-
# result = client.
|
1171
|
+
# # Call the update_backup_channel method.
|
1172
|
+
# result = client.update_backup_channel request
|
1118
1173
|
#
|
1119
1174
|
# # The returned object is of type Gapic::Operation. You can use it to
|
1120
1175
|
# # check the status of an operation, cancel it, or wait for results.
|
@@ -1126,16 +1181,16 @@ module Google
|
|
1126
1181
|
# puts "No response received."
|
1127
1182
|
# end
|
1128
1183
|
#
|
1129
|
-
def
|
1184
|
+
def update_backup_channel request, options = nil
|
1130
1185
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1131
1186
|
|
1132
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
1187
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest
|
1133
1188
|
|
1134
1189
|
# Converts hash and nil to an options object
|
1135
1190
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1136
1191
|
|
1137
1192
|
# Customize the options with defaults
|
1138
|
-
call_metadata = @config.rpcs.
|
1193
|
+
call_metadata = @config.rpcs.update_backup_channel.metadata.to_h
|
1139
1194
|
|
1140
1195
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1141
1196
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1146,15 +1201,15 @@ module Google
|
|
1146
1201
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1147
1202
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1148
1203
|
|
1149
|
-
options.apply_defaults timeout: @config.rpcs.
|
1204
|
+
options.apply_defaults timeout: @config.rpcs.update_backup_channel.timeout,
|
1150
1205
|
metadata: call_metadata,
|
1151
|
-
retry_policy: @config.rpcs.
|
1206
|
+
retry_policy: @config.rpcs.update_backup_channel.retry_policy
|
1152
1207
|
|
1153
1208
|
options.apply_defaults timeout: @config.timeout,
|
1154
1209
|
metadata: @config.metadata,
|
1155
1210
|
retry_policy: @config.retry_policy
|
1156
1211
|
|
1157
|
-
@backup_for_gke_stub.
|
1212
|
+
@backup_for_gke_stub.update_backup_channel request, options do |result, operation|
|
1158
1213
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1159
1214
|
yield result, operation if block_given?
|
1160
1215
|
throw :response, result
|
@@ -1164,34 +1219,34 @@ module Google
|
|
1164
1219
|
end
|
1165
1220
|
|
1166
1221
|
##
|
1167
|
-
# Deletes an existing
|
1222
|
+
# Deletes an existing BackupChannel.
|
1168
1223
|
#
|
1169
|
-
# @overload
|
1170
|
-
# Pass arguments to `
|
1171
|
-
# {::Google::Cloud::GkeBackup::V1::
|
1224
|
+
# @overload delete_backup_channel(request, options = nil)
|
1225
|
+
# Pass arguments to `delete_backup_channel` via a request object, either of type
|
1226
|
+
# {::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest} or an equivalent Hash.
|
1172
1227
|
#
|
1173
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
1228
|
+
# @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, ::Hash]
|
1174
1229
|
# A request object representing the call parameters. Required. To specify no
|
1175
1230
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1176
1231
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1177
1232
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1178
1233
|
#
|
1179
|
-
# @overload
|
1180
|
-
# Pass arguments to `
|
1234
|
+
# @overload delete_backup_channel(name: nil, etag: nil, force: nil)
|
1235
|
+
# Pass arguments to `delete_backup_channel` via keyword arguments. Note that at
|
1181
1236
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1182
1237
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1183
1238
|
#
|
1184
1239
|
# @param name [::String]
|
1185
|
-
# Required.
|
1186
|
-
# Format: `projects/*/locations/*/
|
1240
|
+
# Required. Fully qualified BackupChannel name.
|
1241
|
+
# Format: `projects/*/locations/*/backupChannels/*`
|
1187
1242
|
# @param etag [::String]
|
1188
1243
|
# Optional. If provided, this value must match the current value of the
|
1189
|
-
# target
|
1190
|
-
# request is rejected.
|
1244
|
+
# target BackupChannel's {::Google::Cloud::GkeBackup::V1::BackupChannel#etag etag}
|
1245
|
+
# field or the request is rejected.
|
1191
1246
|
# @param force [::Boolean]
|
1192
|
-
# Optional. If set to true, any
|
1193
|
-
# deleted. Otherwise, the request will only
|
1194
|
-
#
|
1247
|
+
# Optional. If set to true, any BackupPlanAssociations below this
|
1248
|
+
# BackupChannel will also be deleted. Otherwise, the request will only
|
1249
|
+
# succeed if the BackupChannel has no BackupPlanAssociations.
|
1195
1250
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1196
1251
|
# @yieldparam result [::Gapic::Operation]
|
1197
1252
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1207,10 +1262,10 @@ module Google
|
|
1207
1262
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1208
1263
|
#
|
1209
1264
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1210
|
-
# request = Google::Cloud::GkeBackup::V1::
|
1265
|
+
# request = Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new
|
1211
1266
|
#
|
1212
|
-
# # Call the
|
1213
|
-
# result = client.
|
1267
|
+
# # Call the delete_backup_channel method.
|
1268
|
+
# result = client.delete_backup_channel request
|
1214
1269
|
#
|
1215
1270
|
# # The returned object is of type Gapic::Operation. You can use it to
|
1216
1271
|
# # check the status of an operation, cancel it, or wait for results.
|
@@ -1222,16 +1277,16 @@ module Google
|
|
1222
1277
|
# puts "No response received."
|
1223
1278
|
# end
|
1224
1279
|
#
|
1225
|
-
def
|
1280
|
+
def delete_backup_channel request, options = nil
|
1226
1281
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1227
1282
|
|
1228
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
1283
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest
|
1229
1284
|
|
1230
1285
|
# Converts hash and nil to an options object
|
1231
1286
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1232
1287
|
|
1233
1288
|
# Customize the options with defaults
|
1234
|
-
call_metadata = @config.rpcs.
|
1289
|
+
call_metadata = @config.rpcs.delete_backup_channel.metadata.to_h
|
1235
1290
|
|
1236
1291
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1237
1292
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1242,15 +1297,15 @@ module Google
|
|
1242
1297
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1243
1298
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1244
1299
|
|
1245
|
-
options.apply_defaults timeout: @config.rpcs.
|
1300
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup_channel.timeout,
|
1246
1301
|
metadata: call_metadata,
|
1247
|
-
retry_policy: @config.rpcs.
|
1302
|
+
retry_policy: @config.rpcs.delete_backup_channel.retry_policy
|
1248
1303
|
|
1249
1304
|
options.apply_defaults timeout: @config.timeout,
|
1250
1305
|
metadata: @config.metadata,
|
1251
1306
|
retry_policy: @config.retry_policy
|
1252
1307
|
|
1253
|
-
@backup_for_gke_stub.
|
1308
|
+
@backup_for_gke_stub.delete_backup_channel request, options do |result, operation|
|
1254
1309
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1255
1310
|
yield result, operation if block_given?
|
1256
1311
|
throw :response, result
|
@@ -1260,49 +1315,50 @@ module Google
|
|
1260
1315
|
end
|
1261
1316
|
|
1262
1317
|
##
|
1263
|
-
# Lists
|
1318
|
+
# Lists BackupPlanBindings in a given location.
|
1264
1319
|
#
|
1265
|
-
# @overload
|
1266
|
-
# Pass arguments to `
|
1267
|
-
# {::Google::Cloud::GkeBackup::V1::
|
1320
|
+
# @overload list_backup_plan_bindings(request, options = nil)
|
1321
|
+
# Pass arguments to `list_backup_plan_bindings` via a request object, either of type
|
1322
|
+
# {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest} or an equivalent Hash.
|
1268
1323
|
#
|
1269
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
1324
|
+
# @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, ::Hash]
|
1270
1325
|
# A request object representing the call parameters. Required. To specify no
|
1271
1326
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1272
1327
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1273
1328
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1274
1329
|
#
|
1275
|
-
# @overload
|
1276
|
-
# Pass arguments to `
|
1330
|
+
# @overload list_backup_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1331
|
+
# Pass arguments to `list_backup_plan_bindings` via keyword arguments. Note that at
|
1277
1332
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1278
1333
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1279
1334
|
#
|
1280
1335
|
# @param parent [::String]
|
1281
|
-
# Required. The
|
1282
|
-
# Format: `projects/*/locations/*/
|
1336
|
+
# Required. The BackupChannel that contains the BackupPlanBindings to list.
|
1337
|
+
# Format: `projects/*/locations/*/backupChannels/*`
|
1283
1338
|
# @param page_size [::Integer]
|
1284
1339
|
# Optional. The target number of results to return in a single response.
|
1285
1340
|
# If not specified, a default value will be chosen by the service.
|
1286
1341
|
# Note that the response may include a partial list and a caller should
|
1287
1342
|
# only rely on the response's
|
1288
|
-
# {::Google::Cloud::GkeBackup::V1::
|
1343
|
+
# {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token}
|
1289
1344
|
# to determine if there are more instances left to be queried.
|
1290
1345
|
# @param page_token [::String]
|
1291
1346
|
# Optional. The value of
|
1292
|
-
# {::Google::Cloud::GkeBackup::V1::
|
1293
|
-
# received from a previous `
|
1347
|
+
# {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token}
|
1348
|
+
# received from a previous `ListBackupPlanBindings` call.
|
1294
1349
|
# Provide this to retrieve the subsequent page in a multi-page list of
|
1295
1350
|
# results. When paginating, all other parameters provided to
|
1296
|
-
# `
|
1351
|
+
# `ListBackupPlanBindings` must match the call that provided the page
|
1352
|
+
# token.
|
1297
1353
|
# @param filter [::String]
|
1298
1354
|
# Optional. Field match expression used to filter the results.
|
1299
1355
|
# @param order_by [::String]
|
1300
1356
|
# Optional. Field by which to sort the results.
|
1301
1357
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1302
|
-
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::
|
1358
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>]
|
1303
1359
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1304
1360
|
#
|
1305
|
-
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::
|
1361
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>]
|
1306
1362
|
#
|
1307
1363
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1308
1364
|
#
|
@@ -1313,28 +1369,28 @@ module Google
|
|
1313
1369
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1314
1370
|
#
|
1315
1371
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1316
|
-
# request = Google::Cloud::GkeBackup::V1::
|
1372
|
+
# request = Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.new
|
1317
1373
|
#
|
1318
|
-
# # Call the
|
1319
|
-
# result = client.
|
1374
|
+
# # Call the list_backup_plan_bindings method.
|
1375
|
+
# result = client.list_backup_plan_bindings request
|
1320
1376
|
#
|
1321
1377
|
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1322
1378
|
# # over elements, and API calls will be issued to fetch pages as needed.
|
1323
1379
|
# result.each do |item|
|
1324
|
-
# # Each element is of type ::Google::Cloud::GkeBackup::V1::
|
1380
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlanBinding.
|
1325
1381
|
# p item
|
1326
1382
|
# end
|
1327
1383
|
#
|
1328
|
-
def
|
1384
|
+
def list_backup_plan_bindings request, options = nil
|
1329
1385
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1330
1386
|
|
1331
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
1387
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest
|
1332
1388
|
|
1333
1389
|
# Converts hash and nil to an options object
|
1334
1390
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1335
1391
|
|
1336
1392
|
# Customize the options with defaults
|
1337
|
-
call_metadata = @config.rpcs.
|
1393
|
+
call_metadata = @config.rpcs.list_backup_plan_bindings.metadata.to_h
|
1338
1394
|
|
1339
1395
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1340
1396
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1345,16 +1401,16 @@ module Google
|
|
1345
1401
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1346
1402
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1347
1403
|
|
1348
|
-
options.apply_defaults timeout: @config.rpcs.
|
1404
|
+
options.apply_defaults timeout: @config.rpcs.list_backup_plan_bindings.timeout,
|
1349
1405
|
metadata: call_metadata,
|
1350
|
-
retry_policy: @config.rpcs.
|
1406
|
+
retry_policy: @config.rpcs.list_backup_plan_bindings.retry_policy
|
1351
1407
|
|
1352
1408
|
options.apply_defaults timeout: @config.timeout,
|
1353
1409
|
metadata: @config.metadata,
|
1354
1410
|
retry_policy: @config.retry_policy
|
1355
1411
|
|
1356
|
-
@backup_for_gke_stub.
|
1357
|
-
result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :
|
1412
|
+
@backup_for_gke_stub.list_backup_plan_bindings request, options do |result, operation|
|
1413
|
+
result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plan_bindings, "backup_plan_bindings", request, result, options
|
1358
1414
|
yield result, operation if block_given?
|
1359
1415
|
throw :response, result
|
1360
1416
|
end
|
@@ -1363,31 +1419,32 @@ module Google
|
|
1363
1419
|
end
|
1364
1420
|
|
1365
1421
|
##
|
1366
|
-
# Retrieve the details of a single
|
1422
|
+
# Retrieve the details of a single BackupPlanBinding.
|
1367
1423
|
#
|
1368
|
-
# @overload
|
1369
|
-
# Pass arguments to `
|
1370
|
-
# {::Google::Cloud::GkeBackup::V1::
|
1424
|
+
# @overload get_backup_plan_binding(request, options = nil)
|
1425
|
+
# Pass arguments to `get_backup_plan_binding` via a request object, either of type
|
1426
|
+
# {::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest} or an equivalent Hash.
|
1371
1427
|
#
|
1372
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
1428
|
+
# @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, ::Hash]
|
1373
1429
|
# A request object representing the call parameters. Required. To specify no
|
1374
1430
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1375
1431
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1376
1432
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1377
1433
|
#
|
1378
|
-
# @overload
|
1379
|
-
# Pass arguments to `
|
1434
|
+
# @overload get_backup_plan_binding(name: nil)
|
1435
|
+
# Pass arguments to `get_backup_plan_binding` via keyword arguments. Note that at
|
1380
1436
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1381
1437
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1382
1438
|
#
|
1383
1439
|
# @param name [::String]
|
1384
|
-
# Required.
|
1385
|
-
# Format:
|
1440
|
+
# Required. Fully qualified BackupPlanBinding name.
|
1441
|
+
# Format:
|
1442
|
+
# `projects/*/locations/*/backupChannels/*/backupPlanBindings/*`
|
1386
1443
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1387
|
-
# @yieldparam result [::Google::Cloud::GkeBackup::V1::
|
1444
|
+
# @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupPlanBinding]
|
1388
1445
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1389
1446
|
#
|
1390
|
-
# @return [::Google::Cloud::GkeBackup::V1::
|
1447
|
+
# @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding]
|
1391
1448
|
#
|
1392
1449
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1393
1450
|
#
|
@@ -1398,24 +1455,24 @@ module Google
|
|
1398
1455
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1399
1456
|
#
|
1400
1457
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1401
|
-
# request = Google::Cloud::GkeBackup::V1::
|
1458
|
+
# request = Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new
|
1402
1459
|
#
|
1403
|
-
# # Call the
|
1404
|
-
# result = client.
|
1460
|
+
# # Call the get_backup_plan_binding method.
|
1461
|
+
# result = client.get_backup_plan_binding request
|
1405
1462
|
#
|
1406
|
-
# # The returned object is of type Google::Cloud::GkeBackup::V1::
|
1463
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlanBinding.
|
1407
1464
|
# p result
|
1408
1465
|
#
|
1409
|
-
def
|
1466
|
+
def get_backup_plan_binding request, options = nil
|
1410
1467
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1411
1468
|
|
1412
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
1469
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest
|
1413
1470
|
|
1414
1471
|
# Converts hash and nil to an options object
|
1415
1472
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1416
1473
|
|
1417
1474
|
# Customize the options with defaults
|
1418
|
-
call_metadata = @config.rpcs.
|
1475
|
+
call_metadata = @config.rpcs.get_backup_plan_binding.metadata.to_h
|
1419
1476
|
|
1420
1477
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1421
1478
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1426,15 +1483,15 @@ module Google
|
|
1426
1483
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1427
1484
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1428
1485
|
|
1429
|
-
options.apply_defaults timeout: @config.rpcs.
|
1486
|
+
options.apply_defaults timeout: @config.rpcs.get_backup_plan_binding.timeout,
|
1430
1487
|
metadata: call_metadata,
|
1431
|
-
retry_policy: @config.rpcs.
|
1488
|
+
retry_policy: @config.rpcs.get_backup_plan_binding.retry_policy
|
1432
1489
|
|
1433
1490
|
options.apply_defaults timeout: @config.timeout,
|
1434
1491
|
metadata: @config.metadata,
|
1435
1492
|
retry_policy: @config.retry_policy
|
1436
1493
|
|
1437
|
-
@backup_for_gke_stub.
|
1494
|
+
@backup_for_gke_stub.get_backup_plan_binding request, options do |result, operation|
|
1438
1495
|
yield result, operation if block_given?
|
1439
1496
|
end
|
1440
1497
|
rescue ::Gapic::Rest::Error => e
|
@@ -1442,37 +1499,37 @@ module Google
|
|
1442
1499
|
end
|
1443
1500
|
|
1444
1501
|
##
|
1445
|
-
# Creates a
|
1502
|
+
# Creates a Backup for the given BackupPlan.
|
1446
1503
|
#
|
1447
|
-
# @overload
|
1448
|
-
# Pass arguments to `
|
1449
|
-
# {::Google::Cloud::GkeBackup::V1::
|
1504
|
+
# @overload create_backup(request, options = nil)
|
1505
|
+
# Pass arguments to `create_backup` via a request object, either of type
|
1506
|
+
# {::Google::Cloud::GkeBackup::V1::CreateBackupRequest} or an equivalent Hash.
|
1450
1507
|
#
|
1451
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
1508
|
+
# @param request [::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Hash]
|
1452
1509
|
# A request object representing the call parameters. Required. To specify no
|
1453
1510
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1454
1511
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1455
1512
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1456
1513
|
#
|
1457
|
-
# @overload
|
1458
|
-
# Pass arguments to `
|
1514
|
+
# @overload create_backup(parent: nil, backup: nil, backup_id: nil)
|
1515
|
+
# Pass arguments to `create_backup` via keyword arguments. Note that at
|
1459
1516
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1460
1517
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1461
1518
|
#
|
1462
1519
|
# @param parent [::String]
|
1463
|
-
# Required. The
|
1464
|
-
# Format: `projects/*/locations/*`
|
1465
|
-
# @param
|
1466
|
-
#
|
1467
|
-
# @param
|
1468
|
-
#
|
1520
|
+
# Required. The BackupPlan within which to create the Backup.
|
1521
|
+
# Format: `projects/*/locations/*/backupPlans/*`
|
1522
|
+
# @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
|
1523
|
+
# Optional. The Backup resource to create.
|
1524
|
+
# @param backup_id [::String]
|
1525
|
+
# Optional. The client-provided short name for the Backup resource.
|
1469
1526
|
# This name must:
|
1470
1527
|
#
|
1471
1528
|
# - be between 1 and 63 characters long (inclusive)
|
1472
1529
|
# - consist of only lower-case ASCII letters, numbers, and dashes
|
1473
1530
|
# - start with a lower-case letter
|
1474
1531
|
# - end with a lower-case letter or number
|
1475
|
-
# - be unique within the set of
|
1532
|
+
# - be unique within the set of Backups in this BackupPlan
|
1476
1533
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1477
1534
|
# @yieldparam result [::Gapic::Operation]
|
1478
1535
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1488,10 +1545,10 @@ module Google
|
|
1488
1545
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1489
1546
|
#
|
1490
1547
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1491
|
-
# request = Google::Cloud::GkeBackup::V1::
|
1548
|
+
# request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new
|
1492
1549
|
#
|
1493
|
-
# # Call the
|
1494
|
-
# result = client.
|
1550
|
+
# # Call the create_backup method.
|
1551
|
+
# result = client.create_backup request
|
1495
1552
|
#
|
1496
1553
|
# # The returned object is of type Gapic::Operation. You can use it to
|
1497
1554
|
# # check the status of an operation, cancel it, or wait for results.
|
@@ -1503,16 +1560,16 @@ module Google
|
|
1503
1560
|
# puts "No response received."
|
1504
1561
|
# end
|
1505
1562
|
#
|
1506
|
-
def
|
1563
|
+
def create_backup request, options = nil
|
1507
1564
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1508
1565
|
|
1509
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
1566
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupRequest
|
1510
1567
|
|
1511
1568
|
# Converts hash and nil to an options object
|
1512
1569
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1513
1570
|
|
1514
1571
|
# Customize the options with defaults
|
1515
|
-
call_metadata = @config.rpcs.
|
1572
|
+
call_metadata = @config.rpcs.create_backup.metadata.to_h
|
1516
1573
|
|
1517
1574
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1518
1575
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1523,15 +1580,15 @@ module Google
|
|
1523
1580
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1524
1581
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1525
1582
|
|
1526
|
-
options.apply_defaults timeout: @config.rpcs.
|
1583
|
+
options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
|
1527
1584
|
metadata: call_metadata,
|
1528
|
-
retry_policy: @config.rpcs.
|
1585
|
+
retry_policy: @config.rpcs.create_backup.retry_policy
|
1529
1586
|
|
1530
1587
|
options.apply_defaults timeout: @config.timeout,
|
1531
1588
|
metadata: @config.metadata,
|
1532
1589
|
retry_policy: @config.retry_policy
|
1533
1590
|
|
1534
|
-
@backup_for_gke_stub.
|
1591
|
+
@backup_for_gke_stub.create_backup request, options do |result, operation|
|
1535
1592
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1536
1593
|
yield result, operation if block_given?
|
1537
1594
|
throw :response, result
|
@@ -1541,49 +1598,1184 @@ module Google
|
|
1541
1598
|
end
|
1542
1599
|
|
1543
1600
|
##
|
1544
|
-
# Lists
|
1601
|
+
# Lists the Backups for a given BackupPlan.
|
1545
1602
|
#
|
1546
|
-
# @overload
|
1547
|
-
# Pass arguments to `
|
1548
|
-
# {::Google::Cloud::GkeBackup::V1::
|
1603
|
+
# @overload list_backups(request, options = nil)
|
1604
|
+
# Pass arguments to `list_backups` via a request object, either of type
|
1605
|
+
# {::Google::Cloud::GkeBackup::V1::ListBackupsRequest} or an equivalent Hash.
|
1549
1606
|
#
|
1550
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
1607
|
+
# @param request [::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Hash]
|
1551
1608
|
# A request object representing the call parameters. Required. To specify no
|
1552
1609
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1553
1610
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1554
1611
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1555
1612
|
#
|
1556
|
-
# @overload
|
1613
|
+
# @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil)
|
1614
|
+
# Pass arguments to `list_backups` via keyword arguments. Note that at
|
1615
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1616
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1617
|
+
#
|
1618
|
+
# @param parent [::String]
|
1619
|
+
# Required. The BackupPlan that contains the Backups to list.
|
1620
|
+
# Format: `projects/*/locations/*/backupPlans/*`
|
1621
|
+
# @param page_size [::Integer]
|
1622
|
+
# Optional. The target number of results to return in a single response.
|
1623
|
+
# If not specified, a default value will be chosen by the service.
|
1624
|
+
# Note that the response may include a partial list and a caller should
|
1625
|
+
# only rely on the response's
|
1626
|
+
# {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
|
1627
|
+
# to determine if there are more instances left to be queried.
|
1628
|
+
# @param page_token [::String]
|
1629
|
+
# Optional. The value of
|
1630
|
+
# {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token}
|
1631
|
+
# received from a previous `ListBackups` call.
|
1632
|
+
# Provide this to retrieve the subsequent page in a multi-page list of
|
1633
|
+
# results. When paginating, all other parameters provided to
|
1634
|
+
# `ListBackups` must match the call that provided the page token.
|
1635
|
+
# @param filter [::String]
|
1636
|
+
# Optional. Field match expression used to filter the results.
|
1637
|
+
# @param order_by [::String]
|
1638
|
+
# Optional. Field by which to sort the results.
|
1639
|
+
# @param return_partial_success [::Boolean]
|
1640
|
+
# Optional. If set to true, the response will return partial results when
|
1641
|
+
# some regions are unreachable and the unreachable field will be populated.
|
1642
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1643
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
|
1644
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1645
|
+
#
|
1646
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>]
|
1647
|
+
#
|
1648
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1649
|
+
#
|
1650
|
+
# @example Basic example
|
1651
|
+
# require "google/cloud/gke_backup/v1"
|
1652
|
+
#
|
1653
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1654
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1655
|
+
#
|
1656
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1657
|
+
# request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new
|
1658
|
+
#
|
1659
|
+
# # Call the list_backups method.
|
1660
|
+
# result = client.list_backups request
|
1661
|
+
#
|
1662
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1663
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1664
|
+
# result.each do |item|
|
1665
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup.
|
1666
|
+
# p item
|
1667
|
+
# end
|
1668
|
+
#
|
1669
|
+
def list_backups request, options = nil
|
1670
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1671
|
+
|
1672
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupsRequest
|
1673
|
+
|
1674
|
+
# Converts hash and nil to an options object
|
1675
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1676
|
+
|
1677
|
+
# Customize the options with defaults
|
1678
|
+
call_metadata = @config.rpcs.list_backups.metadata.to_h
|
1679
|
+
|
1680
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1681
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1682
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1683
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
1684
|
+
transports_version_send: [:rest]
|
1685
|
+
|
1686
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1687
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1688
|
+
|
1689
|
+
options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
|
1690
|
+
metadata: call_metadata,
|
1691
|
+
retry_policy: @config.rpcs.list_backups.retry_policy
|
1692
|
+
|
1693
|
+
options.apply_defaults timeout: @config.timeout,
|
1694
|
+
metadata: @config.metadata,
|
1695
|
+
retry_policy: @config.retry_policy
|
1696
|
+
|
1697
|
+
@backup_for_gke_stub.list_backups request, options do |result, operation|
|
1698
|
+
result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backups, "backups", request, result, options
|
1699
|
+
yield result, operation if block_given?
|
1700
|
+
throw :response, result
|
1701
|
+
end
|
1702
|
+
rescue ::Gapic::Rest::Error => e
|
1703
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1704
|
+
end
|
1705
|
+
|
1706
|
+
##
|
1707
|
+
# Retrieve the details of a single Backup.
|
1708
|
+
#
|
1709
|
+
# @overload get_backup(request, options = nil)
|
1710
|
+
# Pass arguments to `get_backup` via a request object, either of type
|
1711
|
+
# {::Google::Cloud::GkeBackup::V1::GetBackupRequest} or an equivalent Hash.
|
1712
|
+
#
|
1713
|
+
# @param request [::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Hash]
|
1714
|
+
# A request object representing the call parameters. Required. To specify no
|
1715
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1716
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1717
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1718
|
+
#
|
1719
|
+
# @overload get_backup(name: nil)
|
1720
|
+
# Pass arguments to `get_backup` via keyword arguments. Note that at
|
1721
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1722
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1723
|
+
#
|
1724
|
+
# @param name [::String]
|
1725
|
+
# Required. Full name of the Backup resource.
|
1726
|
+
# Format: `projects/*/locations/*/backupPlans/*/backups/*`
|
1727
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1728
|
+
# @yieldparam result [::Google::Cloud::GkeBackup::V1::Backup]
|
1729
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1730
|
+
#
|
1731
|
+
# @return [::Google::Cloud::GkeBackup::V1::Backup]
|
1732
|
+
#
|
1733
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1734
|
+
#
|
1735
|
+
# @example Basic example
|
1736
|
+
# require "google/cloud/gke_backup/v1"
|
1737
|
+
#
|
1738
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1739
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1740
|
+
#
|
1741
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1742
|
+
# request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new
|
1743
|
+
#
|
1744
|
+
# # Call the get_backup method.
|
1745
|
+
# result = client.get_backup request
|
1746
|
+
#
|
1747
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::Backup.
|
1748
|
+
# p result
|
1749
|
+
#
|
1750
|
+
def get_backup request, options = nil
|
1751
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1752
|
+
|
1753
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupRequest
|
1754
|
+
|
1755
|
+
# Converts hash and nil to an options object
|
1756
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1757
|
+
|
1758
|
+
# Customize the options with defaults
|
1759
|
+
call_metadata = @config.rpcs.get_backup.metadata.to_h
|
1760
|
+
|
1761
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1762
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1763
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1764
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
1765
|
+
transports_version_send: [:rest]
|
1766
|
+
|
1767
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1768
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1769
|
+
|
1770
|
+
options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
|
1771
|
+
metadata: call_metadata,
|
1772
|
+
retry_policy: @config.rpcs.get_backup.retry_policy
|
1773
|
+
|
1774
|
+
options.apply_defaults timeout: @config.timeout,
|
1775
|
+
metadata: @config.metadata,
|
1776
|
+
retry_policy: @config.retry_policy
|
1777
|
+
|
1778
|
+
@backup_for_gke_stub.get_backup request, options do |result, operation|
|
1779
|
+
yield result, operation if block_given?
|
1780
|
+
end
|
1781
|
+
rescue ::Gapic::Rest::Error => e
|
1782
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1783
|
+
end
|
1784
|
+
|
1785
|
+
##
|
1786
|
+
# Update a Backup.
|
1787
|
+
#
|
1788
|
+
# @overload update_backup(request, options = nil)
|
1789
|
+
# Pass arguments to `update_backup` via a request object, either of type
|
1790
|
+
# {::Google::Cloud::GkeBackup::V1::UpdateBackupRequest} or an equivalent Hash.
|
1791
|
+
#
|
1792
|
+
# @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Hash]
|
1793
|
+
# A request object representing the call parameters. Required. To specify no
|
1794
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1795
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1796
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1797
|
+
#
|
1798
|
+
# @overload update_backup(backup: nil, update_mask: nil)
|
1799
|
+
# Pass arguments to `update_backup` via keyword arguments. Note that at
|
1800
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1801
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1802
|
+
#
|
1803
|
+
# @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash]
|
1804
|
+
# Required. A new version of the Backup resource that contains updated
|
1805
|
+
# fields. This may be sparsely populated if an `update_mask` is provided.
|
1806
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1807
|
+
# Optional. This is used to specify the fields to be overwritten in the
|
1808
|
+
# Backup targeted for update. The values for each of these
|
1809
|
+
# updated fields will be taken from the `backup_plan` provided
|
1810
|
+
# with this request. Field names are relative to the root of the resource.
|
1811
|
+
# If no `update_mask` is provided, all fields in `backup` will be
|
1812
|
+
# written to the target Backup resource.
|
1813
|
+
# Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored
|
1814
|
+
# and are not used to update the target Backup.
|
1815
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1816
|
+
# @yieldparam result [::Gapic::Operation]
|
1817
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1818
|
+
#
|
1819
|
+
# @return [::Gapic::Operation]
|
1820
|
+
#
|
1821
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1822
|
+
#
|
1823
|
+
# @example Basic example
|
1824
|
+
# require "google/cloud/gke_backup/v1"
|
1825
|
+
#
|
1826
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1827
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1828
|
+
#
|
1829
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1830
|
+
# request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new
|
1831
|
+
#
|
1832
|
+
# # Call the update_backup method.
|
1833
|
+
# result = client.update_backup request
|
1834
|
+
#
|
1835
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1836
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1837
|
+
# # Here is how to wait for a response.
|
1838
|
+
# result.wait_until_done! timeout: 60
|
1839
|
+
# if result.response?
|
1840
|
+
# p result.response
|
1841
|
+
# else
|
1842
|
+
# puts "No response received."
|
1843
|
+
# end
|
1844
|
+
#
|
1845
|
+
def update_backup request, options = nil
|
1846
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1847
|
+
|
1848
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest
|
1849
|
+
|
1850
|
+
# Converts hash and nil to an options object
|
1851
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1852
|
+
|
1853
|
+
# Customize the options with defaults
|
1854
|
+
call_metadata = @config.rpcs.update_backup.metadata.to_h
|
1855
|
+
|
1856
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1857
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1858
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1859
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
1860
|
+
transports_version_send: [:rest]
|
1861
|
+
|
1862
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1863
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1864
|
+
|
1865
|
+
options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
|
1866
|
+
metadata: call_metadata,
|
1867
|
+
retry_policy: @config.rpcs.update_backup.retry_policy
|
1868
|
+
|
1869
|
+
options.apply_defaults timeout: @config.timeout,
|
1870
|
+
metadata: @config.metadata,
|
1871
|
+
retry_policy: @config.retry_policy
|
1872
|
+
|
1873
|
+
@backup_for_gke_stub.update_backup request, options do |result, operation|
|
1874
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1875
|
+
yield result, operation if block_given?
|
1876
|
+
throw :response, result
|
1877
|
+
end
|
1878
|
+
rescue ::Gapic::Rest::Error => e
|
1879
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1880
|
+
end
|
1881
|
+
|
1882
|
+
##
|
1883
|
+
# Deletes an existing Backup.
|
1884
|
+
#
|
1885
|
+
# @overload delete_backup(request, options = nil)
|
1886
|
+
# Pass arguments to `delete_backup` via a request object, either of type
|
1887
|
+
# {::Google::Cloud::GkeBackup::V1::DeleteBackupRequest} or an equivalent Hash.
|
1888
|
+
#
|
1889
|
+
# @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Hash]
|
1890
|
+
# A request object representing the call parameters. Required. To specify no
|
1891
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1892
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1893
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1894
|
+
#
|
1895
|
+
# @overload delete_backup(name: nil, etag: nil, force: nil)
|
1896
|
+
# Pass arguments to `delete_backup` via keyword arguments. Note that at
|
1897
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1898
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1899
|
+
#
|
1900
|
+
# @param name [::String]
|
1901
|
+
# Required. Name of the Backup resource.
|
1902
|
+
# Format: `projects/*/locations/*/backupPlans/*/backups/*`
|
1903
|
+
# @param etag [::String]
|
1904
|
+
# Optional. If provided, this value must match the current value of the
|
1905
|
+
# target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the
|
1906
|
+
# request is rejected.
|
1907
|
+
# @param force [::Boolean]
|
1908
|
+
# Optional. If set to true, any VolumeBackups below this Backup will also be
|
1909
|
+
# deleted. Otherwise, the request will only succeed if the Backup has no
|
1910
|
+
# VolumeBackups.
|
1911
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1912
|
+
# @yieldparam result [::Gapic::Operation]
|
1913
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1914
|
+
#
|
1915
|
+
# @return [::Gapic::Operation]
|
1916
|
+
#
|
1917
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1918
|
+
#
|
1919
|
+
# @example Basic example
|
1920
|
+
# require "google/cloud/gke_backup/v1"
|
1921
|
+
#
|
1922
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1923
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1924
|
+
#
|
1925
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1926
|
+
# request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new
|
1927
|
+
#
|
1928
|
+
# # Call the delete_backup method.
|
1929
|
+
# result = client.delete_backup request
|
1930
|
+
#
|
1931
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1932
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1933
|
+
# # Here is how to wait for a response.
|
1934
|
+
# result.wait_until_done! timeout: 60
|
1935
|
+
# if result.response?
|
1936
|
+
# p result.response
|
1937
|
+
# else
|
1938
|
+
# puts "No response received."
|
1939
|
+
# end
|
1940
|
+
#
|
1941
|
+
def delete_backup request, options = nil
|
1942
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1943
|
+
|
1944
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest
|
1945
|
+
|
1946
|
+
# Converts hash and nil to an options object
|
1947
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1948
|
+
|
1949
|
+
# Customize the options with defaults
|
1950
|
+
call_metadata = @config.rpcs.delete_backup.metadata.to_h
|
1951
|
+
|
1952
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1953
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1954
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1955
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
1956
|
+
transports_version_send: [:rest]
|
1957
|
+
|
1958
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1959
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1960
|
+
|
1961
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
|
1962
|
+
metadata: call_metadata,
|
1963
|
+
retry_policy: @config.rpcs.delete_backup.retry_policy
|
1964
|
+
|
1965
|
+
options.apply_defaults timeout: @config.timeout,
|
1966
|
+
metadata: @config.metadata,
|
1967
|
+
retry_policy: @config.retry_policy
|
1968
|
+
|
1969
|
+
@backup_for_gke_stub.delete_backup request, options do |result, operation|
|
1970
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1971
|
+
yield result, operation if block_given?
|
1972
|
+
throw :response, result
|
1973
|
+
end
|
1974
|
+
rescue ::Gapic::Rest::Error => e
|
1975
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1976
|
+
end
|
1977
|
+
|
1978
|
+
##
|
1979
|
+
# Lists the VolumeBackups for a given Backup.
|
1980
|
+
#
|
1981
|
+
# @overload list_volume_backups(request, options = nil)
|
1982
|
+
# Pass arguments to `list_volume_backups` via a request object, either of type
|
1983
|
+
# {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest} or an equivalent Hash.
|
1984
|
+
#
|
1985
|
+
# @param request [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Hash]
|
1986
|
+
# A request object representing the call parameters. Required. To specify no
|
1987
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1988
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1989
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1990
|
+
#
|
1991
|
+
# @overload list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1992
|
+
# Pass arguments to `list_volume_backups` via keyword arguments. Note that at
|
1993
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1994
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1995
|
+
#
|
1996
|
+
# @param parent [::String]
|
1997
|
+
# Required. The Backup that contains the VolumeBackups to list.
|
1998
|
+
# Format: `projects/*/locations/*/backupPlans/*/backups/*`
|
1999
|
+
# @param page_size [::Integer]
|
2000
|
+
# Optional. The target number of results to return in a single response.
|
2001
|
+
# If not specified, a default value will be chosen by the service.
|
2002
|
+
# Note that the response may include a partial list and a caller should
|
2003
|
+
# only rely on the response's
|
2004
|
+
# {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
|
2005
|
+
# to determine if there are more instances left to be queried.
|
2006
|
+
# @param page_token [::String]
|
2007
|
+
# Optional. The value of
|
2008
|
+
# {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token}
|
2009
|
+
# received from a previous `ListVolumeBackups` call.
|
2010
|
+
# Provide this to retrieve the subsequent page in a multi-page list of
|
2011
|
+
# results. When paginating, all other parameters provided to
|
2012
|
+
# `ListVolumeBackups` must match the call that provided the page token.
|
2013
|
+
# @param filter [::String]
|
2014
|
+
# Optional. Field match expression used to filter the results.
|
2015
|
+
# @param order_by [::String]
|
2016
|
+
# Optional. Field by which to sort the results.
|
2017
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2018
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
|
2019
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2020
|
+
#
|
2021
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>]
|
2022
|
+
#
|
2023
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2024
|
+
#
|
2025
|
+
# @example Basic example
|
2026
|
+
# require "google/cloud/gke_backup/v1"
|
2027
|
+
#
|
2028
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2029
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2030
|
+
#
|
2031
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2032
|
+
# request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new
|
2033
|
+
#
|
2034
|
+
# # Call the list_volume_backups method.
|
2035
|
+
# result = client.list_volume_backups request
|
2036
|
+
#
|
2037
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2038
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2039
|
+
# result.each do |item|
|
2040
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup.
|
2041
|
+
# p item
|
2042
|
+
# end
|
2043
|
+
#
|
2044
|
+
def list_volume_backups request, options = nil
|
2045
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2046
|
+
|
2047
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest
|
2048
|
+
|
2049
|
+
# Converts hash and nil to an options object
|
2050
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2051
|
+
|
2052
|
+
# Customize the options with defaults
|
2053
|
+
call_metadata = @config.rpcs.list_volume_backups.metadata.to_h
|
2054
|
+
|
2055
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2056
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2057
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2058
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
2059
|
+
transports_version_send: [:rest]
|
2060
|
+
|
2061
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2062
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2063
|
+
|
2064
|
+
options.apply_defaults timeout: @config.rpcs.list_volume_backups.timeout,
|
2065
|
+
metadata: call_metadata,
|
2066
|
+
retry_policy: @config.rpcs.list_volume_backups.retry_policy
|
2067
|
+
|
2068
|
+
options.apply_defaults timeout: @config.timeout,
|
2069
|
+
metadata: @config.metadata,
|
2070
|
+
retry_policy: @config.retry_policy
|
2071
|
+
|
2072
|
+
@backup_for_gke_stub.list_volume_backups request, options do |result, operation|
|
2073
|
+
result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, "volume_backups", request, result, options
|
2074
|
+
yield result, operation if block_given?
|
2075
|
+
throw :response, result
|
2076
|
+
end
|
2077
|
+
rescue ::Gapic::Rest::Error => e
|
2078
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2079
|
+
end
|
2080
|
+
|
2081
|
+
##
|
2082
|
+
# Retrieve the details of a single VolumeBackup.
|
2083
|
+
#
|
2084
|
+
# @overload get_volume_backup(request, options = nil)
|
2085
|
+
# Pass arguments to `get_volume_backup` via a request object, either of type
|
2086
|
+
# {::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest} or an equivalent Hash.
|
2087
|
+
#
|
2088
|
+
# @param request [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Hash]
|
2089
|
+
# A request object representing the call parameters. Required. To specify no
|
2090
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2091
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2092
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2093
|
+
#
|
2094
|
+
# @overload get_volume_backup(name: nil)
|
2095
|
+
# Pass arguments to `get_volume_backup` via keyword arguments. Note that at
|
2096
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2097
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2098
|
+
#
|
2099
|
+
# @param name [::String]
|
2100
|
+
# Required. Full name of the VolumeBackup resource.
|
2101
|
+
# Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`
|
2102
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2103
|
+
# @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeBackup]
|
2104
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2105
|
+
#
|
2106
|
+
# @return [::Google::Cloud::GkeBackup::V1::VolumeBackup]
|
2107
|
+
#
|
2108
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2109
|
+
#
|
2110
|
+
# @example Basic example
|
2111
|
+
# require "google/cloud/gke_backup/v1"
|
2112
|
+
#
|
2113
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2114
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2115
|
+
#
|
2116
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2117
|
+
# request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new
|
2118
|
+
#
|
2119
|
+
# # Call the get_volume_backup method.
|
2120
|
+
# result = client.get_volume_backup request
|
2121
|
+
#
|
2122
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup.
|
2123
|
+
# p result
|
2124
|
+
#
|
2125
|
+
def get_volume_backup request, options = nil
|
2126
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2127
|
+
|
2128
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest
|
2129
|
+
|
2130
|
+
# Converts hash and nil to an options object
|
2131
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2132
|
+
|
2133
|
+
# Customize the options with defaults
|
2134
|
+
call_metadata = @config.rpcs.get_volume_backup.metadata.to_h
|
2135
|
+
|
2136
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2137
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2138
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2139
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
2140
|
+
transports_version_send: [:rest]
|
2141
|
+
|
2142
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2143
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2144
|
+
|
2145
|
+
options.apply_defaults timeout: @config.rpcs.get_volume_backup.timeout,
|
2146
|
+
metadata: call_metadata,
|
2147
|
+
retry_policy: @config.rpcs.get_volume_backup.retry_policy
|
2148
|
+
|
2149
|
+
options.apply_defaults timeout: @config.timeout,
|
2150
|
+
metadata: @config.metadata,
|
2151
|
+
retry_policy: @config.retry_policy
|
2152
|
+
|
2153
|
+
@backup_for_gke_stub.get_volume_backup request, options do |result, operation|
|
2154
|
+
yield result, operation if block_given?
|
2155
|
+
end
|
2156
|
+
rescue ::Gapic::Rest::Error => e
|
2157
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2158
|
+
end
|
2159
|
+
|
2160
|
+
##
|
2161
|
+
# Creates a new RestorePlan in a given location.
|
2162
|
+
#
|
2163
|
+
# @overload create_restore_plan(request, options = nil)
|
2164
|
+
# Pass arguments to `create_restore_plan` via a request object, either of type
|
2165
|
+
# {::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest} or an equivalent Hash.
|
2166
|
+
#
|
2167
|
+
# @param request [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Hash]
|
2168
|
+
# A request object representing the call parameters. Required. To specify no
|
2169
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2170
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2171
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2172
|
+
#
|
2173
|
+
# @overload create_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil)
|
2174
|
+
# Pass arguments to `create_restore_plan` via keyword arguments. Note that at
|
2175
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2176
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2177
|
+
#
|
2178
|
+
# @param parent [::String]
|
2179
|
+
# Required. The location within which to create the RestorePlan.
|
2180
|
+
# Format: `projects/*/locations/*`
|
2181
|
+
# @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash]
|
2182
|
+
# Required. The RestorePlan resource object to create.
|
2183
|
+
# @param restore_plan_id [::String]
|
2184
|
+
# Required. The client-provided short name for the RestorePlan resource.
|
2185
|
+
# This name must:
|
2186
|
+
#
|
2187
|
+
# - be between 1 and 63 characters long (inclusive)
|
2188
|
+
# - consist of only lower-case ASCII letters, numbers, and dashes
|
2189
|
+
# - start with a lower-case letter
|
2190
|
+
# - end with a lower-case letter or number
|
2191
|
+
# - be unique within the set of RestorePlans in this location
|
2192
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2193
|
+
# @yieldparam result [::Gapic::Operation]
|
2194
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2195
|
+
#
|
2196
|
+
# @return [::Gapic::Operation]
|
2197
|
+
#
|
2198
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2199
|
+
#
|
2200
|
+
# @example Basic example
|
2201
|
+
# require "google/cloud/gke_backup/v1"
|
2202
|
+
#
|
2203
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2204
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2205
|
+
#
|
2206
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2207
|
+
# request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new
|
2208
|
+
#
|
2209
|
+
# # Call the create_restore_plan method.
|
2210
|
+
# result = client.create_restore_plan request
|
2211
|
+
#
|
2212
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2213
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2214
|
+
# # Here is how to wait for a response.
|
2215
|
+
# result.wait_until_done! timeout: 60
|
2216
|
+
# if result.response?
|
2217
|
+
# p result.response
|
2218
|
+
# else
|
2219
|
+
# puts "No response received."
|
2220
|
+
# end
|
2221
|
+
#
|
2222
|
+
def create_restore_plan request, options = nil
|
2223
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2224
|
+
|
2225
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest
|
2226
|
+
|
2227
|
+
# Converts hash and nil to an options object
|
2228
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2229
|
+
|
2230
|
+
# Customize the options with defaults
|
2231
|
+
call_metadata = @config.rpcs.create_restore_plan.metadata.to_h
|
2232
|
+
|
2233
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2234
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2235
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2236
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
2237
|
+
transports_version_send: [:rest]
|
2238
|
+
|
2239
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2240
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2241
|
+
|
2242
|
+
options.apply_defaults timeout: @config.rpcs.create_restore_plan.timeout,
|
2243
|
+
metadata: call_metadata,
|
2244
|
+
retry_policy: @config.rpcs.create_restore_plan.retry_policy
|
2245
|
+
|
2246
|
+
options.apply_defaults timeout: @config.timeout,
|
2247
|
+
metadata: @config.metadata,
|
2248
|
+
retry_policy: @config.retry_policy
|
2249
|
+
|
2250
|
+
@backup_for_gke_stub.create_restore_plan request, options do |result, operation|
|
2251
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2252
|
+
yield result, operation if block_given?
|
2253
|
+
throw :response, result
|
2254
|
+
end
|
2255
|
+
rescue ::Gapic::Rest::Error => e
|
2256
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2257
|
+
end
|
2258
|
+
|
2259
|
+
##
|
2260
|
+
# Lists RestorePlans in a given location.
|
2261
|
+
#
|
2262
|
+
# @overload list_restore_plans(request, options = nil)
|
2263
|
+
# Pass arguments to `list_restore_plans` via a request object, either of type
|
2264
|
+
# {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest} or an equivalent Hash.
|
2265
|
+
#
|
2266
|
+
# @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Hash]
|
2267
|
+
# A request object representing the call parameters. Required. To specify no
|
2268
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2269
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2270
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2271
|
+
#
|
2272
|
+
# @overload list_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1557
2273
|
# Pass arguments to `list_restore_plans` via keyword arguments. Note that at
|
1558
2274
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1559
2275
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1560
2276
|
#
|
1561
2277
|
# @param parent [::String]
|
1562
|
-
# Required. The location that contains the RestorePlans to list.
|
2278
|
+
# Required. The location that contains the RestorePlans to list.
|
2279
|
+
# Format: `projects/*/locations/*`
|
2280
|
+
# @param page_size [::Integer]
|
2281
|
+
# Optional. The target number of results to return in a single response.
|
2282
|
+
# If not specified, a default value will be chosen by the service.
|
2283
|
+
# Note that the response may include a partial list and a caller should
|
2284
|
+
# only rely on the response's
|
2285
|
+
# {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
|
2286
|
+
# to determine if there are more instances left to be queried.
|
2287
|
+
# @param page_token [::String]
|
2288
|
+
# Optional. The value of
|
2289
|
+
# {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token}
|
2290
|
+
# received from a previous `ListRestorePlans` call.
|
2291
|
+
# Provide this to retrieve the subsequent page in a multi-page list of
|
2292
|
+
# results. When paginating, all other parameters provided to
|
2293
|
+
# `ListRestorePlans` must match the call that provided the page token.
|
2294
|
+
# @param filter [::String]
|
2295
|
+
# Optional. Field match expression used to filter the results.
|
2296
|
+
# @param order_by [::String]
|
2297
|
+
# Optional. Field by which to sort the results.
|
2298
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2299
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>]
|
2300
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2301
|
+
#
|
2302
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>]
|
2303
|
+
#
|
2304
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2305
|
+
#
|
2306
|
+
# @example Basic example
|
2307
|
+
# require "google/cloud/gke_backup/v1"
|
2308
|
+
#
|
2309
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2310
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2311
|
+
#
|
2312
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2313
|
+
# request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new
|
2314
|
+
#
|
2315
|
+
# # Call the list_restore_plans method.
|
2316
|
+
# result = client.list_restore_plans request
|
2317
|
+
#
|
2318
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2319
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2320
|
+
# result.each do |item|
|
2321
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan.
|
2322
|
+
# p item
|
2323
|
+
# end
|
2324
|
+
#
|
2325
|
+
def list_restore_plans request, options = nil
|
2326
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2327
|
+
|
2328
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest
|
2329
|
+
|
2330
|
+
# Converts hash and nil to an options object
|
2331
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2332
|
+
|
2333
|
+
# Customize the options with defaults
|
2334
|
+
call_metadata = @config.rpcs.list_restore_plans.metadata.to_h
|
2335
|
+
|
2336
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2337
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2338
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2339
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
2340
|
+
transports_version_send: [:rest]
|
2341
|
+
|
2342
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2343
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2344
|
+
|
2345
|
+
options.apply_defaults timeout: @config.rpcs.list_restore_plans.timeout,
|
2346
|
+
metadata: call_metadata,
|
2347
|
+
retry_policy: @config.rpcs.list_restore_plans.retry_policy
|
2348
|
+
|
2349
|
+
options.apply_defaults timeout: @config.timeout,
|
2350
|
+
metadata: @config.metadata,
|
2351
|
+
retry_policy: @config.retry_policy
|
2352
|
+
|
2353
|
+
@backup_for_gke_stub.list_restore_plans request, options do |result, operation|
|
2354
|
+
result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plans, "restore_plans", request, result, options
|
2355
|
+
yield result, operation if block_given?
|
2356
|
+
throw :response, result
|
2357
|
+
end
|
2358
|
+
rescue ::Gapic::Rest::Error => e
|
2359
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2360
|
+
end
|
2361
|
+
|
2362
|
+
##
|
2363
|
+
# Retrieve the details of a single RestorePlan.
|
2364
|
+
#
|
2365
|
+
# @overload get_restore_plan(request, options = nil)
|
2366
|
+
# Pass arguments to `get_restore_plan` via a request object, either of type
|
2367
|
+
# {::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest} or an equivalent Hash.
|
2368
|
+
#
|
2369
|
+
# @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Hash]
|
2370
|
+
# A request object representing the call parameters. Required. To specify no
|
2371
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2372
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2373
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2374
|
+
#
|
2375
|
+
# @overload get_restore_plan(name: nil)
|
2376
|
+
# Pass arguments to `get_restore_plan` via keyword arguments. Note that at
|
2377
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2378
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2379
|
+
#
|
2380
|
+
# @param name [::String]
|
2381
|
+
# Required. Fully qualified RestorePlan name.
|
2382
|
+
# Format: `projects/*/locations/*/restorePlans/*`
|
2383
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2384
|
+
# @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlan]
|
2385
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2386
|
+
#
|
2387
|
+
# @return [::Google::Cloud::GkeBackup::V1::RestorePlan]
|
2388
|
+
#
|
2389
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2390
|
+
#
|
2391
|
+
# @example Basic example
|
2392
|
+
# require "google/cloud/gke_backup/v1"
|
2393
|
+
#
|
2394
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2395
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2396
|
+
#
|
2397
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2398
|
+
# request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new
|
2399
|
+
#
|
2400
|
+
# # Call the get_restore_plan method.
|
2401
|
+
# result = client.get_restore_plan request
|
2402
|
+
#
|
2403
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan.
|
2404
|
+
# p result
|
2405
|
+
#
|
2406
|
+
def get_restore_plan request, options = nil
|
2407
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2408
|
+
|
2409
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest
|
2410
|
+
|
2411
|
+
# Converts hash and nil to an options object
|
2412
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2413
|
+
|
2414
|
+
# Customize the options with defaults
|
2415
|
+
call_metadata = @config.rpcs.get_restore_plan.metadata.to_h
|
2416
|
+
|
2417
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2418
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2419
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2420
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
2421
|
+
transports_version_send: [:rest]
|
2422
|
+
|
2423
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2424
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2425
|
+
|
2426
|
+
options.apply_defaults timeout: @config.rpcs.get_restore_plan.timeout,
|
2427
|
+
metadata: call_metadata,
|
2428
|
+
retry_policy: @config.rpcs.get_restore_plan.retry_policy
|
2429
|
+
|
2430
|
+
options.apply_defaults timeout: @config.timeout,
|
2431
|
+
metadata: @config.metadata,
|
2432
|
+
retry_policy: @config.retry_policy
|
2433
|
+
|
2434
|
+
@backup_for_gke_stub.get_restore_plan request, options do |result, operation|
|
2435
|
+
yield result, operation if block_given?
|
2436
|
+
end
|
2437
|
+
rescue ::Gapic::Rest::Error => e
|
2438
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2439
|
+
end
|
2440
|
+
|
2441
|
+
##
|
2442
|
+
# Update a RestorePlan.
|
2443
|
+
#
|
2444
|
+
# @overload update_restore_plan(request, options = nil)
|
2445
|
+
# Pass arguments to `update_restore_plan` via a request object, either of type
|
2446
|
+
# {::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest} or an equivalent Hash.
|
2447
|
+
#
|
2448
|
+
# @param request [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Hash]
|
2449
|
+
# A request object representing the call parameters. Required. To specify no
|
2450
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2451
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2452
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2453
|
+
#
|
2454
|
+
# @overload update_restore_plan(restore_plan: nil, update_mask: nil)
|
2455
|
+
# Pass arguments to `update_restore_plan` via keyword arguments. Note that at
|
2456
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2457
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2458
|
+
#
|
2459
|
+
# @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash]
|
2460
|
+
# Required. A new version of the RestorePlan resource that contains updated
|
2461
|
+
# fields. This may be sparsely populated if an `update_mask` is provided.
|
2462
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2463
|
+
# Optional. This is used to specify the fields to be overwritten in the
|
2464
|
+
# RestorePlan targeted for update. The values for each of these
|
2465
|
+
# updated fields will be taken from the `restore_plan` provided
|
2466
|
+
# with this request. Field names are relative to the root of the resource.
|
2467
|
+
# If no `update_mask` is provided, all fields in `restore_plan` will be
|
2468
|
+
# written to the target RestorePlan resource.
|
2469
|
+
# Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored
|
2470
|
+
# and are not used to update the target RestorePlan.
|
2471
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2472
|
+
# @yieldparam result [::Gapic::Operation]
|
2473
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2474
|
+
#
|
2475
|
+
# @return [::Gapic::Operation]
|
2476
|
+
#
|
2477
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2478
|
+
#
|
2479
|
+
# @example Basic example
|
2480
|
+
# require "google/cloud/gke_backup/v1"
|
2481
|
+
#
|
2482
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2483
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2484
|
+
#
|
2485
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2486
|
+
# request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new
|
2487
|
+
#
|
2488
|
+
# # Call the update_restore_plan method.
|
2489
|
+
# result = client.update_restore_plan request
|
2490
|
+
#
|
2491
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2492
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2493
|
+
# # Here is how to wait for a response.
|
2494
|
+
# result.wait_until_done! timeout: 60
|
2495
|
+
# if result.response?
|
2496
|
+
# p result.response
|
2497
|
+
# else
|
2498
|
+
# puts "No response received."
|
2499
|
+
# end
|
2500
|
+
#
|
2501
|
+
def update_restore_plan request, options = nil
|
2502
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2503
|
+
|
2504
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest
|
2505
|
+
|
2506
|
+
# Converts hash and nil to an options object
|
2507
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2508
|
+
|
2509
|
+
# Customize the options with defaults
|
2510
|
+
call_metadata = @config.rpcs.update_restore_plan.metadata.to_h
|
2511
|
+
|
2512
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2513
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2514
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2515
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
2516
|
+
transports_version_send: [:rest]
|
2517
|
+
|
2518
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2519
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2520
|
+
|
2521
|
+
options.apply_defaults timeout: @config.rpcs.update_restore_plan.timeout,
|
2522
|
+
metadata: call_metadata,
|
2523
|
+
retry_policy: @config.rpcs.update_restore_plan.retry_policy
|
2524
|
+
|
2525
|
+
options.apply_defaults timeout: @config.timeout,
|
2526
|
+
metadata: @config.metadata,
|
2527
|
+
retry_policy: @config.retry_policy
|
2528
|
+
|
2529
|
+
@backup_for_gke_stub.update_restore_plan request, options do |result, operation|
|
2530
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2531
|
+
yield result, operation if block_given?
|
2532
|
+
throw :response, result
|
2533
|
+
end
|
2534
|
+
rescue ::Gapic::Rest::Error => e
|
2535
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2536
|
+
end
|
2537
|
+
|
2538
|
+
##
|
2539
|
+
# Deletes an existing RestorePlan.
|
2540
|
+
#
|
2541
|
+
# @overload delete_restore_plan(request, options = nil)
|
2542
|
+
# Pass arguments to `delete_restore_plan` via a request object, either of type
|
2543
|
+
# {::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest} or an equivalent Hash.
|
2544
|
+
#
|
2545
|
+
# @param request [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Hash]
|
2546
|
+
# A request object representing the call parameters. Required. To specify no
|
2547
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2548
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2549
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2550
|
+
#
|
2551
|
+
# @overload delete_restore_plan(name: nil, etag: nil, force: nil)
|
2552
|
+
# Pass arguments to `delete_restore_plan` via keyword arguments. Note that at
|
2553
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2554
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2555
|
+
#
|
2556
|
+
# @param name [::String]
|
2557
|
+
# Required. Fully qualified RestorePlan name.
|
2558
|
+
# Format: `projects/*/locations/*/restorePlans/*`
|
2559
|
+
# @param etag [::String]
|
2560
|
+
# Optional. If provided, this value must match the current value of the
|
2561
|
+
# target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag}
|
2562
|
+
# field or the request is rejected.
|
2563
|
+
# @param force [::Boolean]
|
2564
|
+
# Optional. If set to true, any Restores below this RestorePlan will also be
|
2565
|
+
# deleted. Otherwise, the request will only succeed if the RestorePlan has no
|
2566
|
+
# Restores.
|
2567
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2568
|
+
# @yieldparam result [::Gapic::Operation]
|
2569
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2570
|
+
#
|
2571
|
+
# @return [::Gapic::Operation]
|
2572
|
+
#
|
2573
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2574
|
+
#
|
2575
|
+
# @example Basic example
|
2576
|
+
# require "google/cloud/gke_backup/v1"
|
2577
|
+
#
|
2578
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2579
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2580
|
+
#
|
2581
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2582
|
+
# request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new
|
2583
|
+
#
|
2584
|
+
# # Call the delete_restore_plan method.
|
2585
|
+
# result = client.delete_restore_plan request
|
2586
|
+
#
|
2587
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2588
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2589
|
+
# # Here is how to wait for a response.
|
2590
|
+
# result.wait_until_done! timeout: 60
|
2591
|
+
# if result.response?
|
2592
|
+
# p result.response
|
2593
|
+
# else
|
2594
|
+
# puts "No response received."
|
2595
|
+
# end
|
2596
|
+
#
|
2597
|
+
def delete_restore_plan request, options = nil
|
2598
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2599
|
+
|
2600
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest
|
2601
|
+
|
2602
|
+
# Converts hash and nil to an options object
|
2603
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2604
|
+
|
2605
|
+
# Customize the options with defaults
|
2606
|
+
call_metadata = @config.rpcs.delete_restore_plan.metadata.to_h
|
2607
|
+
|
2608
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2609
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2610
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2611
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
2612
|
+
transports_version_send: [:rest]
|
2613
|
+
|
2614
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2615
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2616
|
+
|
2617
|
+
options.apply_defaults timeout: @config.rpcs.delete_restore_plan.timeout,
|
2618
|
+
metadata: call_metadata,
|
2619
|
+
retry_policy: @config.rpcs.delete_restore_plan.retry_policy
|
2620
|
+
|
2621
|
+
options.apply_defaults timeout: @config.timeout,
|
2622
|
+
metadata: @config.metadata,
|
2623
|
+
retry_policy: @config.retry_policy
|
2624
|
+
|
2625
|
+
@backup_for_gke_stub.delete_restore_plan request, options do |result, operation|
|
2626
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2627
|
+
yield result, operation if block_given?
|
2628
|
+
throw :response, result
|
2629
|
+
end
|
2630
|
+
rescue ::Gapic::Rest::Error => e
|
2631
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2632
|
+
end
|
2633
|
+
|
2634
|
+
##
|
2635
|
+
# Creates a new RestoreChannel in a given location.
|
2636
|
+
#
|
2637
|
+
# @overload create_restore_channel(request, options = nil)
|
2638
|
+
# Pass arguments to `create_restore_channel` via a request object, either of type
|
2639
|
+
# {::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest} or an equivalent Hash.
|
2640
|
+
#
|
2641
|
+
# @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, ::Hash]
|
2642
|
+
# A request object representing the call parameters. Required. To specify no
|
2643
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2644
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2645
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2646
|
+
#
|
2647
|
+
# @overload create_restore_channel(parent: nil, restore_channel: nil, restore_channel_id: nil)
|
2648
|
+
# Pass arguments to `create_restore_channel` via keyword arguments. Note that at
|
2649
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2650
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2651
|
+
#
|
2652
|
+
# @param parent [::String]
|
2653
|
+
# Required. The location within which to create the RestoreChannel.
|
2654
|
+
# Format: `projects/*/locations/*`
|
2655
|
+
# @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash]
|
2656
|
+
# Required. The RestoreChannel resource object to create.
|
2657
|
+
# @param restore_channel_id [::String]
|
2658
|
+
# Optional. The client-provided short name for the RestoreChannel resource.
|
2659
|
+
# This name must:
|
2660
|
+
#
|
2661
|
+
# - be between 1 and 63 characters long (inclusive)
|
2662
|
+
# - consist of only lower-case ASCII letters, numbers, and dashes
|
2663
|
+
# - start with a lower-case letter
|
2664
|
+
# - end with a lower-case letter or number
|
2665
|
+
# - be unique within the set of RestoreChannels in this location
|
2666
|
+
# If the user does not provide a name, a uuid will be used as the name.
|
2667
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2668
|
+
# @yieldparam result [::Gapic::Operation]
|
2669
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2670
|
+
#
|
2671
|
+
# @return [::Gapic::Operation]
|
2672
|
+
#
|
2673
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2674
|
+
#
|
2675
|
+
# @example Basic example
|
2676
|
+
# require "google/cloud/gke_backup/v1"
|
2677
|
+
#
|
2678
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2679
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
2680
|
+
#
|
2681
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2682
|
+
# request = Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new
|
2683
|
+
#
|
2684
|
+
# # Call the create_restore_channel method.
|
2685
|
+
# result = client.create_restore_channel request
|
2686
|
+
#
|
2687
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2688
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2689
|
+
# # Here is how to wait for a response.
|
2690
|
+
# result.wait_until_done! timeout: 60
|
2691
|
+
# if result.response?
|
2692
|
+
# p result.response
|
2693
|
+
# else
|
2694
|
+
# puts "No response received."
|
2695
|
+
# end
|
2696
|
+
#
|
2697
|
+
def create_restore_channel request, options = nil
|
2698
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2699
|
+
|
2700
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest
|
2701
|
+
|
2702
|
+
# Converts hash and nil to an options object
|
2703
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2704
|
+
|
2705
|
+
# Customize the options with defaults
|
2706
|
+
call_metadata = @config.rpcs.create_restore_channel.metadata.to_h
|
2707
|
+
|
2708
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2709
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2710
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2711
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
2712
|
+
transports_version_send: [:rest]
|
2713
|
+
|
2714
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2715
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2716
|
+
|
2717
|
+
options.apply_defaults timeout: @config.rpcs.create_restore_channel.timeout,
|
2718
|
+
metadata: call_metadata,
|
2719
|
+
retry_policy: @config.rpcs.create_restore_channel.retry_policy
|
2720
|
+
|
2721
|
+
options.apply_defaults timeout: @config.timeout,
|
2722
|
+
metadata: @config.metadata,
|
2723
|
+
retry_policy: @config.retry_policy
|
2724
|
+
|
2725
|
+
@backup_for_gke_stub.create_restore_channel request, options do |result, operation|
|
2726
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2727
|
+
yield result, operation if block_given?
|
2728
|
+
throw :response, result
|
2729
|
+
end
|
2730
|
+
rescue ::Gapic::Rest::Error => e
|
2731
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2732
|
+
end
|
2733
|
+
|
2734
|
+
##
|
2735
|
+
# Lists RestoreChannels in a given location.
|
2736
|
+
#
|
2737
|
+
# @overload list_restore_channels(request, options = nil)
|
2738
|
+
# Pass arguments to `list_restore_channels` via a request object, either of type
|
2739
|
+
# {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest} or an equivalent Hash.
|
2740
|
+
#
|
2741
|
+
# @param request [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, ::Hash]
|
2742
|
+
# A request object representing the call parameters. Required. To specify no
|
2743
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2744
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2745
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2746
|
+
#
|
2747
|
+
# @overload list_restore_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2748
|
+
# Pass arguments to `list_restore_channels` via keyword arguments. Note that at
|
2749
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2750
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2751
|
+
#
|
2752
|
+
# @param parent [::String]
|
2753
|
+
# Required. The location that contains the RestoreChannels to list.
|
1563
2754
|
# Format: `projects/*/locations/*`
|
1564
2755
|
# @param page_size [::Integer]
|
1565
2756
|
# Optional. The target number of results to return in a single response.
|
1566
2757
|
# If not specified, a default value will be chosen by the service.
|
1567
2758
|
# Note that the response may include a partial list and a caller should
|
1568
2759
|
# only rely on the response's
|
1569
|
-
# {::Google::Cloud::GkeBackup::V1::
|
2760
|
+
# {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token}
|
1570
2761
|
# to determine if there are more instances left to be queried.
|
1571
2762
|
# @param page_token [::String]
|
1572
2763
|
# Optional. The value of
|
1573
|
-
# {::Google::Cloud::GkeBackup::V1::
|
1574
|
-
# received from a previous `
|
2764
|
+
# {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token}
|
2765
|
+
# received from a previous `ListRestoreChannels` call.
|
1575
2766
|
# Provide this to retrieve the subsequent page in a multi-page list of
|
1576
2767
|
# results. When paginating, all other parameters provided to
|
1577
|
-
# `
|
2768
|
+
# `ListRestoreChannels` must match the call that provided the page
|
2769
|
+
# token.
|
1578
2770
|
# @param filter [::String]
|
1579
2771
|
# Optional. Field match expression used to filter the results.
|
1580
2772
|
# @param order_by [::String]
|
1581
2773
|
# Optional. Field by which to sort the results.
|
1582
2774
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1583
|
-
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::
|
2775
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>]
|
1584
2776
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1585
2777
|
#
|
1586
|
-
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::
|
2778
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>]
|
1587
2779
|
#
|
1588
2780
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1589
2781
|
#
|
@@ -1594,28 +2786,28 @@ module Google
|
|
1594
2786
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1595
2787
|
#
|
1596
2788
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1597
|
-
# request = Google::Cloud::GkeBackup::V1::
|
2789
|
+
# request = Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.new
|
1598
2790
|
#
|
1599
|
-
# # Call the
|
1600
|
-
# result = client.
|
2791
|
+
# # Call the list_restore_channels method.
|
2792
|
+
# result = client.list_restore_channels request
|
1601
2793
|
#
|
1602
2794
|
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1603
2795
|
# # over elements, and API calls will be issued to fetch pages as needed.
|
1604
2796
|
# result.each do |item|
|
1605
|
-
# # Each element is of type ::Google::Cloud::GkeBackup::V1::
|
2797
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::RestoreChannel.
|
1606
2798
|
# p item
|
1607
2799
|
# end
|
1608
2800
|
#
|
1609
|
-
def
|
2801
|
+
def list_restore_channels request, options = nil
|
1610
2802
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1611
2803
|
|
1612
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
2804
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest
|
1613
2805
|
|
1614
2806
|
# Converts hash and nil to an options object
|
1615
2807
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1616
2808
|
|
1617
2809
|
# Customize the options with defaults
|
1618
|
-
call_metadata = @config.rpcs.
|
2810
|
+
call_metadata = @config.rpcs.list_restore_channels.metadata.to_h
|
1619
2811
|
|
1620
2812
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1621
2813
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1626,16 +2818,16 @@ module Google
|
|
1626
2818
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1627
2819
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1628
2820
|
|
1629
|
-
options.apply_defaults timeout: @config.rpcs.
|
2821
|
+
options.apply_defaults timeout: @config.rpcs.list_restore_channels.timeout,
|
1630
2822
|
metadata: call_metadata,
|
1631
|
-
retry_policy: @config.rpcs.
|
2823
|
+
retry_policy: @config.rpcs.list_restore_channels.retry_policy
|
1632
2824
|
|
1633
2825
|
options.apply_defaults timeout: @config.timeout,
|
1634
2826
|
metadata: @config.metadata,
|
1635
2827
|
retry_policy: @config.retry_policy
|
1636
2828
|
|
1637
|
-
@backup_for_gke_stub.
|
1638
|
-
result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :
|
2829
|
+
@backup_for_gke_stub.list_restore_channels request, options do |result, operation|
|
2830
|
+
result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_channels, "restore_channels", request, result, options
|
1639
2831
|
yield result, operation if block_given?
|
1640
2832
|
throw :response, result
|
1641
2833
|
end
|
@@ -1644,31 +2836,31 @@ module Google
|
|
1644
2836
|
end
|
1645
2837
|
|
1646
2838
|
##
|
1647
|
-
# Retrieve the details of a single
|
2839
|
+
# Retrieve the details of a single RestoreChannel.
|
1648
2840
|
#
|
1649
|
-
# @overload
|
1650
|
-
# Pass arguments to `
|
1651
|
-
# {::Google::Cloud::GkeBackup::V1::
|
2841
|
+
# @overload get_restore_channel(request, options = nil)
|
2842
|
+
# Pass arguments to `get_restore_channel` via a request object, either of type
|
2843
|
+
# {::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest} or an equivalent Hash.
|
1652
2844
|
#
|
1653
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
2845
|
+
# @param request [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, ::Hash]
|
1654
2846
|
# A request object representing the call parameters. Required. To specify no
|
1655
2847
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1656
2848
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1657
2849
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1658
2850
|
#
|
1659
|
-
# @overload
|
1660
|
-
# Pass arguments to `
|
2851
|
+
# @overload get_restore_channel(name: nil)
|
2852
|
+
# Pass arguments to `get_restore_channel` via keyword arguments. Note that at
|
1661
2853
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1662
2854
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1663
2855
|
#
|
1664
2856
|
# @param name [::String]
|
1665
|
-
# Required. Fully qualified
|
1666
|
-
# Format: `projects/*/locations/*/
|
2857
|
+
# Required. Fully qualified RestoreChannel name.
|
2858
|
+
# Format: `projects/*/locations/*/restoreChannels/*`
|
1667
2859
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1668
|
-
# @yieldparam result [::Google::Cloud::GkeBackup::V1::
|
2860
|
+
# @yieldparam result [::Google::Cloud::GkeBackup::V1::RestoreChannel]
|
1669
2861
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1670
2862
|
#
|
1671
|
-
# @return [::Google::Cloud::GkeBackup::V1::
|
2863
|
+
# @return [::Google::Cloud::GkeBackup::V1::RestoreChannel]
|
1672
2864
|
#
|
1673
2865
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1674
2866
|
#
|
@@ -1679,24 +2871,24 @@ module Google
|
|
1679
2871
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1680
2872
|
#
|
1681
2873
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1682
|
-
# request = Google::Cloud::GkeBackup::V1::
|
2874
|
+
# request = Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new
|
1683
2875
|
#
|
1684
|
-
# # Call the
|
1685
|
-
# result = client.
|
2876
|
+
# # Call the get_restore_channel method.
|
2877
|
+
# result = client.get_restore_channel request
|
1686
2878
|
#
|
1687
|
-
# # The returned object is of type Google::Cloud::GkeBackup::V1::
|
2879
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::RestoreChannel.
|
1688
2880
|
# p result
|
1689
2881
|
#
|
1690
|
-
def
|
2882
|
+
def get_restore_channel request, options = nil
|
1691
2883
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1692
2884
|
|
1693
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
2885
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest
|
1694
2886
|
|
1695
2887
|
# Converts hash and nil to an options object
|
1696
2888
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1697
2889
|
|
1698
2890
|
# Customize the options with defaults
|
1699
|
-
call_metadata = @config.rpcs.
|
2891
|
+
call_metadata = @config.rpcs.get_restore_channel.metadata.to_h
|
1700
2892
|
|
1701
2893
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1702
2894
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1707,15 +2899,15 @@ module Google
|
|
1707
2899
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1708
2900
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1709
2901
|
|
1710
|
-
options.apply_defaults timeout: @config.rpcs.
|
2902
|
+
options.apply_defaults timeout: @config.rpcs.get_restore_channel.timeout,
|
1711
2903
|
metadata: call_metadata,
|
1712
|
-
retry_policy: @config.rpcs.
|
2904
|
+
retry_policy: @config.rpcs.get_restore_channel.retry_policy
|
1713
2905
|
|
1714
2906
|
options.apply_defaults timeout: @config.timeout,
|
1715
2907
|
metadata: @config.metadata,
|
1716
2908
|
retry_policy: @config.retry_policy
|
1717
2909
|
|
1718
|
-
@backup_for_gke_stub.
|
2910
|
+
@backup_for_gke_stub.get_restore_channel request, options do |result, operation|
|
1719
2911
|
yield result, operation if block_given?
|
1720
2912
|
end
|
1721
2913
|
rescue ::Gapic::Rest::Error => e
|
@@ -1723,35 +2915,37 @@ module Google
|
|
1723
2915
|
end
|
1724
2916
|
|
1725
2917
|
##
|
1726
|
-
# Update a
|
2918
|
+
# Update a RestoreChannel.
|
1727
2919
|
#
|
1728
|
-
# @overload
|
1729
|
-
# Pass arguments to `
|
1730
|
-
# {::Google::Cloud::GkeBackup::V1::
|
2920
|
+
# @overload update_restore_channel(request, options = nil)
|
2921
|
+
# Pass arguments to `update_restore_channel` via a request object, either of type
|
2922
|
+
# {::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest} or an equivalent Hash.
|
1731
2923
|
#
|
1732
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
2924
|
+
# @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, ::Hash]
|
1733
2925
|
# A request object representing the call parameters. Required. To specify no
|
1734
2926
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1735
2927
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1736
2928
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1737
2929
|
#
|
1738
|
-
# @overload
|
1739
|
-
# Pass arguments to `
|
2930
|
+
# @overload update_restore_channel(restore_channel: nil, update_mask: nil)
|
2931
|
+
# Pass arguments to `update_restore_channel` via keyword arguments. Note that at
|
1740
2932
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1741
2933
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1742
2934
|
#
|
1743
|
-
# @param
|
1744
|
-
# Required. A new version of the
|
1745
|
-
# fields. This may be sparsely populated if an `update_mask` is
|
2935
|
+
# @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash]
|
2936
|
+
# Required. A new version of the RestoreChannel resource that contains
|
2937
|
+
# updated fields. This may be sparsely populated if an `update_mask` is
|
2938
|
+
# provided.
|
1746
2939
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1747
2940
|
# Optional. This is used to specify the fields to be overwritten in the
|
1748
|
-
#
|
1749
|
-
# updated fields will be taken from the `
|
1750
|
-
# with this request. Field names are relative to the root of the resource
|
1751
|
-
#
|
1752
|
-
#
|
1753
|
-
#
|
1754
|
-
# and
|
2941
|
+
# RestoreChannel targeted for update. The values for each of these
|
2942
|
+
# updated fields will be taken from the `restore_channel` provided
|
2943
|
+
# with this request. Field names are relative to the root of the resource
|
2944
|
+
# (e.g., `description`, `destination_project_id`, etc.)
|
2945
|
+
# If no `update_mask` is provided, all fields in `restore_channel` will
|
2946
|
+
# be written to the target RestoreChannel resource. Note that
|
2947
|
+
# OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and
|
2948
|
+
# are not used to update the target RestoreChannel.
|
1755
2949
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1756
2950
|
# @yieldparam result [::Gapic::Operation]
|
1757
2951
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1767,10 +2961,10 @@ module Google
|
|
1767
2961
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1768
2962
|
#
|
1769
2963
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1770
|
-
# request = Google::Cloud::GkeBackup::V1::
|
2964
|
+
# request = Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new
|
1771
2965
|
#
|
1772
|
-
# # Call the
|
1773
|
-
# result = client.
|
2966
|
+
# # Call the update_restore_channel method.
|
2967
|
+
# result = client.update_restore_channel request
|
1774
2968
|
#
|
1775
2969
|
# # The returned object is of type Gapic::Operation. You can use it to
|
1776
2970
|
# # check the status of an operation, cancel it, or wait for results.
|
@@ -1782,16 +2976,16 @@ module Google
|
|
1782
2976
|
# puts "No response received."
|
1783
2977
|
# end
|
1784
2978
|
#
|
1785
|
-
def
|
2979
|
+
def update_restore_channel request, options = nil
|
1786
2980
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1787
2981
|
|
1788
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
2982
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest
|
1789
2983
|
|
1790
2984
|
# Converts hash and nil to an options object
|
1791
2985
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1792
2986
|
|
1793
2987
|
# Customize the options with defaults
|
1794
|
-
call_metadata = @config.rpcs.
|
2988
|
+
call_metadata = @config.rpcs.update_restore_channel.metadata.to_h
|
1795
2989
|
|
1796
2990
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1797
2991
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1802,15 +2996,15 @@ module Google
|
|
1802
2996
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1803
2997
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1804
2998
|
|
1805
|
-
options.apply_defaults timeout: @config.rpcs.
|
2999
|
+
options.apply_defaults timeout: @config.rpcs.update_restore_channel.timeout,
|
1806
3000
|
metadata: call_metadata,
|
1807
|
-
retry_policy: @config.rpcs.
|
3001
|
+
retry_policy: @config.rpcs.update_restore_channel.retry_policy
|
1808
3002
|
|
1809
3003
|
options.apply_defaults timeout: @config.timeout,
|
1810
3004
|
metadata: @config.metadata,
|
1811
3005
|
retry_policy: @config.retry_policy
|
1812
3006
|
|
1813
|
-
@backup_for_gke_stub.
|
3007
|
+
@backup_for_gke_stub.update_restore_channel request, options do |result, operation|
|
1814
3008
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1815
3009
|
yield result, operation if block_given?
|
1816
3010
|
throw :response, result
|
@@ -1820,34 +3014,31 @@ module Google
|
|
1820
3014
|
end
|
1821
3015
|
|
1822
3016
|
##
|
1823
|
-
# Deletes an existing
|
3017
|
+
# Deletes an existing RestoreChannel.
|
1824
3018
|
#
|
1825
|
-
# @overload
|
1826
|
-
# Pass arguments to `
|
1827
|
-
# {::Google::Cloud::GkeBackup::V1::
|
3019
|
+
# @overload delete_restore_channel(request, options = nil)
|
3020
|
+
# Pass arguments to `delete_restore_channel` via a request object, either of type
|
3021
|
+
# {::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest} or an equivalent Hash.
|
1828
3022
|
#
|
1829
|
-
# @param request [::Google::Cloud::GkeBackup::V1::
|
3023
|
+
# @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, ::Hash]
|
1830
3024
|
# A request object representing the call parameters. Required. To specify no
|
1831
3025
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1832
3026
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1833
3027
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1834
3028
|
#
|
1835
|
-
# @overload
|
1836
|
-
# Pass arguments to `
|
3029
|
+
# @overload delete_restore_channel(name: nil, etag: nil)
|
3030
|
+
# Pass arguments to `delete_restore_channel` via keyword arguments. Note that at
|
1837
3031
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1838
3032
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1839
3033
|
#
|
1840
3034
|
# @param name [::String]
|
1841
|
-
# Required. Fully qualified
|
1842
|
-
# Format: `projects/*/locations/*/
|
3035
|
+
# Required. Fully qualified RestoreChannel name.
|
3036
|
+
# Format: `projects/*/locations/*/restoreChannels/*`
|
1843
3037
|
# @param etag [::String]
|
1844
3038
|
# Optional. If provided, this value must match the current value of the
|
1845
|
-
# target
|
1846
|
-
# field or the request
|
1847
|
-
#
|
1848
|
-
# Optional. If set to true, any Restores below this RestorePlan will also be
|
1849
|
-
# deleted. Otherwise, the request will only succeed if the RestorePlan has no
|
1850
|
-
# Restores.
|
3039
|
+
# target RestoreChannel's
|
3040
|
+
# {::Google::Cloud::GkeBackup::V1::RestoreChannel#etag etag} field or the request
|
3041
|
+
# is rejected.
|
1851
3042
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1852
3043
|
# @yieldparam result [::Gapic::Operation]
|
1853
3044
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1863,10 +3054,10 @@ module Google
|
|
1863
3054
|
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
1864
3055
|
#
|
1865
3056
|
# # Create a request. To set request fields, pass in keyword arguments.
|
1866
|
-
# request = Google::Cloud::GkeBackup::V1::
|
3057
|
+
# request = Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new
|
1867
3058
|
#
|
1868
|
-
# # Call the
|
1869
|
-
# result = client.
|
3059
|
+
# # Call the delete_restore_channel method.
|
3060
|
+
# result = client.delete_restore_channel request
|
1870
3061
|
#
|
1871
3062
|
# # The returned object is of type Gapic::Operation. You can use it to
|
1872
3063
|
# # check the status of an operation, cancel it, or wait for results.
|
@@ -1878,16 +3069,16 @@ module Google
|
|
1878
3069
|
# puts "No response received."
|
1879
3070
|
# end
|
1880
3071
|
#
|
1881
|
-
def
|
3072
|
+
def delete_restore_channel request, options = nil
|
1882
3073
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1883
3074
|
|
1884
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::
|
3075
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest
|
1885
3076
|
|
1886
3077
|
# Converts hash and nil to an options object
|
1887
3078
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1888
3079
|
|
1889
3080
|
# Customize the options with defaults
|
1890
|
-
call_metadata = @config.rpcs.
|
3081
|
+
call_metadata = @config.rpcs.delete_restore_channel.metadata.to_h
|
1891
3082
|
|
1892
3083
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1893
3084
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1898,15 +3089,15 @@ module Google
|
|
1898
3089
|
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1899
3090
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1900
3091
|
|
1901
|
-
options.apply_defaults timeout: @config.rpcs.
|
3092
|
+
options.apply_defaults timeout: @config.rpcs.delete_restore_channel.timeout,
|
1902
3093
|
metadata: call_metadata,
|
1903
|
-
retry_policy: @config.rpcs.
|
3094
|
+
retry_policy: @config.rpcs.delete_restore_channel.retry_policy
|
1904
3095
|
|
1905
3096
|
options.apply_defaults timeout: @config.timeout,
|
1906
3097
|
metadata: @config.metadata,
|
1907
3098
|
retry_policy: @config.retry_policy
|
1908
3099
|
|
1909
|
-
@backup_for_gke_stub.
|
3100
|
+
@backup_for_gke_stub.delete_restore_channel request, options do |result, operation|
|
1910
3101
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1911
3102
|
yield result, operation if block_given?
|
1912
3103
|
throw :response, result
|
@@ -1915,6 +3106,190 @@ module Google
|
|
1915
3106
|
raise ::Google::Cloud::Error.from_error(e)
|
1916
3107
|
end
|
1917
3108
|
|
3109
|
+
##
|
3110
|
+
# Lists RestorePlanBindings in a given location.
|
3111
|
+
#
|
3112
|
+
# @overload list_restore_plan_bindings(request, options = nil)
|
3113
|
+
# Pass arguments to `list_restore_plan_bindings` via a request object, either of type
|
3114
|
+
# {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest} or an equivalent Hash.
|
3115
|
+
#
|
3116
|
+
# @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, ::Hash]
|
3117
|
+
# A request object representing the call parameters. Required. To specify no
|
3118
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3119
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3120
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3121
|
+
#
|
3122
|
+
# @overload list_restore_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
3123
|
+
# Pass arguments to `list_restore_plan_bindings` via keyword arguments. Note that at
|
3124
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3125
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3126
|
+
#
|
3127
|
+
# @param parent [::String]
|
3128
|
+
# Required. The RestoreChannel that contains the ListRestorePlanBindings to
|
3129
|
+
# list. Format: `projects/*/locations/*/restoreChannels/*`
|
3130
|
+
# @param page_size [::Integer]
|
3131
|
+
# Optional. The target number of results to return in a single response.
|
3132
|
+
# If not specified, a default value will be chosen by the service.
|
3133
|
+
# Note that the response may include a partial list and a caller should
|
3134
|
+
# only rely on the response's
|
3135
|
+
# {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token}
|
3136
|
+
# to determine if there are more instances left to be queried.
|
3137
|
+
# @param page_token [::String]
|
3138
|
+
# Optional. The value of
|
3139
|
+
# {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token}
|
3140
|
+
# received from a previous `ListRestorePlanBindings` call.
|
3141
|
+
# Provide this to retrieve the subsequent page in a multi-page list of
|
3142
|
+
# results. When paginating, all other parameters provided to
|
3143
|
+
# `ListRestorePlanBindings` must match the call that provided the page
|
3144
|
+
# token.
|
3145
|
+
# @param filter [::String]
|
3146
|
+
# Optional. Field match expression used to filter the results.
|
3147
|
+
# @param order_by [::String]
|
3148
|
+
# Optional. Field by which to sort the results.
|
3149
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3150
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>]
|
3151
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3152
|
+
#
|
3153
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>]
|
3154
|
+
#
|
3155
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3156
|
+
#
|
3157
|
+
# @example Basic example
|
3158
|
+
# require "google/cloud/gke_backup/v1"
|
3159
|
+
#
|
3160
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3161
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
3162
|
+
#
|
3163
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3164
|
+
# request = Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.new
|
3165
|
+
#
|
3166
|
+
# # Call the list_restore_plan_bindings method.
|
3167
|
+
# result = client.list_restore_plan_bindings request
|
3168
|
+
#
|
3169
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3170
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3171
|
+
# result.each do |item|
|
3172
|
+
# # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlanBinding.
|
3173
|
+
# p item
|
3174
|
+
# end
|
3175
|
+
#
|
3176
|
+
def list_restore_plan_bindings request, options = nil
|
3177
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3178
|
+
|
3179
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest
|
3180
|
+
|
3181
|
+
# Converts hash and nil to an options object
|
3182
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3183
|
+
|
3184
|
+
# Customize the options with defaults
|
3185
|
+
call_metadata = @config.rpcs.list_restore_plan_bindings.metadata.to_h
|
3186
|
+
|
3187
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3188
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3189
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3190
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
3191
|
+
transports_version_send: [:rest]
|
3192
|
+
|
3193
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3194
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3195
|
+
|
3196
|
+
options.apply_defaults timeout: @config.rpcs.list_restore_plan_bindings.timeout,
|
3197
|
+
metadata: call_metadata,
|
3198
|
+
retry_policy: @config.rpcs.list_restore_plan_bindings.retry_policy
|
3199
|
+
|
3200
|
+
options.apply_defaults timeout: @config.timeout,
|
3201
|
+
metadata: @config.metadata,
|
3202
|
+
retry_policy: @config.retry_policy
|
3203
|
+
|
3204
|
+
@backup_for_gke_stub.list_restore_plan_bindings request, options do |result, operation|
|
3205
|
+
result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plan_bindings, "restore_plan_bindings", request, result, options
|
3206
|
+
yield result, operation if block_given?
|
3207
|
+
throw :response, result
|
3208
|
+
end
|
3209
|
+
rescue ::Gapic::Rest::Error => e
|
3210
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3211
|
+
end
|
3212
|
+
|
3213
|
+
##
|
3214
|
+
# Retrieve the details of a single RestorePlanBinding.
|
3215
|
+
#
|
3216
|
+
# @overload get_restore_plan_binding(request, options = nil)
|
3217
|
+
# Pass arguments to `get_restore_plan_binding` via a request object, either of type
|
3218
|
+
# {::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest} or an equivalent Hash.
|
3219
|
+
#
|
3220
|
+
# @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, ::Hash]
|
3221
|
+
# A request object representing the call parameters. Required. To specify no
|
3222
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3223
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3224
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3225
|
+
#
|
3226
|
+
# @overload get_restore_plan_binding(name: nil)
|
3227
|
+
# Pass arguments to `get_restore_plan_binding` via keyword arguments. Note that at
|
3228
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3229
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3230
|
+
#
|
3231
|
+
# @param name [::String]
|
3232
|
+
# Required. Fully qualified RestorePlanBinding name.
|
3233
|
+
# Format:
|
3234
|
+
# `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*`
|
3235
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
3236
|
+
# @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlanBinding]
|
3237
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
3238
|
+
#
|
3239
|
+
# @return [::Google::Cloud::GkeBackup::V1::RestorePlanBinding]
|
3240
|
+
#
|
3241
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
3242
|
+
#
|
3243
|
+
# @example Basic example
|
3244
|
+
# require "google/cloud/gke_backup/v1"
|
3245
|
+
#
|
3246
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3247
|
+
# client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new
|
3248
|
+
#
|
3249
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3250
|
+
# request = Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new
|
3251
|
+
#
|
3252
|
+
# # Call the get_restore_plan_binding method.
|
3253
|
+
# result = client.get_restore_plan_binding request
|
3254
|
+
#
|
3255
|
+
# # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlanBinding.
|
3256
|
+
# p result
|
3257
|
+
#
|
3258
|
+
def get_restore_plan_binding request, options = nil
|
3259
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3260
|
+
|
3261
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest
|
3262
|
+
|
3263
|
+
# Converts hash and nil to an options object
|
3264
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3265
|
+
|
3266
|
+
# Customize the options with defaults
|
3267
|
+
call_metadata = @config.rpcs.get_restore_plan_binding.metadata.to_h
|
3268
|
+
|
3269
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3270
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3271
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3272
|
+
gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION,
|
3273
|
+
transports_version_send: [:rest]
|
3274
|
+
|
3275
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3276
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3277
|
+
|
3278
|
+
options.apply_defaults timeout: @config.rpcs.get_restore_plan_binding.timeout,
|
3279
|
+
metadata: call_metadata,
|
3280
|
+
retry_policy: @config.rpcs.get_restore_plan_binding.retry_policy
|
3281
|
+
|
3282
|
+
options.apply_defaults timeout: @config.timeout,
|
3283
|
+
metadata: @config.metadata,
|
3284
|
+
retry_policy: @config.retry_policy
|
3285
|
+
|
3286
|
+
@backup_for_gke_stub.get_restore_plan_binding request, options do |result, operation|
|
3287
|
+
yield result, operation if block_given?
|
3288
|
+
end
|
3289
|
+
rescue ::Gapic::Rest::Error => e
|
3290
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3291
|
+
end
|
3292
|
+
|
1918
3293
|
##
|
1919
3294
|
# Creates a new Restore for the given RestorePlan.
|
1920
3295
|
#
|
@@ -2830,6 +4205,41 @@ module Google
|
|
2830
4205
|
#
|
2831
4206
|
attr_reader :delete_backup_plan
|
2832
4207
|
##
|
4208
|
+
# RPC-specific configuration for `create_backup_channel`
|
4209
|
+
# @return [::Gapic::Config::Method]
|
4210
|
+
#
|
4211
|
+
attr_reader :create_backup_channel
|
4212
|
+
##
|
4213
|
+
# RPC-specific configuration for `list_backup_channels`
|
4214
|
+
# @return [::Gapic::Config::Method]
|
4215
|
+
#
|
4216
|
+
attr_reader :list_backup_channels
|
4217
|
+
##
|
4218
|
+
# RPC-specific configuration for `get_backup_channel`
|
4219
|
+
# @return [::Gapic::Config::Method]
|
4220
|
+
#
|
4221
|
+
attr_reader :get_backup_channel
|
4222
|
+
##
|
4223
|
+
# RPC-specific configuration for `update_backup_channel`
|
4224
|
+
# @return [::Gapic::Config::Method]
|
4225
|
+
#
|
4226
|
+
attr_reader :update_backup_channel
|
4227
|
+
##
|
4228
|
+
# RPC-specific configuration for `delete_backup_channel`
|
4229
|
+
# @return [::Gapic::Config::Method]
|
4230
|
+
#
|
4231
|
+
attr_reader :delete_backup_channel
|
4232
|
+
##
|
4233
|
+
# RPC-specific configuration for `list_backup_plan_bindings`
|
4234
|
+
# @return [::Gapic::Config::Method]
|
4235
|
+
#
|
4236
|
+
attr_reader :list_backup_plan_bindings
|
4237
|
+
##
|
4238
|
+
# RPC-specific configuration for `get_backup_plan_binding`
|
4239
|
+
# @return [::Gapic::Config::Method]
|
4240
|
+
#
|
4241
|
+
attr_reader :get_backup_plan_binding
|
4242
|
+
##
|
2833
4243
|
# RPC-specific configuration for `create_backup`
|
2834
4244
|
# @return [::Gapic::Config::Method]
|
2835
4245
|
#
|
@@ -2890,6 +4300,41 @@ module Google
|
|
2890
4300
|
#
|
2891
4301
|
attr_reader :delete_restore_plan
|
2892
4302
|
##
|
4303
|
+
# RPC-specific configuration for `create_restore_channel`
|
4304
|
+
# @return [::Gapic::Config::Method]
|
4305
|
+
#
|
4306
|
+
attr_reader :create_restore_channel
|
4307
|
+
##
|
4308
|
+
# RPC-specific configuration for `list_restore_channels`
|
4309
|
+
# @return [::Gapic::Config::Method]
|
4310
|
+
#
|
4311
|
+
attr_reader :list_restore_channels
|
4312
|
+
##
|
4313
|
+
# RPC-specific configuration for `get_restore_channel`
|
4314
|
+
# @return [::Gapic::Config::Method]
|
4315
|
+
#
|
4316
|
+
attr_reader :get_restore_channel
|
4317
|
+
##
|
4318
|
+
# RPC-specific configuration for `update_restore_channel`
|
4319
|
+
# @return [::Gapic::Config::Method]
|
4320
|
+
#
|
4321
|
+
attr_reader :update_restore_channel
|
4322
|
+
##
|
4323
|
+
# RPC-specific configuration for `delete_restore_channel`
|
4324
|
+
# @return [::Gapic::Config::Method]
|
4325
|
+
#
|
4326
|
+
attr_reader :delete_restore_channel
|
4327
|
+
##
|
4328
|
+
# RPC-specific configuration for `list_restore_plan_bindings`
|
4329
|
+
# @return [::Gapic::Config::Method]
|
4330
|
+
#
|
4331
|
+
attr_reader :list_restore_plan_bindings
|
4332
|
+
##
|
4333
|
+
# RPC-specific configuration for `get_restore_plan_binding`
|
4334
|
+
# @return [::Gapic::Config::Method]
|
4335
|
+
#
|
4336
|
+
attr_reader :get_restore_plan_binding
|
4337
|
+
##
|
2893
4338
|
# RPC-specific configuration for `create_restore`
|
2894
4339
|
# @return [::Gapic::Config::Method]
|
2895
4340
|
#
|
@@ -2942,6 +4387,20 @@ module Google
|
|
2942
4387
|
@update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config
|
2943
4388
|
delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan
|
2944
4389
|
@delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config
|
4390
|
+
create_backup_channel_config = parent_rpcs.create_backup_channel if parent_rpcs.respond_to? :create_backup_channel
|
4391
|
+
@create_backup_channel = ::Gapic::Config::Method.new create_backup_channel_config
|
4392
|
+
list_backup_channels_config = parent_rpcs.list_backup_channels if parent_rpcs.respond_to? :list_backup_channels
|
4393
|
+
@list_backup_channels = ::Gapic::Config::Method.new list_backup_channels_config
|
4394
|
+
get_backup_channel_config = parent_rpcs.get_backup_channel if parent_rpcs.respond_to? :get_backup_channel
|
4395
|
+
@get_backup_channel = ::Gapic::Config::Method.new get_backup_channel_config
|
4396
|
+
update_backup_channel_config = parent_rpcs.update_backup_channel if parent_rpcs.respond_to? :update_backup_channel
|
4397
|
+
@update_backup_channel = ::Gapic::Config::Method.new update_backup_channel_config
|
4398
|
+
delete_backup_channel_config = parent_rpcs.delete_backup_channel if parent_rpcs.respond_to? :delete_backup_channel
|
4399
|
+
@delete_backup_channel = ::Gapic::Config::Method.new delete_backup_channel_config
|
4400
|
+
list_backup_plan_bindings_config = parent_rpcs.list_backup_plan_bindings if parent_rpcs.respond_to? :list_backup_plan_bindings
|
4401
|
+
@list_backup_plan_bindings = ::Gapic::Config::Method.new list_backup_plan_bindings_config
|
4402
|
+
get_backup_plan_binding_config = parent_rpcs.get_backup_plan_binding if parent_rpcs.respond_to? :get_backup_plan_binding
|
4403
|
+
@get_backup_plan_binding = ::Gapic::Config::Method.new get_backup_plan_binding_config
|
2945
4404
|
create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
|
2946
4405
|
@create_backup = ::Gapic::Config::Method.new create_backup_config
|
2947
4406
|
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|
@@ -2966,6 +4425,20 @@ module Google
|
|
2966
4425
|
@update_restore_plan = ::Gapic::Config::Method.new update_restore_plan_config
|
2967
4426
|
delete_restore_plan_config = parent_rpcs.delete_restore_plan if parent_rpcs.respond_to? :delete_restore_plan
|
2968
4427
|
@delete_restore_plan = ::Gapic::Config::Method.new delete_restore_plan_config
|
4428
|
+
create_restore_channel_config = parent_rpcs.create_restore_channel if parent_rpcs.respond_to? :create_restore_channel
|
4429
|
+
@create_restore_channel = ::Gapic::Config::Method.new create_restore_channel_config
|
4430
|
+
list_restore_channels_config = parent_rpcs.list_restore_channels if parent_rpcs.respond_to? :list_restore_channels
|
4431
|
+
@list_restore_channels = ::Gapic::Config::Method.new list_restore_channels_config
|
4432
|
+
get_restore_channel_config = parent_rpcs.get_restore_channel if parent_rpcs.respond_to? :get_restore_channel
|
4433
|
+
@get_restore_channel = ::Gapic::Config::Method.new get_restore_channel_config
|
4434
|
+
update_restore_channel_config = parent_rpcs.update_restore_channel if parent_rpcs.respond_to? :update_restore_channel
|
4435
|
+
@update_restore_channel = ::Gapic::Config::Method.new update_restore_channel_config
|
4436
|
+
delete_restore_channel_config = parent_rpcs.delete_restore_channel if parent_rpcs.respond_to? :delete_restore_channel
|
4437
|
+
@delete_restore_channel = ::Gapic::Config::Method.new delete_restore_channel_config
|
4438
|
+
list_restore_plan_bindings_config = parent_rpcs.list_restore_plan_bindings if parent_rpcs.respond_to? :list_restore_plan_bindings
|
4439
|
+
@list_restore_plan_bindings = ::Gapic::Config::Method.new list_restore_plan_bindings_config
|
4440
|
+
get_restore_plan_binding_config = parent_rpcs.get_restore_plan_binding if parent_rpcs.respond_to? :get_restore_plan_binding
|
4441
|
+
@get_restore_plan_binding = ::Gapic::Config::Method.new get_restore_plan_binding_config
|
2969
4442
|
create_restore_config = parent_rpcs.create_restore if parent_rpcs.respond_to? :create_restore
|
2970
4443
|
@create_restore = ::Gapic::Config::Method.new create_restore_config
|
2971
4444
|
list_restores_config = parent_rpcs.list_restores if parent_rpcs.respond_to? :list_restores
|