Struct sts_profile_auth::AwsProfileInfo
source · [−]pub struct AwsProfileInfo {
pub name: String,
pub region: String,
pub aws_access_key_id: String,
pub aws_secret_access_key: String,
pub aws_session_token: Option<String>,
pub role_arn: Option<String>,
pub source_profile: Option<String>,
}
Expand description
Profile meta-data, representing either a profile with an access key, or a profile utilizing sts.
Fields
name: String
region: String
aws_access_key_id: String
aws_secret_access_key: String
aws_session_token: Option<String>
role_arn: Option<String>
source_profile: Option<String>
Implementations
sourceimpl AwsProfileInfo
impl AwsProfileInfo
sourcepub fn from_hashmap(
profile_name: &str,
profile_map: &HashMap<String, HashMap<String, String>>
) -> Option<Self>
pub fn from_hashmap(
profile_name: &str,
profile_map: &HashMap<String, HashMap<String, String>>
) -> Option<Self>
This function fills an instance of AwsProfileInfo
using a hashmap
generated by fill_profile_map
It will return None if all required
information cannot be found.
sourcepub fn fill_profile_map() -> Result<HashMap<String, Self>, StsClientError>
pub fn fill_profile_map() -> Result<HashMap<String, Self>, StsClientError>
Extract profile information hashmap from ${HOME}/.aws/config
and
${HOME}/.aws/credentials
Trait Implementations
sourceimpl Clone for AwsProfileInfo
impl Clone for AwsProfileInfo
sourcefn clone(&self) -> AwsProfileInfo
fn clone(&self) -> AwsProfileInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AwsProfileInfo
impl Debug for AwsProfileInfo
sourceimpl Default for AwsProfileInfo
impl Default for AwsProfileInfo
sourcefn default() -> AwsProfileInfo
fn default() -> AwsProfileInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for AwsProfileInfo
impl Send for AwsProfileInfo
impl Sync for AwsProfileInfo
impl Unpin for AwsProfileInfo
impl UnwindSafe for AwsProfileInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more