Class BareMetalSolutionClient (2.15.1)

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.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

BareMetalSolutionClient(BareMetalSolutionClient const &)

Copy and move support

Parameter
NameDescription
BareMetalSolutionClient const &

BareMetalSolutionClient(BareMetalSolutionClient &&)

Copy and move support

Parameter
NameDescription
BareMetalSolutionClient &&

BareMetalSolutionClient(std::shared_ptr< BareMetalSolutionConnection >, Options)

Parameters
NameDescription
connection std::shared_ptr< BareMetalSolutionConnection >
opts Options

Operators

operator=(BareMetalSolutionClient const &)

Copy and move support

Parameter
NameDescription
BareMetalSolutionClient const &
Returns
TypeDescription
BareMetalSolutionClient &

operator=(BareMetalSolutionClient &&)

Copy and move support

Parameter
NameDescription
BareMetalSolutionClient &&
Returns
TypeDescription
BareMetalSolutionClient &

Functions

ListInstances(std::string const &, Options)

List servers in a given project and location.

Parameters
NameDescription
parent std::string const &

Required. Parent value for ListInstancesRequest.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::Instance >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.baremetalsolution.v2.Instance, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListInstances(google::cloud::baremetalsolution::v2::ListInstancesRequest, Options)

List servers in a given project and location.

Parameters
NameDescription
request google::cloud::baremetalsolution::v2::ListInstancesRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.baremetalsolution.v2.ListInstancesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::Instance >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.baremetalsolution.v2.Instance, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetInstance(std::string const &, Options)

Get details about a single server.

Parameters
NameDescription
name std::string const &

Required. Name of the resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Instance >

the result of the RPC. The response message type (google.cloud.baremetalsolution.v2.Instance) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetInstance(google::cloud::baremetalsolution::v2::GetInstanceRequest const &, Options)

Get details about a single server.

Parameters
NameDescription
request google::cloud::baremetalsolution::v2::GetInstanceRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.baremetalsolution.v2.GetInstanceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Instance >

the result of the RPC. The response message type (google.cloud.baremetalsolution.v2.Instance) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateInstance(google::cloud::baremetalsolution::v2::Instance const &, google::protobuf::FieldMask const &, Options)

Update details of a single server.

Parameters
NameDescription
instance google::cloud::baremetalsolution::v2::Instance const &

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 const &

The list of fields to update. The currently supported fields are: labels``hyperthreading_enabled``os_image

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::Instance > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.Instance proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UpdateInstance(google::cloud::baremetalsolution::v2::UpdateInstanceRequest const &, Options)

Update details of a single server.

Parameters
NameDescription
request google::cloud::baremetalsolution::v2::UpdateInstanceRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.baremetalsolution.v2.UpdateInstanceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::Instance > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.Instance proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

RenameInstance(std::string const &, std::string const &, Options)

RenameInstance sets a new name for an instance.

Use with caution, previous names become immediately invalidated.

Parameters
NameDescription
name std::string const &

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

new_instance_id std::string const &

Required. The new id of the instance.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Instance >

the result of the RPC. The response message type (google.cloud.baremetalsolution.v2.Instance) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

RenameInstance(google::cloud::baremetalsolution::v2::RenameInstanceRequest const &, Options)

RenameInstance sets a new name for an instance.

Use with caution, previous names become immediately invalidated.

Parameters
NameDescription
request google::cloud::baremetalsolution::v2::RenameInstanceRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.baremetalsolution.v2.RenameInstanceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Instance >

the result of the RPC. The response message type (google.cloud.baremetalsolution.v2.Instance) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ResetInstance(std::string const &, Options)

Perform an ungraceful, hard reset on a server.

Equivalent to shutting the power off and then turning it back on.

Parameters
NameDescription
name std::string const &

Required. Name of the resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::ResetInstanceResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.ResetInstanceResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ResetInstance(google::cloud::baremetalsolution::v2::ResetInstanceRequest const &, Options)

Perform an ungraceful, hard reset on a server.

Equivalent to shutting the power off and then turning it back on.

Parameters
NameDescription
request google::cloud::baremetalsolution::v2::ResetInstanceRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.baremetalsolution.v2.ResetInstanceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::ResetInstanceResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.ResetInstanceResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StartInstance(std::string const &, Options)

Starts a server that was shutdown.

Parameters
NameDescription
name std::string const &

Required. Name of the resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::StartInstanceResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.StartInstanceResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StartInstance(google::cloud::baremetalsolution::v2::StartInstanceRequest const &, Options)

Starts a server that was shutdown.

Parameters
NameDescription
request google::cloud::baremetalsolution::v2::StartInstanceRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.baremetalsolution.v2.StartInstanceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::StartInstanceResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.StartInstanceResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StopInstance(std::string const &, Options)

Stop a running server.

Parameters
NameDescription
name std::string const &

Required. Name of the resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::StopInstanceResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.StopInstanceResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

StopInstance(google::cloud::baremetalsolution::v2::StopInstanceRequest const &, Options)

Stop a running server.

Parameters
NameDescription
request google::cloud::baremetalsolution::v2::StopInstanceRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.baremetalsolution.v2.StopInstanceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::StopInstanceResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.StopInstanceResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

EnableInteractiveSerialConsole(std::string const &, Options)

Enable the interactive serial console feature on an instance.

Parameters
NameDescription
name std::string const &

Required. Name of the resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::EnableInteractiveSerialConsoleResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

EnableInteractiveSerialConsole(google::cloud::baremetalsolution::v2::EnableInteractiveSerialConsoleRequest const &, Options)

Enable the interactive serial console feature on an instance.

Parameters
NameDescription
request google::cloud::baremetalsolution::v2::EnableInteractiveSerialConsoleRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::EnableInteractiveSerialConsoleResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.EnableInteractiveSerialConsoleResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DisableInteractiveSerialConsole(std::string const &, Options)

Disable the interactive serial console feature on an instance.

Parameters
NameDescription
name std::string const &

Required. Name of the resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::DisableInteractiveSerialConsoleResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DisableInteractiveSerialConsole(google::cloud::baremetalsolution::v2::DisableInteractiveSerialConsoleRequest const &, Options)

Disable the interactive serial console feature on an instance.

Parameters
NameDescription
request google::cloud::baremetalsolution::v2::DisableInteractiveSerialConsoleRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::DisableInteractiveSerialConsoleResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.baremetalsolution.v2.DisableInteractiveSerialConsoleResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DetachLun(std::string const &, std::string const &, Options)

Detach LUN from Instance.

Parameters
NameDescription
instance std::string const &

Required. Name of the instance.

lun std::string const &

Required. Name of the Lun to detach.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

<