aws_sdk_ec2/operation/create_vpc/_create_vpc_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 CreateVpcInput {
6 /// <p>The IPv4 network range for the VPC, in CIDR notation. For example, <code>10.0.0.0/16</code>. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
7 pub cidr_block: ::std::option::Option<::std::string::String>,
8 /// <p>The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.</p>
9 pub ipv6_pool: ::std::option::Option<::std::string::String>,
10 /// <p>The IPv6 CIDR block from the IPv6 address pool. You must also specify <code>Ipv6Pool</code> in the request.</p>
11 /// <p>To let Amazon choose the IPv6 CIDR block for you, omit this parameter.</p>
12 pub ipv6_cidr_block: ::std::option::Option<::std::string::String>,
13 /// <p>The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
14 pub ipv4_ipam_pool_id: ::std::option::Option<::std::string::String>,
15 /// <p>The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
16 pub ipv4_netmask_length: ::std::option::Option<i32>,
17 /// <p>The ID of an IPv6 IPAM pool which will be used to allocate this VPC an IPv6 CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
18 pub ipv6_ipam_pool_id: ::std::option::Option<::std::string::String>,
19 /// <p>The netmask length of the IPv6 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
20 pub ipv6_netmask_length: ::std::option::Option<i32>,
21 /// <p>The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.</p>
22 /// <p>You must set <code>AmazonProvidedIpv6CidrBlock</code> to <code>true</code> to use this parameter.</p>
23 pub ipv6_cidr_block_network_border_group: ::std::option::Option<::std::string::String>,
24 /// <p>Specifies the encryption control configuration to apply to the VPC during creation. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements.</p>
25 /// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html">Enforce VPC encryption in transit</a> in the <i>Amazon VPC User Guide</i>.</p>
26 pub vpc_encryption_control: ::std::option::Option<crate::types::VpcEncryptionControlConfiguration>,
27 /// <p>The tags to assign to the VPC.</p>
28 pub tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
29 /// <p>Checks 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>
30 pub dry_run: ::std::option::Option<bool>,
31 /// <p>The tenancy options for instances launched into the VPC. For <code>default</code>, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For <code>dedicated</code>, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of <code>dedicated</code> or <code>host</code> into a dedicated tenancy VPC.</p>
32 /// <p><b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p>
33 /// <p>Default: <code>default</code></p>
34 pub instance_tenancy: ::std::option::Option<crate::types::Tenancy>,
35 /// <p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.</p>
36 pub amazon_provided_ipv6_cidr_block: ::std::option::Option<bool>,
37}
38impl CreateVpcInput {
39 /// <p>The IPv4 network range for the VPC, in CIDR notation. For example, <code>10.0.0.0/16</code>. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
40 pub fn cidr_block(&self) -> ::std::option::Option<&str> {
41 self.cidr_block.as_deref()
42 }
43 /// <p>The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.</p>
44 pub fn ipv6_pool(&self) -> ::std::option::Option<&str> {
45 self.ipv6_pool.as_deref()
46 }
47 /// <p>The IPv6 CIDR block from the IPv6 address pool. You must also specify <code>Ipv6Pool</code> in the request.</p>
48 /// <p>To let Amazon choose the IPv6 CIDR block for you, omit this parameter.</p>
49 pub fn ipv6_cidr_block(&self) -> ::std::option::Option<&str> {
50 self.ipv6_cidr_block.as_deref()
51 }
52 /// <p>The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
53 pub fn ipv4_ipam_pool_id(&self) -> ::std::option::Option<&str> {
54 self.ipv4_ipam_pool_id.as_deref()
55 }
56 /// <p>The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
57 pub fn ipv4_netmask_length(&self) -> ::std::option::Option<i32> {
58 self.ipv4_netmask_length
59 }
60 /// <p>The ID of an IPv6 IPAM pool which will be used to allocate this VPC an IPv6 CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
61 pub fn ipv6_ipam_pool_id(&self) -> ::std::option::Option<&str> {
62 self.ipv6_ipam_pool_id.as_deref()
63 }
64 /// <p>The netmask length of the IPv6 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
65 pub fn ipv6_netmask_length(&self) -> ::std::option::Option<i32> {
66 self.ipv6_netmask_length
67 }
68 /// <p>The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.</p>
69 /// <p>You must set <code>AmazonProvidedIpv6CidrBlock</code> to <code>true</code> to use this parameter.</p>
70 pub fn ipv6_cidr_block_network_border_group(&self) -> ::std::option::Option<&str> {
71 self.ipv6_cidr_block_network_border_group.as_deref()
72 }
73 /// <p>Specifies the encryption control configuration to apply to the VPC during creation. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements.</p>
74 /// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html">Enforce VPC encryption in transit</a> in the <i>Amazon VPC User Guide</i>.</p>
75 pub fn vpc_encryption_control(&self) -> ::std::option::Option<&crate::types::VpcEncryptionControlConfiguration> {
76 self.vpc_encryption_control.as_ref()
77 }
78 /// <p>The tags to assign to the VPC.</p>
79 ///
80 /// 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()`.
81 pub fn tag_specifications(&self) -> &[crate::types::TagSpecification] {
82 self.tag_specifications.as_deref().unwrap_or_default()
83 }
84 /// <p>Checks 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>
85 pub fn dry_run(&self) -> ::std::option::Option<bool> {
86 self.dry_run
87 }
88 /// <p>The tenancy options for instances launched into the VPC. For <code>default</code>, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For <code>dedicated</code>, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of <code>dedicated</code> or <code>host</code> into a dedicated tenancy VPC.</p>
89 /// <p><b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p>
90 /// <p>Default: <code>default</code></p>
91 pub fn instance_tenancy(&self) -> ::std::option::Option<&crate::types::Tenancy> {
92 self.instance_tenancy.as_ref()
93 }
94 /// <p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.</p>
95 pub fn amazon_provided_ipv6_cidr_block(&self) -> ::std::option::Option<bool> {
96 self.amazon_provided_ipv6_cidr_block
97 }
98}
99impl CreateVpcInput {
100 /// Creates a new builder-style object to manufacture [`CreateVpcInput`](crate::operation::create_vpc::CreateVpcInput).
101 pub fn builder() -> crate::operation::create_vpc::builders::CreateVpcInputBuilder {
102 crate::operation::create_vpc::builders::CreateVpcInputBuilder::default()
103 }
104}
105
106/// A builder for [`CreateVpcInput`](crate::operation::create_vpc::CreateVpcInput).
107#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
108#[non_exhaustive]
109pub struct CreateVpcInputBuilder {
110 pub(crate) cidr_block: ::std::option::Option<::std::string::String>,
111 pub(crate) ipv6_pool: ::std::option::Option<::std::string::String>,
112 pub(crate) ipv6_cidr_block: ::std::option::Option<::std::string::String>,
113 pub(crate) ipv4_ipam_pool_id: ::std::option::Option<::std::string::String>,
114 pub(crate) ipv4_netmask_length: ::std::option::Option<i32>,
115 pub(crate) ipv6_ipam_pool_id: ::std::option::Option<::std::string::String>,
116 pub(crate) ipv6_netmask_length: ::std::option::Option<i32>,
117 pub(crate) ipv6_cidr_block_network_border_group: ::std::option::Option<::std::string::String>,
118 pub(crate) vpc_encryption_control: ::std::option::Option<crate::types::VpcEncryptionControlConfiguration>,
119 pub(crate) tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
120 pub(crate) dry_run: ::std::option::Option<bool>,
121 pub(crate) instance_tenancy: ::std::option::Option<crate::types::Tenancy>,
122 pub(crate) amazon_provided_ipv6_cidr_block: ::std::option::Option<bool>,
123}
124impl CreateVpcInputBuilder {
125 /// <p>The IPv4 network range for the VPC, in CIDR notation. For example, <code>10.0.0.0/16</code>. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
126 pub fn cidr_block(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.cidr_block = ::std::option::Option::Some(input.into());
128 self
129 }
130 /// <p>The IPv4 network range for the VPC, in CIDR notation. For example, <code>10.0.0.0/16</code>. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
131 pub fn set_cidr_block(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.cidr_block = input;
133 self
134 }
135 /// <p>The IPv4 network range for the VPC, in CIDR notation. For example, <code>10.0.0.0/16</code>. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p>
136 pub fn get_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
137 &self.cidr_block
138 }
139 /// <p>The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.</p>
140 pub fn ipv6_pool(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141 self.ipv6_pool = ::std::option::Option::Some(input.into());
142 self
143 }
144 /// <p>The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.</p>
145 pub fn set_ipv6_pool(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146 self.ipv6_pool = input;
147 self
148 }
149 /// <p>The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.</p>
150 pub fn get_ipv6_pool(&self) -> &::std::option::Option<::std::string::String> {
151 &self.ipv6_pool
152 }
153 /// <p>The IPv6 CIDR block from the IPv6 address pool. You must also specify <code>Ipv6Pool</code> in the request.</p>
154 /// <p>To let Amazon choose the IPv6 CIDR block for you, omit this parameter.</p>
155 pub fn ipv6_cidr_block(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.ipv6_cidr_block = ::std::option::Option::Some(input.into());
157 self
158 }
159 /// <p>The IPv6 CIDR block from the IPv6 address pool. You must also specify <code>Ipv6Pool</code> in the request.</p>
160 /// <p>To let Amazon choose the IPv6 CIDR block for you, omit this parameter.</p>
161 pub fn set_ipv6_cidr_block(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.ipv6_cidr_block = input;
163 self
164 }
165 /// <p>The IPv6 CIDR block from the IPv6 address pool. You must also specify <code>Ipv6Pool</code> in the request.</p>
166 /// <p>To let Amazon choose the IPv6 CIDR block for you, omit this parameter.</p>
167 pub fn get_ipv6_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
168 &self.ipv6_cidr_block
169 }
170 /// <p>The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
171 pub fn ipv4_ipam_pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172 self.ipv4_ipam_pool_id = ::std::option::Option::Some(input.into());
173 self
174 }
175 /// <p>The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
176 pub fn set_ipv4_ipam_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.ipv4_ipam_pool_id = input;
178 self
179 }
180 /// <p>The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
181 pub fn get_ipv4_ipam_pool_id(&self) -> &::std::option::Option<::std::string::String> {
182 &self.ipv4_ipam_pool_id
183 }
184 /// <p>The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
185 pub fn ipv4_netmask_length(mut self, input: i32) -> Self {
186 self.ipv4_netmask_length = ::std::option::Option::Some(input);
187 self
188 }
189 /// <p>The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
190 pub fn set_ipv4_netmask_length(mut self, input: ::std::option::Option<i32>) -> Self {
191 self.ipv4_netmask_length = input;
192 self
193 }
194 /// <p>The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
195 pub fn get_ipv4_netmask_length(&self) -> &::std::option::Option<i32> {
196 &self.ipv4_netmask_length
197 }
198 /// <p>The ID of an IPv6 IPAM pool which will be used to allocate this VPC an IPv6 CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
199 pub fn ipv6_ipam_pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 self.ipv6_ipam_pool_id = ::std::option::Option::Some(input.into());
201 self
202 }
203 /// <p>The ID of an IPv6 IPAM pool which will be used to allocate this VPC an IPv6 CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
204 pub fn set_ipv6_ipam_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205 self.ipv6_ipam_pool_id = input;
206 self
207 }
208 /// <p>The ID of an IPv6 IPAM pool which will be used to allocate this VPC an IPv6 CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
209 pub fn get_ipv6_ipam_pool_id(&self) -> &::std::option::Option<::std::string::String> {
210 &self.ipv6_ipam_pool_id
211 }
212 /// <p>The netmask length of the IPv6 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
213 pub fn ipv6_netmask_length(mut self, input: i32) -> Self {
214 self.ipv6_netmask_length = ::std::option::Option::Some(input);
215 self
216 }
217 /// <p>The netmask length of the IPv6 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
218 pub fn set_ipv6_netmask_length(mut self, input: ::std::option::Option<i32>) -> Self {
219 self.ipv6_netmask_length = input;
220 self
221 }
222 /// <p>The netmask length of the IPv6 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see <a href="https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html">What is IPAM?</a> in the <i>Amazon VPC IPAM User Guide</i>.</p>
223 pub fn get_ipv6_netmask_length(&self) -> &::std::option::Option<i32> {
224 &self.ipv6_netmask_length
225 }
226 /// <p>The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.</p>
227 /// <p>You must set <code>AmazonProvidedIpv6CidrBlock</code> to <code>true</code> to use this parameter.</p>
228 pub fn ipv6_cidr_block_network_border_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
229 self.ipv6_cidr_block_network_border_group = ::std::option::Option::Some(input.into());
230 self
231 }
232 /// <p>The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.</p>
233 /// <p>You must set <code>AmazonProvidedIpv6CidrBlock</code> to <code>true</code> to use this parameter.</p>
234 pub fn set_ipv6_cidr_block_network_border_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235 self.ipv6_cidr_block_network_border_group = input;
236 self
237 }
238 /// <p>The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.</p>
239 /// <p>You must set <code>AmazonProvidedIpv6CidrBlock</code> to <code>true</code> to use this parameter.</p>
240 pub fn get_ipv6_cidr_block_network_border_group(&self) -> &::std::option::Option<::std::string::String> {
241 &self.ipv6_cidr_block_network_border_group
242 }
243 /// <p>Specifies the encryption control configuration to apply to the VPC during creation. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements.</p>
244 /// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html">Enforce VPC encryption in transit</a> in the <i>Amazon VPC User Guide</i>.</p>
245 pub fn vpc_encryption_control(mut self, input: crate::types::VpcEncryptionControlConfiguration) -> Self {
246 self.vpc_encryption_control = ::std::option::Option::Some(input);
247 self
248 }
249 /// <p>Specifies the encryption control configuration to apply to the VPC during creation. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements.</p>
250 /// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html">Enforce VPC encryption in transit</a> in the <i>Amazon VPC User Guide</i>.</p>
251 pub fn set_vpc_encryption_control(mut self, input: ::std::option::Option<crate::types::VpcEncryptionControlConfiguration>) -> Self {
252 self.vpc_encryption_control = input;
253 self
254 }
255 /// <p>Specifies the encryption control configuration to apply to the VPC during creation. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements.</p>
256 /// <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html">Enforce VPC encryption in transit</a> in the <i>Amazon VPC User Guide</i>.</p>
257 pub fn get_vpc_encryption_control(&self) -> &::std::option::Option<crate::types::VpcEncryptionControlConfiguration> {
258 &self.vpc_encryption_control
259 }
260 /// Appends an item to `tag_specifications`.
261 ///
262 /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
263 ///
264 /// <p>The tags to assign to the VPC.</p>
265 pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
266 let mut v = self.tag_specifications.unwrap_or_default();
267 v.push(input);
268 self.tag_specifications = ::std::option::Option::Some(v);
269 self
270 }
271 /// <p>The tags to assign to the VPC.</p>
272 pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
273 self.tag_specifications = input;
274 self
275 }
276 /// <p>The tags to assign to the VPC.</p>
277 pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
278 &self.tag_specifications
279 }
280 /// <p>Checks 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>
281 pub fn dry_run(mut self, input: bool) -> Self {
282 self.dry_run = ::std::option::Option::Some(input);
283 self
284 }
285 /// <p>Checks 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>
286 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
287 self.dry_run = input;
288 self
289 }
290 /// <p>Checks 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>
291 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
292 &self.dry_run
293 }
294 /// <p>The tenancy options for instances launched into the VPC. For <code>default</code>, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For <code>dedicated</code>, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of <code>dedicated</code> or <code>host</code> into a dedicated tenancy VPC.</p>
295 /// <p><b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p>
296 /// <p>Default: <code>default</code></p>
297 pub fn instance_tenancy(mut self, input: crate::types::Tenancy) -> Self {
298 self.instance_tenancy = ::std::option::Option::Some(input);
299 self
300 }
301 /// <p>The tenancy options for instances launched into the VPC. For <code>default</code>, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For <code>dedicated</code>, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of <code>dedicated</code> or <code>host</code> into a dedicated tenancy VPC.</p>
302 /// <p><b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p>
303 /// <p>Default: <code>default</code></p>
304 pub fn set_instance_tenancy(mut self, input: ::std::option::Option<crate::types::Tenancy>) -> Self {
305 self.instance_tenancy = input;
306 self
307 }
308 /// <p>The tenancy options for instances launched into the VPC. For <code>default</code>, instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For <code>dedicated</code>, instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of <code>dedicated</code> or <code>host</code> into a dedicated tenancy VPC.</p>
309 /// <p><b>Important:</b> The <code>host</code> value cannot be used with this parameter. Use the <code>default</code> or <code>dedicated</code> values only.</p>
310 /// <p>Default: <code>default</code></p>
311 pub fn get_instance_tenancy(&self) -> &::std::option::Option<crate::types::Tenancy> {
312 &self.instance_tenancy
313 }
314 /// <p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.</p>
315 pub fn amazon_provided_ipv6_cidr_block(mut self, input: bool) -> Self {
316 self.amazon_provided_ipv6_cidr_block = ::std::option::Option::Some(input);
317 self
318 }
319 /// <p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.</p>
320 pub fn set_amazon_provided_ipv6_cidr_block(mut self, input: ::std::option::Option<bool>) -> Self {
321 self.amazon_provided_ipv6_cidr_block = input;
322 self
323 }
324 /// <p>Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.</p>
325 pub fn get_amazon_provided_ipv6_cidr_block(&self) -> &::std::option::Option<bool> {
326 &self.amazon_provided_ipv6_cidr_block
327 }
328 /// Consumes the builder and constructs a [`CreateVpcInput`](crate::operation::create_vpc::CreateVpcInput).
329 pub fn build(self) -> ::std::result::Result<crate::operation::create_vpc::CreateVpcInput, ::aws_smithy_types::error::operation::BuildError> {
330 ::std::result::Result::Ok(crate::operation::create_vpc::CreateVpcInput {
331 cidr_block: self.cidr_block,
332 ipv6_pool: self.ipv6_pool,
333 ipv6_cidr_block: self.ipv6_cidr_block,
334 ipv4_ipam_pool_id: self.ipv4_ipam_pool_id,
335 ipv4_netmask_length: self.ipv4_netmask_length,
336 ipv6_ipam_pool_id: self.ipv6_ipam_pool_id,
337 ipv6_netmask_length: self.ipv6_netmask_length,
338 ipv6_cidr_block_network_border_group: self.ipv6_cidr_block_network_border_group,
339 vpc_encryption_control: self.vpc_encryption_control,
340 tag_specifications: self.tag_specifications,
341 dry_run: self.dry_run,
342 instance_tenancy: self.instance_tenancy,
343 amazon_provided_ipv6_cidr_block: self.amazon_provided_ipv6_cidr_block,
344 })
345 }
346}