aws_sdk_ec2/operation/delete_ipam/
_delete_ipam_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 DeleteIpamInput {
6    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
7    pub dry_run: ::std::option::Option<bool>,
8    /// <p>The ID of the IPAM to delete.</p>
9    pub ipam_id: ::std::option::Option<::std::string::String>,
10    /// <p>Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. You cannot delete the IPAM with this option if there is a pool in your public scope. If you use this option, IPAM does the following:</p>
11    /// <ul>
12    /// <li>
13    /// <p>Deallocates any CIDRs allocated to VPC resources (such as VPCs) in pools in private scopes.</p><note>
14    /// <p>No VPC resources are deleted as a result of enabling this option. The CIDR associated with the resource will no longer be allocated from an IPAM pool, but the CIDR itself will remain unchanged.</p>
15    /// </note></li>
16    /// <li>
17    /// <p>Deprovisions all IPv4 CIDRs provisioned to IPAM pools in private scopes.</p></li>
18    /// <li>
19    /// <p>Deletes all IPAM pools in private scopes.</p></li>
20    /// <li>
21    /// <p>Deletes all non-default private scopes in the IPAM.</p></li>
22    /// <li>
23    /// <p>Deletes the default public and private scopes and the IPAM.</p></li>
24    /// </ul>
25    pub cascade: ::std::option::Option<bool>,
26}
27impl DeleteIpamInput {
28    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
29    pub fn dry_run(&self) -> ::std::option::Option<bool> {
30        self.dry_run
31    }
32    /// <p>The ID of the IPAM to delete.</p>
33    pub fn ipam_id(&self) -> ::std::option::Option<&str> {
34        self.ipam_id.as_deref()
35    }
36    /// <p>Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. You cannot delete the IPAM with this option if there is a pool in your public scope. If you use this option, IPAM does the following:</p>
37    /// <ul>
38    /// <li>
39    /// <p>Deallocates any CIDRs allocated to VPC resources (such as VPCs) in pools in private scopes.</p><note>
40    /// <p>No VPC resources are deleted as a result of enabling this option. The CIDR associated with the resource will no longer be allocated from an IPAM pool, but the CIDR itself will remain unchanged.</p>
41    /// </note></li>
42    /// <li>
43    /// <p>Deprovisions all IPv4 CIDRs provisioned to IPAM pools in private scopes.</p></li>
44    /// <li>
45    /// <p>Deletes all IPAM pools in private scopes.</p></li>
46    /// <li>
47    /// <p>Deletes all non-default private scopes in the IPAM.</p></li>
48    /// <li>
49    /// <p>Deletes the default public and private scopes and the IPAM.</p></li>
50    /// </ul>
51    pub fn cascade(&self) -> ::std::option::Option<bool> {
52        self.cascade
53    }
54}
55impl DeleteIpamInput {
56    /// Creates a new builder-style object to manufacture [`DeleteIpamInput`](crate::operation::delete_ipam::DeleteIpamInput).
57    pub fn builder() -> crate::operation::delete_ipam::builders::DeleteIpamInputBuilder {
58        crate::operation::delete_ipam::builders::DeleteIpamInputBuilder::default()
59    }
60}
61
62/// A builder for [`DeleteIpamInput`](crate::operation::delete_ipam::DeleteIpamInput).
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
64#[non_exhaustive]
65pub struct DeleteIpamInputBuilder {
66    pub(crate) dry_run: ::std::option::Option<bool>,
67    pub(crate) ipam_id: ::std::option::Option<::std::string::String>,
68    pub(crate) cascade: ::std::option::Option<bool>,
69}
70impl DeleteIpamInputBuilder {
71    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
72    pub fn dry_run(mut self, input: bool) -> Self {
73        self.dry_run = ::std::option::Option::Some(input);
74        self
75    }
76    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
77    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
78        self.dry_run = input;
79        self
80    }
81    /// <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
82    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
83        &self.dry_run
84    }
85    /// <p>The ID of the IPAM to delete.</p>
86    /// This field is required.
87    pub fn ipam_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.ipam_id = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The ID of the IPAM to delete.</p>
92    pub fn set_ipam_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.ipam_id = input;
94        self
95    }
96    /// <p>The ID of the IPAM to delete.</p>
97    pub fn get_ipam_id(&self) -> &::std::option::Option<::std::string::String> {
98        &self.ipam_id
99    }
100    /// <p>Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. You cannot delete the IPAM with this option if there is a pool in your public scope. If you use this option, IPAM does the following:</p>
101    /// <ul>
102    /// <li>
103    /// <p>Deallocates any CIDRs allocated to VPC resources (such as VPCs) in pools in private scopes.</p><note>
104    /// <p>No VPC resources are deleted as a result of enabling this option. The CIDR associated with the resource will no longer be allocated from an IPAM pool, but the CIDR itself will remain unchanged.</p>
105    /// </note></li>
106    /// <li>
107    /// <p>Deprovisions all IPv4 CIDRs provisioned to IPAM pools in private scopes.</p></li>
108    /// <li>
109    /// <p>Deletes all IPAM pools in private scopes.</p></li>
110    /// <li>
111    /// <p>Deletes all non-default private scopes in the IPAM.</p></li>
112    /// <li>
113    /// <p>Deletes the default public and private scopes and the IPAM.</p></li>
114    /// </ul>
115    pub fn cascade(mut self, input: bool) -> Self {
116        self.cascade = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. You cannot delete the IPAM with this option if there is a pool in your public scope. If you use this option, IPAM does the following:</p>
120    /// <ul>
121    /// <li>
122    /// <p>Deallocates any CIDRs allocated to VPC resources (such as VPCs) in pools in private scopes.</p><note>
123    /// <p>No VPC resources are deleted as a result of enabling this option. The CIDR associated with the resource will no longer be allocated from an IPAM pool, but the CIDR itself will remain unchanged.</p>
124    /// </note></li>
125    /// <li>
126    /// <p>Deprovisions all IPv4 CIDRs provisioned to IPAM pools in private scopes.</p></li>
127    /// <li>
128    /// <p>Deletes all IPAM pools in private scopes.</p></li>
129    /// <li>
130    /// <p>Deletes all non-default private scopes in the IPAM.</p></li>
131    /// <li>
132    /// <p>Deletes the default public and private scopes and the IPAM.</p></li>
133    /// </ul>
134    pub fn set_cascade(mut self, input: ::std::option::Option<bool>) -> Self {
135        self.cascade = input;
136        self
137    }
138    /// <p>Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. You cannot delete the IPAM with this option if there is a pool in your public scope. If you use this option, IPAM does the following:</p>
139    /// <ul>
140    /// <li>
141    /// <p>Deallocates any CIDRs allocated to VPC resources (such as VPCs) in pools in private scopes.</p><note>
142    /// <p>No VPC resources are deleted as a result of enabling this option. The CIDR associated with the resource will no longer be allocated from an IPAM pool, but the CIDR itself will remain unchanged.</p>
143    /// </note></li>
144    /// <li>
145    /// <p>Deprovisions all IPv4 CIDRs provisioned to IPAM pools in private scopes.</p></li>
146    /// <li>
147    /// <p>Deletes all IPAM pools in private scopes.</p></li>
148    /// <li>
149    /// <p>Deletes all non-default private scopes in the IPAM.</p></li>
150    /// <li>
151    /// <p>Deletes the default public and private scopes and the IPAM.</p></li>
152    /// </ul>
153    pub fn get_cascade(&self) -> &::std::option::Option<bool> {
154        &self.cascade
155    }
156    /// Consumes the builder and constructs a [`DeleteIpamInput`](crate::operation::delete_ipam::DeleteIpamInput).
157    pub fn build(self) -> ::std::result::Result<crate::operation::delete_ipam::DeleteIpamInput, ::aws_smithy_types::error::operation::BuildError> {
158        ::std::result::Result::Ok(crate::operation::delete_ipam::DeleteIpamInput {
159            dry_run: self.dry_run,
160            ipam_id: self.ipam_id,
161            cascade: self.cascade,
162        })
163    }
164}