1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ModifyVpcAttributeInput {
/// <p>Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.</p>
pub enable_dns_hostnames: ::std::option::Option<crate::types::AttributeBooleanValue>,
/// <p>Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.</p>
pub enable_dns_support: ::std::option::Option<crate::types::AttributeBooleanValue>,
/// <p>The ID of the VPC.</p>
pub vpc_id: ::std::option::Option<::std::string::String>,
/// <p>Indicates whether Network Address Usage metrics are enabled for your VPC.</p>
pub enable_network_address_usage_metrics: ::std::option::Option<crate::types::AttributeBooleanValue>,
}
impl ModifyVpcAttributeInput {
/// <p>Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.</p>
pub fn enable_dns_hostnames(&self) -> ::std::option::Option<&crate::types::AttributeBooleanValue> {
self.enable_dns_hostnames.as_ref()
}
/// <p>Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.</p>
pub fn enable_dns_support(&self) -> ::std::option::Option<&crate::types::AttributeBooleanValue> {
self.enable_dns_support.as_ref()
}
/// <p>The ID of the VPC.</p>
pub fn vpc_id(&self) -> ::std::option::Option<&str> {
self.vpc_id.as_deref()
}
/// <p>Indicates whether Network Address Usage metrics are enabled for your VPC.</p>
pub fn enable_network_address_usage_metrics(&self) -> ::std::option::Option<&crate::types::AttributeBooleanValue> {
self.enable_network_address_usage_metrics.as_ref()
}
}
impl ModifyVpcAttributeInput {
/// Creates a new builder-style object to manufacture [`ModifyVpcAttributeInput`](crate::operation::modify_vpc_attribute::ModifyVpcAttributeInput).
pub fn builder() -> crate::operation::modify_vpc_attribute::builders::ModifyVpcAttributeInputBuilder {
crate::operation::modify_vpc_attribute::builders::ModifyVpcAttributeInputBuilder::default()
}
}
/// A builder for [`ModifyVpcAttributeInput`](crate::operation::modify_vpc_attribute::ModifyVpcAttributeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyVpcAttributeInputBuilder {
pub(crate) enable_dns_hostnames: ::std::option::Option<crate::types::AttributeBooleanValue>,
pub(crate) enable_dns_support: ::std::option::Option<crate::types::AttributeBooleanValue>,
pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
pub(crate) enable_network_address_usage_metrics: ::std::option::Option<crate::types::AttributeBooleanValue>,
}
impl ModifyVpcAttributeInputBuilder {
/// <p>Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.</p>
pub fn enable_dns_hostnames(mut self, input: crate::types::AttributeBooleanValue) -> Self {
self.enable_dns_hostnames = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.</p>
pub fn set_enable_dns_hostnames(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
self.enable_dns_hostnames = input;
self
}
/// <p>Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.</p>
pub fn get_enable_dns_hostnames(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
&self.enable_dns_hostnames
}
/// <p>Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.</p>
pub fn enable_dns_support(mut self, input: crate::types::AttributeBooleanValue) -> Self {
self.enable_dns_support = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.</p>
pub fn set_enable_dns_support(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
self.enable_dns_support = input;
self
}
/// <p>Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.</p>
/// <p>You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.</p>
pub fn get_enable_dns_support(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
&self.enable_dns_support
}
/// <p>The ID of the VPC.</p>
/// This field is required.
pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.vpc_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the VPC.</p>
pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.vpc_id = input;
self
}
/// <p>The ID of the VPC.</p>
pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
&self.vpc_id
}
/// <p>Indicates whether Network Address Usage metrics are enabled for your VPC.</p>
pub fn enable_network_address_usage_metrics(mut self, input: crate::types::AttributeBooleanValue) -> Self {
self.enable_network_address_usage_metrics = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether Network Address Usage metrics are enabled for your VPC.</p>
pub fn set_enable_network_address_usage_metrics(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
self.enable_network_address_usage_metrics = input;
self
}
/// <p>Indicates whether Network Address Usage metrics are enabled for your VPC.</p>
pub fn get_enable_network_address_usage_metrics(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
&self.enable_network_address_usage_metrics
}
/// Consumes the builder and constructs a [`ModifyVpcAttributeInput`](crate::operation::modify_vpc_attribute::ModifyVpcAttributeInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::modify_vpc_attribute::ModifyVpcAttributeInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::modify_vpc_attribute::ModifyVpcAttributeInput {
enable_dns_hostnames: self.enable_dns_hostnames,
enable_dns_support: self.enable_dns_support,
vpc_id: self.vpc_id,
enable_network_address_usage_metrics: self.enable_network_address_usage_metrics,
})
}
}