[−][src]Struct rusoto_credential::ProfileProvider
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.
Methods
impl ProfileProvider
[src]
pub fn new() -> Result<ProfileProvider, CredentialsError>
[src]
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>,
[src]
F: Into<PathBuf>,
P: Into<String>,
Create a new ProfileProvider
for the credentials file at the given path, using
the given profile.
pub fn with_default_configuration<F>(file_path: F) -> ProfileProvider where
F: Into<PathBuf>,
[src]
F: Into<PathBuf>,
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 region() -> Result<Option<String>, CredentialsError>
[src]
Attempts to resolve a region value associated with the current 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
pub fn file_path(&self) -> &Path
[src]
Get a reference to the credentials file path.
pub fn profile(&self) -> &str
[src]
Get a reference to the profile name.
pub fn set_file_path<F>(&mut self, file_path: F) where
F: Into<PathBuf>,
[src]
F: Into<PathBuf>,
Set the credentials file path.
pub fn set_profile<P>(&mut self, profile: P) where
P: Into<String>,
[src]
P: Into<String>,
Set the profile name.
Trait Implementations
impl ProvideAwsCredentials for ProfileProvider
[src]
type Future = ProfileProviderFuture
The future response value.
fn credentials(&self) -> Self::Future
[src]
impl Clone for ProfileProvider
[src]
fn clone(&self) -> ProfileProvider
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for ProfileProvider
[src]
Auto Trait Implementations
impl Send for ProfileProvider
impl Sync for ProfileProvider
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,