pub struct WamiContextBuilder { /* private fields */ }Expand description
Builder for creating a WamiContext
Implementations§
Source§impl WamiContextBuilder
impl WamiContextBuilder
Sourcepub fn tenant_path(self, tenant_path: TenantPath) -> Self
pub fn tenant_path(self, tenant_path: TenantPath) -> Self
Set the tenant path
Sourcepub fn instance_id(self, instance_id: impl Into<String>) -> Self
pub fn instance_id(self, instance_id: impl Into<String>) -> Self
Set the instance ID
Sourcepub fn caller_arn(self, caller_arn: WamiArn) -> Self
pub fn caller_arn(self, caller_arn: WamiArn) -> Self
Set the caller ARN
Sourcepub fn is_root(self, is_root: bool) -> Self
pub fn is_root(self, is_root: bool) -> Self
Set whether the caller is a root user
Leave it unset to derive it from the caller ARN. An explicit value is
never overridden — in particular is_root(false) stays false even for
a root ARN, which is what makes deliberate privilege dropping possible.
Sourcepub fn session_info(self, session_info: SessionInfo) -> Self
pub fn session_info(self, session_info: SessionInfo) -> Self
Set session information for temporary credentials
Sourcepub fn mfa_present(self, present: bool) -> Self
pub fn mfa_present(self, present: bool) -> Self
Set whether MFA was used for authentication
Sourcepub fn secure_transport(self, secure: bool) -> Self
pub fn secure_transport(self, secure: bool) -> Self
Set whether the request uses secure transport (HTTPS)
Sourcepub fn build(self) -> Result<WamiContext>
pub fn build(self) -> Result<WamiContext>
Build the WamiContext
Trait Implementations§
Source§impl Default for WamiContextBuilder
impl Default for WamiContextBuilder
Source§fn default() -> WamiContextBuilder
fn default() -> WamiContextBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WamiContextBuilder
impl RefUnwindSafe for WamiContextBuilder
impl Send for WamiContextBuilder
impl Sync for WamiContextBuilder
impl Unpin for WamiContextBuilder
impl UnsafeUnpin for WamiContextBuilder
impl UnwindSafe for WamiContextBuilder
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