pub struct BareMetalSolution { /* private fields */ }Expand description
Implements a client for the Bare Metal Solution API.
§Example
let client = BareMetalSolution::builder().build().await?;
// use `client` to make requests to the Bare Metal Solution API.§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.
§Configuration
To configure BareMetalSolution use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://baremetalsolution.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
BareMetalSolution holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap BareMetalSolution in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl BareMetalSolution
impl BareMetalSolution
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for BareMetalSolution.
let client = BareMetalSolution::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: BareMetalSolution + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: BareMetalSolution + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn list_instances(&self) -> ListInstances
pub fn list_instances(&self) -> ListInstances
List servers in a given project and location.
Sourcepub fn get_instance(&self) -> GetInstance
pub fn get_instance(&self) -> GetInstance
Get details about a single server.
Sourcepub fn update_instance(&self) -> UpdateInstance
pub fn update_instance(&self) -> UpdateInstance
Update details of a single server.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn rename_instance(&self) -> RenameInstance
pub fn rename_instance(&self) -> RenameInstance
RenameInstance sets a new name for an instance. Use with caution, previous names become immediately invalidated.
Sourcepub fn reset_instance(&self) -> ResetInstance
pub fn reset_instance(&self) -> ResetInstance
Perform an ungraceful, hard reset on a server. Equivalent to shutting the power off and then turning it back on.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn start_instance(&self) -> StartInstance
pub fn start_instance(&self) -> StartInstance
Starts a server that was shutdown.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn stop_instance(&self) -> StopInstance
pub fn stop_instance(&self) -> StopInstance
Stop a running server.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn enable_interactive_serial_console(
&self,
) -> EnableInteractiveSerialConsole
pub fn enable_interactive_serial_console( &self, ) -> EnableInteractiveSerialConsole
Enable the interactive serial console feature on an instance.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn disable_interactive_serial_console(
&self,
) -> DisableInteractiveSerialConsole
pub fn disable_interactive_serial_console( &self, ) -> DisableInteractiveSerialConsole
Disable the interactive serial console feature on an instance.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn detach_lun(&self) -> DetachLun
pub fn detach_lun(&self) -> DetachLun
Detach LUN from Instance.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_ssh_keys(&self) -> ListSSHKeys
pub fn list_ssh_keys(&self) -> ListSSHKeys
Lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature.
Sourcepub fn create_ssh_key(&self) -> CreateSSHKey
pub fn create_ssh_key(&self) -> CreateSSHKey
Register a public SSH key in the specified project for use with the interactive serial console feature.
Sourcepub fn delete_ssh_key(&self) -> DeleteSSHKey
pub fn delete_ssh_key(&self) -> DeleteSSHKey
Deletes a public SSH key registered in the specified project.
Sourcepub fn list_volumes(&self) -> ListVolumes
pub fn list_volumes(&self) -> ListVolumes
List storage volumes in a given project and location.
Sourcepub fn get_volume(&self) -> GetVolume
pub fn get_volume(&self) -> GetVolume
Get details of a single storage volume.
Sourcepub fn update_volume(&self) -> UpdateVolume
pub fn update_volume(&self) -> UpdateVolume
Update details of a single storage volume.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn rename_volume(&self) -> RenameVolume
pub fn rename_volume(&self) -> RenameVolume
RenameVolume sets a new name for a volume. Use with caution, previous names become immediately invalidated.
Sourcepub fn evict_volume(&self) -> EvictVolume
pub fn evict_volume(&self) -> EvictVolume
Skips volume’s cooloff and deletes it now. Volume must be in cooloff state.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn resize_volume(&self) -> ResizeVolume
pub fn resize_volume(&self) -> ResizeVolume
Emergency Volume resize.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_networks(&self) -> ListNetworks
pub fn list_networks(&self) -> ListNetworks
List network in a given project and location.
Sourcepub fn list_network_usage(&self) -> ListNetworkUsage
pub fn list_network_usage(&self) -> ListNetworkUsage
List all Networks (and used IPs for each Network) in the vendor account associated with the specified project.
Sourcepub fn get_network(&self) -> GetNetwork
pub fn get_network(&self) -> GetNetwork
Get details of a single network.
Sourcepub fn update_network(&self) -> UpdateNetwork
pub fn update_network(&self) -> UpdateNetwork
Update details of a single network.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn create_volume_snapshot(&self) -> CreateVolumeSnapshot
pub fn create_volume_snapshot(&self) -> CreateVolumeSnapshot
Takes a snapshot of a boot volume. Returns INVALID_ARGUMENT if called for a non-boot volume.
Sourcepub fn restore_volume_snapshot(&self) -> RestoreVolumeSnapshot
pub fn restore_volume_snapshot(&self) -> RestoreVolumeSnapshot
Uses the specified snapshot to restore its parent volume. Returns INVALID_ARGUMENT if called for a non-boot volume.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn delete_volume_snapshot(&self) -> DeleteVolumeSnapshot
pub fn delete_volume_snapshot(&self) -> DeleteVolumeSnapshot
Deletes a volume snapshot. Returns INVALID_ARGUMENT if called for a non-boot volume.
Sourcepub fn get_volume_snapshot(&self) -> GetVolumeSnapshot
pub fn get_volume_snapshot(&self) -> GetVolumeSnapshot
Returns the specified snapshot resource. Returns INVALID_ARGUMENT if called for a non-boot volume.
Sourcepub fn list_volume_snapshots(&self) -> ListVolumeSnapshots
pub fn list_volume_snapshots(&self) -> 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.
Sourcepub fn evict_lun(&self) -> EvictLun
pub fn evict_lun(&self) -> EvictLun
Skips lun’s cooloff and deletes it now. Lun must be in cooloff state.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Get details of a single NFS share.
List NFS shares.
Update details of a single NFS share.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Create an NFS share.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
RenameNfsShare sets a new name for an nfsshare. Use with caution, previous names become immediately invalidated.
Delete an NFS share. The underlying volume is automatically deleted.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_provisioning_quotas(&self) -> ListProvisioningQuotas
pub fn list_provisioning_quotas(&self) -> ListProvisioningQuotas
List the budget details to provision resources on a given project.
Sourcepub fn submit_provisioning_config(&self) -> SubmitProvisioningConfig
pub fn submit_provisioning_config(&self) -> SubmitProvisioningConfig
Submit a provisiong configuration for a given project.
Sourcepub fn get_provisioning_config(&self) -> GetProvisioningConfig
pub fn get_provisioning_config(&self) -> GetProvisioningConfig
Get ProvisioningConfig by name.
Sourcepub fn create_provisioning_config(&self) -> CreateProvisioningConfig
pub fn create_provisioning_config(&self) -> CreateProvisioningConfig
Create new ProvisioningConfig.
Sourcepub fn update_provisioning_config(&self) -> UpdateProvisioningConfig
pub fn update_provisioning_config(&self) -> UpdateProvisioningConfig
Update existing ProvisioningConfig.
Sourcepub fn rename_network(&self) -> RenameNetwork
pub fn rename_network(&self) -> RenameNetwork
RenameNetwork sets a new name for a network. Use with caution, previous names become immediately invalidated.
Sourcepub fn list_os_images(&self) -> ListOSImages
pub fn list_os_images(&self) -> ListOSImages
Retrieves the list of OS images which are currently approved.
Sourcepub fn list_locations(&self) -> ListLocations
pub fn list_locations(&self) -> ListLocations
Lists information about the supported locations for this service.
Sourcepub fn get_location(&self) -> GetLocation
pub fn get_location(&self) -> GetLocation
Gets information about a location.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for BareMetalSolution
impl Clone for BareMetalSolution
Source§fn clone(&self) -> BareMetalSolution
fn clone(&self) -> BareMetalSolution
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more