aws_sdk_bedrockagentcorecontrol/client/
delete_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 [`DeletePolicy`](crate::operation::delete_policy::builders::DeletePolicyFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`policy_engine_id(impl Into<String>)`](crate::operation::delete_policy::builders::DeletePolicyFluentBuilder::policy_engine_id) / [`set_policy_engine_id(Option<String>)`](crate::operation::delete_policy::builders::DeletePolicyFluentBuilder::set_policy_engine_id):<br>required: **true**<br><p>The identifier of the policy engine that manages the policy to be deleted. This ensures the policy is deleted from the correct policy engine context.</p><br>
7    ///   - [`policy_id(impl Into<String>)`](crate::operation::delete_policy::builders::DeletePolicyFluentBuilder::policy_id) / [`set_policy_id(Option<String>)`](crate::operation::delete_policy::builders::DeletePolicyFluentBuilder::set_policy_id):<br>required: **true**<br><p>The unique identifier of the policy to be deleted. This must be a valid policy ID that exists within the specified policy engine.</p><br>
8    /// - On success, responds with [`DeletePolicyOutput`](crate::operation::delete_policy::DeletePolicyOutput) with field(s):
9    ///   - [`policy_id(String)`](crate::operation::delete_policy::DeletePolicyOutput::policy_id): <p>The unique identifier of the policy being deleted. This confirms which policy the deletion operation targets.</p>
10    ///   - [`name(String)`](crate::operation::delete_policy::DeletePolicyOutput::name): <p>The customer-assigned name of the deleted policy. This confirms which policy was successfully removed from the system and matches the name that was originally assigned during policy creation.</p>
11    ///   - [`policy_engine_id(String)`](crate::operation::delete_policy::DeletePolicyOutput::policy_engine_id): <p>The identifier of the policy engine from which the policy was deleted. This confirms the policy engine context for the deletion operation.</p>
12    ///   - [`definition(Option<PolicyDefinition>)`](crate::operation::delete_policy::DeletePolicyOutput::definition): <p>Represents the definition structure for policies within the AgentCore Policy system. This structure encapsulates different policy formats and languages that can be used to define access control rules.</p>
13    ///   - [`description(Option<String>)`](crate::operation::delete_policy::DeletePolicyOutput::description): <p>The human-readable description of the deleted policy.</p>
14    ///   - [`created_at(DateTime)`](crate::operation::delete_policy::DeletePolicyOutput::created_at): <p>The timestamp when the deleted policy was originally created.</p>
15    ///   - [`updated_at(DateTime)`](crate::operation::delete_policy::DeletePolicyOutput::updated_at): <p>The timestamp when the deleted policy was last modified before deletion. This tracks the final state of the policy before it was removed from the system.</p>
16    ///   - [`policy_arn(String)`](crate::operation::delete_policy::DeletePolicyOutput::policy_arn): <p>The Amazon Resource Name (ARN) of the deleted policy. This globally unique identifier confirms which policy resource was successfully removed.</p>
17    ///   - [`status(PolicyStatus)`](crate::operation::delete_policy::DeletePolicyOutput::status): <p>The status of the policy deletion operation. This provides information about any issues that occurred during the deletion process.</p>
18    ///   - [`status_reasons(Vec::<String>)`](crate::operation::delete_policy::DeletePolicyOutput::status_reasons): <p>Additional information about the deletion status. This provides details about the deletion process or any issues that may have occurred.</p>
19    /// - On failure, responds with [`SdkError<DeletePolicyError>`](crate::operation::delete_policy::DeletePolicyError)
20    pub fn delete_policy(&self) -> crate::operation::delete_policy::builders::DeletePolicyFluentBuilder {
21        crate::operation::delete_policy::builders::DeletePolicyFluentBuilder::new(self.handle.clone())
22    }
23}