Struct aws_sdk_iot::input::TestAuthorizationInput
source · #[non_exhaustive]pub struct TestAuthorizationInput { /* private fields */ }
Implementations§
source§impl TestAuthorizationInput
impl TestAuthorizationInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<TestAuthorization, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<TestAuthorization, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<TestAuthorization
>
Examples found in repository?
24360 24361 24362 24363 24364 24365 24366 24367 24368 24369 24370 24371 24372 24373 24374 24375 24376 24377 24378 24379 24380 24381 24382 24383 24384 24385 24386 24387 24388 24389 24390 24391 24392 24393 24394 24395 24396 24397 24398 24399 24400 24401 24402
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::TestAuthorization,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::TestAuthorizationError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::TestAuthorizationOutput,
aws_smithy_http::result::SdkError<crate::error::TestAuthorizationError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture TestAuthorizationInput
.
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) -> Option<&[AuthInfo]>
pub fn auth_infos(&self) -> Option<&[AuthInfo]>
A list of authorization info objects. Simulating authorization will create a response for each authInfo
object in the list.
sourcepub fn policy_names_to_add(&self) -> Option<&[String]>
pub fn policy_names_to_add(&self) -> Option<&[String]>
When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.
sourcepub fn policy_names_to_skip(&self) -> Option<&[String]>
pub fn policy_names_to_skip(&self) -> Option<&[String]>
When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.
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 more