Struct rusoto_credential::ProfileProvider [−][src]
pub struct ProfileProvider { /* fields omitted */ }
Expand description
Provides AWS credentials from a profile in a credentials file, or from a credential process.
Warning
This provider allows the credential_process
option, a method of
sourcing credentials from an external process. This can potentially be dangerous, so proceed
with caution. Other credential providers should be preferred if at all possible. If using this
option, you should make sure that the config file is as locked down as possible using security
best practices for your operating system.
Implementations
Create a new ProfileProvider
for the default credentials file path and profile name.
pub fn with_configuration<F, P>(file_path: F, profile: P) -> ProfileProvider where
F: Into<PathBuf>,
P: Into<String>,
pub fn with_configuration<F, P>(file_path: F, profile: P) -> ProfileProvider where
F: Into<PathBuf>,
P: Into<String>,
Create a new ProfileProvider
for the credentials file at the given path, using
the given profile.
Create a new ProfileProvider
for the credentials file at the given path, using
the profile name from environment variable AWS_PROFILE
or fall-back to "default"
if AWS_PROFILE
is not set.
pub fn with_default_credentials<P>(
profile: P
) -> Result<ProfileProvider, CredentialsError> where
P: Into<String>,
pub fn with_default_credentials<P>(
profile: P
) -> Result<ProfileProvider, CredentialsError> where
P: Into<String>,
Create a new ProfileProvider
for the default credentials file path using
the given profile.
Attempts to resolve a region value associated with the current default profile from
~/.aws/config
or the file associated with the AWS_CONFIG_FILE
environment variable.
As these fields do not require a region field to be defined, an Option
type is returned
For a the ful region resolution chain, use the Default
impl for rusoto_core::Region
Attempts to resolve the region value associated with the current ProfileProvider
s
config file path (ProfileProvider.file_path
) and profile (ProfileProvider.profile
).
As these fields do not require a region field to be defined, an Option
type is returned
Set the credentials file path.
Set the profile name.
Trait Implementations
fn credentials<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<AwsCredentials, CredentialsError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn credentials<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<AwsCredentials, CredentialsError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Produce a new AwsCredentials
future.
Auto Trait Implementations
impl RefUnwindSafe for ProfileProvider
impl Send for ProfileProvider
impl Sync for ProfileProvider
impl Unpin for ProfileProvider
impl UnwindSafe for ProfileProvider
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more