Reference documentation and code samples for the Bare Metal Solution V2 API class Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.
REST client for the BareMetalSolution service.
Performs management operations on Bare Metal Solution servers.
The baremetalsolution.googleapis.com
service provides management
capabilities for Bare Metal Solution servers. To access the API methods, you
must assign Bare Metal Solution IAM roles containing the desired permissions
to your staff in your Google Cloud project. You must also enable the Bare
Metal Solution API. Once enabled, the methods act
upon specific servers in your Bare Metal Solution environment.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the BareMetalSolution Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all BareMetalSolution clients ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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.
def create_nfs_share(request, options = nil) -> ::Gapic::Operation
create_nfs_share
via a request object, either of type
CreateNfsShareRequest or an equivalent Hash.
- 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
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).
- parent (::String) — Required. The parent project and location.
- nfs_share (::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash) — Required. The NfsShare to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def create_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
create_provisioning_config
via a request object, either of type
CreateProvisioningConfigRequest or an equivalent Hash.
- 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
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def create_ssh_key(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::SSHKey
create_ssh_key
via a request object, either of type
CreateSSHKeyRequest or an equivalent Hash.
- 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
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).
- 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}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::SSHKey)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def create_volume_snapshot(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
create_volume_snapshot
via a request object, either of type
CreateVolumeSnapshotRequest or an equivalent Hash.
- 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
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).
- parent (::String) — Required. The volume to snapshot.
- volume_snapshot (::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot, ::Hash) — Required. The snapshot to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def delete_nfs_share(request, options = nil) -> ::Gapic::Operation
delete_nfs_share
via a request object, either of type
DeleteNfsShareRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. The name of the NFS share to delete.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def delete_ssh_key(request, options = nil) -> ::Google::Protobuf::Empty
delete_ssh_key
via a request object, either of type
DeleteSSHKeyRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. The name of the SSH key to delete. Currently, the only valid value for the location is "global".
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def delete_volume_snapshot(request, options = nil) -> ::Google::Protobuf::Empty
delete_volume_snapshot
via a request object, either of type
DeleteVolumeSnapshotRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. The name of the snapshot to delete.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def detach_lun(request, options = nil) -> ::Gapic::Operation
detach_lun
via a request object, either of type
DetachLunRequest or an equivalent Hash.
- 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
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def disable_interactive_serial_console(request, options = nil) -> ::Gapic::Operation
disable_interactive_serial_console
via a request object, either of type
DisableInteractiveSerialConsoleRequest or an equivalent Hash.
- request (::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::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 disable_interactive_serial_console(name: nil) -> ::Gapic::Operation
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).
- name (::String) — Required. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def enable_interactive_serial_console(request, options = nil) -> ::Gapic::Operation
enable_interactive_serial_console
via a request object, either of type
EnableInteractiveSerialConsoleRequest or an equivalent Hash.
- request (::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::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 enable_interactive_serial_console(name: nil) -> ::Gapic::Operation
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).
- name (::String) — Required. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def evict_lun(request, options = nil) -> ::Gapic::Operation
evict_lun
via a request object, either of type
EvictLunRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. The name of the lun.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def evict_volume(request, options = nil) -> ::Gapic::Operation
evict_volume
via a request object, either of type
EvictVolumeRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. The name of the Volume.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def get_instance(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Instance
get_instance
via a request object, either of type
GetInstanceRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::Instance)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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).
def get_lun(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Lun
get_lun
via a request object, either of type
GetLunRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::Lun)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def get_network(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Network
get_network
via a request object, either of type
GetNetworkRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::Network)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def get_nfs_share(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::NfsShare
get_nfs_share
via a request object, either of type
GetNfsShareRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::NfsShare)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def get_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
get_provisioning_config
via a request object, either of type
GetProvisioningConfigRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of the ProvisioningConfig.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def get_volume(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Volume
get_volume
via a request object, either of type
GetVolumeRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::Volume)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def get_volume_snapshot(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot
get_volume_snapshot
via a request object, either of type
GetVolumeSnapshotRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. The name of the snapshot.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new BareMetalSolution REST client object.
- (config) — Configure the BareMetalSolution client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config| config.timeout = 10.0 end
#list_instances
def list_instances(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse
def list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse
List servers in a given project and location.
def list_instances(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse
list_instances
via a request object, either of type
ListInstancesRequest or an equivalent Hash.
- 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) -> ::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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) -> ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse
def list_luns(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse
List storage volume luns for given storage volume.
def list_luns(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse
list_luns
via a request object, either of type
ListLunsRequest or an equivalent Hash.
- 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) -> ::Google::Cloud::BareMetalSolution::V2::ListLunsResponse
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::ListLunsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def list_network_usage(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse
list_network_usage
via a request object, either of type
ListNetworkUsageRequest or an equivalent Hash.
- 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
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).
- location (::String) — Required. Parent value (project and location).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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) -> ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse
def list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse
List network in a given project and location.
def list_networks(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse
list_networks
via a request object, either of type
ListNetworksRequest or an equivalent Hash.
- 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) -> ::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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) -> ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse
def list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse
List NFS shares.
def list_nfs_shares(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse
list_nfs_shares
via a request object, either of type
ListNfsSharesRequest or an equivalent Hash.
- 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) -> ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>
def list_os_images(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>
Retrieves the list of OS images which are currently approved.
def list_os_images(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>
list_os_images
via a request object, either of type
ListOSImagesRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>
def list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>
List the budget details to provision resources on a given project.
def list_provisioning_quotas(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>
list_provisioning_quotas
via a request object, either of type
ListProvisioningQuotasRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>
def list_ssh_keys(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>
Lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature.
def list_ssh_keys(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>
list_ssh_keys
via a request object, either of type
ListSSHKeysRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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) -> ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse
def list_volume_snapshots(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse
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.
def list_volume_snapshots(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse
list_volume_snapshots
via a request object, either of type
ListVolumeSnapshotsRequest or an equivalent Hash.
- 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) -> ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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) -> ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse
def list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse
List storage volumes in a given project and location.
def list_volumes(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse
list_volumes
via a request object, either of type
ListVolumesRequest or an equivalent Hash.
- 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) -> ::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#operations_client
def operations_client() -> ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::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.
def rename_instance(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Instance
rename_instance
via a request object, either of type
RenameInstanceRequest or an equivalent Hash.
- 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
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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::Instance)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def rename_network(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Network
rename_network
via a request object, either of type
RenameNetworkRequest or an equivalent Hash.
- 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
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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::Network)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def rename_nfs_share(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::NfsShare
rename_nfs_share
via a request object, either of type
RenameNfsShareRequest or an equivalent Hash.
- 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
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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::NfsShare)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def rename_volume(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::Volume
rename_volume
via a request object, either of type
RenameVolumeRequest or an equivalent Hash.
- 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
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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::Volume)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def reset_instance(request, options = nil) -> ::Gapic::Operation
reset_instance
via a request object, either of type
ResetInstanceRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def resize_volume(request, options = nil) -> ::Gapic::Operation
resize_volume
via a request object, either of type
ResizeVolumeRequest or an equivalent Hash.
- 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
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).
- volume (::String) — Required. Volume to resize.
- size_gib (::Integer) — New Volume size, in GiB.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def restore_volume_snapshot(request, options = nil) -> ::Gapic::Operation
restore_volume_snapshot
via a request object, either of type
RestoreVolumeSnapshotRequest or an equivalent Hash.
- 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
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).
- volume_snapshot (::String) — Required. Name of the snapshot which will be used to restore its parent volume.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def start_instance(request, options = nil) -> ::Gapic::Operation
start_instance
via a request object, either of type
StartInstanceRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def stop_instance(request, options = nil) -> ::Gapic::Operation
stop_instance
via a request object, either of type
StopInstanceRequest or an equivalent Hash.
- 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
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).
- name (::String) — Required. Name of the resource.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def submit_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse
submit_provisioning_config
via a request object, either of type
SubmitProvisioningConfigRequest or an equivalent Hash.
- 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
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).
- 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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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
#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.
def update_instance(request, options = nil) -> ::Gapic::Operation
update_instance
via a request object, either of type
UpdateInstanceRequest or an equivalent Hash.
- 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
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).
-
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
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def update_network(request, options = nil) -> ::Gapic::Operation
update_network
via a request object, either of type
UpdateNetworkRequest or an equivalent Hash.
- 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
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).
-
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
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def update_nfs_share(request, options = nil) -> ::Gapic::Operation
update_nfs_share
via a request object, either of type
UpdateNfsShareRequest or an equivalent Hash.
- 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
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).
-
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
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def update_provisioning_config(request, options = nil) -> ::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig
update_provisioning_config
via a request object, either of type
UpdateProvisioningConfigRequest or an equivalent Hash.
- 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
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).
- provisioning_config (::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash) — Required. The ProvisioningConfig to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The list of fields to update.
- email (::String) — Optional. Email provided to send a confirmation with provisioning config to.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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.
def update_volume(request, options = nil) -> ::Gapic::Operation
update_volume
via a request object, either of type
UpdateVolumeRequest or an equivalent Hash.
- 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
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).
-
volume (::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash) — Required. The volume to update.
The
name
field is used to identify the volume to update. Format: projects/{project}/locations/{location}/volumes/{volume} - update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to update. The only currently supported fields are: 'labels'
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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