Class BareMetalSolutionClient (0.51.0)

GitHub RepositoryProduct ReferenceREST DocumentationRPC Documentation

Service Description: 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.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   Instance response = bareMetalSolutionClient.getInstance(name);
 }
 

Note: close() needs to be called on the BareMetalSolutionClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListInstances

List servers in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listInstances(ListInstancesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listInstances(LocationName parent)

  • listInstances(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listInstancesPagedCallable()

  • listInstancesCallable()

GetInstance

Get details about a single server.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getInstance(GetInstanceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getInstance(InstanceName name)

  • getInstance(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getInstanceCallable()

UpdateInstance

Update details of a single server.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateInstanceAsync(UpdateInstanceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateInstanceAsync(Instance instance, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateInstanceOperationCallable()

  • updateInstanceCallable()

RenameInstance

RenameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • renameInstance(RenameInstanceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • renameInstance(InstanceName name, String newInstanceId)

  • renameInstance(String name, String newInstanceId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • renameInstanceCallable()

ResetInstance

Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • resetInstanceAsync(ResetInstanceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • resetInstanceAsync(InstanceName name)

  • resetInstanceAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • resetInstanceOperationCallable()

  • resetInstanceCallable()

StartInstance

Starts a server that was shutdown.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • startInstanceAsync(StartInstanceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • startInstanceAsync(InstanceName name)

  • startInstanceAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • startInstanceOperationCallable()

  • startInstanceCallable()

StopInstance

Stop a running server.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • stopInstanceAsync(StopInstanceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • stopInstanceAsync(InstanceName name)

  • stopInstanceAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • stopInstanceOperationCallable()

  • stopInstanceCallable()

EnableInteractiveSerialConsole

Enable the interactive serial console feature on an instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • enableInteractiveSerialConsoleAsync(EnableInteractiveSerialConsoleRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • enableInteractiveSerialConsoleAsync(InstanceName name)

  • enableInteractiveSerialConsoleAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • enableInteractiveSerialConsoleOperationCallable()

  • enableInteractiveSerialConsoleCallable()

DisableInteractiveSerialConsole

Disable the interactive serial console feature on an instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • disableInteractiveSerialConsoleAsync(DisableInteractiveSerialConsoleRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • disableInteractiveSerialConsoleAsync(InstanceName name)

  • disableInteractiveSerialConsoleAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • disableInteractiveSerialConsoleOperationCallable()

  • disableInteractiveSerialConsoleCallable()

DetachLun

Detach LUN from Instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • detachLunAsync(DetachLunRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • detachLunAsync(InstanceName instance, LunName lun)

  • detachLunAsync(InstanceName instance, String lun)

  • detachLunAsync(String instance, LunName lun)

  • detachLunAsync(String instance, String lun)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • detachLunOperationCallable()

  • detachLunCallable()

ListSSHKeys

Lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listSSHKeys(ListSSHKeysRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listSSHKeys(LocationName parent)

  • listSSHKeys(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listSSHKeysPagedCallable()

  • listSSHKeysCallable()

CreateSSHKey

Register a public SSH key in the specified project for use with the interactive serial console feature.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createSSHKey(CreateSSHKeyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createSSHKey(LocationName parent, SSHKey sshKey, String sshKeyId)

  • createSSHKey(String parent, SSHKey sshKey, String sshKeyId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createSSHKeyCallable()

DeleteSSHKey

Deletes a public SSH key registered in the specified project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteSSHKey(DeleteSSHKeyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteSSHKey(SshKeyName name)

  • deleteSSHKey(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteSSHKeyCallable()

ListVolumes

List storage volumes in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listVolumes(ListVolumesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listVolumes(LocationName parent)

  • listVolumes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listVolumesPagedCallable()

  • listVolumesCallable()

GetVolume

Get details of a single storage volume.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getVolume(GetVolumeRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getVolume(VolumeName name)

  • getVolume(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getVolumeCallable()

UpdateVolume

Update details of a single storage volume.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateVolumeAsync(UpdateVolumeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateVolumeAsync(Volume volume, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateVolumeOperationCallable()

  • updateVolumeCallable()

RenameVolume

RenameVolume sets a new name for a volume. Use with caution, previous names become immediately invalidated.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • renameVolume(RenameVolumeRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • renameVolume(VolumeName name, String newVolumeId)

  • renameVolume(String name, String newVolumeId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • renameVolumeCallable()

EvictVolume

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • evictVolumeAsync(EvictVolumeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • evictVolumeAsync(VolumeName name)

  • evictVolumeAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • evictVolumeOperationCallable()

  • evictVolumeCallable()

ResizeVolume

Emergency Volume resize.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • resizeVolumeAsync(ResizeVolumeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • resizeVolumeAsync(VolumeName volume, long sizeGib)

  • resizeVolumeAsync(String volume, long sizeGib)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • resizeVolumeOperationCallable()

  • resizeVolumeCallable()

ListNetworks

List network in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listNetworks(ListNetworksRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listNetworks(LocationName parent)

  • listNetworks(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listNetworksPagedCallable()

  • listNetworksCallable()

ListNetworkUsage

List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listNetworkUsage(ListNetworkUsageRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listNetworkUsage(LocationName location)

  • listNetworkUsage(String location)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listNetworkUsageCallable()

GetNetwork

Get details of a single network.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getNetwork(GetNetworkRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getNetwork(NetworkName name)

  • getNetwork(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getNetworkCallable()

UpdateNetwork

Update details of a single network.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateNetworkAsync(UpdateNetworkRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateNetworkAsync(Network network, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateNetworkOperationCallable()

  • updateNetworkCallable()

CreateVolumeSnapshot

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createVolumeSnapshot(CreateVolumeSnapshotRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createVolumeSnapshot(VolumeName parent, VolumeSnapshot volumeSnapshot)

  • createVolumeSnapshot(String parent, VolumeSnapshot volumeSnapshot)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createVolumeSnapshotCallable()

RestoreVolumeSnapshot

Uses the specified snapshot to restore its parent volume. Returns INVALID_ARGUMENT if called for a non-boot volume.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • restoreVolumeSnapshotAsync(RestoreVolumeSnapshotRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • restoreVolumeSnapshotAsync(VolumeSnapshotName volumeSnapshot)

  • restoreVolumeSnapshotAsync(String volumeSnapshot)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • restoreVolumeSnapshotOperationCallable()

  • restoreVolumeSnapshotCallable()

DeleteVolumeSnapshot

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteVolumeSnapshot(DeleteVolumeSnapshotRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteVolumeSnapshot(VolumeSnapshotName name)

  • deleteVolumeSnapshot(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteVolumeSnapshotCallable()

GetVolumeSnapshot

Returns the specified snapshot resource. Returns INVALID_ARGUMENT if called for a non-boot volume.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getVolumeSnapshot(GetVolumeSnapshotRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getVolumeSnapshot(VolumeSnapshotName name)

  • getVolumeSnapshot(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getVolumeSnapshotCallable()

ListVolumeSnapshots

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listVolumeSnapshots(ListVolumeSnapshotsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listVolumeSnapshots(VolumeName parent)

  • listVolumeSnapshots(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listVolumeSnapshotsPagedCallable()

  • listVolumeSnapshotsCallable()

GetLun

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLun(GetLunRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getLun(LunName name)

  • getLun(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLunCallable()

ListLuns

List storage volume luns for given storage volume.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLuns(ListLunsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listLuns(VolumeName parent)

  • listLuns(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLunsPagedCallable()

  • listLunsCallable()

EvictLun

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • evictLunAsync(EvictLunRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • evictLunAsync(LunName name)

  • evictLunAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • evictLunOperationCallable()

  • evictLunCallable()

GetNfsShare

Get details of a single NFS share.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getNfsShare(GetNfsShareRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getNfsShare(NFSShareName name)

  • getNfsShare(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getNfsShareCallable()

ListNfsShares

List NFS shares.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listNfsShares(ListNfsSharesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listNfsShares(LocationName parent)

  • listNfsShares(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listNfsSharesPagedCallable()

  • listNfsSharesCallable()

UpdateNfsShare

Update details of a single NFS share.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateNfsShareAsync(UpdateNfsShareRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateNfsShareAsync(NfsShare nfsShare, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateNfsShareOperationCallable()

  • updateNfsShareCallable()

CreateNfsShare

Create an NFS share.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createNfsShareAsync(CreateNfsShareRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createNfsShareAsync(LocationName parent, NfsShare nfsShare)

  • createNfsShareAsync(String parent, NfsShare nfsShare)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createNfsShareOperationCallable()

  • createNfsShareCallable()

RenameNfsShare

RenameNfsShare sets a new name for an nfsshare. Use with caution, previous names become immediately invalidated.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • renameNfsShare(RenameNfsShareRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • renameNfsShare(NFSShareName name, String newNfsshareId)

  • renameNfsShare(String name, String newNfsshareId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • renameNfsShareCallable()

DeleteNfsShare

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteNfsShareAsync(DeleteNfsShareRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteNfsShareAsync(NFSShareName name)

  • deleteNfsShareAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteNfsShareOperationCallable()

  • deleteNfsShareCallable()

ListProvisioningQuotas

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

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listProvisioningQuotas(ListProvisioningQuotasRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listProvisioningQuotas(LocationName parent)

  • listProvisioningQuotas(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listProvisioningQuotasPagedCallable()

  • listProvisioningQuotasCallable()

SubmitProvisioningConfig

Submit a provisiong configuration for a given project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • submitProvisioningConfig(SubmitProvisioningConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • submitProvisioningConfig(LocationName parent, ProvisioningConfig provisioningConfig)

  • submitProvisioningConfig(String parent, ProvisioningConfig provisioningConfig)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • submitProvisioningConfigCallable()

GetProvisioningConfig

Get ProvisioningConfig by name.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getProvisioningConfig(GetProvisioningConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getProvisioningConfig(ProvisioningConfigName name)

  • getProvisioningConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getProvisioningConfigCallable()

CreateProvisioningConfig

Create new ProvisioningConfig.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createProvisioningConfig(CreateProvisioningConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createProvisioningConfig(LocationName parent, ProvisioningConfig provisioningConfig)

  • createProvisioningConfig(String parent, ProvisioningConfig provisioningConfig)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createProvisioningConfigCallable()

UpdateProvisioningConfig

Update existing ProvisioningConfig.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateProvisioningConfig(UpdateProvisioningConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateProvisioningConfig(ProvisioningConfig provisioningConfig, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateProvisioningConfigCallable()

RenameNetwork

RenameNetwork sets a new name for a network. Use with caution, previous names become immediately invalidated.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • renameNetwork(RenameNetworkRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • renameNetwork(NetworkName name, String newNetworkId)

  • renameNetwork(String name, String newNetworkId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • renameNetworkCallable()

ListOSImages

Retrieves the list of OS images which are currently approved.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listOSImages(ListOSImagesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listOSImages(LocationName parent)

  • listOSImages(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listOSImagesPagedCallable()

  • listOSImagesCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of BareMetalSolutionSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 BareMetalSolutionSettings bareMetalSolutionSettings =
     BareMetalSolutionSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 BareMetalSolutionClient bareMetalSolutionClient =
     BareMetalSolutionClient.create(bareMetalSolutionSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 BareMetalSolutionSettings bareMetalSolutionSettings =
     BareMetalSolutionSettings.newBuilder().setEndpoint(myEndpoint).build();
 BareMetalSolutionClient bareMetalSolutionClient =
     BareMetalSolutionClient.create(bareMetalSolutionSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 BareMetalSolutionSettings bareMetalSolutionSettings =
     BareMetalSolutionSettings.newHttpJsonBuilder().build();
 BareMetalSolutionClient bareMetalSolutionClient =
     BareMetalSolutionClient.create(bareMetalSolutionSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > BareMetalSolutionClient

Static Methods

create()

public static final BareMetalSolutionClient create()

Constructs an instance of BareMetalSolutionClient with default settings.

Returns
Type Description
BareMetalSolutionClient
Exceptions
Type Description
IOException

create(BareMetalSolutionSettings settings)

public static final BareMetalSolutionClient create(BareMetalSolutionSettings settings)

Constructs an instance of BareMetalSolutionClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings BareMetalSolutionSettings
Returns
Type Description
BareMetalSolutionClient
Exceptions
Type Description
IOException

create(BareMetalSolutionStub stub)

public static final BareMetalSolutionClient create(BareMetalSolutionStub stub)

Constructs an instance of BareMetalSolutionClient, using the given stub for making calls. This is for advanced usage - prefer using create(BareMetalSolutionSettings).

Parameter
Name Description
stub BareMetalSolutionStub
Returns
Type Description
BareMetalSolutionClient

Constructors

BareMetalSolutionClient(BareMetalSolutionSettings settings)

protected BareMetalSolutionClient(BareMetalSolutionSettings settings)

Constructs an instance of BareMetalSolutionClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings BareMetalSolutionSettings

BareMetalSolutionClient(BareMetalSolutionStub stub)

protected BareMetalSolutionClient(BareMetalSolutionStub stub)
Parameter
Name Description
stub BareMetalSolutionStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createNfsShareAsync(CreateNfsShareRequest request)

public final OperationFuture<NfsShare,OperationMetadata> createNfsShareAsync(CreateNfsShareRequest request)

Create an NFS share.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   CreateNfsShareRequest request =
       CreateNfsShareRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setNfsShare(NfsShare.newBuilder().build())
           .build();
   NfsShare response = bareMetalSolutionClient.createNfsShareAsync(request).get();
 }
 
Parameter
Name Description
request CreateNfsShareRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<NfsShare,OperationMetadata>

createNfsShareAsync(LocationName parent, NfsShare nfsShare)

public final OperationFuture<NfsShare,OperationMetadata> createNfsShareAsync(LocationName parent, NfsShare nfsShare)

Create an NFS share.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   NfsShare nfsShare = NfsShare.newBuilder().build();
   NfsShare response = bareMetalSolutionClient.createNfsShareAsync(parent, nfsShare).get();
 }
 
Parameters
Name Description
parent LocationName

Required. The parent project and location.

nfsShare NfsShare

Required. The NfsShare to create.

Returns
Type Description
OperationFuture<NfsShare,OperationMetadata>

createNfsShareAsync(String parent, NfsShare nfsShare)

public final OperationFuture<NfsShare,OperationMetadata> createNfsShareAsync(String parent, NfsShare nfsShare)

Create an NFS share.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   NfsShare nfsShare = NfsShare.newBuilder().build();
   NfsShare response = bareMetalSolutionClient.createNfsShareAsync(parent, nfsShare).get();
 }
 
Parameters
Name Description
parent String

Required. The parent project and location.

nfsShare NfsShare

Required. The NfsShare to create.

Returns
Type Description
OperationFuture<NfsShare,OperationMetadata>

createNfsShareCallable()

public final UnaryCallable<CreateNfsShareRequest,Operation> createNfsShareCallable()

Create an NFS share.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   CreateNfsShareRequest request =
       CreateNfsShareRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setNfsShare(NfsShare.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       bareMetalSolutionClient.createNfsShareCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateNfsShareRequest,Operation>

createNfsShareOperationCallable()

public final OperationCallable<CreateNfsShareRequest,NfsShare,OperationMetadata> createNfsShareOperationCallable()

Create an NFS share.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   CreateNfsShareRequest request =
       CreateNfsShareRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setNfsShare(NfsShare.newBuilder().build())
           .build();
   OperationFuture<NfsShare, OperationMetadata> future =
       bareMetalSolutionClient.createNfsShareOperationCallable().futureCall(request);
   // Do something.
   NfsShare response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateNfsShareRequest,NfsShare,OperationMetadata>

createProvisioningConfig(CreateProvisioningConfigRequest request)

public final ProvisioningConfig createProvisioningConfig(CreateProvisioningConfigRequest request)

Create new ProvisioningConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   CreateProvisioningConfigRequest request =
       CreateProvisioningConfigRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setProvisioningConfig(ProvisioningConfig.newBuilder().build())
           .setEmail("email96619420")
           .build();
   ProvisioningConfig response = bareMetalSolutionClient.createProvisioningConfig(request);
 }
 
Parameter
Name Description
request CreateProvisioningConfigRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ProvisioningConfig

createProvisioningConfig(LocationName parent, ProvisioningConfig provisioningConfig)

public final ProvisioningConfig createProvisioningConfig(LocationName parent, ProvisioningConfig provisioningConfig)

Create new ProvisioningConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   ProvisioningConfig provisioningConfig = ProvisioningConfig.newBuilder().build();
   ProvisioningConfig response =
       bareMetalSolutionClient.createProvisioningConfig(parent, provisioningConfig);
 }
 
Parameters
Name Description
parent LocationName

Required. The parent project and location containing the ProvisioningConfig.

provisioningConfig ProvisioningConfig

Required. The ProvisioningConfig to create.

Returns
Type Description
ProvisioningConfig

createProvisioningConfig(String parent, ProvisioningConfig provisioningConfig)

public final ProvisioningConfig createProvisioningConfig(String parent, ProvisioningConfig provisioningConfig)

Create new ProvisioningConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   ProvisioningConfig provisioningConfig = ProvisioningConfig.newBuilder().build();
   ProvisioningConfig response =
       bareMetalSolutionClient.createProvisioningConfig(parent, provisioningConfig);
 }
 
Parameters
Name Description
parent String

Required. The parent project and location containing the ProvisioningConfig.

provisioningConfig ProvisioningConfig

Required. The ProvisioningConfig to create.

Returns
Type Description
ProvisioningConfig

createProvisioningConfigCallable()

public final UnaryCallable<CreateProvisioningConfigRequest,ProvisioningConfig> createProvisioningConfigCallable()

Create new ProvisioningConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   CreateProvisioningConfigRequest request =
       CreateProvisioningConfigRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setProvisioningConfig(ProvisioningConfig.newBuilder().build())
           .setEmail("email96619420")
           .build();
   ApiFuture<ProvisioningConfig> future =
       bareMetalSolutionClient.createProvisioningConfigCallable().futureCall(request);
   // Do something.
   ProvisioningConfig response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateProvisioningConfigRequest,ProvisioningConfig>

createSSHKey(CreateSSHKeyRequest request)

public final SSHKey createSSHKey(CreateSSHKeyRequest request)

Register a public SSH key in the specified project for use with the interactive serial console feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   CreateSSHKeyRequest request =
       CreateSSHKeyRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setSshKey(SSHKey.newBuilder().build())
           .setSshKeyId("sshKeyId593257138")
           .build();
   SSHKey response = bareMetalSolutionClient.createSSHKey(request);
 }
 
Parameter
Name Description
request CreateSSHKeyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
SSHKey

createSSHKey(LocationName parent, SSHKey sshKey, String sshKeyId)

public final SSHKey createSSHKey(LocationName parent, SSHKey sshKey, String sshKeyId)

Register a public SSH key in the specified project for use with the interactive serial console feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   SSHKey sshKey = SSHKey.newBuilder().build();
   String sshKeyId = "sshKeyId593257138";
   SSHKey response = bareMetalSolutionClient.createSSHKey(parent, sshKey, sshKeyId);
 }
 
Parameters
Name Description
parent LocationName

Required. The parent containing the SSH keys.

sshKey SSHKey

Required. The SSH key to register.

sshKeyId 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}

Returns
Type Description
SSHKey

createSSHKey(String parent, SSHKey sshKey, String sshKeyId)

public final SSHKey createSSHKey(String parent, SSHKey sshKey, String sshKeyId)

Register a public SSH key in the specified project for use with the interactive serial console feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   SSHKey sshKey = SSHKey.newBuilder().build();
   String sshKeyId = "sshKeyId593257138";
   SSHKey response = bareMetalSolutionClient.createSSHKey(parent, sshKey, sshKeyId);
 }
 
Parameters
Name Description
parent String

Required. The parent containing the SSH keys.

sshKey SSHKey

Required. The SSH key to register.

sshKeyId 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}

Returns
Type Description
SSHKey

createSSHKeyCallable()

public final UnaryCallable<CreateSSHKeyRequest,SSHKey> createSSHKeyCallable()

Register a public SSH key in the specified project for use with the interactive serial console feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   CreateSSHKeyRequest request =
       CreateSSHKeyRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setSshKey(SSHKey.newBuilder().build())
           .setSshKeyId("sshKeyId593257138")
           .build();
   ApiFuture<SSHKey> future = bareMetalSolutionClient.createSSHKeyCallable().futureCall(request);
   // Do something.
   SSHKey response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateSSHKeyRequest,SSHKey>

createVolumeSnapshot(CreateVolumeSnapshotRequest request)

public final VolumeSnapshot createVolumeSnapshot(CreateVolumeSnapshotRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   CreateVolumeSnapshotRequest request =
       CreateVolumeSnapshotRequest.newBuilder()
           .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
           .setVolumeSnapshot(VolumeSnapshot.newBuilder().build())
           .build();
   VolumeSnapshot response = bareMetalSolutionClient.createVolumeSnapshot(request);
 }
 
Parameter
Name Description
request CreateVolumeSnapshotRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
VolumeSnapshot

createVolumeSnapshot(VolumeName parent, VolumeSnapshot volumeSnapshot)

public final VolumeSnapshot createVolumeSnapshot(VolumeName parent, VolumeSnapshot volumeSnapshot)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
   VolumeSnapshot volumeSnapshot = VolumeSnapshot.newBuilder().build();
   VolumeSnapshot response =
       bareMetalSolutionClient.createVolumeSnapshot(parent, volumeSnapshot);
 }
 
Parameters
Name Description
parent VolumeName

Required. The volume to snapshot.

volumeSnapshot VolumeSnapshot

Required. The snapshot to create.

Returns
Type Description
VolumeSnapshot

createVolumeSnapshot(String parent, VolumeSnapshot volumeSnapshot)

public final VolumeSnapshot createVolumeSnapshot(String parent, VolumeSnapshot volumeSnapshot)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
   VolumeSnapshot volumeSnapshot = VolumeSnapshot.newBuilder().build();
   VolumeSnapshot response =
       bareMetalSolutionClient.createVolumeSnapshot(parent, volumeSnapshot);
 }
 
Parameters
Name Description
parent String

Required. The volume to snapshot.

volumeSnapshot VolumeSnapshot

Required. The snapshot to create.

Returns
Type Description
VolumeSnapshot

createVolumeSnapshotCallable()

public final UnaryCallable<CreateVolumeSnapshotRequest,VolumeSnapshot> createVolumeSnapshotCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   CreateVolumeSnapshotRequest request =
       CreateVolumeSnapshotRequest.newBuilder()
           .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
           .setVolumeSnapshot(VolumeSnapshot.newBuilder().build())
           .build();
   ApiFuture<VolumeSnapshot> future =
       bareMetalSolutionClient.createVolumeSnapshotCallable().futureCall(request);
   // Do something.
   VolumeSnapshot response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateVolumeSnapshotRequest,VolumeSnapshot>

deleteNfsShareAsync(DeleteNfsShareRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteNfsShareAsync(DeleteNfsShareRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DeleteNfsShareRequest request =
       DeleteNfsShareRequest.newBuilder()
           .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString())
           .build();
   bareMetalSolutionClient.deleteNfsShareAsync(request).get();
 }
 
Parameter
Name Description
request DeleteNfsShareRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteNfsShareAsync(NFSShareName name)

public final OperationFuture<Empty,OperationMetadata> deleteNfsShareAsync(NFSShareName name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   NFSShareName name = NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]");
   bareMetalSolutionClient.deleteNfsShareAsync(name).get();
 }
 
Parameter
Name Description
name NFSShareName

Required. The name of the NFS share to delete.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteNfsShareAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteNfsShareAsync(String name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String name = NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString();
   bareMetalSolutionClient.deleteNfsShareAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the NFS share to delete.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteNfsShareCallable()

public final UnaryCallable<DeleteNfsShareRequest,Operation> deleteNfsShareCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DeleteNfsShareRequest request =
       DeleteNfsShareRequest.newBuilder()
           .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString())
           .build();
   ApiFuture<Operation> future =
       bareMetalSolutionClient.deleteNfsShareCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteNfsShareRequest,Operation>

deleteNfsShareOperationCallable()

public final OperationCallable<DeleteNfsShareRequest,Empty,OperationMetadata> deleteNfsShareOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DeleteNfsShareRequest request =
       DeleteNfsShareRequest.newBuilder()
           .setName(NFSShareName.of("[PROJECT]", "[LOCATION]", "[NFS_SHARE]").toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       bareMetalSolutionClient.deleteNfsShareOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteNfsShareRequest,Empty,OperationMetadata>

deleteSSHKey(DeleteSSHKeyRequest request)

public final void deleteSSHKey(DeleteSSHKeyRequest request)

Deletes a public SSH key registered in the specified project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DeleteSSHKeyRequest request =
       DeleteSSHKeyRequest.newBuilder()
           .setName(SshKeyName.of("[PROJECT]", "[LOCATION]", "[SSH_KEY]").toString())
           .build();
   bareMetalSolutionClient.deleteSSHKey(request);
 }
 
Parameter
Name Description
request DeleteSSHKeyRequest

The request object containing all of the parameters for the API call.

deleteSSHKey(SshKeyName name)

public final void deleteSSHKey(SshKeyName name)

Deletes a public SSH key registered in the specified project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   SshKeyName name = SshKeyName.of("[PROJECT]", "[LOCATION]", "[SSH_KEY]");
   bareMetalSolutionClient.deleteSSHKey(name);
 }
 
Parameter
Name Description
name SshKeyName

Required. The name of the SSH key to delete. Currently, the only valid value for the location is "global".

deleteSSHKey(String name)

public final void deleteSSHKey(String name)

Deletes a public SSH key registered in the specified project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String name = SshKeyName.of("[PROJECT]", "[LOCATION]", "[SSH_KEY]").toString();
   bareMetalSolutionClient.deleteSSHKey(name);
 }
 
Parameter
Name Description
name String

Required. The name of the SSH key to delete. Currently, the only valid value for the location is "global".

deleteSSHKeyCallable()

public final UnaryCallable<DeleteSSHKeyRequest,Empty> deleteSSHKeyCallable()

Deletes a public SSH key registered in the specified project.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DeleteSSHKeyRequest request =
       DeleteSSHKeyRequest.newBuilder()
           .setName(SshKeyName.of("[PROJECT]", "[LOCATION]", "[SSH_KEY]").toString())
           .build();
   ApiFuture<Empty> future = bareMetalSolutionClient.deleteSSHKeyCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteSSHKeyRequest,Empty>

deleteVolumeSnapshot(DeleteVolumeSnapshotRequest request)

public final void deleteVolumeSnapshot(DeleteVolumeSnapshotRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DeleteVolumeSnapshotRequest request =
       DeleteVolumeSnapshotRequest.newBuilder()
           .setName(
               VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
                   .toString())
           .build();
   bareMetalSolutionClient.deleteVolumeSnapshot(request);
 }
 
Parameter
Name Description
request DeleteVolumeSnapshotRequest

The request object containing all of the parameters for the API call.

deleteVolumeSnapshot(VolumeSnapshotName name)

public final void deleteVolumeSnapshot(VolumeSnapshotName name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   VolumeSnapshotName name =
       VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]");
   bareMetalSolutionClient.deleteVolumeSnapshot(name);
 }
 
Parameter
Name Description
name VolumeSnapshotName

Required. The name of the snapshot to delete.

deleteVolumeSnapshot(String name)

public final void deleteVolumeSnapshot(String name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String name =
       VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString();
   bareMetalSolutionClient.deleteVolumeSnapshot(name);
 }
 
Parameter
Name Description
name String

Required. The name of the snapshot to delete.

deleteVolumeSnapshotCallable()

public final UnaryCallable<DeleteVolumeSnapshotRequest,Empty> deleteVolumeSnapshotCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DeleteVolumeSnapshotRequest request =
       DeleteVolumeSnapshotRequest.newBuilder()
           .setName(
               VolumeSnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]")
                   .toString())
           .build();
   ApiFuture<Empty> future =
       bareMetalSolutionClient.deleteVolumeSnapshotCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteVolumeSnapshotRequest,Empty>

detachLunAsync(DetachLunRequest request)

public final OperationFuture<Instance,OperationMetadata> detachLunAsync(DetachLunRequest request)

Detach LUN from Instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DetachLunRequest request =
       DetachLunRequest.newBuilder()
           .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .setLun(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
           .setSkipReboot(true)
           .build();
   Instance response = bareMetalSolutionClient.detachLunAsync(request).get();
 }
 
Parameter
Name Description
request DetachLunRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Instance,OperationMetadata>

detachLunAsync(InstanceName instance, LunName lun)

public final OperationFuture<Instance,OperationMetadata> detachLunAsync(InstanceName instance, LunName lun)

Detach LUN from Instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
   Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get();
 }
 
Parameters
Name Description
instance InstanceName

Required. Name of the instance.

lun LunName

Required. Name of the Lun to detach.

Returns
Type Description
OperationFuture<Instance,OperationMetadata>

detachLunAsync(InstanceName instance, String lun)

public final OperationFuture<Instance,OperationMetadata> detachLunAsync(InstanceName instance, String lun)

Detach LUN from Instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   String lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString();
   Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get();
 }
 
Parameters
Name Description
instance InstanceName

Required. Name of the instance.

lun String

Required. Name of the Lun to detach.

Returns
Type Description
OperationFuture<Instance,OperationMetadata>

detachLunAsync(String instance, LunName lun)

public final OperationFuture<Instance,OperationMetadata> detachLunAsync(String instance, LunName lun)

Detach LUN from Instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
   LunName lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
   Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get();
 }
 
Parameters
Name Description
instance String

Required. Name of the instance.

lun LunName

Required. Name of the Lun to detach.

Returns
Type Description
OperationFuture<Instance,OperationMetadata>

detachLunAsync(String instance, String lun)

public final OperationFuture<Instance,OperationMetadata> detachLunAsync(String instance, String lun)

Detach LUN from Instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
   String lun = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString();
   Instance response = bareMetalSolutionClient.detachLunAsync(instance, lun).get();
 }
 
Parameters
Name Description
instance String

Required. Name of the instance.

lun String

Required. Name of the Lun to detach.

Returns
Type Description
OperationFuture<Instance,OperationMetadata>

detachLunCallable()

public final UnaryCallable<DetachLunRequest,Operation> detachLunCallable()

Detach LUN from Instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DetachLunRequest request =
       DetachLunRequest.newBuilder()
           .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .setLun(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
           .setSkipReboot(true)
           .build();
   ApiFuture<Operation> future = bareMetalSolutionClient.detachLunCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<DetachLunRequest,Operation>

detachLunOperationCallable()

public final OperationCallable<DetachLunRequest,Instance,OperationMetadata> detachLunOperationCallable()

Detach LUN from Instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DetachLunRequest request =
       DetachLunRequest.newBuilder()
           .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .setLun(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
           .setSkipReboot(true)
           .build();
   OperationFuture<Instance, OperationMetadata> future =
       bareMetalSolutionClient.detachLunOperationCallable().futureCall(request);
   // Do something.
   Instance response = future.get();
 }
 
Returns
Type Description
OperationCallable<DetachLunRequest,Instance,OperationMetadata>

disableInteractiveSerialConsoleAsync(DisableInteractiveSerialConsoleRequest request)

public final OperationFuture<DisableInteractiveSerialConsoleResponse,OperationMetadata> disableInteractiveSerialConsoleAsync(DisableInteractiveSerialConsoleRequest request)

Disable the interactive serial console feature on an instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DisableInteractiveSerialConsoleRequest request =
       DisableInteractiveSerialConsoleRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   DisableInteractiveSerialConsoleResponse response =
       bareMetalSolutionClient.disableInteractiveSerialConsoleAsync(request).get();
 }
 
Parameter
Name Description
request DisableInteractiveSerialConsoleRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<DisableInteractiveSerialConsoleResponse,OperationMetadata>

disableInteractiveSerialConsoleAsync(InstanceName name)

public final OperationFuture<DisableInteractiveSerialConsoleResponse,OperationMetadata> disableInteractiveSerialConsoleAsync(InstanceName name)

Disable the interactive serial console feature on an instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   DisableInteractiveSerialConsoleResponse response =
       bareMetalSolutionClient.disableInteractiveSerialConsoleAsync(name).get();
 }
 
Parameter
Name Description
name InstanceName

Required. Name of the resource.

Returns
Type Description
OperationFuture<DisableInteractiveSerialConsoleResponse,OperationMetadata>

disableInteractiveSerialConsoleAsync(String name)

public final OperationFuture<DisableInteractiveSerialConsoleResponse,OperationMetadata> disableInteractiveSerialConsoleAsync(String name)

Disable the interactive serial console feature on an instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
   DisableInteractiveSerialConsoleResponse response =
       bareMetalSolutionClient.disableInteractiveSerialConsoleAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
OperationFuture<DisableInteractiveSerialConsoleResponse,OperationMetadata>

disableInteractiveSerialConsoleCallable()

public final UnaryCallable<DisableInteractiveSerialConsoleRequest,Operation> disableInteractiveSerialConsoleCallable()

Disable the interactive serial console feature on an instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DisableInteractiveSerialConsoleRequest request =
       DisableInteractiveSerialConsoleRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   ApiFuture<Operation> future =
       bareMetalSolutionClient.disableInteractiveSerialConsoleCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<DisableInteractiveSerialConsoleRequest,Operation>

disableInteractiveSerialConsoleOperationCallable()

public final OperationCallable<DisableInteractiveSerialConsoleRequest,DisableInteractiveSerialConsoleResponse,OperationMetadata> disableInteractiveSerialConsoleOperationCallable()

Disable the interactive serial console feature on an instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   DisableInteractiveSerialConsoleRequest request =
       DisableInteractiveSerialConsoleRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   OperationFuture<DisableInteractiveSerialConsoleResponse, OperationMetadata> future =
       bareMetalSolutionClient
           .disableInteractiveSerialConsoleOperationCallable()
           .futureCall(request);
   // Do something.
   DisableInteractiveSerialConsoleResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<DisableInteractiveSerialConsoleRequest,DisableInteractiveSerialConsoleResponse,OperationMetadata>

enableInteractiveSerialConsoleAsync(EnableInteractiveSerialConsoleRequest request)

public final OperationFuture<EnableInteractiveSerialConsoleResponse,OperationMetadata> enableInteractiveSerialConsoleAsync(EnableInteractiveSerialConsoleRequest request)

Enable the interactive serial console feature on an instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   EnableInteractiveSerialConsoleRequest request =
       EnableInteractiveSerialConsoleRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   EnableInteractiveSerialConsoleResponse response =
       bareMetalSolutionClient.enableInteractiveSerialConsoleAsync(request).get();
 }
 
Parameter
Name Description
request EnableInteractiveSerialConsoleRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<EnableInteractiveSerialConsoleResponse,OperationMetadata>

enableInteractiveSerialConsoleAsync(InstanceName name)

public final OperationFuture<EnableInteractiveSerialConsoleResponse,OperationMetadata> enableInteractiveSerialConsoleAsync(InstanceName name)

Enable the interactive serial console feature on an instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   EnableInteractiveSerialConsoleResponse response =
       bareMetalSolutionClient.enableInteractiveSerialConsoleAsync(name).get();
 }
 
Parameter
Name Description
name InstanceName

Required. Name of the resource.

Returns
Type Description
OperationFuture<EnableInteractiveSerialConsoleResponse,OperationMetadata>

enableInteractiveSerialConsoleAsync(String name)

public final OperationFuture<EnableInteractiveSerialConsoleResponse,OperationMetadata> enableInteractiveSerialConsoleAsync(String name)

Enable the interactive serial console feature on an instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
   EnableInteractiveSerialConsoleResponse response =
       bareMetalSolutionClient.enableInteractiveSerialConsoleAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
OperationFuture<EnableInteractiveSerialConsoleResponse,OperationMetadata>

enableInteractiveSerialConsoleCallable()

public final UnaryCallable<EnableInteractiveSerialConsoleRequest,Operation> enableInteractiveSerialConsoleCallable()

Enable the interactive serial console feature on an instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   EnableInteractiveSerialConsoleRequest request =
       EnableInteractiveSerialConsoleRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   ApiFuture<Operation> future =
       bareMetalSolutionClient.enableInteractiveSerialConsoleCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<EnableInteractiveSerialConsoleRequest,Operation>

enableInteractiveSerialConsoleOperationCallable()

public final OperationCallable<EnableInteractiveSerialConsoleRequest,EnableInteractiveSerialConsoleResponse,OperationMetadata> enableInteractiveSerialConsoleOperationCallable()

Enable the interactive serial console feature on an instance.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   EnableInteractiveSerialConsoleRequest request =
       EnableInteractiveSerialConsoleRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   OperationFuture<EnableInteractiveSerialConsoleResponse, OperationMetadata> future =
       bareMetalSolutionClient
           .enableInteractiveSerialConsoleOperationCallable()
           .futureCall(request);
   // Do something.
   EnableInteractiveSerialConsoleResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<EnableInteractiveSerialConsoleRequest,EnableInteractiveSerialConsoleResponse,OperationMetadata>

evictLunAsync(EvictLunRequest request)

public final OperationFuture<Empty,OperationMetadata> evictLunAsync(EvictLunRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   EvictLunRequest request =
       EvictLunRequest.newBuilder()
           .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
           .build();
   bareMetalSolutionClient.evictLunAsync(request).get();
 }
 
Parameter
Name Description
request EvictLunRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

evictLunAsync(LunName name)

public final OperationFuture<Empty,OperationMetadata> evictLunAsync(LunName name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
   bareMetalSolutionClient.evictLunAsync(name).get();
 }
 
Parameter
Name Description
name LunName

Required. The name of the lun.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

evictLunAsync(String name)

public final OperationFuture<Empty,OperationMetadata> evictLunAsync(String name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString();
   bareMetalSolutionClient.evictLunAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the lun.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

evictLunCallable()

public final UnaryCallable<EvictLunRequest,Operation> evictLunCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   EvictLunRequest request =
       EvictLunRequest.newBuilder()
           .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
           .build();
   ApiFuture<Operation> future = bareMetalSolutionClient.evictLunCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<EvictLunRequest,Operation>

evictLunOperationCallable()

public final OperationCallable<EvictLunRequest,Empty,OperationMetadata> evictLunOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   EvictLunRequest request =
       EvictLunRequest.newBuilder()
           .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       bareMetalSolutionClient.evictLunOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<EvictLunRequest,Empty,OperationMetadata>

evictVolumeAsync(EvictVolumeRequest request)

public final OperationFuture<Empty,OperationMetadata> evictVolumeAsync(EvictVolumeRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   EvictVolumeRequest request =
       EvictVolumeRequest.newBuilder()
           .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
           .build();
   bareMetalSolutionClient.evictVolumeAsync(request).get();
 }
 
Parameter
Name Description
request EvictVolumeRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

evictVolumeAsync(VolumeName name)

public final OperationFuture<Empty,OperationMetadata> evictVolumeAsync(VolumeName name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
   bareMetalSolutionClient.evictVolumeAsync(name).get();
 }
 
Parameter
Name Description
name VolumeName

Required. The name of the Volume.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

evictVolumeAsync(String name)

public final OperationFuture<Empty,OperationMetadata> evictVolumeAsync(String name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
   bareMetalSolutionClient.evictVolumeAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the Volume.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

evictVolumeCallable()

public final UnaryCallable<EvictVolumeRequest,Operation> evictVolumeCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   EvictVolumeRequest request =
       EvictVolumeRequest.newBuilder()
           .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
           .build();
   ApiFuture<Operation> future =
       bareMetalSolutionClient.evictVolumeCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<EvictVolumeRequest,Operation>

evictVolumeOperationCallable()

public final OperationCallable<EvictVolumeRequest,Empty,OperationMetadata> evictVolumeOperationCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   EvictVolumeRequest request =
       EvictVolumeRequest.newBuilder()
           .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       bareMetalSolutionClient.evictVolumeOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<EvictVolumeRequest,Empty,OperationMetadata>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getInstance(GetInstanceRequest request)

public final Instance getInstance(GetInstanceRequest request)

Get details about a single server.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   GetInstanceRequest request =
       GetInstanceRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   Instance response = bareMetalSolutionClient.getInstance(request);
 }
 
Parameter
Name Description
request GetInstanceRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Instance

getInstance(InstanceName name)

public final Instance getInstance(InstanceName name)

Get details about a single server.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   Instance response = bareMetalSolutionClient.getInstance(name);
 }
 
Parameter
Name Description
name InstanceName

Required. Name of the resource.

Returns
Type Description
Instance

getInstance(String name)

public final Instance getInstance(String name)

Get details about a single server.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
   Instance response = bareMetalSolutionClient.getInstance(name);
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
Instance

getInstanceCallable()

public final UnaryCallable<GetInstanceRequest,Instance> getInstanceCallable()

Get details about a single server.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   GetInstanceRequest request =
       GetInstanceRequest.newBuilder()
           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
           .build();
   ApiFuture<Instance> future =
       bareMetalSolutionClient.getInstanceCallable().futureCall(request);
   // Do something.
   Instance response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetInstanceRequest,Instance>

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = bareMetalSolutionClient.getLocation(request);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future =
       bareMetalSolutionClient.getLocationCallable().futureCall(request);
   // Do something.
   Location response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getLun(GetLunRequest request)

public final Lun getLun(GetLunRequest request)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   GetLunRequest request =
       GetLunRequest.newBuilder()
           .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
           .build();
   Lun response = bareMetalSolutionClient.getLun(request);
 }
 
Parameter
Name Description
request GetLunRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Lun

getLun(LunName name)

public final Lun getLun(LunName name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   LunName name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]");
   Lun response = bareMetalSolutionClient.getLun(name);
 }
 
Parameter
Name Description
name LunName

Required. Name of the resource.

Returns
Type Description
Lun

getLun(String name)

public final Lun getLun(String name)

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   String name = LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString();
   Lun response = bareMetalSolutionClient.getLun(name);
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
Lun

getLunCallable()

public final UnaryCallable<GetLunRequest,Lun> getLunCallable()

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

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BareMetalSolutionClient bareMetalSolutionClient = BareMetalSolutionClient.create()) {
   GetLunRequest request =
       GetLunRequest.newBuilder()
           .setName(LunName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[LUN]").toString())
           .build();
   ApiFuture<Lun> future