pub struct BareMetalSolution { /* private fields */ }Expand description
Implements a client for the Bare Metal Solution API.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
let client = BareMetalSolution::builder().build().await?;
let parent = "parent_value";
let mut list = client.list_instances()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}§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 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.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let mut list = client.list_instances()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn get_instance(&self) -> GetInstance
pub fn get_instance(&self) -> GetInstance
Get details about a single server.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.get_instance()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_wkt::FieldMask;
use google_cloud_baremetalsolution_v2::model::Instance;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.update_instance()
.set_instance(
Instance::new().set_name(name)/* set fields */
)
.set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.rename_instance()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.reset_instance()
/* set fields */
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.start_instance()
/* set fields */
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.stop_instance()
/* set fields */
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.enable_interactive_serial_console()
/* set fields */
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.disable_interactive_serial_console()
/* set fields */
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.detach_lun()
/* set fields */
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let mut list = client.list_ssh_keys()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_baremetalsolution_v2::model::SSHKey;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let response = client.create_ssh_key()
.set_parent(parent)
.set_ssh_key(
SSHKey::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn delete_ssh_key(&self) -> DeleteSSHKey
pub fn delete_ssh_key(&self) -> DeleteSSHKey
Deletes a public SSH key registered in the specified project.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
client.delete_ssh_key()
.set_name(name)
.send().await?;
Ok(())
}Sourcepub fn list_volumes(&self) -> ListVolumes
pub fn list_volumes(&self) -> ListVolumes
List storage volumes in a given project and location.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let mut list = client.list_volumes()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn get_volume(&self) -> GetVolume
pub fn get_volume(&self) -> GetVolume
Get details of a single storage volume.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.get_volume()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_wkt::FieldMask;
use google_cloud_baremetalsolution_v2::model::Volume;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.update_volume()
.set_volume(
Volume::new().set_name(name)/* set fields */
)
.set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.rename_volume()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
client.evict_volume()
/* set fields */
.poller().until_done().await?;
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.resize_volume()
/* set fields */
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_networks(&self) -> ListNetworks
pub fn list_networks(&self) -> ListNetworks
List network in a given project and location.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let mut list = client.list_networks()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.list_network_usage()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn get_network(&self) -> GetNetwork
pub fn get_network(&self) -> GetNetwork
Get details of a single network.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.get_network()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_wkt::FieldMask;
use google_cloud_baremetalsolution_v2::model::Network;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.update_network()
.set_network(
Network::new().set_name(name)/* set fields */
)
.set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_baremetalsolution_v2::model::VolumeSnapshot;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let response = client.create_volume_snapshot()
.set_parent(parent)
.set_volume_snapshot(
VolumeSnapshot::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.restore_volume_snapshot()
/* set fields */
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
client.delete_volume_snapshot()
.set_name(name)
.send().await?;
Ok(())
}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.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.get_volume_snapshot()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let mut list = client.list_volume_snapshots()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn get_lun(&self) -> GetLun
pub fn get_lun(&self) -> GetLun
Get details of a single storage logical unit number(LUN).
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.get_lun()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_luns(&self) -> ListLuns
pub fn list_luns(&self) -> ListLuns
List storage volume luns for given storage volume.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let mut list = client.list_luns()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
client.evict_lun()
/* set fields */
.poller().until_done().await?;
Ok(())
}Get details of a single NFS share.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.get_nfs_share()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}List NFS shares.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let mut list = client.list_nfs_shares()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_wkt::FieldMask;
use google_cloud_baremetalsolution_v2::model::NfsShare;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.update_nfs_share()
.set_nfs_share(
NfsShare::new().set_name(name)/* set fields */
)
.set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::model::NfsShare;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let response = client.create_nfs_share()
.set_parent(parent)
.set_nfs_share(
NfsShare::new()/* set fields */
)
.poller().until_done().await?;
println!("response {:?}", response);
Ok(())
}RenameNfsShare sets a new name for an nfsshare. Use with caution, previous names become immediately invalidated.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.rename_nfs_share()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_lro::Poller;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
client.delete_nfs_share()
.set_name(name)
.poller().until_done().await?;
Ok(())
}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.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let mut list = client.list_provisioning_quotas()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn submit_provisioning_config(&self) -> SubmitProvisioningConfig
pub fn submit_provisioning_config(&self) -> SubmitProvisioningConfig
Submit a provisiong configuration for a given project.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.submit_provisioning_config()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn get_provisioning_config(&self) -> GetProvisioningConfig
pub fn get_provisioning_config(&self) -> GetProvisioningConfig
Get ProvisioningConfig by name.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.get_provisioning_config()
.set_name(name)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn create_provisioning_config(&self) -> CreateProvisioningConfig
pub fn create_provisioning_config(&self) -> CreateProvisioningConfig
Create new ProvisioningConfig.
§Example
use google_cloud_baremetalsolution_v2::model::ProvisioningConfig;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let response = client.create_provisioning_config()
.set_parent(parent)
.set_provisioning_config(
ProvisioningConfig::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn update_provisioning_config(&self) -> UpdateProvisioningConfig
pub fn update_provisioning_config(&self) -> UpdateProvisioningConfig
Update existing ProvisioningConfig.
§Example
use google_cloud_wkt::FieldMask;
use google_cloud_baremetalsolution_v2::model::ProvisioningConfig;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, name: &str
) -> Result<()> {
let response = client.update_provisioning_config()
.set_provisioning_config(
ProvisioningConfig::new().set_name(name)/* set fields */
)
.set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
.send().await?;
println!("response {:?}", response);
Ok(())
}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.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.rename_network()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_os_images(&self) -> ListOSImages
pub fn list_os_images(&self) -> ListOSImages
Retrieves the list of OS images which are currently approved.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution, parent: &str
) -> Result<()> {
let mut list = client.list_os_images()
.set_parent(parent)
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn list_locations(&self) -> ListLocations
pub fn list_locations(&self) -> ListLocations
Lists information about the supported locations for this service.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let mut list = client.list_locations()
/* set fields */
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn get_location(&self) -> GetLocation
pub fn get_location(&self) -> GetLocation
Gets information about a location.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.get_location()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_baremetalsolution_v2::Result;
async fn sample(
client: &BareMetalSolution
) -> Result<()> {
let response = client.get_operation()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}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