Class: Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb
Overview
REST client for the BackupForGKE service.
BackupForGKE allows Kubernetes administrators to configure, execute, and manage backup and restore operations for their GKE clusters.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client
readonly
Get the associated client for mix-in of the IAMPolicy.
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the BackupForGKE Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the BackupForGKE Client instance.
-
#create_backup(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a Backup for the given BackupPlan.
-
#create_backup_plan(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new BackupPlan in a given location.
-
#create_restore(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new Restore for the given RestorePlan.
-
#create_restore_plan(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new RestorePlan in a given location.
-
#delete_backup(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes an existing Backup.
-
#delete_backup_plan(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes an existing BackupPlan.
-
#delete_restore(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes an existing Restore.
-
#delete_restore_plan(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes an existing RestorePlan.
-
#get_backup(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::Backup
Retrieve the details of a single Backup.
-
#get_backup_plan(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::BackupPlan
Retrieve the details of a single BackupPlan.
-
#get_restore(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::Restore
Retrieves the details of a single Restore.
-
#get_restore_plan(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::RestorePlan
Retrieve the details of a single RestorePlan.
-
#get_volume_backup(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::VolumeBackup
Retrieve the details of a single VolumeBackup.
-
#get_volume_restore(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::VolumeRestore
Retrieve the details of a single VolumeRestore.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new BackupForGKE REST client object.
-
#list_backup_plans(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse
Lists BackupPlans in a given location.
-
#list_backups(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>
Lists the Backups for a given BackupPlan.
-
#list_restore_plans(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse
Lists RestorePlans in a given location.
-
#list_restores(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::ListRestoresResponse
Lists the Restores for a given RestorePlan.
-
#list_volume_backups(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>
Lists the VolumeBackups for a given Backup.
-
#list_volume_restores(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>
Lists the VolumeRestores for a given Restore.
-
#update_backup(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Update a Backup.
-
#update_backup_plan(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Update a BackupPlan.
-
#update_restore(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Update a Restore.
-
#update_restore_plan(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Update a RestorePlan.
Methods included from Paths
#backup_path, #backup_plan_path, #cluster_path, #crypto_key_path, #location_path, #restore_path, #restore_plan_path, #volume_backup_path, #volume_restore_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new BackupForGKE REST client object.
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 198 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-") credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint end @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.bindings_override = @config.bindings_override end @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.bindings_override = @config.bindings_override end @backup_for_gke_stub = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials end |
Instance Attribute Details
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client (readonly)
Get the associated client for mix-in of the IAMPolicy.
262 263 264 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 262 def iam_policy_client @iam_policy_client end |
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
255 256 257 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 255 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Operations (readonly)
Get the associated client for long-running operations.
248 249 250 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 248 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the BackupForGKE Client class.
See Configuration for a description of the configuration fields.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 61 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "GkeBackup", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.create_backup_plan.timeout = 300.0 default_config.rpcs.list_backup_plans.timeout = 60.0 default_config.rpcs.list_backup_plans.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_backup_plan.timeout = 60.0 default_config.rpcs.get_backup_plan.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.update_backup_plan.timeout = 60.0 default_config.rpcs.delete_backup_plan.timeout = 60.0 default_config.rpcs.create_backup.timeout = 120.0 default_config.rpcs.list_backups.timeout = 60.0 default_config.rpcs.list_backups.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_backup.timeout = 60.0 default_config.rpcs.get_backup.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.update_backup.timeout = 60.0 default_config.rpcs.delete_backup.timeout = 300.0 default_config.rpcs.list_volume_backups.timeout = 60.0 default_config.rpcs.list_volume_backups.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_volume_backup.timeout = 60.0 default_config.rpcs.get_volume_backup.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_restore_plan.timeout = 120.0 default_config.rpcs.list_restore_plans.timeout = 60.0 default_config.rpcs.list_restore_plans.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_restore_plan.timeout = 60.0 default_config.rpcs.get_restore_plan.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.update_restore_plan.timeout = 60.0 default_config.rpcs.delete_restore_plan.timeout = 60.0 default_config.rpcs.create_restore.timeout = 120.0 default_config.rpcs.list_restores.timeout = 60.0 default_config.rpcs.list_restores.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_restore.timeout = 60.0 default_config.rpcs.get_restore.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.update_restore.timeout = 60.0 default_config.rpcs.delete_restore.timeout = 60.0 default_config.rpcs.list_volume_restores.timeout = 60.0 default_config.rpcs.list_volume_restores.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_volume_restore.timeout = 60.0 default_config.rpcs.get_volume_restore.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the BackupForGKE Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
177 178 179 180 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 177 def configure yield @config if block_given? @config end |
#create_backup(request, options = nil) ⇒ ::Gapic::Operation #create_backup(parent: nil, backup: nil, backup_id: nil) ⇒ ::Gapic::Operation
Creates a Backup for the given BackupPlan.
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 794 def create_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_backup..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_backup.timeout, metadata: , retry_policy: @config.rpcs.create_backup.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.create_backup request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_backup_plan(request, options = nil) ⇒ ::Gapic::Operation #create_backup_plan(parent: nil, backup_plan: nil, backup_plan_id: nil) ⇒ ::Gapic::Operation
Creates a new BackupPlan in a given location.
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 328 def create_backup_plan request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_backup_plan..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_backup_plan.timeout, metadata: , retry_policy: @config.rpcs.create_backup_plan.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.create_backup_plan request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_restore(request, options = nil) ⇒ ::Gapic::Operation #create_restore(parent: nil, restore: nil, restore_id: nil) ⇒ ::Gapic::Operation
Creates a new Restore for the given RestorePlan.
1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 1914 def create_restore request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_restore..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_restore.timeout, metadata: , retry_policy: @config.rpcs.create_restore.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.create_restore request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_restore_plan(request, options = nil) ⇒ ::Gapic::Operation #create_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil) ⇒ ::Gapic::Operation
Creates a new RestorePlan in a given location.
1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 1445 def create_restore_plan request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_restore_plan..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_restore_plan.timeout, metadata: , retry_policy: @config.rpcs.create_restore_plan.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.create_restore_plan request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_backup(request, options = nil) ⇒ ::Gapic::Operation #delete_backup(name: nil, etag: nil, force: nil) ⇒ ::Gapic::Operation
Deletes an existing Backup.
1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 1166 def delete_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_backup..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_backup.timeout, metadata: , retry_policy: @config.rpcs.delete_backup.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.delete_backup request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_backup_plan(request, options = nil) ⇒ ::Gapic::Operation #delete_backup_plan(name: nil, etag: nil) ⇒ ::Gapic::Operation
Deletes an existing BackupPlan.
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 696 def delete_backup_plan request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_backup_plan..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout, metadata: , retry_policy: @config.rpcs.delete_backup_plan.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.delete_backup_plan request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_restore(request, options = nil) ⇒ ::Gapic::Operation #delete_restore(name: nil, etag: nil, force: nil) ⇒ ::Gapic::Operation
Deletes an existing Restore.
2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 2285 def delete_restore request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_restore..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_restore.timeout, metadata: , retry_policy: @config.rpcs.delete_restore.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.delete_restore request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_restore_plan(request, options = nil) ⇒ ::Gapic::Operation #delete_restore_plan(name: nil, etag: nil, force: nil) ⇒ ::Gapic::Operation
Deletes an existing RestorePlan.
1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 1816 def delete_restore_plan request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_restore_plan..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_restore_plan.timeout, metadata: , retry_policy: @config.rpcs.delete_restore_plan.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.delete_restore_plan request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_backup(request, options = nil) ⇒ ::Google::Cloud::GkeBackup::V1::Backup #get_backup(name: nil) ⇒ ::Google::Cloud::GkeBackup::V1::Backup
Retrieve the details of a single Backup.
976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 976 def get_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_backup..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_backup.timeout, metadata: , retry_policy: @config.rpcs.get_backup.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.get_backup request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_backup_plan(request, options = nil) ⇒ ::Google::Cloud::GkeBackup::V1::BackupPlan #get_backup_plan(name: nil) ⇒ ::Google::Cloud::GkeBackup::V1::BackupPlan
Retrieve the details of a single BackupPlan.
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 509 def get_backup_plan request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_backup_plan..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_backup_plan.timeout, metadata: , retry_policy: @config.rpcs.get_backup_plan.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.get_backup_plan request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_restore(request, options = nil) ⇒ ::Google::Cloud::GkeBackup::V1::Restore #get_restore(name: nil) ⇒ ::Google::Cloud::GkeBackup::V1::Restore
Retrieves the details of a single Restore.
2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 2095 def get_restore request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_restore..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_restore.timeout, metadata: , retry_policy: @config.rpcs.get_restore.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.get_restore request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_restore_plan(request, options = nil) ⇒ ::Google::Cloud::GkeBackup::V1::RestorePlan #get_restore_plan(name: nil) ⇒ ::Google::Cloud::GkeBackup::V1::RestorePlan
Retrieve the details of a single RestorePlan.
1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 1626 def get_restore_plan request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_restore_plan..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_restore_plan.timeout, metadata: , retry_policy: @config.rpcs.get_restore_plan.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.get_restore_plan request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_volume_backup(request, options = nil) ⇒ ::Google::Cloud::GkeBackup::V1::VolumeBackup #get_volume_backup(name: nil) ⇒ ::Google::Cloud::GkeBackup::V1::VolumeBackup
Retrieve the details of a single VolumeBackup.
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 1348 def get_volume_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_volume_backup..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_volume_backup.timeout, metadata: , retry_policy: @config.rpcs.get_volume_backup.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.get_volume_backup request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_volume_restore(request, options = nil) ⇒ ::Google::Cloud::GkeBackup::V1::VolumeRestore #get_volume_restore(name: nil) ⇒ ::Google::Cloud::GkeBackup::V1::VolumeRestore
Retrieve the details of a single VolumeRestore.
2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 2467 def get_volume_restore request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_volume_restore..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_volume_restore.timeout, metadata: , retry_policy: @config.rpcs.get_volume_restore.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.get_volume_restore request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_backup_plans(request, options = nil) ⇒ ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse #list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse
Lists BackupPlans in a given location.
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 430 def list_backup_plans request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_backup_plans..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_backup_plans.timeout, metadata: , retry_policy: @config.rpcs.list_backup_plans.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.list_backup_plans request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_backups(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup> #list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>
Lists the Backups for a given BackupPlan.
896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 896 def list_backups request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_backups..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_backups.timeout, metadata: , retry_policy: @config.rpcs.list_backups.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.list_backups request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backups, "backups", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_restore_plans(request, options = nil) ⇒ ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse #list_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse
Lists RestorePlans in a given location.
1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 1547 def list_restore_plans request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_restore_plans..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_restore_plans.timeout, metadata: , retry_policy: @config.rpcs.list_restore_plans.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.list_restore_plans request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_restores(request, options = nil) ⇒ ::Google::Cloud::GkeBackup::V1::ListRestoresResponse #list_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::GkeBackup::V1::ListRestoresResponse
Lists the Restores for a given RestorePlan.
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 2016 def list_restores request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoresRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_restores..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_restores.timeout, metadata: , retry_policy: @config.rpcs.list_restores.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.list_restores request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_volume_backups(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup> #list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>
Lists the VolumeBackups for a given Backup.
1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 1268 def list_volume_backups request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_volume_backups..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_volume_backups.timeout, metadata: , retry_policy: @config.rpcs.list_volume_backups.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.list_volume_backups request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, "volume_backups", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_volume_restores(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore> #list_volume_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>
Lists the VolumeRestores for a given Restore.
2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 2387 def list_volume_restores request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_volume_restores..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_volume_restores.timeout, metadata: , retry_policy: @config.rpcs.list_volume_restores.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.list_volume_restores request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_volume_restores, "volume_restores", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_backup(request, options = nil) ⇒ ::Gapic::Operation #update_backup(backup: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update a Backup.
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 1071 def update_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_backup..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_backup.timeout, metadata: , retry_policy: @config.rpcs.update_backup.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.update_backup request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_backup_plan(request, options = nil) ⇒ ::Gapic::Operation #update_backup_plan(backup_plan: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update a BackupPlan.
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 605 def update_backup_plan request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_backup_plan..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_backup_plan.timeout, metadata: , retry_policy: @config.rpcs.update_backup_plan.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.update_backup_plan request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_restore(request, options = nil) ⇒ ::Gapic::Operation #update_restore(restore: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update a Restore.
2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 2190 def update_restore request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_restore..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_restore.timeout, metadata: , retry_policy: @config.rpcs.update_restore.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.update_restore request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_restore_plan(request, options = nil) ⇒ ::Gapic::Operation #update_restore_plan(restore_plan: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update a RestorePlan.
1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb', line 1721 def update_restore_plan request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_restore_plan..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, transports_version_send: [:rest] [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_restore_plan.timeout, metadata: , retry_policy: @config.rpcs.update_restore_plan.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.update_restore_plan request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |