pub struct Client { /* private fields */ }Expand description
Async client for Alibaba Cloud STS API.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(credential: Credential) -> Result<Self>
pub fn new(credential: Credential) -> Result<Self>
Creates a new client with an explicit credential.
Sourcepub fn with_config(credential: Credential, config: ClientConfig) -> Result<Self>
pub fn with_config(credential: Credential, config: ClientConfig) -> Result<Self>
Creates a new client with an explicit credential and custom configuration.
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Creates a new client using the default credential chain (env vars → profile file).
Sourcepub async fn assume_role(
&self,
request: AssumeRoleRequest,
) -> Result<AssumeRoleResponse>
pub async fn assume_role( &self, request: AssumeRoleRequest, ) -> Result<AssumeRoleResponse>
Assumes a RAM role and obtains temporary security credentials.
Sourcepub async fn assume_role_with_saml(
&self,
request: AssumeRoleWithSamlRequest,
) -> Result<AssumeRoleWithSamlResponse>
pub async fn assume_role_with_saml( &self, request: AssumeRoleWithSamlRequest, ) -> Result<AssumeRoleWithSamlResponse>
Assumes a RAM role using a SAML assertion for SSO.
Sourcepub async fn assume_role_with_oidc(
&self,
request: AssumeRoleWithOidcRequest,
) -> Result<AssumeRoleWithOidcResponse>
pub async fn assume_role_with_oidc( &self, request: AssumeRoleWithOidcRequest, ) -> Result<AssumeRoleWithOidcResponse>
Assumes a RAM role using an OIDC token for SSO.
Sourcepub async fn get_caller_identity(&self) -> Result<GetCallerIdentityResponse>
pub async fn get_caller_identity(&self) -> Result<GetCallerIdentityResponse>
Queries the identity of the current caller.
Sourcepub fn time_offset(&self) -> i64
pub fn time_offset(&self) -> i64
Returns the current clock offset in seconds.
A positive value means the local clock is behind the server clock. A negative value means the local clock is ahead of the server clock.
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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