Skip to main content

aws_sdk_ec2/operation/create_vpc_endpoint/
_create_vpc_endpoint_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 CreateVpcEndpointInput {
6    /// <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>
7    pub dry_run: ::std::option::Option<bool>,
8    /// <p>The type of endpoint.</p>
9    /// <p>Default: Gateway</p>
10    pub vpc_endpoint_type: ::std::option::Option<crate::types::VpcEndpointType>,
11    /// <p>The ID of the VPC.</p>
12    pub vpc_id: ::std::option::Option<::std::string::String>,
13    /// <p>The name of the endpoint service.</p>
14    pub service_name: ::std::option::Option<::std::string::String>,
15    /// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.</p>
16    pub policy_document: ::std::option::Option<::std::string::String>,
17    /// <p>(Gateway endpoint) The route table IDs.</p>
18    pub route_table_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
19    /// <p>(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create endpoint network interfaces. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
20    pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
21    /// <p>(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC.</p>
22    pub security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
23    /// <p>The IP address type for the endpoint.</p>
24    pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
25    /// <p>The DNS options for the endpoint.</p>
26    pub dns_options: ::std::option::Option<crate::types::DnsOptionsSpecification>,
27    /// <p>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">How to ensure idempotency</a>.</p>
28    pub client_token: ::std::option::Option<::std::string::String>,
29    /// <p>(Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, <code>kinesis.us-east-1.amazonaws.com</code>), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.</p>
30    /// <p>To use a private hosted zone, you must set the following VPC attributes to <code>true</code>: <code>enableDnsHostnames</code> and <code>enableDnsSupport</code>. Use <code>ModifyVpcAttribute</code> to set the VPC attributes.</p>
31    pub private_dns_enabled: ::std::option::Option<bool>,
32    /// <p>The tags to associate with the endpoint.</p>
33    pub tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
34    /// <p>The subnet configurations for the endpoint.</p>
35    pub subnet_configurations: ::std::option::Option<::std::vec::Vec<crate::types::SubnetConfiguration>>,
36    /// <p>The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.</p>
37    pub service_network_arn: ::std::option::Option<::std::string::String>,
38    /// <p>The Amazon Resource Name (ARN) of a resource configuration that will be associated with the VPC endpoint of type resource.</p>
39    pub resource_configuration_arn: ::std::option::Option<::std::string::String>,
40    /// <p>The Region where the service is hosted. The default is the current Region.</p>
41    pub service_region: ::std::option::Option<::std::string::String>,
42}
43impl CreateVpcEndpointInput {
44    /// <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>
45    pub fn dry_run(&self) -> ::std::option::Option<bool> {
46        self.dry_run
47    }
48    /// <p>The type of endpoint.</p>
49    /// <p>Default: Gateway</p>
50    pub fn vpc_endpoint_type(&self) -> ::std::option::Option<&crate::types::VpcEndpointType> {
51        self.vpc_endpoint_type.as_ref()
52    }
53    /// <p>The ID of the VPC.</p>
54    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
55        self.vpc_id.as_deref()
56    }
57    /// <p>The name of the endpoint service.</p>
58    pub fn service_name(&self) -> ::std::option::Option<&str> {
59        self.service_name.as_deref()
60    }
61    /// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.</p>
62    pub fn policy_document(&self) -> ::std::option::Option<&str> {
63        self.policy_document.as_deref()
64    }
65    /// <p>(Gateway endpoint) The route table IDs.</p>
66    ///
67    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.route_table_ids.is_none()`.
68    pub fn route_table_ids(&self) -> &[::std::string::String] {
69        self.route_table_ids.as_deref().unwrap_or_default()
70    }
71    /// <p>(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create endpoint network interfaces. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
72    ///
73    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_ids.is_none()`.
74    pub fn subnet_ids(&self) -> &[::std::string::String] {
75        self.subnet_ids.as_deref().unwrap_or_default()
76    }
77    /// <p>(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC.</p>
78    ///
79    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_group_ids.is_none()`.
80    pub fn security_group_ids(&self) -> &[::std::string::String] {
81        self.security_group_ids.as_deref().unwrap_or_default()
82    }
83    /// <p>The IP address type for the endpoint.</p>
84    pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
85        self.ip_address_type.as_ref()
86    }
87    /// <p>The DNS options for the endpoint.</p>
88    pub fn dns_options(&self) -> ::std::option::Option<&crate::types::DnsOptionsSpecification> {
89        self.dns_options.as_ref()
90    }
91    /// <p>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">How to ensure idempotency</a>.</p>
92    pub fn client_token(&self) -> ::std::option::Option<&str> {
93        self.client_token.as_deref()
94    }
95    /// <p>(Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, <code>kinesis.us-east-1.amazonaws.com</code>), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.</p>
96    /// <p>To use a private hosted zone, you must set the following VPC attributes to <code>true</code>: <code>enableDnsHostnames</code> and <code>enableDnsSupport</code>. Use <code>ModifyVpcAttribute</code> to set the VPC attributes.</p>
97    pub fn private_dns_enabled(&self) -> ::std::option::Option<bool> {
98        self.private_dns_enabled
99    }
100    /// <p>The tags to associate with the endpoint.</p>
101    ///
102    /// 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()`.
103    pub fn tag_specifications(&self) -> &[crate::types::TagSpecification] {
104        self.tag_specifications.as_deref().unwrap_or_default()
105    }
106    /// <p>The subnet configurations for the endpoint.</p>
107    ///
108    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_configurations.is_none()`.
109    pub fn subnet_configurations(&self) -> &[crate::types::SubnetConfiguration] {
110        self.subnet_configurations.as_deref().unwrap_or_default()
111    }
112    /// <p>The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.</p>
113    pub fn service_network_arn(&self) -> ::std::option::Option<&str> {
114        self.service_network_arn.as_deref()
115    }
116    /// <p>The Amazon Resource Name (ARN) of a resource configuration that will be associated with the VPC endpoint of type resource.</p>
117    pub fn resource_configuration_arn(&self) -> ::std::option::Option<&str> {
118        self.resource_configuration_arn.as_deref()
119    }
120    /// <p>The Region where the service is hosted. The default is the current Region.</p>
121    pub fn service_region(&self) -> ::std::option::Option<&str> {
122        self.service_region.as_deref()
123    }
124}
125impl CreateVpcEndpointInput {
126    /// Creates a new builder-style object to manufacture [`CreateVpcEndpointInput`](crate::operation::create_vpc_endpoint::CreateVpcEndpointInput).
127    pub fn builder() -> crate::operation::create_vpc_endpoint::builders::CreateVpcEndpointInputBuilder {
128        crate::operation::create_vpc_endpoint::builders::CreateVpcEndpointInputBuilder::default()
129    }
130}
131
132/// A builder for [`CreateVpcEndpointInput`](crate::operation::create_vpc_endpoint::CreateVpcEndpointInput).
133#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
134#[non_exhaustive]
135pub struct CreateVpcEndpointInputBuilder {
136    pub(crate) dry_run: ::std::option::Option<bool>,
137    pub(crate) vpc_endpoint_type: ::std::option::Option<crate::types::VpcEndpointType>,
138    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
139    pub(crate) service_name: ::std::option::Option<::std::string::String>,
140    pub(crate) policy_document: ::std::option::Option<::std::string::String>,
141    pub(crate) route_table_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
142    pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
143    pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
144    pub(crate) ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
145    pub(crate) dns_options: ::std::option::Option<crate::types::DnsOptionsSpecification>,
146    pub(crate) client_token: ::std::option::Option<::std::string::String>,
147    pub(crate) private_dns_enabled: ::std::option::Option<bool>,
148    pub(crate) tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
149    pub(crate) subnet_configurations: ::std::option::Option<::std::vec::Vec<crate::types::SubnetConfiguration>>,
150    pub(crate) service_network_arn: ::std::option::Option<::std::string::String>,
151    pub(crate) resource_configuration_arn: ::std::option::Option<::std::string::String>,
152    pub(crate) service_region: ::std::option::Option<::std::string::String>,
153}
154impl CreateVpcEndpointInputBuilder {
155    /// <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>
156    pub fn dry_run(mut self, input: bool) -> Self {
157        self.dry_run = ::std::option::Option::Some(input);
158        self
159    }
160    /// <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>
161    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
162        self.dry_run = input;
163        self
164    }
165    /// <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>
166    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
167        &self.dry_run
168    }
169    /// <p>The type of endpoint.</p>
170    /// <p>Default: Gateway</p>
171    pub fn vpc_endpoint_type(mut self, input: crate::types::VpcEndpointType) -> Self {
172        self.vpc_endpoint_type = ::std::option::Option::Some(input);
173        self
174    }
175    /// <p>The type of endpoint.</p>
176    /// <p>Default: Gateway</p>
177    pub fn set_vpc_endpoint_type(mut self, input: ::std::option::Option<crate::types::VpcEndpointType>) -> Self {
178        self.vpc_endpoint_type = input;
179        self
180    }
181    /// <p>The type of endpoint.</p>
182    /// <p>Default: Gateway</p>
183    pub fn get_vpc_endpoint_type(&self) -> &::std::option::Option<crate::types::VpcEndpointType> {
184        &self.vpc_endpoint_type
185    }
186    /// <p>The ID of the VPC.</p>
187    /// This field is required.
188    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189        self.vpc_id = ::std::option::Option::Some(input.into());
190        self
191    }
192    /// <p>The ID of the VPC.</p>
193    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194        self.vpc_id = input;
195        self
196    }
197    /// <p>The ID of the VPC.</p>
198    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
199        &self.vpc_id
200    }
201    /// <p>The name of the endpoint service.</p>
202    pub fn service_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.service_name = ::std::option::Option::Some(input.into());
204        self
205    }
206    /// <p>The name of the endpoint service.</p>
207    pub fn set_service_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208        self.service_name = input;
209        self
210    }
211    /// <p>The name of the endpoint service.</p>
212    pub fn get_service_name(&self) -> &::std::option::Option<::std::string::String> {
213        &self.service_name
214    }
215    /// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.</p>
216    pub fn policy_document(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217        self.policy_document = ::std::option::Option::Some(input.into());
218        self
219    }
220    /// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.</p>
221    pub fn set_policy_document(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222        self.policy_document = input;
223        self
224    }
225    /// <p>(Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.</p>
226    pub fn get_policy_document(&self) -> &::std::option::Option<::std::string::String> {
227        &self.policy_document
228    }
229    /// Appends an item to `route_table_ids`.
230    ///
231    /// To override the contents of this collection use [`set_route_table_ids`](Self::set_route_table_ids).
232    ///
233    /// <p>(Gateway endpoint) The route table IDs.</p>
234    pub fn route_table_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
235        let mut v = self.route_table_ids.unwrap_or_default();
236        v.push(input.into());
237        self.route_table_ids = ::std::option::Option::Some(v);
238        self
239    }
240    /// <p>(Gateway endpoint) The route table IDs.</p>
241    pub fn set_route_table_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
242        self.route_table_ids = input;
243        self
244    }
245    /// <p>(Gateway endpoint) The route table IDs.</p>
246    pub fn get_route_table_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
247        &self.route_table_ids
248    }
249    /// Appends an item to `subnet_ids`.
250    ///
251    /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
252    ///
253    /// <p>(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create endpoint network interfaces. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
254    pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255        let mut v = self.subnet_ids.unwrap_or_default();
256        v.push(input.into());
257        self.subnet_ids = ::std::option::Option::Some(v);
258        self
259    }
260    /// <p>(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create endpoint network interfaces. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
261    pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
262        self.subnet_ids = input;
263        self
264    }
265    /// <p>(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create endpoint network interfaces. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
266    pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
267        &self.subnet_ids
268    }
269    /// Appends an item to `security_group_ids`.
270    ///
271    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
272    ///
273    /// <p>(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC.</p>
274    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
275        let mut v = self.security_group_ids.unwrap_or_default();
276        v.push(input.into());
277        self.security_group_ids = ::std::option::Option::Some(v);
278        self
279    }
280    /// <p>(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC.</p>
281    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
282        self.security_group_ids = input;
283        self
284    }
285    /// <p>(Interface endpoint) The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC.</p>
286    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
287        &self.security_group_ids
288    }
289    /// <p>The IP address type for the endpoint.</p>
290    pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
291        self.ip_address_type = ::std::option::Option::Some(input);
292        self
293    }
294    /// <p>The IP address type for the endpoint.</p>
295    pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
296        self.ip_address_type = input;
297        self
298    }
299    /// <p>The IP address type for the endpoint.</p>
300    pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
301        &self.ip_address_type
302    }
303    /// <p>The DNS options for the endpoint.</p>
304    pub fn dns_options(mut self, input: crate::types::DnsOptionsSpecification) -> Self {
305        self.dns_options = ::std::option::Option::Some(input);
306        self
307    }
308    /// <p>The DNS options for the endpoint.</p>
309    pub fn set_dns_options(mut self, input: ::std::option::Option<crate::types::DnsOptionsSpecification>) -> Self {
310        self.dns_options = input;
311        self
312    }
313    /// <p>The DNS options for the endpoint.</p>
314    pub fn get_dns_options(&self) -> &::std::option::Option<crate::types::DnsOptionsSpecification> {
315        &self.dns_options
316    }
317    /// <p>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">How to ensure idempotency</a>.</p>
318    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
319        self.client_token = ::std::option::Option::Some(input.into());
320        self
321    }
322    /// <p>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">How to ensure idempotency</a>.</p>
323    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
324        self.client_token = input;
325        self
326    }
327    /// <p>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">How to ensure idempotency</a>.</p>
328    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
329        &self.client_token
330    }
331    /// <p>(Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, <code>kinesis.us-east-1.amazonaws.com</code>), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.</p>
332    /// <p>To use a private hosted zone, you must set the following VPC attributes to <code>true</code>: <code>enableDnsHostnames</code> and <code>enableDnsSupport</code>. Use <code>ModifyVpcAttribute</code> to set the VPC attributes.</p>
333    pub fn private_dns_enabled(mut self, input: bool) -> Self {
334        self.private_dns_enabled = ::std::option::Option::Some(input);
335        self
336    }
337    /// <p>(Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, <code>kinesis.us-east-1.amazonaws.com</code>), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.</p>
338    /// <p>To use a private hosted zone, you must set the following VPC attributes to <code>true</code>: <code>enableDnsHostnames</code> and <code>enableDnsSupport</code>. Use <code>ModifyVpcAttribute</code> to set the VPC attributes.</p>
339    pub fn set_private_dns_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
340        self.private_dns_enabled = input;
341        self
342    }
343    /// <p>(Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, <code>kinesis.us-east-1.amazonaws.com</code>), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.</p>
344    /// <p>To use a private hosted zone, you must set the following VPC attributes to <code>true</code>: <code>enableDnsHostnames</code> and <code>enableDnsSupport</code>. Use <code>ModifyVpcAttribute</code> to set the VPC attributes.</p>
345    pub fn get_private_dns_enabled(&self) -> &::std::option::Option<bool> {
346        &self.private_dns_enabled
347    }
348    /// Appends an item to `tag_specifications`.
349    ///
350    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
351    ///
352    /// <p>The tags to associate with the endpoint.</p>
353    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
354        let mut v = self.tag_specifications.unwrap_or_default();
355        v.push(input);
356        self.tag_specifications = ::std::option::Option::Some(v);
357        self
358    }
359    /// <p>The tags to associate with the endpoint.</p>
360    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
361        self.tag_specifications = input;
362        self
363    }
364    /// <p>The tags to associate with the endpoint.</p>
365    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
366        &self.tag_specifications
367    }
368    /// Appends an item to `subnet_configurations`.
369    ///
370    /// To override the contents of this collection use [`set_subnet_configurations`](Self::set_subnet_configurations).
371    ///
372    /// <p>The subnet configurations for the endpoint.</p>
373    pub fn subnet_configurations(mut self, input: crate::types::SubnetConfiguration) -> Self {
374        let mut v = self.subnet_configurations.unwrap_or_default();
375        v.push(input);
376        self.subnet_configurations = ::std::option::Option::Some(v);
377        self
378    }
379    /// <p>The subnet configurations for the endpoint.</p>
380    pub fn set_subnet_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubnetConfiguration>>) -> Self {
381        self.subnet_configurations = input;
382        self
383    }
384    /// <p>The subnet configurations for the endpoint.</p>
385    pub fn get_subnet_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubnetConfiguration>> {
386        &self.subnet_configurations
387    }
388    /// <p>The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.</p>
389    pub fn service_network_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
390        self.service_network_arn = ::std::option::Option::Some(input.into());
391        self
392    }
393    /// <p>The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.</p>
394    pub fn set_service_network_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
395        self.service_network_arn = input;
396        self
397    }
398    /// <p>The Amazon Resource Name (ARN) of a service network that will be associated with the VPC endpoint of type service-network.</p>
399    pub fn get_service_network_arn(&self) -> &::std::option::Option<::std::string::String> {
400        &self.service_network_arn
401    }
402    /// <p>The Amazon Resource Name (ARN) of a resource configuration that will be associated with the VPC endpoint of type resource.</p>
403    pub fn resource_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
404        self.resource_configuration_arn = ::std::option::Option::Some(input.into());
405        self
406    }
407    /// <p>The Amazon Resource Name (ARN) of a resource configuration that will be associated with the VPC endpoint of type resource.</p>
408    pub fn set_resource_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
409        self.resource_configuration_arn = input;
410        self
411    }
412    /// <p>The Amazon Resource Name (ARN) of a resource configuration that will be associated with the VPC endpoint of type resource.</p>
413    pub fn get_resource_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
414        &self.resource_configuration_arn
415    }
416    /// <p>The Region where the service is hosted. The default is the current Region.</p>
417    pub fn service_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
418        self.service_region = ::std::option::Option::Some(input.into());
419        self
420    }
421    /// <p>The Region where the service is hosted. The default is the current Region.</p>
422    pub fn set_service_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
423        self.service_region = input;
424        self
425    }
426    /// <p>The Region where the service is hosted. The default is the current Region.</p>
427    pub fn get_service_region(&self) -> &::std::option::Option<::std::string::String> {
428        &self.service_region
429    }
430    /// Consumes the builder and constructs a [`CreateVpcEndpointInput`](crate::operation::create_vpc_endpoint::CreateVpcEndpointInput).
431    pub fn build(
432        self,
433    ) -> ::std::result::Result<crate::operation::create_vpc_endpoint::CreateVpcEndpointInput, ::aws_smithy_types::error::operation::BuildError> {
434        ::std::result::Result::Ok(crate::operation::create_vpc_endpoint::CreateVpcEndpointInput {
435            dry_run: self.dry_run,
436            vpc_endpoint_type: self.vpc_endpoint_type,
437            vpc_id: self.vpc_id,
438            service_name: self.service_name,
439            policy_document: self.policy_document,
440            route_table_ids: self.route_table_ids,
441            subnet_ids: self.subnet_ids,
442            security_group_ids: self.security_group_ids,
443            ip_address_type: self.ip_address_type,
444            dns_options: self.dns_options,
445            client_token: self.client_token,
446            private_dns_enabled: self.private_dns_enabled,
447            tag_specifications: self.tag_specifications,
448            subnet_configurations: self.subnet_configurations,
449            service_network_arn: self.service_network_arn,
450            resource_configuration_arn: self.resource_configuration_arn,
451            service_region: self.service_region,
452        })
453    }
454}