Struct aws_manager::sts::Identity
source · Expand description
Represents the caller identity.
Fields§
§account_id: String§role_arn: String§user_id: StringImplementations§
source§impl Identity
impl Identity
sourcepub fn new(account_id: &str, role_arn: &str, user_id: &str) -> Self
pub fn new(account_id: &str, role_arn: &str, user_id: &str) -> Self
Examples found in repository?
src/sts.rs (lines 42-46)
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
pub async fn get_identity(&self) -> Result<Identity> {
log::info!("fetching STS caller identity");
let ret = self.cli.get_caller_identity().send().await;
let resp = match ret {
Ok(v) => v,
Err(e) => {
return Err(API {
message: format!("failed get_caller_identity {:?}", e),
is_retryable: is_error_retryable(&e),
});
}
};
Ok(Identity::new(
resp.account().unwrap_or(""),
resp.arn().unwrap_or(""),
resp.user_id().unwrap_or(""),
))
}Trait Implementations§
source§impl<'de> Deserialize<'de> for Identity
impl<'de> Deserialize<'de> for Identity
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Identity> for Identity
impl PartialEq<Identity> for Identity
impl Eq for Identity
impl StructuralEq for Identity
impl StructuralPartialEq for Identity
Auto Trait Implementations§
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.