pub struct UpcloudApi { /* private fields */ }
Implementations§
Source§impl<'a> UpcloudApi
impl<'a> UpcloudApi
pub fn new<S1, S2>(username: S1, password: S2) -> UpcloudApi
pub async fn get_account_info_async( &self, ) -> Result<UpcloudAccount, UpcloudError>
pub async fn get_account_list_async( &self, ) -> Result<Vec<UpcloudAccountsListItem>, UpcloudError>
pub async fn get_prices_async( &self, ) -> Result<Vec<UpcloudPricesZone>, UpcloudError>
pub async fn get_zones_async(&self) -> Result<Vec<UpcloudZone>, UpcloudError>
pub async fn get_plans_async(&self) -> Result<Vec<UpcloudPlan>, UpcloudError>
pub async fn get_servers_async( &self, ) -> Result<Vec<UpcloudServer>, UpcloudError>
pub async fn get_server_details_async( &self, machine_id: &str, ) -> Result<UpcloudServer, UpcloudError>
pub async fn get_server_templates_async( &self, ) -> Result<Vec<UpcloudServerTemplate>, UpcloudError>
Sourcepub fn create_instance<S1, S2, S3, S4, S5>(
&self,
region_id: S1,
plan_id: S2,
os_id: S3,
title: S4,
hostname: S5,
) -> CreateInstanceBuilder
pub fn create_instance<S1, S2, S3, S4, S5>( &self, region_id: S1, plan_id: S2, os_id: S3, title: S4, hostname: S5, ) -> CreateInstanceBuilder
More information at https://developers.upcloud.com/1.3/8-servers/#create-server
pub async fn delete_instance_async( &self, machine_uuid: &str, ) -> Result<(), UpcloudError>
pub async fn stop_instance_async( &self, machine_uuid: &str, ) -> Result<UpcloudServer, UpcloudError>
Trait Implementations§
Source§impl Clone for UpcloudApi
impl Clone for UpcloudApi
Source§fn clone(&self) -> UpcloudApi
fn clone(&self) -> UpcloudApi
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for UpcloudApi
impl RefUnwindSafe for UpcloudApi
impl Send for UpcloudApi
impl Sync for UpcloudApi
impl Unpin for UpcloudApi
impl UnwindSafe for UpcloudApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more