pub struct Ec2SecurityCredentialsMetadataResponse { /* private fields */ }Expand description
Parser for responses received from the EC2 security-credentials metadata service.
Implementations§
Source§impl Ec2SecurityCredentialsMetadataResponse
impl Ec2SecurityCredentialsMetadataResponse
Sourcepub fn deserialize(s: &str) -> Result<Self, Error>
pub fn deserialize(s: &str) -> Result<Self, Error>
Deserialize a JSON response received from the EC2 metadata service.
Parses the credentials from a response received from
http://169.254.169.254/latest/meta-data/iam/security-credentials/{name-of-IAM-role}.
§Errors
Returns an error if the JSON is invalid.
Sourcepub const fn expiration(&self) -> Timestamp
pub const fn expiration(&self) -> Timestamp
Get the expiration of the credentials of this Ec2SecurityCredentialsMetadataResponse
Sourcepub fn into_credentials(self) -> Credentials
pub fn into_credentials(self) -> Credentials
Convert this Ec2SecurityCredentialsMetadataResponse into Credentials
Sourcepub fn rotate_credentials(self, rotating: &RotatingCredentials)
pub fn rotate_credentials(self, rotating: &RotatingCredentials)
Update a RotatingCredentials with the credentials of this Ec2SecurityCredentialsMetadataResponse
Trait Implementations§
Source§impl Clone for Ec2SecurityCredentialsMetadataResponse
impl Clone for Ec2SecurityCredentialsMetadataResponse
Source§fn clone(&self) -> Ec2SecurityCredentialsMetadataResponse
fn clone(&self) -> Ec2SecurityCredentialsMetadataResponse
Returns a duplicate 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<'de> Deserialize<'de> for Ec2SecurityCredentialsMetadataResponse
impl<'de> Deserialize<'de> for Ec2SecurityCredentialsMetadataResponse
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
Auto Trait Implementations§
impl Freeze for Ec2SecurityCredentialsMetadataResponse
impl RefUnwindSafe for Ec2SecurityCredentialsMetadataResponse
impl Send for Ec2SecurityCredentialsMetadataResponse
impl Sync for Ec2SecurityCredentialsMetadataResponse
impl Unpin for Ec2SecurityCredentialsMetadataResponse
impl UnwindSafe for Ec2SecurityCredentialsMetadataResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more