aws_sdk_fms/operation/delete_policy/_delete_policy_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeletePolicyInput {
6 /// <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>
7 pub policy_id: ::std::option::Option<::std::string::String>,
8 /// <p>If <code>True</code>, the request performs cleanup according to the policy type.</p>
9 /// <p>For WAF and Shield Advanced policies, the cleanup does the following:</p>
10 /// <ul>
11 /// <li>
12 /// <p>Deletes rule groups created by Firewall Manager</p></li>
13 /// <li>
14 /// <p>Removes web ACLs from in-scope resources</p></li>
15 /// <li>
16 /// <p>Deletes web ACLs that contain no rules or rule groups</p></li>
17 /// </ul>
18 /// <p>For security group policies, the cleanup does the following for each security group in the policy:</p>
19 /// <ul>
20 /// <li>
21 /// <p>Disassociates the security group from in-scope resources</p></li>
22 /// <li>
23 /// <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>
24 /// </ul><note>
25 /// <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>
26 /// </note>
27 /// <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>
28 pub delete_all_policy_resources: ::std::option::Option<bool>,
29}
30impl DeletePolicyInput {
31 /// <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>
32 pub fn policy_id(&self) -> ::std::option::Option<&str> {
33 self.policy_id.as_deref()
34 }
35 /// <p>If <code>True</code>, the request performs cleanup according to the policy type.</p>
36 /// <p>For WAF and Shield Advanced policies, the cleanup does the following:</p>
37 /// <ul>
38 /// <li>
39 /// <p>Deletes rule groups created by Firewall Manager</p></li>
40 /// <li>
41 /// <p>Removes web ACLs from in-scope resources</p></li>
42 /// <li>
43 /// <p>Deletes web ACLs that contain no rules or rule groups</p></li>
44 /// </ul>
45 /// <p>For security group policies, the cleanup does the following for each security group in the policy:</p>
46 /// <ul>
47 /// <li>
48 /// <p>Disassociates the security group from in-scope resources</p></li>
49 /// <li>
50 /// <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>
51 /// </ul><note>
52 /// <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>
53 /// </note>
54 /// <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>
55 pub fn delete_all_policy_resources(&self) -> ::std::option::Option<bool> {
56 self.delete_all_policy_resources
57 }
58}
59impl DeletePolicyInput {
60 /// Creates a new builder-style object to manufacture [`DeletePolicyInput`](crate::operation::delete_policy::DeletePolicyInput).
61 pub fn builder() -> crate::operation::delete_policy::builders::DeletePolicyInputBuilder {
62 crate::operation::delete_policy::builders::DeletePolicyInputBuilder::default()
63 }
64}
65
66/// A builder for [`DeletePolicyInput`](crate::operation::delete_policy::DeletePolicyInput).
67#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
68#[non_exhaustive]
69pub struct DeletePolicyInputBuilder {
70 pub(crate) policy_id: ::std::option::Option<::std::string::String>,
71 pub(crate) delete_all_policy_resources: ::std::option::Option<bool>,
72}
73impl DeletePolicyInputBuilder {
74 /// <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>
75 /// This field is required.
76 pub fn policy_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.policy_id = ::std::option::Option::Some(input.into());
78 self
79 }
80 /// <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>
81 pub fn set_policy_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82 self.policy_id = input;
83 self
84 }
85 /// <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>
86 pub fn get_policy_id(&self) -> &::std::option::Option<::std::string::String> {
87 &self.policy_id
88 }
89 /// <p>If <code>True</code>, the request performs cleanup according to the policy type.</p>
90 /// <p>For WAF and Shield Advanced policies, the cleanup does the following:</p>
91 /// <ul>
92 /// <li>
93 /// <p>Deletes rule groups created by Firewall Manager</p></li>
94 /// <li>
95 /// <p>Removes web ACLs from in-scope resources</p></li>
96 /// <li>
97 /// <p>Deletes web ACLs that contain no rules or rule groups</p></li>
98 /// </ul>
99 /// <p>For security group policies, the cleanup does the following for each security group in the policy:</p>
100 /// <ul>
101 /// <li>
102 /// <p>Disassociates the security group from in-scope resources</p></li>
103 /// <li>
104 /// <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>
105 /// </ul><note>
106 /// <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>
107 /// </note>
108 /// <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>
109 pub fn delete_all_policy_resources(mut self, input: bool) -> Self {
110 self.delete_all_policy_resources = ::std::option::Option::Some(input);
111 self
112 }
113 /// <p>If <code>True</code>, the request performs cleanup according to the policy type.</p>
114 /// <p>For WAF and Shield Advanced policies, the cleanup does the following:</p>
115 /// <ul>
116 /// <li>
117 /// <p>Deletes rule groups created by Firewall Manager</p></li>
118 /// <li>
119 /// <p>Removes web ACLs from in-scope resources</p></li>
120 /// <li>
121 /// <p>Deletes web ACLs that contain no rules or rule groups</p></li>
122 /// </ul>
123 /// <p>For security group policies, the cleanup does the following for each security group in the policy:</p>
124 /// <ul>
125 /// <li>
126 /// <p>Disassociates the security group from in-scope resources</p></li>
127 /// <li>
128 /// <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>
129 /// </ul><note>
130 /// <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>
131 /// </note>
132 /// <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>
133 pub fn set_delete_all_policy_resources(mut self, input: ::std::option::Option<bool>) -> Self {
134 self.delete_all_policy_resources = input;
135 self
136 }
137 /// <p>If <code>True</code>, the request performs cleanup according to the policy type.</p>
138 /// <p>For WAF and Shield Advanced policies, the cleanup does the following:</p>
139 /// <ul>
140 /// <li>
141 /// <p>Deletes rule groups created by Firewall Manager</p></li>
142 /// <li>
143 /// <p>Removes web ACLs from in-scope resources</p></li>
144 /// <li>
145 /// <p>Deletes web ACLs that contain no rules or rule groups</p></li>
146 /// </ul>
147 /// <p>For security group policies, the cleanup does the following for each security group in the policy:</p>
148 /// <ul>
149 /// <li>
150 /// <p>Disassociates the security group from in-scope resources</p></li>
151 /// <li>
152 /// <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>
153 /// </ul><note>
154 /// <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>
155 /// </note>
156 /// <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>
157 pub fn get_delete_all_policy_resources(&self) -> &::std::option::Option<bool> {
158 &self.delete_all_policy_resources
159 }
160 /// Consumes the builder and constructs a [`DeletePolicyInput`](crate::operation::delete_policy::DeletePolicyInput).
161 pub fn build(
162 self,
163 ) -> ::std::result::Result<crate::operation::delete_policy::DeletePolicyInput, ::aws_smithy_types::error::operation::BuildError> {
164 ::std::result::Result::Ok(crate::operation::delete_policy::DeletePolicyInput {
165 policy_id: self.policy_id,
166 delete_all_policy_resources: self.delete_all_policy_resources,
167 })
168 }
169}