Reference documentation and code samples for the Bare Metal Solution V2 API class Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.
Client for the BareMetalSolution service.
Performs management operations on Bare Metal Solution servers.
The baremetalsolution.googleapis.com
service provides management
capabilities for Bare Metal Solution servers. To access the API methods, you
must assign Bare Metal Solution IAM roles containing the desired permissions
to your staff in your Google Cloud project. You must also enable the Bare
Metal Solution API. Once enabled, the methods act
upon specific servers in your Bare Metal Solution environment.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the BareMetalSolution Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all BareMetalSolution clients ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the BareMetalSolution Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#detach_lun
def detach_lun(request, options = nil) -> ::Gapic::Operation
def detach_lun(instance: nil, lun: 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) -> ::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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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
#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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BareMetalSolution::V2::Instance)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BareMetalSolution::V2::Lun)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BareMetalSolution::V2::Network)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BareMetalSolution::V2::NfsShare)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BareMetalSolution::V2::Volume)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new BareMetalSolution 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::Client.new # Create a client using a custom configuration client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new do |config| config.timeout = 10.0 end
#list_instances
def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>
def list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>
List servers in a given project and location.
def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>
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) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Instance>)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BareMetalSolution::V2::ListInstancesRequest.new # Call the list_instances method. result = client.list_instances request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Instance. p item end
#list_luns
def list_luns(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>
def list_luns(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>
List storage volume luns for given storage volume.
def list_luns(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>
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) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>)
- (::Google::Cloud::Error) — if the RPC 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::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).
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new # Call the list_network_usage method. result = client.list_network_usage request # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse. p result
#list_networks
def list_networks(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>
def list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>
List network in a given project and location.
def list_networks(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>
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) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new # Call the list_networks method. result = client.list_networks request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network. p item end
#list_nfs_shares
def list_nfs_shares(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>
def list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>
List NFS shares.
def list_nfs_shares(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>
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) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>)
- (::Google::Cloud::Error) — if the RPC 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::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_volumes
def list_volumes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>
def list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>
List storage volumes in a given project and location.
def list_volumes(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>
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) -> ::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new # Call the list_volumes method. result = client.list_volumes request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#operations_client
def operations_client() -> ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Operations
Get the associated client for long-running operations.
#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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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
#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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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
#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
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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_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:
snapshot_auto_delete_behavior
snapshot_schedule_policy_name
'labels' 'snapshot_enabled' 'snapshot_reservation_detail.reserved_space_percent'
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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