Struct aws_credential_types::CredentialsBuilder
source · pub struct CredentialsBuilder { /* private fields */ }
Expand description
Builder for Credentials
Similar to Credentials::new
, the use of the builder is intended for a custom credentials provider implementation.
It is NOT secure to hardcode credentials into your application.
Implementations§
source§impl CredentialsBuilder
impl CredentialsBuilder
sourcepub fn access_key_id(self, access_key_id: impl Into<String>) -> Self
pub fn access_key_id(self, access_key_id: impl Into<String>) -> Self
Set access key id for the builder.
sourcepub fn secret_access_key(self, secret_access_key: impl Into<String>) -> Self
pub fn secret_access_key(self, secret_access_key: impl Into<String>) -> Self
Set secret access key for the builder.
sourcepub fn session_token(self, session_token: impl Into<String>) -> Self
pub fn session_token(self, session_token: impl Into<String>) -> Self
Set session token for the builder.
sourcepub fn set_session_token(&mut self, session_token: Option<String>)
pub fn set_session_token(&mut self, session_token: Option<String>)
Set session token for the builder.
sourcepub fn expiry(self, expiry: SystemTime) -> Self
pub fn expiry(self, expiry: SystemTime) -> Self
Set expiry for the builder.
sourcepub fn set_expiry(&mut self, expiry: Option<SystemTime>)
pub fn set_expiry(&mut self, expiry: Option<SystemTime>)
Set expiry for the builder.
sourcepub fn account_id(self, account_id: impl Into<AccountId>) -> Self
pub fn account_id(self, account_id: impl Into<AccountId>) -> Self
Set account ID for the builder.
sourcepub fn set_account_id(&mut self, account_id: Option<AccountId>)
pub fn set_account_id(&mut self, account_id: Option<AccountId>)
Set account ID for the builder.
sourcepub fn provider_name(self, provider_name: &'static str) -> Self
pub fn provider_name(self, provider_name: &'static str) -> Self
Set provicer name for the builder.
sourcepub fn build(self) -> Credentials
pub fn build(self) -> Credentials
Build Credentials
from the builder.
Trait Implementations§
source§impl Clone for CredentialsBuilder
impl Clone for CredentialsBuilder
source§fn clone(&self) -> CredentialsBuilder
fn clone(&self) -> CredentialsBuilder
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 Default for CredentialsBuilder
impl Default for CredentialsBuilder
source§fn default() -> CredentialsBuilder
fn default() -> CredentialsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CredentialsBuilder
impl RefUnwindSafe for CredentialsBuilder
impl Send for CredentialsBuilder
impl Sync for CredentialsBuilder
impl Unpin for CredentialsBuilder
impl UnwindSafe for CredentialsBuilder
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.