#[non_exhaustive]pub struct TestAuthorizationInput {
pub principal: Option<String>,
pub cognito_identity_pool_id: Option<String>,
pub auth_infos: Option<Vec<AuthInfo>>,
pub client_id: Option<String>,
pub policy_names_to_add: Option<Vec<String>>,
pub policy_names_to_skip: Option<Vec<String>>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.principal: Option<String>
The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
cognito_identity_pool_id: Option<String>
The Cognito identity pool ID.
auth_infos: Option<Vec<AuthInfo>>
A list of authorization info objects. Simulating authorization will create a response for each authInfo
object in the list.
client_id: Option<String>
The MQTT client ID.
policy_names_to_add: Option<Vec<String>>
When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.
policy_names_to_skip: Option<Vec<String>>
When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.
Implementations§
source§impl TestAuthorizationInput
impl TestAuthorizationInput
sourcepub fn principal(&self) -> Option<&str>
pub fn principal(&self) -> Option<&str>
The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
sourcepub fn cognito_identity_pool_id(&self) -> Option<&str>
pub fn cognito_identity_pool_id(&self) -> Option<&str>
The Cognito identity pool ID.
sourcepub fn auth_infos(&self) -> &[AuthInfo]
pub fn auth_infos(&self) -> &[AuthInfo]
A list of authorization info objects. Simulating authorization will create a response for each authInfo
object in the list.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .auth_infos.is_none()
.
sourcepub fn policy_names_to_add(&self) -> &[String]
pub fn policy_names_to_add(&self) -> &[String]
When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .policy_names_to_add.is_none()
.
sourcepub fn policy_names_to_skip(&self) -> &[String]
pub fn policy_names_to_skip(&self) -> &[String]
When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .policy_names_to_skip.is_none()
.
source§impl TestAuthorizationInput
impl TestAuthorizationInput
sourcepub fn builder() -> TestAuthorizationInputBuilder
pub fn builder() -> TestAuthorizationInputBuilder
Creates a new builder-style object to manufacture TestAuthorizationInput
.
Trait Implementations§
source§impl Clone for TestAuthorizationInput
impl Clone for TestAuthorizationInput
source§fn clone(&self) -> TestAuthorizationInput
fn clone(&self) -> TestAuthorizationInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TestAuthorizationInput
impl Debug for TestAuthorizationInput
source§impl PartialEq for TestAuthorizationInput
impl PartialEq for TestAuthorizationInput
source§fn eq(&self, other: &TestAuthorizationInput) -> bool
fn eq(&self, other: &TestAuthorizationInput) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TestAuthorizationInput
Auto Trait Implementations§
impl Freeze for TestAuthorizationInput
impl RefUnwindSafe for TestAuthorizationInput
impl Send for TestAuthorizationInput
impl Sync for TestAuthorizationInput
impl Unpin for TestAuthorizationInput
impl UnwindSafe for TestAuthorizationInput
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
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>
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 more