aws_sdk_ec2/operation/create_ipam/
_create_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 CreateIpamInput {
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>A description for the IPAM.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>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>
11    /// <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>
12    pub operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>,
13    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
14    pub tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
15    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p>
16    pub client_token: ::std::option::Option<::std::string::String>,
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 CreateIpamInput {
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>A description for the IPAM.</p>
37    pub fn description(&self) -> ::std::option::Option<&str> {
38        self.description.as_deref()
39    }
40    /// <p>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>
41    /// <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>
42    ///
43    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.operating_regions.is_none()`.
44    pub fn operating_regions(&self) -> &[crate::types::AddIpamOperatingRegion] {
45        self.operating_regions.as_deref().unwrap_or_default()
46    }
47    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
48    ///
49    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_specifications.is_none()`.
50    pub fn tag_specifications(&self) -> &[crate::types::TagSpecification] {
51        self.tag_specifications.as_deref().unwrap_or_default()
52    }
53    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p>
54    pub fn client_token(&self) -> ::std::option::Option<&str> {
55        self.client_token.as_deref()
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 CreateIpamInput {
78    /// Creates a new builder-style object to manufacture [`CreateIpamInput`](crate::operation::create_ipam::CreateIpamInput).
79    pub fn builder() -> crate::operation::create_ipam::builders::CreateIpamInputBuilder {
80        crate::operation::create_ipam::builders::CreateIpamInputBuilder::default()
81    }
82}
83
84/// A builder for [`CreateIpamInput`](crate::operation::create_ipam::CreateIpamInput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct CreateIpamInputBuilder {
88    pub(crate) dry_run: ::std::option::Option<bool>,
89    pub(crate) description: ::std::option::Option<::std::string::String>,
90    pub(crate) operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>,
91    pub(crate) tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
92    pub(crate) client_token: ::std::option::Option<::std::string::String>,
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 CreateIpamInputBuilder {
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>A description for the IPAM.</p>
113    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.description = ::std::option::Option::Some(input.into());
115        self
116    }
117    /// <p>A description for the IPAM.</p>
118    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.description = input;
120        self
121    }
122    /// <p>A description for the IPAM.</p>
123    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
124        &self.description
125    }
126    /// Appends an item to `operating_regions`.
127    ///
128    /// To override the contents of this collection use [`set_operating_regions`](Self::set_operating_regions).
129    ///
130    /// <p>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>
131    /// <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>
132    pub fn operating_regions(mut self, input: crate::types::AddIpamOperatingRegion) -> Self {
133        let mut v = self.operating_regions.unwrap_or_default();
134        v.push(input);
135        self.operating_regions = ::std::option::Option::Some(v);
136        self
137    }
138    /// <p>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>
139    /// <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>
140    pub fn set_operating_regions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>) -> Self {
141        self.operating_regions = input;
142        self
143    }
144    /// <p>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>
145    /// <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>
146    pub fn get_operating_regions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>> {
147        &self.operating_regions
148    }
149    /// Appends an item to `tag_specifications`.
150    ///
151    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
152    ///
153    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
154    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
155        let mut v = self.tag_specifications.unwrap_or_default();
156        v.push(input);
157        self.tag_specifications = ::std::option::Option::Some(v);
158        self
159    }
160    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
161    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
162        self.tag_specifications = input;
163        self
164    }
165    /// <p>The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p>
166    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
167        &self.tag_specifications
168    }
169    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p>
170    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.client_token = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p>
175    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.client_token = input;
177        self
178    }
179    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p>
180    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
181        &self.client_token
182    }
183    /// <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>
184    pub fn tier(mut self, input: crate::types::IpamTier) -> Self {
185        self.tier = ::std::option::Option::Some(input);
186        self
187    }
188    /// <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>
189    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::IpamTier>) -> Self {
190        self.tier = input;
191        self
192    }
193    /// <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>
194    pub fn get_tier(&self) -> &::std::option::Option<crate::types::IpamTier> {
195        &self.tier
196    }
197    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
198    pub fn enable_private_gua(mut self, input: bool) -> Self {
199        self.enable_private_gua = ::std::option::Option::Some(input);
200        self
201    }
202    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
203    pub fn set_enable_private_gua(mut self, input: ::std::option::Option<bool>) -> Self {
204        self.enable_private_gua = input;
205        self
206    }
207    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
208    pub fn get_enable_private_gua(&self) -> &::std::option::Option<bool> {
209        &self.enable_private_gua
210    }
211    /// <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>
212    /// <p>Possible values:</p>
213    /// <ul>
214    /// <li>
215    /// <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>
216    /// <li>
217    /// <p><code>resource-owner</code>: The Amazon Web Services account that owns the IP address is charged for the active IP address.</p></li>
218    /// </ul>
219    pub fn metered_account(mut self, input: crate::types::IpamMeteredAccount) -> Self {
220        self.metered_account = ::std::option::Option::Some(input);
221        self
222    }
223    /// <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>
224    /// <p>Possible values:</p>
225    /// <ul>
226    /// <li>
227    /// <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>
228    /// <li>
229    /// <p><code>resource-owner</code>: The Amazon Web Services account that owns the IP address is charged for the active IP address.</p></li>
230    /// </ul>
231    pub fn set_metered_account(mut self, input: ::std::option::Option<crate::types::IpamMeteredAccount>) -> Self {
232        self.metered_account = input;
233        self
234    }
235    /// <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>
236    /// <p>Possible values:</p>
237    /// <ul>
238    /// <li>
239    /// <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>
240    /// <li>
241    /// <p><code>resource-owner</code>: The Amazon Web Services account that owns the IP address is charged for the active IP address.</p></li>
242    /// </ul>
243    pub fn get_metered_account(&self) -> &::std::option::Option<crate::types::IpamMeteredAccount> {
244        &self.metered_account
245    }
246    /// Consumes the builder and constructs a [`CreateIpamInput`](crate::operation::create_ipam::CreateIpamInput).
247    pub fn build(self) -> ::std::result::Result<crate::operation::create_ipam::CreateIpamInput, ::aws_smithy_types::error::operation::BuildError> {
248        ::std::result::Result::Ok(crate::operation::create_ipam::CreateIpamInput {
249            dry_run: self.dry_run,
250            description: self.description,
251            operating_regions: self.operating_regions,
252            tag_specifications: self.tag_specifications,
253            client_token: self.client_token,
254            tier: self.tier,
255            enable_private_gua: self.enable_private_gua,
256            metered_account: self.metered_account,
257        })
258    }
259}