#[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 ==
.