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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
// 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 CreateLoadBalancerInput {
/// <p>The name of your load balancer.</p>
pub load_balancer_name: ::std::option::Option<::std::string::String>,
/// <p>The instance port where you're creating your load balancer.</p>
pub instance_port: ::std::option::Option<i32>,
/// <p>The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (<code>"/"</code>).</p>
/// <p>You may want to specify a custom health check path other than the root of your application if your home page loads slowly or has a lot of media or scripting on it.</p>
pub health_check_path: ::std::option::Option<::std::string::String>,
/// <p>The name of the SSL/TLS certificate.</p>
/// <p>If you specify <code>certificateName</code>, then <code>certificateDomainName</code> is required (and vice-versa).</p>
pub certificate_name: ::std::option::Option<::std::string::String>,
/// <p>The domain name with which your certificate is associated (<code>example.com</code>).</p>
/// <p>If you specify <code>certificateDomainName</code>, then <code>certificateName</code> is required (and vice-versa).</p>
pub certificate_domain_name: ::std::option::Option<::std::string::String>,
/// <p>The optional alternative domains and subdomains to use with your SSL/TLS certificate (<code>www.example.com</code>, <code>example.com</code>, <code>m.example.com</code>, <code>blog.example.com</code>).</p>
pub certificate_alternative_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The tag keys and optional values to add to the resource during create.</p>
/// <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>The IP address type for the load balancer.</p>
/// <p>The possible values are <code>ipv4</code> for IPv4 only, <code>ipv6</code> for IPv6 only, and <code>dualstack</code> for IPv4 and IPv6.</p>
/// <p>The default value is <code>dualstack</code>.</p>
pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
/// <p>The name of the TLS policy to apply to the load balancer.</p>
/// <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetLoadBalancerTlsPolicies.html">GetLoadBalancerTlsPolicies</a> action to get a list of TLS policy names that you can specify.</p>
/// <p>For more information about load balancer TLS policies, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configure-load-balancer-tls-security-policy">Configuring TLS security policies on your Amazon Lightsail load balancers</a> in the <i>Amazon Lightsail Developer Guide</i>.</p>
pub tls_policy_name: ::std::option::Option<::std::string::String>,
}
impl CreateLoadBalancerInput {
/// <p>The name of your load balancer.</p>
pub fn load_balancer_name(&self) -> ::std::option::Option<&str> {
self.load_balancer_name.as_deref()
}
/// <p>The instance port where you're creating your load balancer.</p>
pub fn instance_port(&self) -> ::std::option::Option<i32> {
self.instance_port
}
/// <p>The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (<code>"/"</code>).</p>
/// <p>You may want to specify a custom health check path other than the root of your application if your home page loads slowly or has a lot of media or scripting on it.</p>
pub fn health_check_path(&self) -> ::std::option::Option<&str> {
self.health_check_path.as_deref()
}
/// <p>The name of the SSL/TLS certificate.</p>
/// <p>If you specify <code>certificateName</code>, then <code>certificateDomainName</code> is required (and vice-versa).</p>
pub fn certificate_name(&self) -> ::std::option::Option<&str> {
self.certificate_name.as_deref()
}
/// <p>The domain name with which your certificate is associated (<code>example.com</code>).</p>
/// <p>If you specify <code>certificateDomainName</code>, then <code>certificateName</code> is required (and vice-versa).</p>
pub fn certificate_domain_name(&self) -> ::std::option::Option<&str> {
self.certificate_domain_name.as_deref()
}
/// <p>The optional alternative domains and subdomains to use with your SSL/TLS certificate (<code>www.example.com</code>, <code>example.com</code>, <code>m.example.com</code>, <code>blog.example.com</code>).</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.certificate_alternative_names.is_none()`.
pub fn certificate_alternative_names(&self) -> &[::std::string::String] {
self.certificate_alternative_names.as_deref().unwrap_or_default()
}
/// <p>The tag keys and optional values to add to the resource during create.</p>
/// <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>The IP address type for the load balancer.</p>
/// <p>The possible values are <code>ipv4</code> for IPv4 only, <code>ipv6</code> for IPv6 only, and <code>dualstack</code> for IPv4 and IPv6.</p>
/// <p>The default value is <code>dualstack</code>.</p>
pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
self.ip_address_type.as_ref()
}
/// <p>The name of the TLS policy to apply to the load balancer.</p>
/// <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetLoadBalancerTlsPolicies.html">GetLoadBalancerTlsPolicies</a> action to get a list of TLS policy names that you can specify.</p>
/// <p>For more information about load balancer TLS policies, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configure-load-balancer-tls-security-policy">Configuring TLS security policies on your Amazon Lightsail load balancers</a> in the <i>Amazon Lightsail Developer Guide</i>.</p>
pub fn tls_policy_name(&self) -> ::std::option::Option<&str> {
self.tls_policy_name.as_deref()
}
}
impl CreateLoadBalancerInput {
/// Creates a new builder-style object to manufacture [`CreateLoadBalancerInput`](crate::operation::create_load_balancer::CreateLoadBalancerInput).
pub fn builder() -> crate::operation::create_load_balancer::builders::CreateLoadBalancerInputBuilder {
crate::operation::create_load_balancer::builders::CreateLoadBalancerInputBuilder::default()
}
}
/// A builder for [`CreateLoadBalancerInput`](crate::operation::create_load_balancer::CreateLoadBalancerInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateLoadBalancerInputBuilder {
pub(crate) load_balancer_name: ::std::option::Option<::std::string::String>,
pub(crate) instance_port: ::std::option::Option<i32>,
pub(crate) health_check_path: ::std::option::Option<::std::string::String>,
pub(crate) certificate_name: ::std::option::Option<::std::string::String>,
pub(crate) certificate_domain_name: ::std::option::Option<::std::string::String>,
pub(crate) certificate_alternative_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
pub(crate) tls_policy_name: ::std::option::Option<::std::string::String>,
}
impl CreateLoadBalancerInputBuilder {
/// <p>The name of your load balancer.</p>
/// This field is required.
pub fn load_balancer_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.load_balancer_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of your load balancer.</p>
pub fn set_load_balancer_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.load_balancer_name = input;
self
}
/// <p>The name of your load balancer.</p>
pub fn get_load_balancer_name(&self) -> &::std::option::Option<::std::string::String> {
&self.load_balancer_name
}
/// <p>The instance port where you're creating your load balancer.</p>
/// This field is required.
pub fn instance_port(mut self, input: i32) -> Self {
self.instance_port = ::std::option::Option::Some(input);
self
}
/// <p>The instance port where you're creating your load balancer.</p>
pub fn set_instance_port(mut self, input: ::std::option::Option<i32>) -> Self {
self.instance_port = input;
self
}
/// <p>The instance port where you're creating your load balancer.</p>
pub fn get_instance_port(&self) -> &::std::option::Option<i32> {
&self.instance_port
}
/// <p>The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (<code>"/"</code>).</p>
/// <p>You may want to specify a custom health check path other than the root of your application if your home page loads slowly or has a lot of media or scripting on it.</p>
pub fn health_check_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.health_check_path = ::std::option::Option::Some(input.into());
self
}
/// <p>The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (<code>"/"</code>).</p>
/// <p>You may want to specify a custom health check path other than the root of your application if your home page loads slowly or has a lot of media or scripting on it.</p>
pub fn set_health_check_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.health_check_path = input;
self
}
/// <p>The path you provided to perform the load balancer health check. If you didn't specify a health check path, Lightsail uses the root path of your website (<code>"/"</code>).</p>
/// <p>You may want to specify a custom health check path other than the root of your application if your home page loads slowly or has a lot of media or scripting on it.</p>
pub fn get_health_check_path(&self) -> &::std::option::Option<::std::string::String> {
&self.health_check_path
}
/// <p>The name of the SSL/TLS certificate.</p>
/// <p>If you specify <code>certificateName</code>, then <code>certificateDomainName</code> is required (and vice-versa).</p>
pub fn certificate_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.certificate_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the SSL/TLS certificate.</p>
/// <p>If you specify <code>certificateName</code>, then <code>certificateDomainName</code> is required (and vice-versa).</p>
pub fn set_certificate_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.certificate_name = input;
self
}
/// <p>The name of the SSL/TLS certificate.</p>
/// <p>If you specify <code>certificateName</code>, then <code>certificateDomainName</code> is required (and vice-versa).</p>
pub fn get_certificate_name(&self) -> &::std::option::Option<::std::string::String> {
&self.certificate_name
}
/// <p>The domain name with which your certificate is associated (<code>example.com</code>).</p>
/// <p>If you specify <code>certificateDomainName</code>, then <code>certificateName</code> is required (and vice-versa).</p>
pub fn certificate_domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.certificate_domain_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The domain name with which your certificate is associated (<code>example.com</code>).</p>
/// <p>If you specify <code>certificateDomainName</code>, then <code>certificateName</code> is required (and vice-versa).</p>
pub fn set_certificate_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.certificate_domain_name = input;
self
}
/// <p>The domain name with which your certificate is associated (<code>example.com</code>).</p>
/// <p>If you specify <code>certificateDomainName</code>, then <code>certificateName</code> is required (and vice-versa).</p>
pub fn get_certificate_domain_name(&self) -> &::std::option::Option<::std::string::String> {
&self.certificate_domain_name
}
/// Appends an item to `certificate_alternative_names`.
///
/// To override the contents of this collection use [`set_certificate_alternative_names`](Self::set_certificate_alternative_names).
///
/// <p>The optional alternative domains and subdomains to use with your SSL/TLS certificate (<code>www.example.com</code>, <code>example.com</code>, <code>m.example.com</code>, <code>blog.example.com</code>).</p>
pub fn certificate_alternative_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.certificate_alternative_names.unwrap_or_default();
v.push(input.into());
self.certificate_alternative_names = ::std::option::Option::Some(v);
self
}
/// <p>The optional alternative domains and subdomains to use with your SSL/TLS certificate (<code>www.example.com</code>, <code>example.com</code>, <code>m.example.com</code>, <code>blog.example.com</code>).</p>
pub fn set_certificate_alternative_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.certificate_alternative_names = input;
self
}
/// <p>The optional alternative domains and subdomains to use with your SSL/TLS certificate (<code>www.example.com</code>, <code>example.com</code>, <code>m.example.com</code>, <code>blog.example.com</code>).</p>
pub fn get_certificate_alternative_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.certificate_alternative_names
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tag keys and optional values to add to the resource during create.</p>
/// <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>The tag keys and optional values to add to the resource during create.</p>
/// <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>The tag keys and optional values to add to the resource during create.</p>
/// <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>The IP address type for the load balancer.</p>
/// <p>The possible values are <code>ipv4</code> for IPv4 only, <code>ipv6</code> for IPv6 only, and <code>dualstack</code> for IPv4 and IPv6.</p>
/// <p>The default value is <code>dualstack</code>.</p>
pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
self.ip_address_type = ::std::option::Option::Some(input);
self
}
/// <p>The IP address type for the load balancer.</p>
/// <p>The possible values are <code>ipv4</code> for IPv4 only, <code>ipv6</code> for IPv6 only, and <code>dualstack</code> for IPv4 and IPv6.</p>
/// <p>The default value is <code>dualstack</code>.</p>
pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
self.ip_address_type = input;
self
}
/// <p>The IP address type for the load balancer.</p>
/// <p>The possible values are <code>ipv4</code> for IPv4 only, <code>ipv6</code> for IPv6 only, and <code>dualstack</code> for IPv4 and IPv6.</p>
/// <p>The default value is <code>dualstack</code>.</p>
pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
&self.ip_address_type
}
/// <p>The name of the TLS policy to apply to the load balancer.</p>
/// <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetLoadBalancerTlsPolicies.html">GetLoadBalancerTlsPolicies</a> action to get a list of TLS policy names that you can specify.</p>
/// <p>For more information about load balancer TLS policies, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configure-load-balancer-tls-security-policy">Configuring TLS security policies on your Amazon Lightsail load balancers</a> in the <i>Amazon Lightsail Developer Guide</i>.</p>
pub fn tls_policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.tls_policy_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the TLS policy to apply to the load balancer.</p>
/// <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetLoadBalancerTlsPolicies.html">GetLoadBalancerTlsPolicies</a> action to get a list of TLS policy names that you can specify.</p>
/// <p>For more information about load balancer TLS policies, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configure-load-balancer-tls-security-policy">Configuring TLS security policies on your Amazon Lightsail load balancers</a> in the <i>Amazon Lightsail Developer Guide</i>.</p>
pub fn set_tls_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.tls_policy_name = input;
self
}
/// <p>The name of the TLS policy to apply to the load balancer.</p>
/// <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetLoadBalancerTlsPolicies.html">GetLoadBalancerTlsPolicies</a> action to get a list of TLS policy names that you can specify.</p>
/// <p>For more information about load balancer TLS policies, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configure-load-balancer-tls-security-policy">Configuring TLS security policies on your Amazon Lightsail load balancers</a> in the <i>Amazon Lightsail Developer Guide</i>.</p>
pub fn get_tls_policy_name(&self) -> &::std::option::Option<::std::string::String> {
&self.tls_policy_name
}
/// Consumes the builder and constructs a [`CreateLoadBalancerInput`](crate::operation::create_load_balancer::CreateLoadBalancerInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_load_balancer::CreateLoadBalancerInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_load_balancer::CreateLoadBalancerInput {
load_balancer_name: self.load_balancer_name,
instance_port: self.instance_port,
health_check_path: self.health_check_path,
certificate_name: self.certificate_name,
certificate_domain_name: self.certificate_domain_name,
certificate_alternative_names: self.certificate_alternative_names,
tags: self.tags,
ip_address_type: self.ip_address_type,
tls_policy_name: self.tls_policy_name,
})
}
}