#[non_exhaustive]pub struct CredentialsBuilder { /* private fields */ }
Expand description
A builder for Credentials
.
Implementations§
Source§impl CredentialsBuilder
impl CredentialsBuilder
Sourcepub fn access_key_id(self, input: impl Into<String>) -> Self
pub fn access_key_id(self, input: impl Into<String>) -> Self
The access key ID that identifies the temporary security credentials.
This field is required.Sourcepub fn set_access_key_id(self, input: Option<String>) -> Self
pub fn set_access_key_id(self, input: Option<String>) -> Self
The access key ID that identifies the temporary security credentials.
Sourcepub fn get_access_key_id(&self) -> &Option<String>
pub fn get_access_key_id(&self) -> &Option<String>
The access key ID that identifies the temporary security credentials.
Sourcepub fn secret_access_key(self, input: impl Into<String>) -> Self
pub fn secret_access_key(self, input: impl Into<String>) -> Self
The secret access key that can be used to sign requests.
This field is required.Sourcepub fn set_secret_access_key(self, input: Option<String>) -> Self
pub fn set_secret_access_key(self, input: Option<String>) -> Self
The secret access key that can be used to sign requests.
Sourcepub fn get_secret_access_key(&self) -> &Option<String>
pub fn get_secret_access_key(&self) -> &Option<String>
The secret access key that can be used to sign requests.
Sourcepub fn session_token(self, input: impl Into<String>) -> Self
pub fn session_token(self, input: impl Into<String>) -> Self
The token that users must pass to the service API to use the temporary credentials.
This field is required.Sourcepub fn set_session_token(self, input: Option<String>) -> Self
pub fn set_session_token(self, input: Option<String>) -> Self
The token that users must pass to the service API to use the temporary credentials.
Sourcepub fn get_session_token(&self) -> &Option<String>
pub fn get_session_token(&self) -> &Option<String>
The token that users must pass to the service API to use the temporary credentials.
Sourcepub fn expiration(self, input: DateTime) -> Self
pub fn expiration(self, input: DateTime) -> Self
The date on which the current credentials expire.
This field is required.Sourcepub fn set_expiration(self, input: Option<DateTime>) -> Self
pub fn set_expiration(self, input: Option<DateTime>) -> Self
The date on which the current credentials expire.
Sourcepub fn get_expiration(&self) -> &Option<DateTime>
pub fn get_expiration(&self) -> &Option<DateTime>
The date on which the current credentials expire.
Sourcepub fn build(self) -> Result<Credentials, BuildError>
pub fn build(self) -> Result<Credentials, BuildError>
Consumes the builder and constructs a Credentials
.
This method will fail if any of the following fields are not set:
Trait Implementations§
Source§impl Clone for CredentialsBuilder
impl Clone for CredentialsBuilder
Source§fn clone(&self) -> CredentialsBuilder
fn clone(&self) -> CredentialsBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CredentialsBuilder
impl Debug for CredentialsBuilder
Source§impl Default for CredentialsBuilder
impl Default for CredentialsBuilder
Source§fn default() -> CredentialsBuilder
fn default() -> CredentialsBuilder
Source§impl PartialEq for CredentialsBuilder
impl PartialEq for CredentialsBuilder
impl StructuralPartialEq for CredentialsBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)