1
2
3
4
5
6
7
8
9
10
11
12
13
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`DeletePolicy`](crate::operation::delete_policy::builders::DeletePolicyFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`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 ID of the policy that you want to delete. You can retrieve this ID from <code>PutPolicy</code> and <code>ListPolicies</code>.</p><br>
    ///   - [`delete_all_policy_resources(bool)`](crate::operation::delete_policy::builders::DeletePolicyFluentBuilder::delete_all_policy_resources) / [`set_delete_all_policy_resources(Option<bool>)`](crate::operation::delete_policy::builders::DeletePolicyFluentBuilder::set_delete_all_policy_resources):<br>required: **false**<br><p>If <code>True</code>, the request performs cleanup according to the policy type.</p> <p>For WAF and Shield Advanced policies, the cleanup does the following:</p> <ul>  <li>   <p>Deletes rule groups created by Firewall Manager</p></li>  <li>   <p>Removes web ACLs from in-scope resources</p></li>  <li>   <p>Deletes web ACLs that contain no rules or rule groups</p></li> </ul> <p>For security group policies, the cleanup does the following for each security group in the policy:</p> <ul>  <li>   <p>Disassociates the security group from in-scope resources</p></li>  <li>   <p>Deletes the security group if it was created through Firewall Manager and if it's no longer associated with any resources through another policy</p></li> </ul><note>  <p>For security group common policies, even if set to <code>False</code>, Firewall Manager deletes all security groups created by Firewall Manager that aren't associated with any other resources through another policy.</p> </note> <p>After the cleanup, in-scope resources are no longer protected by web ACLs in this policy. Protection of out-of-scope resources remains unchanged. Scope is determined by tags that you create and accounts that you associate with the policy. When creating the policy, if you specify that only resources in specific accounts or with specific tags are in scope of the policy, those accounts and resources are handled by the policy. All others are out of scope. If you don't specify tags or accounts, all resources are in scope.</p><br>
    /// - On success, responds with [`DeletePolicyOutput`](crate::operation::delete_policy::DeletePolicyOutput)
    /// - On failure, responds with [`SdkError<DeletePolicyError>`](crate::operation::delete_policy::DeletePolicyError)
    pub fn delete_policy(&self) -> crate::operation::delete_policy::builders::DeletePolicyFluentBuilder {
        crate::operation::delete_policy::builders::DeletePolicyFluentBuilder::new(self.handle.clone())
    }
}