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}
22impl CreateIpamInput {
23    /// <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>
24    pub fn dry_run(&self) -> ::std::option::Option<bool> {
25        self.dry_run
26    }
27    /// <p>A description for the IPAM.</p>
28    pub fn description(&self) -> ::std::option::Option<&str> {
29        self.description.as_deref()
30    }
31    /// <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>
32    /// <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>
33    ///
34    /// 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()`.
35    pub fn operating_regions(&self) -> &[crate::types::AddIpamOperatingRegion] {
36        self.operating_regions.as_deref().unwrap_or_default()
37    }
38    /// <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>
39    ///
40    /// 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()`.
41    pub fn tag_specifications(&self) -> &[crate::types::TagSpecification] {
42        self.tag_specifications.as_deref().unwrap_or_default()
43    }
44    /// <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>
45    pub fn client_token(&self) -> ::std::option::Option<&str> {
46        self.client_token.as_deref()
47    }
48    /// <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>
49    pub fn tier(&self) -> ::std::option::Option<&crate::types::IpamTier> {
50        self.tier.as_ref()
51    }
52    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
53    pub fn enable_private_gua(&self) -> ::std::option::Option<bool> {
54        self.enable_private_gua
55    }
56}
57impl CreateIpamInput {
58    /// Creates a new builder-style object to manufacture [`CreateIpamInput`](crate::operation::create_ipam::CreateIpamInput).
59    pub fn builder() -> crate::operation::create_ipam::builders::CreateIpamInputBuilder {
60        crate::operation::create_ipam::builders::CreateIpamInputBuilder::default()
61    }
62}
63
64/// A builder for [`CreateIpamInput`](crate::operation::create_ipam::CreateIpamInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct CreateIpamInputBuilder {
68    pub(crate) dry_run: ::std::option::Option<bool>,
69    pub(crate) description: ::std::option::Option<::std::string::String>,
70    pub(crate) operating_regions: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>,
71    pub(crate) tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
72    pub(crate) client_token: ::std::option::Option<::std::string::String>,
73    pub(crate) tier: ::std::option::Option<crate::types::IpamTier>,
74    pub(crate) enable_private_gua: ::std::option::Option<bool>,
75}
76impl CreateIpamInputBuilder {
77    /// <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>
78    pub fn dry_run(mut self, input: bool) -> Self {
79        self.dry_run = ::std::option::Option::Some(input);
80        self
81    }
82    /// <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>
83    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
84        self.dry_run = input;
85        self
86    }
87    /// <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>
88    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
89        &self.dry_run
90    }
91    /// <p>A description for the IPAM.</p>
92    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.description = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>A description for the IPAM.</p>
97    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.description = input;
99        self
100    }
101    /// <p>A description for the IPAM.</p>
102    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
103        &self.description
104    }
105    /// Appends an item to `operating_regions`.
106    ///
107    /// To override the contents of this collection use [`set_operating_regions`](Self::set_operating_regions).
108    ///
109    /// <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>
110    /// <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>
111    pub fn operating_regions(mut self, input: crate::types::AddIpamOperatingRegion) -> Self {
112        let mut v = self.operating_regions.unwrap_or_default();
113        v.push(input);
114        self.operating_regions = ::std::option::Option::Some(v);
115        self
116    }
117    /// <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>
118    /// <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>
119    pub fn set_operating_regions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>>) -> Self {
120        self.operating_regions = input;
121        self
122    }
123    /// <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>
124    /// <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>
125    pub fn get_operating_regions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddIpamOperatingRegion>> {
126        &self.operating_regions
127    }
128    /// Appends an item to `tag_specifications`.
129    ///
130    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
131    ///
132    /// <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>
133    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
134        let mut v = self.tag_specifications.unwrap_or_default();
135        v.push(input);
136        self.tag_specifications = ::std::option::Option::Some(v);
137        self
138    }
139    /// <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>
140    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
141        self.tag_specifications = input;
142        self
143    }
144    /// <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>
145    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
146        &self.tag_specifications
147    }
148    /// <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>
149    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.client_token = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <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>
154    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.client_token = input;
156        self
157    }
158    /// <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>
159    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
160        &self.client_token
161    }
162    /// <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>
163    pub fn tier(mut self, input: crate::types::IpamTier) -> Self {
164        self.tier = ::std::option::Option::Some(input);
165        self
166    }
167    /// <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>
168    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::IpamTier>) -> Self {
169        self.tier = input;
170        self
171    }
172    /// <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>
173    pub fn get_tier(&self) -> &::std::option::Option<crate::types::IpamTier> {
174        &self.tier
175    }
176    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
177    pub fn enable_private_gua(mut self, input: bool) -> Self {
178        self.enable_private_gua = ::std::option::Option::Some(input);
179        self
180    }
181    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
182    pub fn set_enable_private_gua(mut self, input: ::std::option::Option<bool>) -> Self {
183        self.enable_private_gua = input;
184        self
185    }
186    /// <p>Enable this option to use your own GUA ranges as private IPv6 addresses. This option is disabled by default.</p>
187    pub fn get_enable_private_gua(&self) -> &::std::option::Option<bool> {
188        &self.enable_private_gua
189    }
190    /// Consumes the builder and constructs a [`CreateIpamInput`](crate::operation::create_ipam::CreateIpamInput).
191    pub fn build(self) -> ::std::result::Result<crate::operation::create_ipam::CreateIpamInput, ::aws_smithy_types::error::operation::BuildError> {
192        ::std::result::Result::Ok(crate::operation::create_ipam::CreateIpamInput {
193            dry_run: self.dry_run,
194            description: self.description,
195            operating_regions: self.operating_regions,
196            tag_specifications: self.tag_specifications,
197            client_token: self.client_token,
198            tier: self.tier,
199            enable_private_gua: self.enable_private_gua,
200        })
201    }
202}