pub struct CreateResourcePolicyStatement<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }Expand description
Fluent builder constructing a request to CreateResourcePolicyStatement.
Adds a new resource policy statement to a bot or bot alias. If a resource policy exists, the statement is added to the current resource policy. If a policy doesn't exist, a new policy is created.
You can't create a resource policy statement that allows cross-account access.
Implementations
impl<C, M, R> CreateResourcePolicyStatement<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> CreateResourcePolicyStatement<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<CreateResourcePolicyStatementOutput, SdkError<CreateResourcePolicyStatementError>> where
R::Policy: SmithyRetryPolicy<CreateResourcePolicyStatementInputOperationOutputAlias, CreateResourcePolicyStatementOutput, CreateResourcePolicyStatementError, CreateResourcePolicyStatementInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<CreateResourcePolicyStatementOutput, SdkError<CreateResourcePolicyStatementError>> where
R::Policy: SmithyRetryPolicy<CreateResourcePolicyStatementInputOperationOutputAlias, CreateResourcePolicyStatementOutput, CreateResourcePolicyStatementError, CreateResourcePolicyStatementInputOperationRetryAlias>,
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, which can be set when configuring the client.
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
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.
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.
Determines whether the statement allows or denies access to the resource.
Determines whether the statement allows or denies access to the resource.
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.
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.
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.
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.
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 .
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 .
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.
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.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for CreateResourcePolicyStatement<C, M, R>
impl<C, M, R> Send for CreateResourcePolicyStatement<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for CreateResourcePolicyStatement<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for CreateResourcePolicyStatement<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for CreateResourcePolicyStatement<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
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