aws_sdk_ec2/operation/modify_ipam/
_modify_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 ModifyIpamInput {
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 you want to modify.</p>
9    pub ipam_id: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the IPAM you want to modify.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
13    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
14    pub add_operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>,
15    /// <p>The operating Regions to remove.</p>
16    pub remove_operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::RemoveIpamOperatingRegion>>,
17    /// <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing &gt; IPAM tab</a>.</p>
18    pub tier: ::std::option::Option<crate::types::IpamTier>,
19    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
20    pub enable_private_gua: ::std::option::Option<bool>,
21    /// <p>A metered account is an Amazon Web Services account that is charged for active IP addresses managed in IPAM. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/ipam-enable-cost-distro.html">Enable cost distribution</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
22    /// <p>Possible values:</p>
23    /// <ul>
24    /// <li>
25    /// <p><code>ipam-owner</code> (default): The Amazon Web Services account which owns the IPAM is charged for all active IP addresses managed in IPAM.</p></li>
26    /// <li>
27    /// <p><code>resource-owner</code>: The Amazon Web Services account that owns the IP address is charged for the active IP address.</p></li>
28    /// </ul>
29    pub metered_account: ::std::option::Option<crate::types::IpamMeteredAccount>,
30}
31impl ModifyIpamInput {
32    /// <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>
33    pub fn dry_run(&self) -> ::std::option::Option<bool> {
34        self.dry_run
35    }
36    /// <p>The ID of the IPAM you want to modify.</p>
37    pub fn ipam_id(&self) -> ::std::option::Option<&str> {
38        self.ipam_id.as_deref()
39    }
40    /// <p>The description of the IPAM you want to modify.</p>
41    pub fn description(&self) -> ::std::option::Option<&str> {
42        self.description.as_deref()
43    }
44    /// <p>Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
45    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
46    ///
47    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.add_operating_regions.is_none()`.
48    pub fn add_operating_regions(&self) -> &[crate::types::AddIpamOperatingRegion] {
49        self.add_operating_regions.as_deref().unwrap_or_default()
50    }
51    /// <p>The operating Regions to remove.</p>
52    ///
53    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.remove_operating_regions.is_none()`.
54    pub fn remove_operating_regions(&self) -> &[crate::types::RemoveIpamOperatingRegion] {
55        self.remove_operating_regions.as_deref().unwrap_or_default()
56    }
57    /// <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing &gt; IPAM tab</a>.</p>
58    pub fn tier(&self) -> ::std::option::Option<&crate::types::IpamTier> {
59        self.tier.as_ref()
60    }
61    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
62    pub fn enable_private_gua(&self) -> ::std::option::Option<bool> {
63        self.enable_private_gua
64    }
65    /// <p>A metered account is an Amazon Web Services account that is charged for active IP addresses managed in IPAM. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/ipam-enable-cost-distro.html">Enable cost distribution</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
66    /// <p>Possible values:</p>
67    /// <ul>
68    /// <li>
69    /// <p><code>ipam-owner</code> (default): The Amazon Web Services account which owns the IPAM is charged for all active IP addresses managed in IPAM.</p></li>
70    /// <li>
71    /// <p><code>resource-owner</code>: The Amazon Web Services account that owns the IP address is charged for the active IP address.</p></li>
72    /// </ul>
73    pub fn metered_account(&self) -> ::std::option::Option<&crate::types::IpamMeteredAccount> {
74        self.metered_account.as_ref()
75    }
76}
77impl ModifyIpamInput {
78    /// Creates a new builder-style object to manufacture [`ModifyIpamInput`](crate::operation::modify_ipam::ModifyIpamInput).
79    pub fn builder() -> crate::operation::modify_ipam::builders::ModifyIpamInputBuilder {
80        crate::operation::modify_ipam::builders::ModifyIpamInputBuilder::default()
81    }
82}
83
84/// A builder for [`ModifyIpamInput`](crate::operation::modify_ipam::ModifyIpamInput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct ModifyIpamInputBuilder {
88    pub(crate) dry_run: ::std::option::Option<bool>,
89    pub(crate) ipam_id: ::std::option::Option<::std::string::String>,
90    pub(crate) description: ::std::option::Option<::std::string::String>,
91    pub(crate) add_operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>,
92    pub(crate) remove_operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::RemoveIpamOperatingRegion>>,
93    pub(crate) tier: ::std::option::Option<crate::types::IpamTier>,
94    pub(crate) enable_private_gua: ::std::option::Option<bool>,
95    pub(crate) metered_account: ::std::option::Option<crate::types::IpamMeteredAccount>,
96}
97impl ModifyIpamInputBuilder {
98    /// <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>
99    pub fn dry_run(mut self, input: bool) -> Self {
100        self.dry_run = ::std::option::Option::Some(input);
101        self
102    }
103    /// <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>
104    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
105        self.dry_run = input;
106        self
107    }
108    /// <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>
109    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
110        &self.dry_run
111    }
112    /// <p>The ID of the IPAM you want to modify.</p>
113    /// This field is required.
114    pub fn ipam_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.ipam_id = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The ID of the IPAM you want to modify.</p>
119    pub fn set_ipam_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.ipam_id = input;
121        self
122    }
123    /// <p>The ID of the IPAM you want to modify.</p>
124    pub fn get_ipam_id(&self) -> &::std::option::Option<::std::string::String> {
125        &self.ipam_id
126    }
127    /// <p>The description of the IPAM you want to modify.</p>
128    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.description = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The description of the IPAM you want to modify.</p>
133    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.description = input;
135        self
136    }
137    /// <p>The description of the IPAM you want to modify.</p>
138    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
139        &self.description
140    }
141    /// Appends an item to `add_operating_regions`.
142    ///
143    /// To override the contents of this collection use [`set_add_operating_regions`](Self::set_add_operating_regions).
144    ///
145    /// <p>Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
146    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
147    pub fn add_operating_regions(mut self, input: crate::types::AddIpamOperatingRegion) -> Self {
148        let mut v = self.add_operating_regions.unwrap_or_default();
149        v.push(input);
150        self.add_operating_regions = ::std::option::Option::Some(v);
151        self
152    }
153    /// <p>Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
154    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
155    pub fn set_add_operating_regions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>) -> Self {
156        self.add_operating_regions = input;
157        self
158    }
159    /// <p>Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.</p>
160    /// <p>For more information about operating Regions, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html">Create an IPAM</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
161    pub fn get_add_operating_regions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>> {
162        &self.add_operating_regions
163    }
164    /// Appends an item to `remove_operating_regions`.
165    ///
166    /// To override the contents of this collection use [`set_remove_operating_regions`](Self::set_remove_operating_regions).
167    ///
168    /// <p>The operating Regions to remove.</p>
169    pub fn remove_operating_regions(mut self, input: crate::types::RemoveIpamOperatingRegion) -> Self {
170        let mut v = self.remove_operating_regions.unwrap_or_default();
171        v.push(input);
172        self.remove_operating_regions = ::std::option::Option::Some(v);
173        self
174    }
175    /// <p>The operating Regions to remove.</p>
176    pub fn set_remove_operating_regions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RemoveIpamOperatingRegion>>) -> Self {
177        self.remove_operating_regions = input;
178        self
179    }
180    /// <p>The operating Regions to remove.</p>
181    pub fn get_remove_operating_regions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RemoveIpamOperatingRegion>> {
182        &self.remove_operating_regions
183    }
184    /// <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing &gt; IPAM tab</a>.</p>
185    pub fn tier(mut self, input: crate::types::IpamTier) -> Self {
186        self.tier = ::std::option::Option::Some(input);
187        self
188    }
189    /// <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing &gt; IPAM tab</a>.</p>
190    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::IpamTier>) -> Self {
191        self.tier = input;
192        self
193    }
194    /// <p>IPAM is offered in a Free Tier and an Advanced Tier. For more information about the features available in each tier and the costs associated with the tiers, see <a href="http://aws.amazon.com/vpc/pricing/">Amazon VPC pricing &gt; IPAM tab</a>.</p>
195    pub fn get_tier(&self) -> &::std::option::Option<crate::types::IpamTier> {
196        &self.tier
197    }
198    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
199    pub fn enable_private_gua(mut self, input: bool) -> Self {
200        self.enable_private_gua = ::std::option::Option::Some(input);
201        self
202    }
203    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
204    pub fn set_enable_private_gua(mut self, input: ::std::option::Option<bool>) -> Self {
205        self.enable_private_gua = input;
206        self
207    }
208    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
209    pub fn get_enable_private_gua(&self) -> &::std::option::Option<bool> {
210        &self.enable_private_gua
211    }
212    /// <p>A metered account is an Amazon Web Services account that is charged for active IP addresses managed in IPAM. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/ipam-enable-cost-distro.html">Enable cost distribution</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
213    /// <p>Possible values:</p>
214    /// <ul>
215    /// <li>
216    /// <p><code>ipam-owner</code> (default): The Amazon Web Services account which owns the IPAM is charged for all active IP addresses managed in IPAM.</p></li>
217    /// <li>
218    /// <p><code>resource-owner</code>: The Amazon Web Services account that owns the IP address is charged for the active IP address.</p></li>
219    /// </ul>
220    pub fn metered_account(mut self, input: crate::types::IpamMeteredAccount) -> Self {
221        self.metered_account = ::std::option::Option::Some(input);
222        self
223    }
224    /// <p>A metered account is an Amazon Web Services account that is charged for active IP addresses managed in IPAM. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/ipam-enable-cost-distro.html">Enable cost distribution</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
225    /// <p>Possible values:</p>
226    /// <ul>
227    /// <li>
228    /// <p><code>ipam-owner</code> (default): The Amazon Web Services account which owns the IPAM is charged for all active IP addresses managed in IPAM.</p></li>
229    /// <li>
230    /// <p><code>resource-owner</code>: The Amazon Web Services account that owns the IP address is charged for the active IP address.</p></li>
231    /// </ul>
232    pub fn set_metered_account(mut self, input: ::std::option::Option<crate::types::IpamMeteredAccount>) -> Self {
233        self.metered_account = input;
234        self
235    }
236    /// <p>A metered account is an Amazon Web Services account that is charged for active IP addresses managed in IPAM. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/ipam-enable-cost-distro.html">Enable cost distribution</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
237    /// <p>Possible values:</p>
238    /// <ul>
239    /// <li>
240    /// <p><code>ipam-owner</code> (default): The Amazon Web Services account which owns the IPAM is charged for all active IP addresses managed in IPAM.</p></li>
241    /// <li>
242    /// <p><code>resource-owner</code>: The Amazon Web Services account that owns the IP address is charged for the active IP address.</p></li>
243    /// </ul>
244    pub fn get_metered_account(&self) -> &::std::option::Option<crate::types::IpamMeteredAccount> {
245        &self.metered_account
246    }
247    /// Consumes the builder and constructs a [`ModifyIpamInput`](crate::operation::modify_ipam::ModifyIpamInput).
248    pub fn build(self) -> ::std::result::Result<crate::operation::modify_ipam::ModifyIpamInput, ::aws_smithy_types::error::operation::BuildError> {
249        ::std::result::Result::Ok(crate::operation::modify_ipam::ModifyIpamInput {
250            dry_run: self.dry_run,
251            ipam_id: self.ipam_id,
252            description: self.description,
253            add_operating_regions: self.add_operating_regions,
254            remove_operating_regions: self.remove_operating_regions,
255            tier: self.tier,
256            enable_private_gua: self.enable_private_gua,
257            metered_account: self.metered_account,
258        })
259    }
260}