Skip to main content

AwsClientConfigExt

Trait AwsClientConfigExt 

Source
pub trait AwsClientConfigExt {
    // Required methods
    fn from_env<'life0, 'async_trait>(
        environment_variables: &'life0 HashMap<String, String>,
    ) -> Pin<Box<dyn Future<Output = Result<AwsClientConfig>> + Send + 'async_trait>>
       where 'life0: 'async_trait;
    fn from_std_env<'async_trait>(    ) -> Pin<Box<dyn Future<Output = Result<AwsClientConfig>> + Send + 'async_trait>>;
    fn impersonate<'life0, 'async_trait>(
        &'life0 self,
        config: AwsImpersonationConfig,
    ) -> Pin<Box<dyn Future<Output = Result<AwsClientConfig>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_credentials(&self) -> Credentials;
    fn get_web_identity_credentials<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<AwsClientConfig>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_service_endpoint(
        &self,
        service_name: &str,
        default_endpoint: &str,
    ) -> String;
    fn get_service_endpoint_option(&self, service_name: &str) -> Option<&str>;
}
Expand description

Trait for AWS platform configuration operations

Required Methods§

Source

fn from_env<'life0, 'async_trait>( environment_variables: &'life0 HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<AwsClientConfig>> + Send + 'async_trait>>
where 'life0: 'async_trait,

Create a new AwsClientConfig from environment variables.

Source

fn from_std_env<'async_trait>() -> Pin<Box<dyn Future<Output = Result<AwsClientConfig>> + Send + 'async_trait>>

Create a new AwsClientConfig from standard environment variables.

Source

fn impersonate<'life0, 'async_trait>( &'life0 self, config: AwsImpersonationConfig, ) -> Pin<Box<dyn Future<Output = Result<AwsClientConfig>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Assume an AWS IAM role and return a new platform config with the assumed credentials

Source

fn get_credentials(&self) -> Credentials

Get AWS credentials from this config

Source

fn get_web_identity_credentials<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<AwsClientConfig>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get credentials for web identity token authentication

Source

fn get_service_endpoint( &self, service_name: &str, default_endpoint: &str, ) -> String

Get service endpoint, checking for overrides first

Source

fn get_service_endpoint_option(&self, service_name: &str) -> Option<&str>

Get the endpoint for a specific service, with override support (returns Option)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§