sui_aws_orchestrator::client

Trait ServerProviderClient

Source
pub trait ServerProviderClient: Display {
    const USERNAME: &'static str;

    // Required methods
    fn list_instances<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = CloudProviderResult<Vec<Instance>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn start_instances<'a, 'life0, 'async_trait, I>(
        &'life0 self,
        instances: I,
    ) -> Pin<Box<dyn Future<Output = CloudProviderResult<()>> + Send + 'async_trait>>
       where I: Iterator<Item = &'a Instance> + Send + 'async_trait,
             Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;
    fn stop_instances<'a, 'life0, 'async_trait, I>(
        &'life0 self,
        instance_ids: I,
    ) -> Pin<Box<dyn Future<Output = CloudProviderResult<()>> + Send + 'async_trait>>
       where I: Iterator<Item = &'a Instance> + Send + 'async_trait,
             Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;
    fn create_instance<'life0, 'async_trait, S>(
        &'life0 self,
        region: S,
    ) -> Pin<Box<dyn Future<Output = CloudProviderResult<Instance>> + Send + 'async_trait>>
       where S: Into<String> + Serialize + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_instance<'life0, 'async_trait>(
        &'life0 self,
        instance: Instance,
    ) -> Pin<Box<dyn Future<Output = CloudProviderResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn register_ssh_public_key<'life0, 'async_trait>(
        &'life0 self,
        public_key: String,
    ) -> Pin<Box<dyn Future<Output = CloudProviderResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn instance_setup_commands<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = CloudProviderResult<Vec<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Constants§

Source

const USERNAME: &'static str

The username used to connect to the instances.

Required Methods§

Source

fn list_instances<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = CloudProviderResult<Vec<Instance>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all existing instances (regardless of their status).

Source

fn start_instances<'a, 'life0, 'async_trait, I>( &'life0 self, instances: I, ) -> Pin<Box<dyn Future<Output = CloudProviderResult<()>> + Send + 'async_trait>>
where I: Iterator<Item = &'a Instance> + Send + 'async_trait, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Start the specified instances.

Source

fn stop_instances<'a, 'life0, 'async_trait, I>( &'life0 self, instance_ids: I, ) -> Pin<Box<dyn Future<Output = CloudProviderResult<()>> + Send + 'async_trait>>
where I: Iterator<Item = &'a Instance> + Send + 'async_trait, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Halt/Stop the specified instances. We may still be billed for stopped instances.

Source

fn create_instance<'life0, 'async_trait, S>( &'life0 self, region: S, ) -> Pin<Box<dyn Future<Output = CloudProviderResult<Instance>> + Send + 'async_trait>>
where S: Into<String> + Serialize + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Create an instance in a specific region.

Source

fn delete_instance<'life0, 'async_trait>( &'life0 self, instance: Instance, ) -> Pin<Box<dyn Future<Output = CloudProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a specific instance. Calling this function ensures we are no longer billed for the specified instance.

Source

fn register_ssh_public_key<'life0, 'async_trait>( &'life0 self, public_key: String, ) -> Pin<Box<dyn Future<Output = CloudProviderResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Authorize the provided ssh public key to access machines.

Source

fn instance_setup_commands<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = CloudProviderResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return provider-specific commands to setup the instance.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ServerProviderClient for AwsClient

Source§

const USERNAME: &'static str = "ubuntu"