Class: Google::Cloud::GkeBackup::V1::BackupForGKE::Client
- Inherits:
-
Object
- Object
- Google::Cloud::GkeBackup::V1::BackupForGKE::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb
Overview
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::Client
readonly
Get the associated client for mix-in of the IAMPolicy.
-
#location_client ⇒ Google::Cloud::Location::Locations::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::GkeBackup::V1::BackupForGKE::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) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a Backup for the given BackupPlan.
-
#create_backup_plan(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a new BackupPlan in a given location.
-
#create_restore(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a new Restore for the given RestorePlan.
-
#create_restore_plan(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a new RestorePlan in a given location.
-
#delete_backup(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes an existing Backup.
-
#delete_backup_plan(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes an existing BackupPlan.
-
#delete_restore(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes an existing Restore.
-
#delete_restore_plan(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Deletes an existing RestorePlan.
-
#get_backup(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::Backup
Retrieve the details of a single Backup.
-
#get_backup_index_download_url(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse
Retrieve the link to the backupIndex.
-
#get_backup_plan(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::BackupPlan
Retrieve the details of a single BackupPlan.
-
#get_restore(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::Restore
Retrieves the details of a single Restore.
-
#get_restore_plan(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::RestorePlan
Retrieve the details of a single RestorePlan.
-
#get_volume_backup(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::VolumeBackup
Retrieve the details of a single VolumeBackup.
-
#get_volume_restore(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::GkeBackup::V1::VolumeRestore
Retrieve the details of a single VolumeRestore.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new BackupForGKE client object.
-
#list_backup_plans(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>
Lists BackupPlans in a given location.
-
#list_backups(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>
Lists the Backups for a given BackupPlan.
-
#list_restore_plans(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>
Lists RestorePlans in a given location.
-
#list_restores(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>
Lists the Restores for a given RestorePlan.
-
#list_volume_backups(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>
Lists the VolumeBackups for a given Backup.
-
#list_volume_restores(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>
Lists the VolumeRestores for a given Restore.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_backup(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Update a Backup.
-
#update_backup_plan(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Update a BackupPlan.
-
#update_restore(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Update a Restore.
-
#update_restore_plan(request, options = nil) {|response, 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 client object.
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 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 216 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/gkebackup/v1/gkebackup_services_pb" # 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.nil? || (@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 = Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @backup_for_gke_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::GkeBackup::V1::BackupForGKE::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool ) @location_client = Google::Cloud::Location::Locations::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @backup_for_gke_stub.endpoint config.universe_domain = @backup_for_gke_stub.universe_domain end @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @backup_for_gke_stub.endpoint config.universe_domain = @backup_for_gke_stub.universe_domain end end |
Instance Attribute Details
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Client (readonly)
Get the associated client for mix-in of the IAMPolicy.
296 297 298 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 296 def iam_policy_client @iam_policy_client end |
#location_client ⇒ Google::Cloud::Location::Locations::Client (readonly)
Get the associated client for mix-in of the Locations.
289 290 291 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 289 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::GkeBackup::V1::BackupForGKE::Operations (readonly)
Get the associated client for long-running operations.
282 283 284 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 282 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.
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 161 162 163 164 165 166 167 168 169 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 65 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.rpcs.get_backup_index_download_url.timeout = 60.0 default_config.rpcs.get_backup_index_download_url.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.
186 187 188 189 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 186 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.
870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 870 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :create_backup, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 363 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :create_backup_plan, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
2087 2088 2089 2090 2091 2092 2093 2094 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/client.rb', line 2087 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :create_restore, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 1577 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :create_restore_plan, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
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 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 1274 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :delete_backup, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 764 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :delete_backup_plan, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 2491 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :delete_restore, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 1981 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :delete_restore_plan, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1068 1069 1070 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 1106 1107 1108 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 1068 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :get_backup, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_backup_index_download_url(request, options = nil) ⇒ ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse #get_backup_index_download_url(backup: nil) ⇒ ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse
Retrieve the link to the backupIndex.
2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 2777 def get_backup_index_download_url request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest # 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_index_download_url..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.backup header_params["backup"] = request.backup end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_backup_index_download_url.timeout, metadata: , retry_policy: @config.rpcs.get_backup_index_download_url.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @backup_for_gke_stub.call_rpc :get_backup_index_download_url, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 561 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :get_backup_plan, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
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 2320 2321 2322 2323 2324 2325 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 2285 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :get_restore, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 1775 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :get_restore_plan, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 1472 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :get_volume_backup, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 2689 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :get_volume_restore, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_backup_plans(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan> #list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>
Lists BackupPlans in a given location.
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 473 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :list_backup_plans, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plans, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_backups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup> #list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>
Lists the Backups for a given BackupPlan.
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 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 980 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :list_backups, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backups, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_restore_plans(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan> #list_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>
Lists RestorePlans in a given location.
1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 1687 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :list_restore_plans, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plans, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_restores(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore> #list_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>
Lists the Restores for a given RestorePlan.
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 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 2197 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :list_restores, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restores, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_volume_backups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup> #list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>
Lists the VolumeBackups for a given Backup.
1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 1384 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :list_volume_backups, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_volume_restores(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore> #list_volume_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>
Lists the VolumeRestores for a given Restore.
2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 2601 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :list_volume_restores, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_volume_restores, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
196 197 198 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 196 def universe_domain @backup_for_gke_stub.universe_domain end |
#update_backup(request, options = nil) ⇒ ::Gapic::Operation #update_backup(backup: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update a Backup.
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 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 1171 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.backup&.name header_params["backup.name"] = request.backup.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :update_backup, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 665 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.backup_plan&.name header_params["backup_plan.name"] = request.backup_plan.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :update_backup_plan, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
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 2422 2423 2424 2425 2426 2427 2428 2429 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 2388 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.restore&.name header_params["restore.name"] = request.restore.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :update_restore, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 |
# File 'lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb', line 1878 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, x-goog-user-project and x-goog-api-version 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.restore_plan&.name header_params["restore_plan.name"] = request.restore_plan.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :update_restore_plan, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |