Class: Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb
Overview
REST client for the BareMetalSolution service.
Performs management operations on Bare Metal Solution servers.
The baremetalsolution.googleapis.com service provides management
capabilities for Bare Metal Solution servers. To access the API methods, you
must assign Bare Metal Solution IAM roles containing the desired permissions
to your staff in your Google Cloud project. You must also enable the Bare
Metal Solution API. Once enabled, the methods act
upon specific servers in your Bare Metal Solution environment.
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::BareMetalSolution::V2::BareMetalSolution::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the BareMetalSolution Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the BareMetalSolution Client instance.
-
#create_nfs_share(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Create an NFS share.
-
#create_provisioning_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Create new ProvisioningConfig.
-
#create_ssh_key(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::SSHKey
Register a public SSH key in the specified project for use with the interactive serial console feature.
-
#create_volume_snapshot(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
Takes a snapshot of a boot volume.
-
#delete_nfs_share(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Delete an NFS share.
-
#delete_ssh_key(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a public SSH key registered in the specified project.
-
#delete_volume_snapshot(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a volume snapshot.
-
#detach_lun(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Detach LUN from Instance.
-
#disable_interactive_serial_console(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Disable the interactive serial console feature on an instance.
-
#enable_interactive_serial_console(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Enable the interactive serial console feature on an instance.
-
#evict_lun(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Skips lun's cooloff and deletes it now.
-
#evict_volume(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Skips volume's cooloff and deletes it now.
-
#get_instance(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::Instance
Get details about a single server.
-
#get_lun(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::Lun
Get details of a single storage logical unit number(LUN).
-
#get_network(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::Network
Get details of a single network.
-
#get_nfs_share(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::NfsShare
Get details of a single NFS share.
-
#get_provisioning_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Get ProvisioningConfig by name.
-
#get_volume(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::Volume
Get details of a single storage volume.
-
#get_volume_snapshot(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
Returns the specified snapshot resource.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new BareMetalSolution REST client object.
-
#list_instances(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>
List servers in a given project and location.
-
#list_luns(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>
List storage volume luns for given storage volume.
-
#list_network_usage(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
-
#list_networks(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>
List network in a given project and location.
-
#list_nfs_shares(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>
List NFS shares.
-
#list_os_images(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>
Retrieves the list of OS images which are currently approved.
-
#list_provisioning_quotas(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>
List the budget details to provision resources on a given project.
-
#list_ssh_keys(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>
Lists the public SSH keys registered for the specified project.
-
#list_volume_snapshots(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>
Retrieves the list of snapshots for the specified volume.
-
#list_volumes(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>
List storage volumes in a given project and location.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#rename_instance(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::Instance
RenameInstance sets a new name for an instance.
-
#rename_network(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::Network
RenameNetwork sets a new name for a network.
-
#rename_nfs_share(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::NfsShare
RenameNfsShare sets a new name for an nfsshare.
-
#rename_volume(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::Volume
RenameVolume sets a new name for a volume.
-
#reset_instance(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Perform an ungraceful, hard reset on a server.
-
#resize_volume(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Emergency Volume resize.
-
#restore_volume_snapshot(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Uses the specified snapshot to restore its parent volume.
-
#start_instance(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Starts a server that was shutdown.
-
#stop_instance(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Stop a running server.
-
#submit_provisioning_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse
Submit a provisiong configuration for a given project.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_instance(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Update details of a single server.
-
#update_network(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Update details of a single network.
-
#update_nfs_share(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Update details of a single NFS share.
-
#update_provisioning_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Update existing ProvisioningConfig.
-
#update_volume(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Update details of a single storage volume.
Methods included from Paths
#instance_config_path, #instance_path, #interconnect_attachment_path, #location_path, #lun_path, #network_config_path, #network_path, #nfs_share_path, #provisioning_config_path, #server_network_template_path, #ssh_key_path, #volume_config_path, #volume_path, #volume_snapshot_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new BareMetalSolution REST client object.
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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 137 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.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 = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @bare_metal_solution_stub = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @bare_metal_solution_stub.logger(stub: true)&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @bare_metal_solution_stub.endpoint config.universe_domain = @bare_metal_solution_stub.universe_domain config.bindings_override = @config.bindings_override config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= end @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @bare_metal_solution_stub.endpoint config.universe_domain = @bare_metal_solution_stub.universe_domain config.logger = @bare_metal_solution_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client (readonly)
Get the associated client for mix-in of the IAMPolicy.
222 223 224 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 222 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.
215 216 217 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 215 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Operations (readonly)
Get the associated client for long-running operations.
208 209 210 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 208 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the BareMetalSolution Client class.
See Configuration for a description of the configuration fields.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 73 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "BareMetalSolution", "V2"] 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.timeout = 60.0 default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the BareMetalSolution 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.
107 108 109 110 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 107 def configure yield @config if block_given? @config end |
#create_nfs_share(request, options = nil) ⇒ ::Gapic::Operation #create_nfs_share(parent: nil, nfs_share: nil) ⇒ ::Gapic::Operation
Create an NFS share.
3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3219 def create_nfs_share request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest # 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_nfs_share..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_nfs_share.timeout, metadata: , retry_policy: @config.rpcs.create_nfs_share.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.create_nfs_share request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_provisioning_config(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig #create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Create new ProvisioningConfig.
3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3727 def create_provisioning_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest # 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_provisioning_config..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_provisioning_config.timeout, metadata: , retry_policy: @config.rpcs.create_provisioning_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.create_provisioning_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_ssh_key(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::SSHKey #create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::SSHKey
Register a public SSH key in the specified project for use with the interactive serial console feature.
1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1251 def create_ssh_key request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest # 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_ssh_key..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_ssh_key.timeout, metadata: , retry_policy: @config.rpcs.create_ssh_key.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.create_ssh_key request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_volume_snapshot(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot #create_volume_snapshot(parent: nil, volume_snapshot: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
Takes a snapshot of a boot volume. Returns INVALID_ARGUMENT if called for a non-boot volume.
2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2275 def create_volume_snapshot request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest # 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_volume_snapshot..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_volume_snapshot.timeout, metadata: , retry_policy: @config.rpcs.create_volume_snapshot.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.create_volume_snapshot request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_nfs_share(request, options = nil) ⇒ ::Gapic::Operation #delete_nfs_share(name: nil) ⇒ ::Gapic::Operation
Delete an NFS share. The underlying volume is automatically deleted.
3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3388 def delete_nfs_share request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest # 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_nfs_share..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_nfs_share.timeout, metadata: , retry_policy: @config.rpcs.delete_nfs_share.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.delete_nfs_share request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_ssh_key(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_ssh_key(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a public SSH key registered in the specified project.
1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1330 def delete_ssh_key request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest # 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_ssh_key..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_ssh_key.timeout, metadata: , retry_policy: @config.rpcs.delete_ssh_key.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.delete_ssh_key request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_volume_snapshot(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_volume_snapshot(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a volume snapshot. Returns INVALID_ARGUMENT if called for a non-boot volume.
2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2443 def delete_volume_snapshot request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest # 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_volume_snapshot..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_volume_snapshot.timeout, metadata: , retry_policy: @config.rpcs.delete_volume_snapshot.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.delete_volume_snapshot request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#detach_lun(request, options = nil) ⇒ ::Gapic::Operation #detach_lun(instance: nil, lun: nil, skip_reboot: nil) ⇒ ::Gapic::Operation
Detach LUN from Instance.
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 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1072 def detach_lun request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest # 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.detach_lun..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.detach_lun.timeout, metadata: , retry_policy: @config.rpcs.detach_lun.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.detach_lun request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#disable_interactive_serial_console(request, options = nil) ⇒ ::Gapic::Operation #disable_interactive_serial_console(name: nil) ⇒ ::Gapic::Operation
Disable the interactive serial console feature on an instance.
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 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 981 def disable_interactive_serial_console request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest # 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.disable_interactive_serial_console..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.disable_interactive_serial_console.timeout, metadata: , retry_policy: @config.rpcs.disable_interactive_serial_console.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.disable_interactive_serial_console request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#enable_interactive_serial_console(request, options = nil) ⇒ ::Gapic::Operation #enable_interactive_serial_console(name: nil) ⇒ ::Gapic::Operation
Enable the interactive serial console feature on an instance.
894 895 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 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 894 def enable_interactive_serial_console request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest # 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.enable_interactive_serial_console..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.enable_interactive_serial_console.timeout, metadata: , retry_policy: @config.rpcs.enable_interactive_serial_console.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.enable_interactive_serial_console request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#evict_lun(request, options = nil) ⇒ ::Gapic::Operation #evict_lun(name: nil) ⇒ ::Gapic::Operation
Skips lun's cooloff and deletes it now. Lun must be in cooloff state.
2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2866 def evict_lun request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest # 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.evict_lun..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.evict_lun.timeout, metadata: , retry_policy: @config.rpcs.evict_lun.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.evict_lun request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#evict_volume(request, options = nil) ⇒ ::Gapic::Operation #evict_volume(name: nil) ⇒ ::Gapic::Operation
Skips volume's cooloff and deletes it now. Volume must be in cooloff state.
1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1761 def evict_volume request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest # 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.evict_volume..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.evict_volume.timeout, metadata: , retry_policy: @config.rpcs.evict_volume.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.evict_volume request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_instance(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Instance #get_instance(name: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Instance
Get details about a single server.
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 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 369 def get_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest # 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_instance..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_instance.timeout, metadata: , retry_policy: @config.rpcs.get_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.get_instance request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_lun(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Lun #get_lun(name: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Lun
Get details of a single storage logical unit number(LUN).
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 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2691 def get_lun request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest # 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_lun..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_lun.timeout, metadata: , retry_policy: @config.rpcs.get_lun.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.get_lun request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_network(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Network #get_network(name: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Network
Get details of a single network.
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 2129 2130 2131 2132 2133 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2100 def get_network request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest # 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_network..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_network.timeout, metadata: , retry_policy: @config.rpcs.get_network.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.get_network request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_nfs_share(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::NfsShare #get_nfs_share(name: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::NfsShare
Get details of a single NFS share.
2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2946 def get_nfs_share request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest # 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_nfs_share..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_nfs_share.timeout, metadata: , retry_policy: @config.rpcs.get_nfs_share.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.get_nfs_share request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_provisioning_config(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig #get_provisioning_config(name: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Get ProvisioningConfig by name.
3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3643 def get_provisioning_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest # 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_provisioning_config..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_provisioning_config.timeout, metadata: , retry_policy: @config.rpcs.get_provisioning_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.get_provisioning_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_volume(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Volume #get_volume(name: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Volume
Get details of a single storage volume.
1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1499 def get_volume request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest # 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..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_volume.timeout, metadata: , retry_policy: @config.rpcs.get_volume.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.get_volume request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_volume_snapshot(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot #get_volume_snapshot(name: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
Returns the specified snapshot resource. Returns INVALID_ARGUMENT if called for a non-boot volume.
2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2522 def get_volume_snapshot request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest # 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_snapshot..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_volume_snapshot.timeout, metadata: , retry_policy: @config.rpcs.get_volume_snapshot.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.get_volume_snapshot request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_instances(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance> #list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>
List servers in a given project and location.
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 289 def list_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest # 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_instances..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_instances.timeout, metadata: , retry_policy: @config.rpcs.list_instances.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.list_instances request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_instances, "instances", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_luns(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun> #list_luns(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>
List storage volume luns for given storage volume.
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 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2778 def list_luns request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest # 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_luns..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_luns.timeout, metadata: , retry_policy: @config.rpcs.list_luns.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.list_luns request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, "luns", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_network_usage(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse #list_network_usage(location: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
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 2050 2051 2052 2053 2054 2055 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2022 def list_network_usage request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest # 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_network_usage..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_network_usage.timeout, metadata: , retry_policy: @config.rpcs.list_network_usage.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.list_network_usage request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_networks(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network> #list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>
List network in a given project and location.
1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1941 def list_networks request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest # 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_networks..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_networks.timeout, metadata: , retry_policy: @config.rpcs.list_networks.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.list_networks request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, "networks", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_nfs_shares(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare> #list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>
List NFS shares.
3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3035 def list_nfs_shares request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest # 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_nfs_shares..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_nfs_shares.timeout, metadata: , retry_policy: @config.rpcs.list_nfs_shares.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.list_nfs_shares request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, "nfs_shares", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_os_images(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage> #list_os_images(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>
Retrieves the list of OS images which are currently approved.
3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3981 def list_os_images request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest # 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_os_images..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_os_images.timeout, metadata: , retry_policy: @config.rpcs.list_os_images.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.list_os_images request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_os_images, "os_images", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_provisioning_quotas(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota> #list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>
List the budget details to provision resources on a given project.
3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3479 def list_provisioning_quotas request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest # 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_provisioning_quotas..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_provisioning_quotas.timeout, metadata: , retry_policy: @config.rpcs.list_provisioning_quotas.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.list_provisioning_quotas request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_provisioning_quotas, "provisioning_quotas", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_ssh_keys(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey> #list_ssh_keys(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>
Lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature.
1162 1163 1164 1165 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 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1162 def list_ssh_keys request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest # 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_ssh_keys..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_ssh_keys.timeout, metadata: , retry_policy: @config.rpcs.list_ssh_keys.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.list_ssh_keys request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_ssh_keys, "ssh_keys", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_volume_snapshots(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot> #list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>
Retrieves the list of snapshots for the specified volume. Returns a response with an empty list of snapshots if called for a non-boot volume.
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 2643 2644 2645 2646 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2611 def list_volume_snapshots request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest # 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_snapshots..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_volume_snapshots.timeout, metadata: , retry_policy: @config.rpcs.list_volume_snapshots.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.list_volume_snapshots request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_volume_snapshots, "volume_snapshots", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_volumes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume> #list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>
List storage volumes in a given project and location.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1419 def list_volumes request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest # 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_volumes..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_volumes.timeout, metadata: , retry_policy: @config.rpcs.list_volumes.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.list_volumes request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, "volumes", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
229 230 231 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 229 def logger @bare_metal_solution_stub.logger end |
#rename_instance(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Instance #rename_instance(name: nil, new_instance_id: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Instance
RenameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated.
547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 547 def rename_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest # 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.rename_instance..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.rename_instance.timeout, metadata: , retry_policy: @config.rpcs.rename_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.rename_instance request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#rename_network(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Network #rename_network(name: nil, new_network_id: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Network
RenameNetwork sets a new name for a network. Use with caution, previous names become immediately invalidated.
3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3892 def rename_network request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest # 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.rename_network..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.rename_network.timeout, metadata: , retry_policy: @config.rpcs.rename_network.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.rename_network request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#rename_nfs_share(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::NfsShare #rename_nfs_share(name: nil, new_nfsshare_id: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::NfsShare
RenameNfsShare sets a new name for an nfsshare. Use with caution, previous names become immediately invalidated.
3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3303 def rename_nfs_share request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest # 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.rename_nfs_share..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.rename_nfs_share.timeout, metadata: , retry_policy: @config.rpcs.rename_nfs_share.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.rename_nfs_share request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#rename_volume(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Volume #rename_volume(name: nil, new_volume_id: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::Volume
RenameVolume sets a new name for a volume. Use with caution, previous names become immediately invalidated.
1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1675 def rename_volume request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest # 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.rename_volume..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.rename_volume.timeout, metadata: , retry_policy: @config.rpcs.rename_volume.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.rename_volume request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#reset_instance(request, options = nil) ⇒ ::Gapic::Operation #reset_instance(name: nil) ⇒ ::Gapic::Operation
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 633 def reset_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest # 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.reset_instance..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.reset_instance.timeout, metadata: , retry_policy: @config.rpcs.reset_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.reset_instance request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#resize_volume(request, options = nil) ⇒ ::Gapic::Operation #resize_volume(volume: nil, size_gib: nil) ⇒ ::Gapic::Operation
Emergency Volume resize.
1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1850 def resize_volume request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest # 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.resize_volume..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.resize_volume.timeout, metadata: , retry_policy: @config.rpcs.resize_volume.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.resize_volume request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#restore_volume_snapshot(request, options = nil) ⇒ ::Gapic::Operation #restore_volume_snapshot(volume_snapshot: nil) ⇒ ::Gapic::Operation
Uses the specified snapshot to restore its parent volume. Returns INVALID_ARGUMENT if called for a non-boot volume.
2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2362 def restore_volume_snapshot request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest # 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.restore_volume_snapshot..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.restore_volume_snapshot.timeout, metadata: , retry_policy: @config.rpcs.restore_volume_snapshot.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.restore_volume_snapshot request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#start_instance(request, options = nil) ⇒ ::Gapic::Operation #start_instance(name: nil) ⇒ ::Gapic::Operation
Starts a server that was shutdown.
720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 720 def start_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest # 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.start_instance..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.start_instance.timeout, metadata: , retry_policy: @config.rpcs.start_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.start_instance request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#stop_instance(request, options = nil) ⇒ ::Gapic::Operation #stop_instance(name: nil) ⇒ ::Gapic::Operation
Stop a running server.
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 807 def stop_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest # 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.stop_instance..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.stop_instance.timeout, metadata: , retry_policy: @config.rpcs.stop_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.stop_instance request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#submit_provisioning_config(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse #submit_provisioning_config(parent: nil, provisioning_config: nil, email: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse
Submit a provisiong configuration for a given project.
3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3565 def submit_provisioning_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest # 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.submit_provisioning_config..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.submit_provisioning_config.timeout, metadata: , retry_policy: @config.rpcs.submit_provisioning_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.submit_provisioning_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
117 118 119 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 117 def universe_domain @bare_metal_solution_stub.universe_domain end |
#update_instance(request, options = nil) ⇒ ::Gapic::Operation #update_instance(instance: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update details of a single server.
463 464 465 466 467 468 469 470 471 472 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 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 463 def update_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest # 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_instance..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_instance.timeout, metadata: , retry_policy: @config.rpcs.update_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.update_instance request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_network(request, options = nil) ⇒ ::Gapic::Operation #update_network(network: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update details of a single network.
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 2225 2226 2227 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 2192 def update_network request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest # 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_network..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_network.timeout, metadata: , retry_policy: @config.rpcs.update_network.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.update_network request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_nfs_share(request, options = nil) ⇒ ::Gapic::Operation #update_nfs_share(nfs_share: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update details of a single NFS share.
3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3130 def update_nfs_share request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest # 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_nfs_share..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_nfs_share.timeout, metadata: , retry_policy: @config.rpcs.update_nfs_share.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.update_nfs_share request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_provisioning_config(request, options = nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig #update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) ⇒ ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Update existing ProvisioningConfig.
3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 3810 def update_provisioning_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest # 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_provisioning_config..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_provisioning_config.timeout, metadata: , retry_policy: @config.rpcs.update_provisioning_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.update_provisioning_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_volume(request, options = nil) ⇒ ::Gapic::Operation #update_volume(volume: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update details of a single storage volume.
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 1619 1620 1621 1622 1623 1624 1625 1626 |
# File 'lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb', line 1591 def update_volume request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest # 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_volume..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::BareMetalSolution::V2::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_volume.timeout, metadata: , retry_policy: @config.rpcs.update_volume.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @bare_metal_solution_stub.update_volume request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |