pub struct AssumeRoleWithWebIdentityCredentialProvider { /* private fields */ }Expand description
AssumeRoleWithWebIdentityCredentialProvider will load credential via assume role with web identity.
This provider reads configuration from:
- Constructor parameters (if provided)
- Environment variables (when constructor parameters are not set)
Implementations§
Source§impl AssumeRoleWithWebIdentityCredentialProvider
impl AssumeRoleWithWebIdentityCredentialProvider
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new AssumeRoleWithWebIdentityCredentialProvider instance that reads from environment variables.
Sourcepub fn with_config(role_arn: String, token_file: PathBuf) -> Self
pub fn with_config(role_arn: String, token_file: PathBuf) -> Self
Create a new AssumeRoleWithWebIdentityCredentialProvider instance with explicit configuration.
Sourcepub fn with_role_arn(self, role_arn: impl Into<String>) -> Self
pub fn with_role_arn(self, role_arn: impl Into<String>) -> Self
Set the role ARN.
Sourcepub fn with_web_identity_token_file(
self,
token_file: impl Into<PathBuf>,
) -> Self
pub fn with_web_identity_token_file( self, token_file: impl Into<PathBuf>, ) -> Self
Set the web identity token file path.
Sourcepub fn with_role_session_name(self, name: String) -> Self
pub fn with_role_session_name(self, name: String) -> Self
Set the role session name.
Sourcepub fn with_duration_seconds(self, seconds: u32) -> Self
pub fn with_duration_seconds(self, seconds: u32) -> Self
Set the duration in seconds.
Sourcepub fn with_policy(self, policy: String) -> Self
pub fn with_policy(self, policy: String) -> Self
Set the session policy.
Sourcepub fn with_policy_arns(self, policy_arns: Vec<String>) -> Self
pub fn with_policy_arns(self, policy_arns: Vec<String>) -> Self
Set the session policy ARNs.
Sourcepub fn with_region(self, region: String) -> Self
pub fn with_region(self, region: String) -> Self
Set the region.
Sourcepub fn with_regional_sts_endpoint(self) -> Self
pub fn with_regional_sts_endpoint(self) -> Self
Use regional STS endpoint.
Trait Implementations§
Source§impl Clone for AssumeRoleWithWebIdentityCredentialProvider
impl Clone for AssumeRoleWithWebIdentityCredentialProvider
Source§fn clone(&self) -> AssumeRoleWithWebIdentityCredentialProvider
fn clone(&self) -> AssumeRoleWithWebIdentityCredentialProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for AssumeRoleWithWebIdentityCredentialProvider
impl Default for AssumeRoleWithWebIdentityCredentialProvider
Source§fn default() -> AssumeRoleWithWebIdentityCredentialProvider
fn default() -> AssumeRoleWithWebIdentityCredentialProvider
Returns the “default value” for a type. Read more
Source§impl ProvideCredential for AssumeRoleWithWebIdentityCredentialProvider
impl ProvideCredential for AssumeRoleWithWebIdentityCredentialProvider
Source§type Credential = Credential
type Credential = Credential
Credential returned by this loader. Read more
Source§async fn provide_credential(
&self,
ctx: &Context,
) -> Result<Option<Self::Credential>>
async fn provide_credential( &self, ctx: &Context, ) -> Result<Option<Self::Credential>>
Load signing credential from current env.
Auto Trait Implementations§
impl Freeze for AssumeRoleWithWebIdentityCredentialProvider
impl RefUnwindSafe for AssumeRoleWithWebIdentityCredentialProvider
impl Send for AssumeRoleWithWebIdentityCredentialProvider
impl Sync for AssumeRoleWithWebIdentityCredentialProvider
impl Unpin for AssumeRoleWithWebIdentityCredentialProvider
impl UnsafeUnpin for AssumeRoleWithWebIdentityCredentialProvider
impl UnwindSafe for AssumeRoleWithWebIdentityCredentialProvider
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> ProvideCredentialDyn for Twhere
T: ProvideCredential + ?Sized,
impl<T> ProvideCredentialDyn for Twhere
T: ProvideCredential + ?Sized,
Source§type Credential = <T as ProvideCredential>::Credential
type Credential = <T as ProvideCredential>::Credential
Credential returned by this loader.
Source§fn provide_credential_dyn<'a>(
&'a self,
ctx: &'a Context,
) -> Pin<Box<dyn Future<Output = Result<Option<<T as ProvideCredentialDyn>::Credential>, Error>> + Send + 'a>>
fn provide_credential_dyn<'a>( &'a self, ctx: &'a Context, ) -> Pin<Box<dyn Future<Output = Result<Option<<T as ProvideCredentialDyn>::Credential>, Error>> + Send + 'a>>
Dyn version of
ProvideCredential::provide_credential.