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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes an instance (a virtual private server).</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Instance {
/// <p>The name the user gave the instance (<code>Amazon_Linux_2023-1</code>).</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the instance (<code>arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE</code>).</p>
pub arn: ::std::option::Option<::std::string::String>,
/// <p>The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.</p>
pub support_code: ::std::option::Option<::std::string::String>,
/// <p>The timestamp when the instance was created (<code>1479734909.17</code>) in Unix time format.</p>
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The region name and Availability Zone where the instance is located.</p>
pub location: ::std::option::Option<crate::types::ResourceLocation>,
/// <p>The type of resource (usually <code>Instance</code>).</p>
pub resource_type: ::std::option::Option<crate::types::ResourceType>,
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>The blueprint ID (<code>amazon_linux_2023</code>).</p>
pub blueprint_id: ::std::option::Option<::std::string::String>,
/// <p>The friendly name of the blueprint (<code>Amazon Linux 2023</code>).</p>
pub blueprint_name: ::std::option::Option<::std::string::String>,
/// <p>The bundle for the instance (<code>micro_x_x</code>).</p>
pub bundle_id: ::std::option::Option<::std::string::String>,
/// <p>An array of objects representing the add-ons enabled on the instance.</p>
pub add_ons: ::std::option::Option<::std::vec::Vec<crate::types::AddOn>>,
/// <p>A Boolean value indicating whether this instance has a static IP assigned to it.</p>
pub is_static_ip: ::std::option::Option<bool>,
/// <p>The private IP address of the instance.</p>
pub private_ip_address: ::std::option::Option<::std::string::String>,
/// <p>The public IP address of the instance.</p>
pub public_ip_address: ::std::option::Option<::std::string::String>,
/// <p>The IPv6 addresses of the instance.</p>
pub ipv6_addresses: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The IP address type of the instance.</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>
pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
/// <p>The size of the vCPU and the amount of RAM for the instance.</p>
pub hardware: ::std::option::Option<crate::types::InstanceHardware>,
/// <p>Information about the public ports and monthly data transfer rates for the instance.</p>
pub networking: ::std::option::Option<crate::types::InstanceNetworking>,
/// <p>The status code and the state (<code>running</code>) for the instance.</p>
pub state: ::std::option::Option<crate::types::InstanceState>,
/// <p>The user name for connecting to the instance (<code>ec2-user</code>).</p>
pub username: ::std::option::Option<::std::string::String>,
/// <p>The name of the SSH key being used to connect to the instance (<code>LightsailDefaultKeyPair</code>).</p>
pub ssh_key_name: ::std::option::Option<::std::string::String>,
/// <p>The metadata options for the Amazon Lightsail instance.</p>
pub metadata_options: ::std::option::Option<crate::types::InstanceMetadataOptions>,
}
impl Instance {
/// <p>The name the user gave the instance (<code>Amazon_Linux_2023-1</code>).</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the instance (<code>arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE</code>).</p>
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.</p>
pub fn support_code(&self) -> ::std::option::Option<&str> {
self.support_code.as_deref()
}
/// <p>The timestamp when the instance was created (<code>1479734909.17</code>) in Unix time format.</p>
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// <p>The region name and Availability Zone where the instance is located.</p>
pub fn location(&self) -> ::std::option::Option<&crate::types::ResourceLocation> {
self.location.as_ref()
}
/// <p>The type of resource (usually <code>Instance</code>).</p>
pub fn resource_type(&self) -> ::std::option::Option<&crate::types::ResourceType> {
self.resource_type.as_ref()
}
/// <p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</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 blueprint ID (<code>amazon_linux_2023</code>).</p>
pub fn blueprint_id(&self) -> ::std::option::Option<&str> {
self.blueprint_id.as_deref()
}
/// <p>The friendly name of the blueprint (<code>Amazon Linux 2023</code>).</p>
pub fn blueprint_name(&self) -> ::std::option::Option<&str> {
self.blueprint_name.as_deref()
}
/// <p>The bundle for the instance (<code>micro_x_x</code>).</p>
pub fn bundle_id(&self) -> ::std::option::Option<&str> {
self.bundle_id.as_deref()
}
/// <p>An array of objects representing the add-ons enabled on the instance.</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 `.add_ons.is_none()`.
pub fn add_ons(&self) -> &[crate::types::AddOn] {
self.add_ons.as_deref().unwrap_or_default()
}
/// <p>A Boolean value indicating whether this instance has a static IP assigned to it.</p>
pub fn is_static_ip(&self) -> ::std::option::Option<bool> {
self.is_static_ip
}
/// <p>The private IP address of the instance.</p>
pub fn private_ip_address(&self) -> ::std::option::Option<&str> {
self.private_ip_address.as_deref()
}
/// <p>The public IP address of the instance.</p>
pub fn public_ip_address(&self) -> ::std::option::Option<&str> {
self.public_ip_address.as_deref()
}
/// <p>The IPv6 addresses of the instance.</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 `.ipv6_addresses.is_none()`.
pub fn ipv6_addresses(&self) -> &[::std::string::String] {
self.ipv6_addresses.as_deref().unwrap_or_default()
}
/// <p>The IP address type of the instance.</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>
pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
self.ip_address_type.as_ref()
}
/// <p>The size of the vCPU and the amount of RAM for the instance.</p>
pub fn hardware(&self) -> ::std::option::Option<&crate::types::InstanceHardware> {
self.hardware.as_ref()
}
/// <p>Information about the public ports and monthly data transfer rates for the instance.</p>
pub fn networking(&self) -> ::std::option::Option<&crate::types::InstanceNetworking> {
self.networking.as_ref()
}
/// <p>The status code and the state (<code>running</code>) for the instance.</p>
pub fn state(&self) -> ::std::option::Option<&crate::types::InstanceState> {
self.state.as_ref()
}
/// <p>The user name for connecting to the instance (<code>ec2-user</code>).</p>
pub fn username(&self) -> ::std::option::Option<&str> {
self.username.as_deref()
}
/// <p>The name of the SSH key being used to connect to the instance (<code>LightsailDefaultKeyPair</code>).</p>
pub fn ssh_key_name(&self) -> ::std::option::Option<&str> {
self.ssh_key_name.as_deref()
}
/// <p>The metadata options for the Amazon Lightsail instance.</p>
pub fn metadata_options(&self) -> ::std::option::Option<&crate::types::InstanceMetadataOptions> {
self.metadata_options.as_ref()
}
}
impl Instance {
/// Creates a new builder-style object to manufacture [`Instance`](crate::types::Instance).
pub fn builder() -> crate::types::builders::InstanceBuilder {
crate::types::builders::InstanceBuilder::default()
}
}
/// A builder for [`Instance`](crate::types::Instance).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct InstanceBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) support_code: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) location: ::std::option::Option<crate::types::ResourceLocation>,
pub(crate) resource_type: ::std::option::Option<crate::types::ResourceType>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) blueprint_id: ::std::option::Option<::std::string::String>,
pub(crate) blueprint_name: ::std::option::Option<::std::string::String>,
pub(crate) bundle_id: ::std::option::Option<::std::string::String>,
pub(crate) add_ons: ::std::option::Option<::std::vec::Vec<crate::types::AddOn>>,
pub(crate) is_static_ip: ::std::option::Option<bool>,
pub(crate) private_ip_address: ::std::option::Option<::std::string::String>,
pub(crate) public_ip_address: ::std::option::Option<::std::string::String>,
pub(crate) ipv6_addresses: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
pub(crate) hardware: ::std::option::Option<crate::types::InstanceHardware>,
pub(crate) networking: ::std::option::Option<crate::types::InstanceNetworking>,
pub(crate) state: ::std::option::Option<crate::types::InstanceState>,
pub(crate) username: ::std::option::Option<::std::string::String>,
pub(crate) ssh_key_name: ::std::option::Option<::std::string::String>,
pub(crate) metadata_options: ::std::option::Option<crate::types::InstanceMetadataOptions>,
}
impl InstanceBuilder {
/// <p>The name the user gave the instance (<code>Amazon_Linux_2023-1</code>).</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name the user gave the instance (<code>Amazon_Linux_2023-1</code>).</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name the user gave the instance (<code>Amazon_Linux_2023-1</code>).</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The Amazon Resource Name (ARN) of the instance (<code>arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE</code>).</p>
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the instance (<code>arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE</code>).</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the instance (<code>arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE</code>).</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.</p>
pub fn support_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.support_code = ::std::option::Option::Some(input.into());
self
}
/// <p>The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.</p>
pub fn set_support_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.support_code = input;
self
}
/// <p>The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily.</p>
pub fn get_support_code(&self) -> &::std::option::Option<::std::string::String> {
&self.support_code
}
/// <p>The timestamp when the instance was created (<code>1479734909.17</code>) in Unix time format.</p>
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp when the instance was created (<code>1479734909.17</code>) in Unix time format.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>The timestamp when the instance was created (<code>1479734909.17</code>) in Unix time format.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// <p>The region name and Availability Zone where the instance is located.</p>
pub fn location(mut self, input: crate::types::ResourceLocation) -> Self {
self.location = ::std::option::Option::Some(input);
self
}
/// <p>The region name and Availability Zone where the instance is located.</p>
pub fn set_location(mut self, input: ::std::option::Option<crate::types::ResourceLocation>) -> Self {
self.location = input;
self
}
/// <p>The region name and Availability Zone where the instance is located.</p>
pub fn get_location(&self) -> &::std::option::Option<crate::types::ResourceLocation> {
&self.location
}
/// <p>The type of resource (usually <code>Instance</code>).</p>
pub fn resource_type(mut self, input: crate::types::ResourceType) -> Self {
self.resource_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of resource (usually <code>Instance</code>).</p>
pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::ResourceType>) -> Self {
self.resource_type = input;
self
}
/// <p>The type of resource (usually <code>Instance</code>).</p>
pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::ResourceType> {
&self.resource_type
}
/// 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 for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</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 for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</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 for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>The blueprint ID (<code>amazon_linux_2023</code>).</p>
pub fn blueprint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.blueprint_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The blueprint ID (<code>amazon_linux_2023</code>).</p>
pub fn set_blueprint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.blueprint_id = input;
self
}
/// <p>The blueprint ID (<code>amazon_linux_2023</code>).</p>
pub fn get_blueprint_id(&self) -> &::std::option::Option<::std::string::String> {
&self.blueprint_id
}
/// <p>The friendly name of the blueprint (<code>Amazon Linux 2023</code>).</p>
pub fn blueprint_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.blueprint_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The friendly name of the blueprint (<code>Amazon Linux 2023</code>).</p>
pub fn set_blueprint_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.blueprint_name = input;
self
}
/// <p>The friendly name of the blueprint (<code>Amazon Linux 2023</code>).</p>
pub fn get_blueprint_name(&self) -> &::std::option::Option<::std::string::String> {
&self.blueprint_name
}
/// <p>The bundle for the instance (<code>micro_x_x</code>).</p>
pub fn bundle_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bundle_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The bundle for the instance (<code>micro_x_x</code>).</p>
pub fn set_bundle_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bundle_id = input;
self
}
/// <p>The bundle for the instance (<code>micro_x_x</code>).</p>
pub fn get_bundle_id(&self) -> &::std::option::Option<::std::string::String> {
&self.bundle_id
}
/// Appends an item to `add_ons`.
///
/// To override the contents of this collection use [`set_add_ons`](Self::set_add_ons).
///
/// <p>An array of objects representing the add-ons enabled on the instance.</p>
pub fn add_ons(mut self, input: crate::types::AddOn) -> Self {
let mut v = self.add_ons.unwrap_or_default();
v.push(input);
self.add_ons = ::std::option::Option::Some(v);
self
}
/// <p>An array of objects representing the add-ons enabled on the instance.</p>
pub fn set_add_ons(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AddOn>>) -> Self {
self.add_ons = input;
self
}
/// <p>An array of objects representing the add-ons enabled on the instance.</p>
pub fn get_add_ons(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddOn>> {
&self.add_ons
}
/// <p>A Boolean value indicating whether this instance has a static IP assigned to it.</p>
pub fn is_static_ip(mut self, input: bool) -> Self {
self.is_static_ip = ::std::option::Option::Some(input);
self
}
/// <p>A Boolean value indicating whether this instance has a static IP assigned to it.</p>
pub fn set_is_static_ip(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_static_ip = input;
self
}
/// <p>A Boolean value indicating whether this instance has a static IP assigned to it.</p>
pub fn get_is_static_ip(&self) -> &::std::option::Option<bool> {
&self.is_static_ip
}
/// <p>The private IP address of the instance.</p>
pub fn private_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.private_ip_address = ::std::option::Option::Some(input.into());
self
}
/// <p>The private IP address of the instance.</p>
pub fn set_private_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.private_ip_address = input;
self
}
/// <p>The private IP address of the instance.</p>
pub fn get_private_ip_address(&self) -> &::std::option::Option<::std::string::String> {
&self.private_ip_address
}
/// <p>The public IP address of the instance.</p>
pub fn public_ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.public_ip_address = ::std::option::Option::Some(input.into());
self
}
/// <p>The public IP address of the instance.</p>
pub fn set_public_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.public_ip_address = input;
self
}
/// <p>The public IP address of the instance.</p>
pub fn get_public_ip_address(&self) -> &::std::option::Option<::std::string::String> {
&self.public_ip_address
}
/// Appends an item to `ipv6_addresses`.
///
/// To override the contents of this collection use [`set_ipv6_addresses`](Self::set_ipv6_addresses).
///
/// <p>The IPv6 addresses of the instance.</p>
pub fn ipv6_addresses(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.ipv6_addresses.unwrap_or_default();
v.push(input.into());
self.ipv6_addresses = ::std::option::Option::Some(v);
self
}
/// <p>The IPv6 addresses of the instance.</p>
pub fn set_ipv6_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.ipv6_addresses = input;
self
}
/// <p>The IPv6 addresses of the instance.</p>
pub fn get_ipv6_addresses(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.ipv6_addresses
}
/// <p>The IP address type of the instance.</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>
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 of the instance.</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>
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 of the instance.</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>
pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
&self.ip_address_type
}
/// <p>The size of the vCPU and the amount of RAM for the instance.</p>
pub fn hardware(mut self, input: crate::types::InstanceHardware) -> Self {
self.hardware = ::std::option::Option::Some(input);
self
}
/// <p>The size of the vCPU and the amount of RAM for the instance.</p>
pub fn set_hardware(mut self, input: ::std::option::Option<crate::types::InstanceHardware>) -> Self {
self.hardware = input;
self
}
/// <p>The size of the vCPU and the amount of RAM for the instance.</p>
pub fn get_hardware(&self) -> &::std::option::Option<crate::types::InstanceHardware> {
&self.hardware
}
/// <p>Information about the public ports and monthly data transfer rates for the instance.</p>
pub fn networking(mut self, input: crate::types::InstanceNetworking) -> Self {
self.networking = ::std::option::Option::Some(input);
self
}
/// <p>Information about the public ports and monthly data transfer rates for the instance.</p>
pub fn set_networking(mut self, input: ::std::option::Option<crate::types::InstanceNetworking>) -> Self {
self.networking = input;
self
}
/// <p>Information about the public ports and monthly data transfer rates for the instance.</p>
pub fn get_networking(&self) -> &::std::option::Option<crate::types::InstanceNetworking> {
&self.networking
}
/// <p>The status code and the state (<code>running</code>) for the instance.</p>
pub fn state(mut self, input: crate::types::InstanceState) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
/// <p>The status code and the state (<code>running</code>) for the instance.</p>
pub fn set_state(mut self, input: ::std::option::Option<crate::types::InstanceState>) -> Self {
self.state = input;
self
}
/// <p>The status code and the state (<code>running</code>) for the instance.</p>
pub fn get_state(&self) -> &::std::option::Option<crate::types::InstanceState> {
&self.state
}
/// <p>The user name for connecting to the instance (<code>ec2-user</code>).</p>
pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.username = ::std::option::Option::Some(input.into());
self
}
/// <p>The user name for connecting to the instance (<code>ec2-user</code>).</p>
pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.username = input;
self
}
/// <p>The user name for connecting to the instance (<code>ec2-user</code>).</p>
pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
&self.username
}
/// <p>The name of the SSH key being used to connect to the instance (<code>LightsailDefaultKeyPair</code>).</p>
pub fn ssh_key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ssh_key_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the SSH key being used to connect to the instance (<code>LightsailDefaultKeyPair</code>).</p>
pub fn set_ssh_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ssh_key_name = input;
self
}
/// <p>The name of the SSH key being used to connect to the instance (<code>LightsailDefaultKeyPair</code>).</p>
pub fn get_ssh_key_name(&self) -> &::std::option::Option<::std::string::String> {
&self.ssh_key_name
}
/// <p>The metadata options for the Amazon Lightsail instance.</p>
pub fn metadata_options(mut self, input: crate::types::InstanceMetadataOptions) -> Self {
self.metadata_options = ::std::option::Option::Some(input);
self
}
/// <p>The metadata options for the Amazon Lightsail instance.</p>
pub fn set_metadata_options(mut self, input: ::std::option::Option<crate::types::InstanceMetadataOptions>) -> Self {
self.metadata_options = input;
self
}
/// <p>The metadata options for the Amazon Lightsail instance.</p>
pub fn get_metadata_options(&self) -> &::std::option::Option<crate::types::InstanceMetadataOptions> {
&self.metadata_options
}
/// Consumes the builder and constructs a [`Instance`](crate::types::Instance).
pub fn build(self) -> crate::types::Instance {
crate::types::Instance {
name: self.name,
arn: self.arn,
support_code: self.support_code,
created_at: self.created_at,
location: self.location,
resource_type: self.resource_type,
tags: self.tags,
blueprint_id: self.blueprint_id,
blueprint_name: self.blueprint_name,
bundle_id: self.bundle_id,
add_ons: self.add_ons,
is_static_ip: self.is_static_ip,
private_ip_address: self.private_ip_address,
public_ip_address: self.public_ip_address,
ipv6_addresses: self.ipv6_addresses,
ip_address_type: self.ip_address_type,
hardware: self.hardware,
networking: self.networking,
state: self.state,
username: self.username,
ssh_key_name: self.ssh_key_name,
metadata_options: self.metadata_options,
}
}
}