Bare Metal Solution V2 API - Class Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client (v0.8.0)

Reference documentation and code samples for the Bare Metal Solution V2 API class Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.

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.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the BareMetalSolution Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all BareMetalSolution clients
::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def 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 Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_nfs_share

def create_nfs_share(request, options = nil) -> ::Gapic::Operation
def create_nfs_share(parent: nil, nfs_share: nil) -> ::Gapic::Operation

Create an NFS share.

Overloads
def create_nfs_share(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_nfs_share via a request object, either of type CreateNfsShareRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_nfs_share(parent: nil, nfs_share: nil) -> ::Gapic::Operation
Pass arguments to create_nfs_share via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new

# Call the create_nfs_share method.
result = client.create_nfs_share request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#create_provisioning_config

def create_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
def create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig

Create new ProvisioningConfig.

Overloads
def create_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Pass arguments to create_provisioning_config via a request object, either of type CreateProvisioningConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_provisioning_config(parent: nil, provisioning_config: nil, email: nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Pass arguments to create_provisioning_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent project and location containing the ProvisioningConfig.
  • provisioning_config (::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash) — Required. The ProvisioningConfig to create.
  • email (::String) — Optional. Email provided to send a confirmation with provisioning config to.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new

# Call the create_provisioning_config method.
result = client.create_provisioning_config request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.
p result

#create_ssh_key

def create_ssh_key(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::SSHKey
def 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.

Overloads
def create_ssh_key(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::SSHKey
Pass arguments to create_ssh_key via a request object, either of type CreateSSHKeyRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil) -> ::Google::Cloud::BareMetalSolution::V2::SSHKey
Pass arguments to create_ssh_key via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent containing the SSH keys.
  • ssh_key (::Google::Cloud::BareMetalSolution::V2::SSHKey, ::Hash) — Required. The SSH key to register.
  • ssh_key_id (::String) — Required. The ID to use for the key, which will become the final component of the key's resource name.

    This value must match the regex: [a-zA-Z0-9@.-_]{1,64}

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new

# Call the create_ssh_key method.
result = client.create_ssh_key request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey.
p result

#create_volume_snapshot

def create_volume_snapshot(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
def 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.

Overloads
def create_volume_snapshot(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
Pass arguments to create_volume_snapshot via a request object, either of type CreateVolumeSnapshotRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_volume_snapshot(parent: nil, volume_snapshot: nil) -> ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
Pass arguments to create_volume_snapshot via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new

# Call the create_volume_snapshot method.
result = client.create_volume_snapshot request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.
p result

#delete_nfs_share

def delete_nfs_share(request, options = nil) -> ::Gapic::Operation
def delete_nfs_share(name: nil) -> ::Gapic::Operation

Delete an NFS share. The underlying volume is automatically deleted.

Overloads
def delete_nfs_share(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_nfs_share via a request object, either of type DeleteNfsShareRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_nfs_share(name: nil) -> ::Gapic::Operation
Pass arguments to delete_nfs_share via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the NFS share to delete.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new

# Call the delete_nfs_share method.
result = client.delete_nfs_share request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#delete_ssh_key

def delete_ssh_key(request, options = nil) -> ::Google::Protobuf::Empty
def delete_ssh_key(name: nil) -> ::Google::Protobuf::Empty

Deletes a public SSH key registered in the specified project.

Overloads
def delete_ssh_key(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_ssh_key via a request object, either of type DeleteSSHKeyRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_ssh_key(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_ssh_key via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the SSH key to delete. Currently, the only valid value for the location is "global".
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new

# Call the delete_ssh_key method.
result = client.delete_ssh_key request

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_volume_snapshot

def delete_volume_snapshot(request, options = nil) -> ::Google::Protobuf::Empty
def delete_volume_snapshot(name: nil) -> ::Google::Protobuf::Empty

Deletes a volume snapshot. Returns INVALID_ARGUMENT if called for a non-boot volume.

Overloads
def delete_volume_snapshot(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_volume_snapshot via a request object, either of type DeleteVolumeSnapshotRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_volume_snapshot(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_volume_snapshot via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the snapshot to delete.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new

# Call the delete_volume_snapshot method.
result = client.delete_volume_snapshot request

# The returned object is of type Google::Protobuf::Empty.
p result

#detach_lun

def detach_lun(request, options = nil) -> ::Gapic::Operation
def detach_lun(instance: nil, lun: nil, skip_reboot: nil) -> ::Gapic::Operation

Detach LUN from Instance.

Overloads
def detach_lun(request, options = nil) -> ::Gapic::Operation
Pass arguments to detach_lun via a request object, either of type DetachLunRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def detach_lun(instance: nil, lun: nil, skip_reboot: nil) -> ::Gapic::Operation
Pass arguments to detach_lun via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance (::String) — Required. Name of the instance.
  • lun (::String) — Required. Name of the Lun to detach.
  • skip_reboot (::Boolean) — If true, performs lun unmapping without instance reboot.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new

# Call the detach_lun method.
result = client.detach_lun request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#disable_interactive_serial_console

def disable_interactive_serial_console(request, options = nil) -> ::Gapic::Operation
def disable_interactive_serial_console(name: nil) -> ::Gapic::Operation

Disable the interactive serial console feature on an instance.

Overloads
def disable_interactive_serial_console(request, options = nil) -> ::Gapic::Operation
Pass arguments to disable_interactive_serial_console via a request object, either of type DisableInteractiveSerialConsoleRequest or an equivalent Hash.
Parameters
def disable_interactive_serial_console(name: nil) -> ::Gapic::Operation
Pass arguments to disable_interactive_serial_console via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new

# Call the disable_interactive_serial_console method.
result = client.disable_interactive_serial_console request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#enable_interactive_serial_console

def enable_interactive_serial_console(request, options = nil) -> ::Gapic::Operation
def enable_interactive_serial_console(name: nil) -> ::Gapic::Operation

Enable the interactive serial console feature on an instance.

Overloads
def enable_interactive_serial_console(request, options = nil) -> ::Gapic::Operation
Pass arguments to enable_interactive_serial_console via a request object, either of type EnableInteractiveSerialConsoleRequest or an equivalent Hash.
Parameters
def enable_interactive_serial_console(name: nil) -> ::Gapic::Operation
Pass arguments to enable_interactive_serial_console via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new

# Call the enable_interactive_serial_console method.
result = client.enable_interactive_serial_console request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#evict_lun

def evict_lun(request, options = nil) -> ::Gapic::Operation
def evict_lun(name: nil) -> ::Gapic::Operation

Skips lun's cooloff and deletes it now. Lun must be in cooloff state.

Overloads
def evict_lun(request, options = nil) -> ::Gapic::Operation
Pass arguments to evict_lun via a request object, either of type EvictLunRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def evict_lun(name: nil) -> ::Gapic::Operation
Pass arguments to evict_lun via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the lun.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new

# Call the evict_lun method.
result = client.evict_lun request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#evict_volume

def evict_volume(request, options = nil) -> ::Gapic::Operation
def evict_volume(name: nil) -> ::Gapic::Operation

Skips volume's cooloff and deletes it now. Volume must be in cooloff state.

Overloads
def evict_volume(request, options = nil) -> ::Gapic::Operation
Pass arguments to evict_volume via a request object, either of type EvictVolumeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def evict_volume(name: nil) -> ::Gapic::Operation
Pass arguments to evict_volume via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the Volume.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new

# Call the evict_volume method.
result = client.evict_volume request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#get_instance

def get_instance(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Instance
def get_instance(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::Instance

Get details about a single server.

Overloads
def get_instance(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Instance
Pass arguments to get_instance via a request object, either of type GetInstanceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_instance(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::Instance
Pass arguments to get_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::GetInstanceRequest.new

# Call the get_instance method.
result = client.get_instance request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance.
p result

#get_lun

def get_lun(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Lun
def get_lun(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::Lun

Get details of a single storage logical unit number(LUN).

Overloads
def get_lun(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Lun
Pass arguments to get_lun via a request object, either of type GetLunRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_lun(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::Lun
Pass arguments to get_lun via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new

# Call the get_lun method.
result = client.get_lun request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun.
p result

#get_network

def get_network(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Network
def get_network(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::Network

Get details of a single network.

Overloads
def get_network(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Network
Pass arguments to get_network via a request object, either of type GetNetworkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_network(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::Network
Pass arguments to get_network via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new

# Call the get_network method.
result = client.get_network request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::Network.
p result

#get_nfs_share

def get_nfs_share(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::NfsShare
def get_nfs_share(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::NfsShare

Get details of a single NFS share.

Overloads
def get_nfs_share(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::NfsShare
Pass arguments to get_nfs_share via a request object, either of type GetNfsShareRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_nfs_share(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::NfsShare
Pass arguments to get_nfs_share via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new

# Call the get_nfs_share method.
result = client.get_nfs_share request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare.
p result

#get_provisioning_config

def get_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
def get_provisioning_config(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig

Get ProvisioningConfig by name.

Overloads
def get_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Pass arguments to get_provisioning_config via a request object, either of type GetProvisioningConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_provisioning_config(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Pass arguments to get_provisioning_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the ProvisioningConfig.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new

# Call the get_provisioning_config method.
result = client.get_provisioning_config request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.
p result

#get_volume

def get_volume(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Volume
def get_volume(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::Volume

Get details of a single storage volume.

Overloads
def get_volume(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Volume
Pass arguments to get_volume via a request object, either of type GetVolumeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_volume(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::Volume
Pass arguments to get_volume via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new

# Call the get_volume method.
result = client.get_volume request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume.
p result

#get_volume_snapshot

def get_volume_snapshot(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
def 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.

Overloads
def get_volume_snapshot(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
Pass arguments to get_volume_snapshot via a request object, either of type GetVolumeSnapshotRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_volume_snapshot(name: nil) -> ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
Pass arguments to get_volume_snapshot via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the snapshot.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new

# Call the get_volume_snapshot method.
result = client.get_volume_snapshot request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.
p result

#iam_policy_client

def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client

Get the associated client for mix-in of the IAMPolicy.

Returns
  • (Google::Iam::V1::IAMPolicy::Client)

#initialize

def initialize() { |config| ... } -> Client

Create a new BareMetalSolution client object.

Yields
  • (config) — Configure the BareMetalSolution client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config|
  config.timeout = 10.0
end

#list_instances

def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>
def list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>

List servers in a given project and location.

Overloads
def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>
Pass arguments to list_instances via a request object, either of type ListInstancesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>
Pass arguments to list_instances via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListInstancesRequest.
  • page_size (::Integer) — Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.
  • page_token (::String) — A token identifying a page of results from the server.
  • filter (::String) — List filter.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new

# Call the list_instances method.
result = client.list_instances request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Instance.
  p item
end

#list_luns

def list_luns(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>
def list_luns(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>

List storage volume luns for given storage volume.

Overloads
def list_luns(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>
Pass arguments to list_luns via a request object, either of type ListLunsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_luns(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>
Pass arguments to list_luns via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListLunsRequest.
  • page_size (::Integer) — Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — A token identifying a page of results from the server.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new

# Call the list_luns method.
result = client.list_luns request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun.
  p item
end

#list_network_usage

def list_network_usage(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse
def 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.

Overloads
def list_network_usage(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse
Pass arguments to list_network_usage via a request object, either of type ListNetworkUsageRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_network_usage(location: nil) -> ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse
Pass arguments to list_network_usage via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • location (::String) — Required. Parent value (project and location).
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new

# Call the list_network_usage method.
result = client.list_network_usage request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.
p result

#list_networks

def list_networks(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>
def list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>

List network in a given project and location.

Overloads
def list_networks(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>
Pass arguments to list_networks via a request object, either of type ListNetworksRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>
Pass arguments to list_networks via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListNetworksRequest.
  • page_size (::Integer) — Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — A token identifying a page of results from the server.
  • filter (::String) — List filter.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new

# Call the list_networks method.
result = client.list_networks request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network.
  p item
end

#list_nfs_shares

def list_nfs_shares(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>
def list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>

List NFS shares.

Overloads
def list_nfs_shares(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>
Pass arguments to list_nfs_shares via a request object, either of type ListNfsSharesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>
Pass arguments to list_nfs_shares via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListNfsSharesRequest.
  • page_size (::Integer) — Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — A token identifying a page of results from the server.
  • filter (::String) — List filter.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new

# Call the list_nfs_shares method.
result = client.list_nfs_shares request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare.
  p item
end

#list_os_images

def list_os_images(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>
def list_os_images(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>

Retrieves the list of OS images which are currently approved.

Overloads
def list_os_images(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>
Pass arguments to list_os_images via a request object, either of type ListOSImagesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_os_images(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>
Pass arguments to list_os_images via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListProvisioningQuotasRequest.
  • page_size (::Integer) — Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default. Notice that page_size field is not supported and won't be respected in the API request for now, will be updated when pagination is supported.
  • page_token (::String) — A token identifying a page of results from the server.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new

# Call the list_os_images method.
result = client.list_os_images request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage.
  p item
end

#list_provisioning_quotas

def list_provisioning_quotas(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>
def list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>

List the budget details to provision resources on a given project.

Overloads
def list_provisioning_quotas(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>
Pass arguments to list_provisioning_quotas via a request object, either of type ListProvisioningQuotasRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>
Pass arguments to list_provisioning_quotas via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListProvisioningQuotasRequest.
  • page_size (::Integer) — Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default. Notice that page_size field is not supported and won't be respected in the API request for now, will be updated when pagination is supported.
  • page_token (::String) — A token identifying a page of results from the server.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new

# Call the list_provisioning_quotas method.
result = client.list_provisioning_quotas request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota.
  p item
end

#list_ssh_keys

def list_ssh_keys(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>
def list_ssh_keys(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::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.

Overloads
def list_ssh_keys(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>
Pass arguments to list_ssh_keys via a request object, either of type ListSSHKeysRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_ssh_keys(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>
Pass arguments to list_ssh_keys via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent containing the SSH keys. Currently, the only valid value for the location is "global".
  • page_size (::Integer) — The maximum number of items to return.
  • page_token (::String) — The next_page_token value returned from a previous List request, if any.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new

# Call the list_ssh_keys method.
result = client.list_ssh_keys request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey.
  p item
end

#list_volume_snapshots

def list_volume_snapshots(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>
def list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::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.

Overloads
def list_volume_snapshots(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>
Pass arguments to list_volume_snapshots via a request object, either of type ListVolumeSnapshotsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>
Pass arguments to list_volume_snapshots via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListVolumesRequest.
  • page_size (::Integer) — Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — A token identifying a page of results from the server.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new

# Call the list_volume_snapshots method.
result = client.list_volume_snapshots request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.
  p item
end

#list_volumes

def list_volumes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>
def list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>

List storage volumes in a given project and location.

Overloads
def list_volumes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>
Pass arguments to list_volumes via a request object, either of type ListVolumesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>
Pass arguments to list_volumes via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. Parent value for ListVolumesRequest.
  • page_size (::Integer) — Requested page size. The server might return fewer items than requested. If unspecified, server will pick an appropriate default.
  • page_token (::String) — A token identifying a page of results from the server.
  • filter (::String) — List filter.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new

# Call the list_volumes method.
result = client.list_volumes request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume.
  p item
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Client)

#operations_client

def operations_client() -> ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations

Get the associated client for long-running operations.

#rename_instance

def rename_instance(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Instance
def 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.

Overloads
def rename_instance(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Instance
Pass arguments to rename_instance via a request object, either of type RenameInstanceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def rename_instance(name: nil, new_instance_id: nil) -> ::Google::Cloud::BareMetalSolution::V2::Instance
Pass arguments to rename_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name field is used to identify the instance. Format: projects/{project}/locations/{location}/instances/{instance}
  • new_instance_id (::String) — Required. The new id of the instance.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new

# Call the rename_instance method.
result = client.rename_instance request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance.
p result

#rename_network

def rename_network(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Network
def 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.

Overloads
def rename_network(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Network
Pass arguments to rename_network via a request object, either of type RenameNetworkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def rename_network(name: nil, new_network_id: nil) -> ::Google::Cloud::BareMetalSolution::V2::Network
Pass arguments to rename_network via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name field is used to identify the network. Format: projects/{project}/locations/{location}/networks/{network}
  • new_network_id (::String) — Required. The new id of the network.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new

# Call the rename_network method.
result = client.rename_network request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::Network.
p result

#rename_nfs_share

def rename_nfs_share(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::NfsShare
def 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.

Overloads
def rename_nfs_share(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::NfsShare
Pass arguments to rename_nfs_share via a request object, either of type RenameNfsShareRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def rename_nfs_share(name: nil, new_nfsshare_id: nil) -> ::Google::Cloud::BareMetalSolution::V2::NfsShare
Pass arguments to rename_nfs_share via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name field is used to identify the nfsshare. Format: projects/{project}/locations/{location}/nfsshares/{nfsshare}
  • new_nfsshare_id (::String) — Required. The new id of the nfsshare.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new

# Call the rename_nfs_share method.
result = client.rename_nfs_share request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare.
p result

#rename_volume

def rename_volume(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Volume
def 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.

Overloads
def rename_volume(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Volume
Pass arguments to rename_volume via a request object, either of type RenameVolumeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def rename_volume(name: nil, new_volume_id: nil) -> ::Google::Cloud::BareMetalSolution::V2::Volume
Pass arguments to rename_volume via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name field is used to identify the volume. Format: projects/{project}/locations/{location}/volumes/{volume}
  • new_volume_id (::String) — Required. The new id of the volume.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new

# Call the rename_volume method.
result = client.rename_volume request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume.
p result

#reset_instance

def reset_instance(request, options = nil) -> ::Gapic::Operation
def 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.

Overloads
def reset_instance(request, options = nil) -> ::Gapic::Operation
Pass arguments to reset_instance via a request object, either of type ResetInstanceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def reset_instance(name: nil) -> ::Gapic::Operation
Pass arguments to reset_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest.new

# Call the reset_instance method.
result = client.reset_instance request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#resize_volume

def resize_volume(request, options = nil) -> ::Gapic::Operation
def resize_volume(volume: nil, size_gib: nil) -> ::Gapic::Operation

Emergency Volume resize.

Overloads
def resize_volume(request, options = nil) -> ::Gapic::Operation
Pass arguments to resize_volume via a request object, either of type ResizeVolumeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def resize_volume(volume: nil, size_gib: nil) -> ::Gapic::Operation
Pass arguments to resize_volume via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • volume (::String) — Required. Volume to resize.
  • size_gib (::Integer) — New Volume size, in GiB.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new

# Call the resize_volume method.
result = client.resize_volume request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#restore_volume_snapshot

def restore_volume_snapshot(request, options = nil) -> ::Gapic::Operation
def 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.

Overloads
def restore_volume_snapshot(request, options = nil) -> ::Gapic::Operation
Pass arguments to restore_volume_snapshot via a request object, either of type RestoreVolumeSnapshotRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def restore_volume_snapshot(volume_snapshot: nil) -> ::Gapic::Operation
Pass arguments to restore_volume_snapshot via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • volume_snapshot (::String) — Required. Name of the snapshot which will be used to restore its parent volume.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new

# Call the restore_volume_snapshot method.
result = client.restore_volume_snapshot request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#start_instance

def start_instance(request, options = nil) -> ::Gapic::Operation
def start_instance(name: nil) -> ::Gapic::Operation

Starts a server that was shutdown.

Overloads
def start_instance(request, options = nil) -> ::Gapic::Operation
Pass arguments to start_instance via a request object, either of type StartInstanceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def start_instance(name: nil) -> ::Gapic::Operation
Pass arguments to start_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::StartInstanceRequest.new

# Call the start_instance method.
result = client.start_instance request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#stop_instance

def stop_instance(request, options = nil) -> ::Gapic::Operation
def stop_instance(name: nil) -> ::Gapic::Operation

Stop a running server.

Overloads
def stop_instance(request, options = nil) -> ::Gapic::Operation
Pass arguments to stop_instance via a request object, either of type StopInstanceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def stop_instance(name: nil) -> ::Gapic::Operation
Pass arguments to stop_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Name of the resource.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::StopInstanceRequest.new

# Call the stop_instance method.
result = client.stop_instance request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#submit_provisioning_config

def submit_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse
def submit_provisioning_config(parent: nil, provisioning_config: nil, email: nil) -> ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse

Submit a provisiong configuration for a given project.

Overloads
def submit_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse
Pass arguments to submit_provisioning_config via a request object, either of type SubmitProvisioningConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def submit_provisioning_config(parent: nil, provisioning_config: nil, email: nil) -> ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse
Pass arguments to submit_provisioning_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent project and location containing the ProvisioningConfig.
  • provisioning_config (::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash) — Required. The ProvisioningConfig to create.
  • email (::String) — Optional. Email provided to send a confirmation with provisioning config to.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new

# Call the submit_provisioning_config method.
result = client.submit_provisioning_config request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_instance

def update_instance(request, options = nil) -> ::Gapic::Operation
def update_instance(instance: nil, update_mask: nil) -> ::Gapic::Operation

Update details of a single server.

Overloads
def update_instance(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_instance via a request object, either of type UpdateInstanceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_instance(instance: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance (::Google::Cloud::BareMetalSolution::V2::Instance, ::Hash) — Required. The server to update.

    The name field is used to identify the instance to update. Format: projects/{project}/locations/{location}/instances/{instance}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to update. The currently supported fields are: labels hyperthreading_enabled os_image
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest.new

# Call the update_instance method.
result = client.update_instance request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#update_network

def update_network(request, options = nil) -> ::Gapic::Operation
def update_network(network: nil, update_mask: nil) -> ::Gapic::Operation

Update details of a single network.

Overloads
def update_network(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_network via a request object, either of type UpdateNetworkRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_network(network: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_network via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • network (::Google::Cloud::BareMetalSolution::V2::Network, ::Hash) — Required. The network to update.

    The name field is used to identify the instance to update. Format: projects/{project}/locations/{location}/networks/{network}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to update. The only currently supported fields are: labels, reservations, vrf.vlan_attachments
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new

# Call the update_network method.
result = client.update_network request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#update_nfs_share

def update_nfs_share(request, options = nil) -> ::Gapic::Operation
def update_nfs_share(nfs_share: nil, update_mask: nil) -> ::Gapic::Operation

Update details of a single NFS share.

Overloads
def update_nfs_share(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_nfs_share via a request object, either of type UpdateNfsShareRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_nfs_share(nfs_share: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_nfs_share via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • nfs_share (::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash) — Required. The NFS share to update.

    The name field is used to identify the NFS share to update. Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to update. The only currently supported fields are: labels allowed_clients
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new

# Call the update_nfs_share method.
result = client.update_nfs_share request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#update_provisioning_config

def update_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
def update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig

Update existing ProvisioningConfig.

Overloads
def update_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Pass arguments to update_provisioning_config via a request object, either of type UpdateProvisioningConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
Pass arguments to update_provisioning_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new

# Call the update_provisioning_config method.
result = client.update_provisioning_config request

# The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.
p result

#update_volume

def update_volume(request, options = nil) -> ::Gapic::Operation
def update_volume(volume: nil, update_mask: nil) -> ::Gapic::Operation

Update details of a single storage volume.

Overloads
def update_volume(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_volume via a request object, either of type UpdateVolumeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_volume(volume: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_volume via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/bare_metal_solution/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new

# Call the update_volume method.
result = client.update_volume request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end