aws_sdk_bedrockagentcorecontrol/client/
update_policy.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`UpdatePolicy`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`policy_engine_id(impl Into<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::policy_engine_id) / [`set_policy_engine_id(Option<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_policy_engine_id):<br>required: **true**<br><p>The identifier of the policy engine that manages the policy to be updated. This ensures the policy is updated within the correct policy engine context.</p><br>
7    ///   - [`policy_id(impl Into<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::policy_id) / [`set_policy_id(Option<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_policy_id):<br>required: **true**<br><p>The unique identifier of the policy to be updated. This must be a valid policy ID that exists within the specified policy engine.</p><br>
8    ///   - [`description(impl Into<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_description):<br>required: **false**<br><p>The new human-readable description for the policy. This optional field allows updating the policy's documentation while keeping the same policy logic.</p><br>
9    ///   - [`definition(PolicyDefinition)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::definition) / [`set_definition(Option<PolicyDefinition>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_definition):<br>required: **true**<br><p>The new Cedar policy statement that defines the access control rules. This replaces the existing policy definition with new logic while maintaining the policy's identity.</p><br>
10    ///   - [`validation_mode(PolicyValidationMode)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::validation_mode) / [`set_validation_mode(Option<PolicyValidationMode>)`](crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::set_validation_mode):<br>required: **false**<br><p>The validation mode for the policy update. Determines how Cedar analyzer validation results are handled during policy updates. FAIL_ON_ANY_FINDINGS runs the Cedar analyzer and fails the update if validation issues are detected, ensuring the policy conforms to the Cedar schema and tool context. IGNORE_ALL_FINDINGS runs the Cedar analyzer but allows updates despite validation warnings. Use FAIL_ON_ANY_FINDINGS to ensure policy correctness during updates, especially when modifying policy logic or conditions.</p><br>
11    /// - On success, responds with [`UpdatePolicyOutput`](crate::operation::update_policy::UpdatePolicyOutput) with field(s):
12    ///   - [`policy_id(String)`](crate::operation::update_policy::UpdatePolicyOutput::policy_id): <p>The unique identifier of the updated policy.</p>
13    ///   - [`name(String)`](crate::operation::update_policy::UpdatePolicyOutput::name): <p>The name of the updated policy.</p>
14    ///   - [`policy_engine_id(String)`](crate::operation::update_policy::UpdatePolicyOutput::policy_engine_id): <p>The identifier of the policy engine managing the updated policy.</p>
15    ///   - [`definition(Option<PolicyDefinition>)`](crate::operation::update_policy::UpdatePolicyOutput::definition): <p>The updated Cedar policy statement.</p>
16    ///   - [`description(Option<String>)`](crate::operation::update_policy::UpdatePolicyOutput::description): <p>The updated description of the policy.</p>
17    ///   - [`created_at(DateTime)`](crate::operation::update_policy::UpdatePolicyOutput::created_at): <p>The original creation timestamp of the policy.</p>
18    ///   - [`updated_at(DateTime)`](crate::operation::update_policy::UpdatePolicyOutput::updated_at): <p>The timestamp when the policy was last updated.</p>
19    ///   - [`policy_arn(String)`](crate::operation::update_policy::UpdatePolicyOutput::policy_arn): <p>The ARN of the updated policy.</p>
20    ///   - [`status(PolicyStatus)`](crate::operation::update_policy::UpdatePolicyOutput::status): <p>The current status of the updated policy.</p>
21    ///   - [`status_reasons(Vec::<String>)`](crate::operation::update_policy::UpdatePolicyOutput::status_reasons): <p>Additional information about the update status.</p>
22    /// - On failure, responds with [`SdkError<UpdatePolicyError>`](crate::operation::update_policy::UpdatePolicyError)
23    pub fn update_policy(&self) -> crate::operation::update_policy::builders::UpdatePolicyFluentBuilder {
24        crate::operation::update_policy::builders::UpdatePolicyFluentBuilder::new(self.handle.clone())
25    }
26}