1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`UpdateResourcePolicy`](crate::operation::update_resource_policy::builders::UpdateResourcePolicyFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`resource_arn(impl Into<String>)`](crate::operation::update_resource_policy::builders::UpdateResourcePolicyFluentBuilder::resource_arn) / [`set_resource_arn(Option<String>)`](crate::operation::update_resource_policy::builders::UpdateResourcePolicyFluentBuilder::set_resource_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.</p><br>
    ///   - [`policy(impl Into<String>)`](crate::operation::update_resource_policy::builders::UpdateResourcePolicyFluentBuilder::policy) / [`set_policy(Option<String>)`](crate::operation::update_resource_policy::builders::UpdateResourcePolicyFluentBuilder::set_policy):<br>required: **true**<br><p>A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html"> IAM JSON policy reference </a>.</p> <p>If the policy isn't valid, Amazon Lex returns a validation exception.</p><br>
    ///   - [`expected_revision_id(impl Into<String>)`](crate::operation::update_resource_policy::builders::UpdateResourcePolicyFluentBuilder::expected_revision_id) / [`set_expected_revision_id(Option<String>)`](crate::operation::update_resource_policy::builders::UpdateResourcePolicyFluentBuilder::set_expected_revision_id):<br>required: **false**<br><p>The identifier of the revision of the policy to update. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.</p> <p>If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.</p><br>
    /// - On success, responds with [`UpdateResourcePolicyOutput`](crate::operation::update_resource_policy::UpdateResourcePolicyOutput) with field(s):
    ///   - [`resource_arn(Option<String>)`](crate::operation::update_resource_policy::UpdateResourcePolicyOutput::resource_arn): <p>The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.</p>
    ///   - [`revision_id(Option<String>)`](crate::operation::update_resource_policy::UpdateResourcePolicyOutput::revision_id): <p>The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource.</p>
    /// - On failure, responds with [`SdkError<UpdateResourcePolicyError>`](crate::operation::update_resource_policy::UpdateResourcePolicyError)
    pub fn update_resource_policy(&self) -> crate::operation::update_resource_policy::builders::UpdateResourcePolicyFluentBuilder {
        crate::operation::update_resource_policy::builders::UpdateResourcePolicyFluentBuilder::new(self.handle.clone())
    }
}