pub struct Builder { /* private fields */ }
Expand description

Implementations§

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

Examples found in repository?
src/client.rs (line 2669)
2668
2669
2670
2671
        pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.resource_arn(input.into());
            self
        }

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

Examples found in repository?
src/client.rs (line 2674)
2673
2674
2675
2676
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_resource_arn(input);
            self
        }

The name of the statement. The ID is the same as the Sid IAM property. The statement name must be unique within the policy. For more information, see IAM JSON policy elements: Sid.

Examples found in repository?
src/client.rs (line 2679)
2678
2679
2680
2681
        pub fn statement_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.statement_id(input.into());
            self
        }

The name of the statement. The ID is the same as the Sid IAM property. The statement name must be unique within the policy. For more information, see IAM JSON policy elements: Sid.

Examples found in repository?
src/client.rs (line 2684)
2683
2684
2685
2686
        pub fn set_statement_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_statement_id(input);
            self
        }

Determines whether the statement allows or denies access to the resource.

Examples found in repository?
src/client.rs (line 2689)
2688
2689
2690
2691
        pub fn effect(mut self, input: crate::model::Effect) -> Self {
            self.inner = self.inner.effect(input);
            self
        }

Determines whether the statement allows or denies access to the resource.

Examples found in repository?
src/client.rs (line 2694)
2693
2694
2695
2696
        pub fn set_effect(mut self, input: std::option::Option<crate::model::Effect>) -> Self {
            self.inner = self.inner.set_effect(input);
            self
        }

Appends an item to principal.

To override the contents of this collection use set_principal.

An IAM principal, such as an IAM users, IAM roles, or AWS services that is allowed or denied access to a resource. For more information, see AWS JSON policy elements: Principal.

Examples found in repository?
src/client.rs (line 2703)
2702
2703
2704
2705
        pub fn principal(mut self, input: crate::model::Principal) -> Self {
            self.inner = self.inner.principal(input);
            self
        }

An IAM principal, such as an IAM users, IAM roles, or AWS services that is allowed or denied access to a resource. For more information, see AWS JSON policy elements: Principal.

Examples found in repository?
src/client.rs (line 2711)
2707
2708
2709
2710
2711
2712
2713
        pub fn set_principal(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Principal>>,
        ) -> Self {
            self.inner = self.inner.set_principal(input);
            self
        }

Appends an item to action.

To override the contents of this collection use set_action.

The Amazon Lex action that this policy either allows or denies. The action must apply to the resource type of the specified ARN. For more information, see Actions, resources, and condition keys for Amazon Lex V2.

Examples found in repository?
src/client.rs (line 2720)
2719
2720
2721
2722
        pub fn action(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.action(input.into());
            self
        }

The Amazon Lex action that this policy either allows or denies. The action must apply to the resource type of the specified ARN. For more information, see Actions, resources, and condition keys for Amazon Lex V2.

Examples found in repository?
src/client.rs (line 2728)
2724
2725
2726
2727
2728
2729
2730
        pub fn set_action(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.inner = self.inner.set_action(input);
            self
        }

Adds a key-value pair to condition.

To override the contents of this collection use set_condition.

Specifies a condition when the policy is in effect. If the principal of the policy is a service principal, you must provide two condition blocks, one with a SourceAccount global condition key and one with a SourceArn global condition key.

For more information, see IAM JSON policy elements: Condition .

Examples found in repository?
src/client.rs (line 2742)
2737
2738
2739
2740
2741
2742
2743
2744
        pub fn condition(
            mut self,
            k: impl Into<std::string::String>,
            v: std::collections::HashMap<std::string::String, std::string::String>,
        ) -> Self {
            self.inner = self.inner.condition(k.into(), v);
            self
        }

Specifies a condition when the policy is in effect. If the principal of the policy is a service principal, you must provide two condition blocks, one with a SourceAccount global condition key and one with a SourceArn global condition key.

For more information, see IAM JSON policy elements: Condition .

Examples found in repository?
src/client.rs (line 2756)
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
        pub fn set_condition(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<
                    std::string::String,
                    std::collections::HashMap<std::string::String, std::string::String>,
                >,
            >,
        ) -> Self {
            self.inner = self.inner.set_condition(input);
            self
        }

The identifier of the revision of the policy to edit. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.

If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.

Examples found in repository?
src/client.rs (line 2762)
2761
2762
2763
2764
        pub fn expected_revision_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.expected_revision_id(input.into());
            self
        }

The identifier of the revision of the policy to edit. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.

If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.

Examples found in repository?
src/client.rs (line 2771)
2767
2768
2769
2770
2771
2772
2773
        pub fn set_expected_revision_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_expected_revision_id(input);
            self
        }

Consumes the builder and constructs a CreateResourcePolicyStatementInput.

Examples found in repository?
src/client.rs (line 2636)
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateResourcePolicyStatement,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateResourcePolicyStatementError>,
        > {
            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::CreateResourcePolicyStatementOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateResourcePolicyStatementError>,
        > {
            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
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more