Struct upcloud_rs::UpcloudApi
source · pub struct UpcloudApi { /* private fields */ }Implementations§
source§impl<'a> UpcloudApi
impl<'a> UpcloudApi
pub fn new<S1, S2>(username: S1, password: S2) -> UpcloudApiwhere S1: Into<String>, S2: Into<String>,
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_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
) -> CreateInstanceBuilderwhere
S1: Into<String> + Serialize,
S2: Into<String> + Serialize,
S3: Into<String> + Serialize,
S4: Into<String> + Serialize,
S5: Into<String> + Serialize,
pub fn create_instance<S1, S2, S3, S4, S5>( &self, region_id: S1, plan_id: S2, os_id: S3, title: S4, hostname: S5 ) -> CreateInstanceBuilderwhere S1: Into<String> + Serialize, S2: Into<String> + Serialize, S3: Into<String> + Serialize, S4: Into<String> + Serialize, S5: Into<String> + Serialize,
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 copy 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 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