Reference documentation and code samples for the Cluster Director V1BETA API class Google::Cloud::HypercomputeCluster::V1beta::HypercomputeCluster::Client.
Client for the HypercomputeCluster service.
Service describing handlers for resources
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the HypercomputeCluster Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all HypercomputeCluster clients ::Google::Cloud::HypercomputeCluster::V1beta::HypercomputeCluster::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the HypercomputeCluster 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_cluster
def create_cluster(request, options = nil) -> ::Gapic::Operation
def create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil) -> ::Gapic::OperationCreates a new Cluster in a given project and location.
def create_cluster(request, options = nil) -> ::Gapic::Operationcreate_cluster via a request object, either of type
CreateClusterRequest or an equivalent Hash.
- request (::Google::Cloud::HypercomputeCluster::V1beta::CreateClusterRequest, ::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_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil) -> ::Gapic::Operationcreate_cluster 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 location in which the cluster should be created, in the
format
projects/{project}/locations/{location}. - cluster_id (::String) — Required. ID of the cluster to create. Must conform to RFC-1034 (lower-case, alphanumeric, and at most 63 characters).
- cluster (::Google::Cloud::HypercomputeCluster::V1beta::Cluster, ::Hash) — Required. Cluster to create.
-
request_id (::String) — Optional. A unique identifier for this request. A random UUID is
recommended. This request is idempotent if and only if
request_idis provided.
- (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/hypercompute_cluster/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::HypercomputeCluster::V1beta::HypercomputeCluster::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::HypercomputeCluster::V1beta::CreateClusterRequest.new # Call the create_cluster method. result = client.create_cluster 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_cluster
def delete_cluster(request, options = nil) -> ::Gapic::Operation
def delete_cluster(name: nil, request_id: nil) -> ::Gapic::OperationDeletes a single Cluster.
def delete_cluster(request, options = nil) -> ::Gapic::Operationdelete_cluster via a request object, either of type
DeleteClusterRequest or an equivalent Hash.
- request (::Google::Cloud::HypercomputeCluster::V1beta::DeleteClusterRequest, ::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_cluster(name: nil, request_id: nil) -> ::Gapic::Operationdelete_cluster 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 cluster to delete, in the format
projects/{project}/locations/{location}/clusters/{cluster}. -
request_id (::String) — Optional. A unique identifier for this request. A random UUID is
recommended. This request is idempotent if and only if
request_idis provided.
- (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/hypercompute_cluster/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::HypercomputeCluster::V1beta::HypercomputeCluster::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::HypercomputeCluster::V1beta::DeleteClusterRequest.new # Call the delete_cluster method. result = client.delete_cluster 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_cluster
def get_cluster(request, options = nil) -> ::Google::Cloud::HypercomputeCluster::V1beta::Cluster
def get_cluster(name: nil) -> ::Google::Cloud::HypercomputeCluster::V1beta::ClusterGets details of a single Cluster.
def get_cluster(request, options = nil) -> ::Google::Cloud::HypercomputeCluster::V1beta::Clusterget_cluster via a request object, either of type
GetClusterRequest or an equivalent Hash.
- request (::Google::Cloud::HypercomputeCluster::V1beta::GetClusterRequest, ::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_cluster(name: nil) -> ::Google::Cloud::HypercomputeCluster::V1beta::Clusterget_cluster 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 cluster to retrieve, in the format
projects/{project}/locations/{location}/clusters/{cluster}.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::HypercomputeCluster::V1beta::Cluster)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/hypercompute_cluster/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::HypercomputeCluster::V1beta::HypercomputeCluster::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::HypercomputeCluster::V1beta::GetClusterRequest.new # Call the get_cluster method. result = client.get_cluster request # The returned object is of type Google::Cloud::HypercomputeCluster::V1beta::Cluster. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new HypercomputeCluster client object.
- (config) — Configure the HypercomputeCluster client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::HypercomputeCluster::V1beta::HypercomputeCluster::Client.new # Create a client using a custom configuration client = ::Google::Cloud::HypercomputeCluster::V1beta::HypercomputeCluster::Client.new do |config| config.timeout = 10.0 end
#list_clusters
def list_clusters(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::HypercomputeCluster::V1beta::Cluster>
def list_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::HypercomputeCluster::V1beta::Cluster>Lists Clusters in a given project and location.
def list_clusters(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::HypercomputeCluster::V1beta::Cluster>list_clusters via a request object, either of type
ListClustersRequest or an equivalent Hash.
- request (::Google::Cloud::HypercomputeCluster::V1beta::ListClustersRequest, ::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_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::HypercomputeCluster::V1beta::Cluster>list_clusters 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 location of the clusters to list, in the format
projects/{project}/locations/{location}. - page_size (::Integer) — Optional. Maximum number of clusters to return. The service may return fewer than this value.
-
page_token (::String) — Optional. A page token received from a previous
ListClusterscall. Provide this to retrieve the subsequent page. When paginating, all other parameters provided toListClustersmust match the call that provided the page token. - filter (::String) — Optional. Filter to apply to the returned results.
-
order_by (::String) — Optional. How to order the resulting clusters. Must be one of the following
strings:
namename desccreate_timecreate_time desc
If not specified, clusters will be returned in an arbitrary order.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::HypercomputeCluster::V1beta::Cluster>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::HypercomputeCluster::V1beta::Cluster>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/hypercompute_cluster/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::HypercomputeCluster::V1beta::HypercomputeCluster::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::HypercomputeCluster::V1beta::ListClustersRequest.new # Call the list_clusters method. result = client.list_clusters 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::HypercomputeCluster::V1beta::Cluster. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::HypercomputeCluster::V1beta::HypercomputeCluster::OperationsGet the associated client for long-running operations.
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)
#update_cluster
def update_cluster(request, options = nil) -> ::Gapic::Operation
def update_cluster(cluster: nil, update_mask: nil, request_id: nil) -> ::Gapic::OperationUpdates the parameters of a single Cluster.
def update_cluster(request, options = nil) -> ::Gapic::Operationupdate_cluster via a request object, either of type
UpdateClusterRequest or an equivalent Hash.
- request (::Google::Cloud::HypercomputeCluster::V1beta::UpdateClusterRequest, ::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_cluster(cluster: nil, update_mask: nil, request_id: nil) -> ::Gapic::Operationupdate_cluster 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).
- cluster (::Google::Cloud::HypercomputeCluster::V1beta::Cluster, ::Hash) — Required. Cluster to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Mask specifying which fields in the cluster to update. All paths must be specified explicitly - wildcards are not supported. At least one path must be provided.
-
request_id (::String) — Optional. A unique identifier for this request. A random UUID is
recommended. This request is idempotent if and only if
request_idis provided.
- (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/hypercompute_cluster/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::HypercomputeCluster::V1beta::HypercomputeCluster::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::HypercomputeCluster::V1beta::UpdateClusterRequest.new # Call the update_cluster method. result = client.update_cluster 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