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§
source§impl 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§
source§impl Clone for AwsProfileInfo
impl Clone for AwsProfileInfo
source§fn clone(&self) -> AwsProfileInfo
fn clone(&self) -> AwsProfileInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AwsProfileInfo
impl Debug for AwsProfileInfo
source§impl Default for AwsProfileInfo
impl Default for AwsProfileInfo
source§fn default() -> AwsProfileInfo
fn default() -> AwsProfileInfo
Returns the “default value” for a type. Read more