aws-sdk-lightsail 1.106.0

AWS SDK for Amazon Lightsail
Documentation
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
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes the full details of an Amazon Lightsail SSL/TLS certificate.</p><note>
/// <p>To get a summary of a certificate, use the <code>GetCertificates</code> action and omit <code>includeCertificateDetails</code> from your request. The response will include only the certificate Amazon Resource Name (ARN), certificate name, domain name, and tags.</p>
/// </note>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Certificate {
    /// <p>The Amazon Resource Name (ARN) of the certificate.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the certificate (<code>my-certificate</code>).</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The domain name of the certificate.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The validation status of the certificate.</p>
    pub status: ::std::option::Option<crate::types::CertificateStatus>,
    /// <p>The serial number of the certificate.</p>
    pub serial_number: ::std::option::Option<::std::string::String>,
    /// <p>An array of strings that specify the alternate domains (<code>example2.com</code>) and subdomains (<code>blog.example.com</code>) of the certificate.</p>
    pub subject_alternative_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>An array of objects that describe the domain validation records of the certificate.</p>
    pub domain_validation_records: ::std::option::Option<::std::vec::Vec<crate::types::DomainValidationRecord>>,
    /// <p>The validation failure reason, if any, of the certificate.</p>
    /// <p>The following failure reasons are possible:</p>
    /// <ul>
    /// <li>
    /// <p><b> <code>NO_AVAILABLE_CONTACTS</code> </b> - This failure applies to email validation, which is not available for Lightsail certificates.</p></li>
    /// <li>
    /// <p><b> <code>ADDITIONAL_VERIFICATION_REQUIRED</code> </b> - Lightsail requires additional information to process this certificate request. This can happen as a fraud-protection measure, such as when the domain ranks within the Alexa top 1000 websites. To provide the required information, use the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> to contact Amazon Web Services Support.</p><note>
    /// <p>You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.</p>
    /// </note></li>
    /// <li>
    /// <p><b> <code>DOMAIN_NOT_ALLOWED</code> </b> - One or more of the domain names in the certificate request was reported as an unsafe domain by <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a>. To correct the problem, search for your domain name on the <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a> website. If your domain is reported as suspicious, see <a href="https://developers.google.com/web/fundamentals/security/hacked">Google Help for Hacked Websites</a> to learn what you can do.</p>
    /// <p>If you believe that the result is a false positive, notify the organization that is reporting the domain. VirusTotal is an aggregate of several antivirus and URL scanners and cannot remove your domain from a block list itself. After you correct the problem and the VirusTotal registry has been updated, request a new certificate.</p>
    /// <p>If you see this error and your domain is not included in the VirusTotal list, visit the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> and create a case.</p></li>
    /// <li>
    /// <p><b> <code>INVALID_PUBLIC_DOMAIN</code> </b> - One or more of the domain names in the certificate request is not valid. Typically, this is because a domain name in the request is not a valid top-level domain. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request, and ensure that all domain names in the request are for valid top-level domains. For example, you cannot request a certificate for <code>example.invalidpublicdomain</code> because <code>invalidpublicdomain</code> is not a valid top-level domain.</p></li>
    /// <li>
    /// <p><b> <code>OTHER</code> </b> - Typically, this failure occurs when there is a typographical error in one or more of the domain names in the certificate request. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request.</p></li>
    /// </ul>
    pub request_failure_reason: ::std::option::Option<::std::string::String>,
    /// <p>The number of Lightsail resources that the certificate is attached to.</p>
    pub in_use_resource_count: i32,
    /// <p>The algorithm used to generate the key pair (the public and private key) of the certificate.</p>
    pub key_algorithm: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp when the certificate was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp when the certificate was issued.</p>
    pub issued_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The certificate authority that issued the certificate.</p>
    pub issuer_ca: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp when the certificate is first valid.</p>
    pub not_before: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp when the certificate expires.</p>
    pub not_after: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The renewal eligibility of the certificate.</p>
    pub eligible_to_renew: ::std::option::Option<::std::string::String>,
    /// <p>An object that describes the status of the certificate renewal managed by Lightsail.</p>
    pub renewal_summary: ::std::option::Option<crate::types::RenewalSummary>,
    /// <p>The timestamp when the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
    pub revoked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The reason the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
    pub revocation_reason: ::std::option::Option<::std::string::String>,
    /// <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 support code. Include this code in your email to support when you have questions about your Lightsail certificate. This code enables our support team to look up your Lightsail information more easily.</p>
    pub support_code: ::std::option::Option<::std::string::String>,
}
impl Certificate {
    /// <p>The Amazon Resource Name (ARN) of the certificate.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name of the certificate (<code>my-certificate</code>).</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The domain name of the certificate.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The validation status of the certificate.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::CertificateStatus> {
        self.status.as_ref()
    }
    /// <p>The serial number of the certificate.</p>
    pub fn serial_number(&self) -> ::std::option::Option<&str> {
        self.serial_number.as_deref()
    }
    /// <p>An array of strings that specify the alternate domains (<code>example2.com</code>) and subdomains (<code>blog.example.com</code>) of the certificate.</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 `.subject_alternative_names.is_none()`.
    pub fn subject_alternative_names(&self) -> &[::std::string::String] {
        self.subject_alternative_names.as_deref().unwrap_or_default()
    }
    /// <p>An array of objects that describe the domain validation records of the certificate.</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 `.domain_validation_records.is_none()`.
    pub fn domain_validation_records(&self) -> &[crate::types::DomainValidationRecord] {
        self.domain_validation_records.as_deref().unwrap_or_default()
    }
    /// <p>The validation failure reason, if any, of the certificate.</p>
    /// <p>The following failure reasons are possible:</p>
    /// <ul>
    /// <li>
    /// <p><b> <code>NO_AVAILABLE_CONTACTS</code> </b> - This failure applies to email validation, which is not available for Lightsail certificates.</p></li>
    /// <li>
    /// <p><b> <code>ADDITIONAL_VERIFICATION_REQUIRED</code> </b> - Lightsail requires additional information to process this certificate request. This can happen as a fraud-protection measure, such as when the domain ranks within the Alexa top 1000 websites. To provide the required information, use the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> to contact Amazon Web Services Support.</p><note>
    /// <p>You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.</p>
    /// </note></li>
    /// <li>
    /// <p><b> <code>DOMAIN_NOT_ALLOWED</code> </b> - One or more of the domain names in the certificate request was reported as an unsafe domain by <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a>. To correct the problem, search for your domain name on the <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a> website. If your domain is reported as suspicious, see <a href="https://developers.google.com/web/fundamentals/security/hacked">Google Help for Hacked Websites</a> to learn what you can do.</p>
    /// <p>If you believe that the result is a false positive, notify the organization that is reporting the domain. VirusTotal is an aggregate of several antivirus and URL scanners and cannot remove your domain from a block list itself. After you correct the problem and the VirusTotal registry has been updated, request a new certificate.</p>
    /// <p>If you see this error and your domain is not included in the VirusTotal list, visit the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> and create a case.</p></li>
    /// <li>
    /// <p><b> <code>INVALID_PUBLIC_DOMAIN</code> </b> - One or more of the domain names in the certificate request is not valid. Typically, this is because a domain name in the request is not a valid top-level domain. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request, and ensure that all domain names in the request are for valid top-level domains. For example, you cannot request a certificate for <code>example.invalidpublicdomain</code> because <code>invalidpublicdomain</code> is not a valid top-level domain.</p></li>
    /// <li>
    /// <p><b> <code>OTHER</code> </b> - Typically, this failure occurs when there is a typographical error in one or more of the domain names in the certificate request. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request.</p></li>
    /// </ul>
    pub fn request_failure_reason(&self) -> ::std::option::Option<&str> {
        self.request_failure_reason.as_deref()
    }
    /// <p>The number of Lightsail resources that the certificate is attached to.</p>
    pub fn in_use_resource_count(&self) -> i32 {
        self.in_use_resource_count
    }
    /// <p>The algorithm used to generate the key pair (the public and private key) of the certificate.</p>
    pub fn key_algorithm(&self) -> ::std::option::Option<&str> {
        self.key_algorithm.as_deref()
    }
    /// <p>The timestamp when the certificate was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The timestamp when the certificate was issued.</p>
    pub fn issued_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.issued_at.as_ref()
    }
    /// <p>The certificate authority that issued the certificate.</p>
    pub fn issuer_ca(&self) -> ::std::option::Option<&str> {
        self.issuer_ca.as_deref()
    }
    /// <p>The timestamp when the certificate is first valid.</p>
    pub fn not_before(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.not_before.as_ref()
    }
    /// <p>The timestamp when the certificate expires.</p>
    pub fn not_after(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.not_after.as_ref()
    }
    /// <p>The renewal eligibility of the certificate.</p>
    pub fn eligible_to_renew(&self) -> ::std::option::Option<&str> {
        self.eligible_to_renew.as_deref()
    }
    /// <p>An object that describes the status of the certificate renewal managed by Lightsail.</p>
    pub fn renewal_summary(&self) -> ::std::option::Option<&crate::types::RenewalSummary> {
        self.renewal_summary.as_ref()
    }
    /// <p>The timestamp when the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
    pub fn revoked_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.revoked_at.as_ref()
    }
    /// <p>The reason the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
    pub fn revocation_reason(&self) -> ::std::option::Option<&str> {
        self.revocation_reason.as_deref()
    }
    /// <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 support code. Include this code in your email to support when you have questions about your Lightsail certificate. 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()
    }
}
impl Certificate {
    /// Creates a new builder-style object to manufacture [`Certificate`](crate::types::Certificate).
    pub fn builder() -> crate::types::builders::CertificateBuilder {
        crate::types::builders::CertificateBuilder::default()
    }
}

/// A builder for [`Certificate`](crate::types::Certificate).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CertificateBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::CertificateStatus>,
    pub(crate) serial_number: ::std::option::Option<::std::string::String>,
    pub(crate) subject_alternative_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) domain_validation_records: ::std::option::Option<::std::vec::Vec<crate::types::DomainValidationRecord>>,
    pub(crate) request_failure_reason: ::std::option::Option<::std::string::String>,
    pub(crate) in_use_resource_count: ::std::option::Option<i32>,
    pub(crate) key_algorithm: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) issued_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) issuer_ca: ::std::option::Option<::std::string::String>,
    pub(crate) not_before: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) not_after: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) eligible_to_renew: ::std::option::Option<::std::string::String>,
    pub(crate) renewal_summary: ::std::option::Option<crate::types::RenewalSummary>,
    pub(crate) revoked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) revocation_reason: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) support_code: ::std::option::Option<::std::string::String>,
}
impl CertificateBuilder {
    /// <p>The Amazon Resource Name (ARN) of the certificate.</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 certificate.</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 certificate.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The name of the certificate (<code>my-certificate</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 of the certificate (<code>my-certificate</code>).</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the certificate (<code>my-certificate</code>).</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The domain name of the certificate.</p>
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The domain name of the certificate.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The domain name of the certificate.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The validation status of the certificate.</p>
    pub fn status(mut self, input: crate::types::CertificateStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The validation status of the certificate.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::CertificateStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The validation status of the certificate.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::CertificateStatus> {
        &self.status
    }
    /// <p>The serial number of the certificate.</p>
    pub fn serial_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.serial_number = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The serial number of the certificate.</p>
    pub fn set_serial_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.serial_number = input;
        self
    }
    /// <p>The serial number of the certificate.</p>
    pub fn get_serial_number(&self) -> &::std::option::Option<::std::string::String> {
        &self.serial_number
    }
    /// Appends an item to `subject_alternative_names`.
    ///
    /// To override the contents of this collection use [`set_subject_alternative_names`](Self::set_subject_alternative_names).
    ///
    /// <p>An array of strings that specify the alternate domains (<code>example2.com</code>) and subdomains (<code>blog.example.com</code>) of the certificate.</p>
    pub fn subject_alternative_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.subject_alternative_names.unwrap_or_default();
        v.push(input.into());
        self.subject_alternative_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of strings that specify the alternate domains (<code>example2.com</code>) and subdomains (<code>blog.example.com</code>) of the certificate.</p>
    pub fn set_subject_alternative_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.subject_alternative_names = input;
        self
    }
    /// <p>An array of strings that specify the alternate domains (<code>example2.com</code>) and subdomains (<code>blog.example.com</code>) of the certificate.</p>
    pub fn get_subject_alternative_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.subject_alternative_names
    }
    /// Appends an item to `domain_validation_records`.
    ///
    /// To override the contents of this collection use [`set_domain_validation_records`](Self::set_domain_validation_records).
    ///
    /// <p>An array of objects that describe the domain validation records of the certificate.</p>
    pub fn domain_validation_records(mut self, input: crate::types::DomainValidationRecord) -> Self {
        let mut v = self.domain_validation_records.unwrap_or_default();
        v.push(input);
        self.domain_validation_records = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of objects that describe the domain validation records of the certificate.</p>
    pub fn set_domain_validation_records(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DomainValidationRecord>>) -> Self {
        self.domain_validation_records = input;
        self
    }
    /// <p>An array of objects that describe the domain validation records of the certificate.</p>
    pub fn get_domain_validation_records(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DomainValidationRecord>> {
        &self.domain_validation_records
    }
    /// <p>The validation failure reason, if any, of the certificate.</p>
    /// <p>The following failure reasons are possible:</p>
    /// <ul>
    /// <li>
    /// <p><b> <code>NO_AVAILABLE_CONTACTS</code> </b> - This failure applies to email validation, which is not available for Lightsail certificates.</p></li>
    /// <li>
    /// <p><b> <code>ADDITIONAL_VERIFICATION_REQUIRED</code> </b> - Lightsail requires additional information to process this certificate request. This can happen as a fraud-protection measure, such as when the domain ranks within the Alexa top 1000 websites. To provide the required information, use the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> to contact Amazon Web Services Support.</p><note>
    /// <p>You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.</p>
    /// </note></li>
    /// <li>
    /// <p><b> <code>DOMAIN_NOT_ALLOWED</code> </b> - One or more of the domain names in the certificate request was reported as an unsafe domain by <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a>. To correct the problem, search for your domain name on the <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a> website. If your domain is reported as suspicious, see <a href="https://developers.google.com/web/fundamentals/security/hacked">Google Help for Hacked Websites</a> to learn what you can do.</p>
    /// <p>If you believe that the result is a false positive, notify the organization that is reporting the domain. VirusTotal is an aggregate of several antivirus and URL scanners and cannot remove your domain from a block list itself. After you correct the problem and the VirusTotal registry has been updated, request a new certificate.</p>
    /// <p>If you see this error and your domain is not included in the VirusTotal list, visit the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> and create a case.</p></li>
    /// <li>
    /// <p><b> <code>INVALID_PUBLIC_DOMAIN</code> </b> - One or more of the domain names in the certificate request is not valid. Typically, this is because a domain name in the request is not a valid top-level domain. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request, and ensure that all domain names in the request are for valid top-level domains. For example, you cannot request a certificate for <code>example.invalidpublicdomain</code> because <code>invalidpublicdomain</code> is not a valid top-level domain.</p></li>
    /// <li>
    /// <p><b> <code>OTHER</code> </b> - Typically, this failure occurs when there is a typographical error in one or more of the domain names in the certificate request. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request.</p></li>
    /// </ul>
    pub fn request_failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_failure_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The validation failure reason, if any, of the certificate.</p>
    /// <p>The following failure reasons are possible:</p>
    /// <ul>
    /// <li>
    /// <p><b> <code>NO_AVAILABLE_CONTACTS</code> </b> - This failure applies to email validation, which is not available for Lightsail certificates.</p></li>
    /// <li>
    /// <p><b> <code>ADDITIONAL_VERIFICATION_REQUIRED</code> </b> - Lightsail requires additional information to process this certificate request. This can happen as a fraud-protection measure, such as when the domain ranks within the Alexa top 1000 websites. To provide the required information, use the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> to contact Amazon Web Services Support.</p><note>
    /// <p>You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.</p>
    /// </note></li>
    /// <li>
    /// <p><b> <code>DOMAIN_NOT_ALLOWED</code> </b> - One or more of the domain names in the certificate request was reported as an unsafe domain by <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a>. To correct the problem, search for your domain name on the <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a> website. If your domain is reported as suspicious, see <a href="https://developers.google.com/web/fundamentals/security/hacked">Google Help for Hacked Websites</a> to learn what you can do.</p>
    /// <p>If you believe that the result is a false positive, notify the organization that is reporting the domain. VirusTotal is an aggregate of several antivirus and URL scanners and cannot remove your domain from a block list itself. After you correct the problem and the VirusTotal registry has been updated, request a new certificate.</p>
    /// <p>If you see this error and your domain is not included in the VirusTotal list, visit the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> and create a case.</p></li>
    /// <li>
    /// <p><b> <code>INVALID_PUBLIC_DOMAIN</code> </b> - One or more of the domain names in the certificate request is not valid. Typically, this is because a domain name in the request is not a valid top-level domain. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request, and ensure that all domain names in the request are for valid top-level domains. For example, you cannot request a certificate for <code>example.invalidpublicdomain</code> because <code>invalidpublicdomain</code> is not a valid top-level domain.</p></li>
    /// <li>
    /// <p><b> <code>OTHER</code> </b> - Typically, this failure occurs when there is a typographical error in one or more of the domain names in the certificate request. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request.</p></li>
    /// </ul>
    pub fn set_request_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_failure_reason = input;
        self
    }
    /// <p>The validation failure reason, if any, of the certificate.</p>
    /// <p>The following failure reasons are possible:</p>
    /// <ul>
    /// <li>
    /// <p><b> <code>NO_AVAILABLE_CONTACTS</code> </b> - This failure applies to email validation, which is not available for Lightsail certificates.</p></li>
    /// <li>
    /// <p><b> <code>ADDITIONAL_VERIFICATION_REQUIRED</code> </b> - Lightsail requires additional information to process this certificate request. This can happen as a fraud-protection measure, such as when the domain ranks within the Alexa top 1000 websites. To provide the required information, use the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> to contact Amazon Web Services Support.</p><note>
    /// <p>You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.</p>
    /// </note></li>
    /// <li>
    /// <p><b> <code>DOMAIN_NOT_ALLOWED</code> </b> - One or more of the domain names in the certificate request was reported as an unsafe domain by <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a>. To correct the problem, search for your domain name on the <a href="https://www.virustotal.com/gui/home/url">VirusTotal</a> website. If your domain is reported as suspicious, see <a href="https://developers.google.com/web/fundamentals/security/hacked">Google Help for Hacked Websites</a> to learn what you can do.</p>
    /// <p>If you believe that the result is a false positive, notify the organization that is reporting the domain. VirusTotal is an aggregate of several antivirus and URL scanners and cannot remove your domain from a block list itself. After you correct the problem and the VirusTotal registry has been updated, request a new certificate.</p>
    /// <p>If you see this error and your domain is not included in the VirusTotal list, visit the <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Support Center</a> and create a case.</p></li>
    /// <li>
    /// <p><b> <code>INVALID_PUBLIC_DOMAIN</code> </b> - One or more of the domain names in the certificate request is not valid. Typically, this is because a domain name in the request is not a valid top-level domain. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request, and ensure that all domain names in the request are for valid top-level domains. For example, you cannot request a certificate for <code>example.invalidpublicdomain</code> because <code>invalidpublicdomain</code> is not a valid top-level domain.</p></li>
    /// <li>
    /// <p><b> <code>OTHER</code> </b> - Typically, this failure occurs when there is a typographical error in one or more of the domain names in the certificate request. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request.</p></li>
    /// </ul>
    pub fn get_request_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_failure_reason
    }
    /// <p>The number of Lightsail resources that the certificate is attached to.</p>
    pub fn in_use_resource_count(mut self, input: i32) -> Self {
        self.in_use_resource_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of Lightsail resources that the certificate is attached to.</p>
    pub fn set_in_use_resource_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.in_use_resource_count = input;
        self
    }
    /// <p>The number of Lightsail resources that the certificate is attached to.</p>
    pub fn get_in_use_resource_count(&self) -> &::std::option::Option<i32> {
        &self.in_use_resource_count
    }
    /// <p>The algorithm used to generate the key pair (the public and private key) of the certificate.</p>
    pub fn key_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key_algorithm = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The algorithm used to generate the key pair (the public and private key) of the certificate.</p>
    pub fn set_key_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key_algorithm = input;
        self
    }
    /// <p>The algorithm used to generate the key pair (the public and private key) of the certificate.</p>
    pub fn get_key_algorithm(&self) -> &::std::option::Option<::std::string::String> {
        &self.key_algorithm
    }
    /// <p>The timestamp when the certificate was created.</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 certificate was created.</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 certificate was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The timestamp when the certificate was issued.</p>
    pub fn issued_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.issued_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the certificate was issued.</p>
    pub fn set_issued_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.issued_at = input;
        self
    }
    /// <p>The timestamp when the certificate was issued.</p>
    pub fn get_issued_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.issued_at
    }
    /// <p>The certificate authority that issued the certificate.</p>
    pub fn issuer_ca(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.issuer_ca = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The certificate authority that issued the certificate.</p>
    pub fn set_issuer_ca(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.issuer_ca = input;
        self
    }
    /// <p>The certificate authority that issued the certificate.</p>
    pub fn get_issuer_ca(&self) -> &::std::option::Option<::std::string::String> {
        &self.issuer_ca
    }
    /// <p>The timestamp when the certificate is first valid.</p>
    pub fn not_before(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.not_before = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the certificate is first valid.</p>
    pub fn set_not_before(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.not_before = input;
        self
    }
    /// <p>The timestamp when the certificate is first valid.</p>
    pub fn get_not_before(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.not_before
    }
    /// <p>The timestamp when the certificate expires.</p>
    pub fn not_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.not_after = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the certificate expires.</p>
    pub fn set_not_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.not_after = input;
        self
    }
    /// <p>The timestamp when the certificate expires.</p>
    pub fn get_not_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.not_after
    }
    /// <p>The renewal eligibility of the certificate.</p>
    pub fn eligible_to_renew(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.eligible_to_renew = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The renewal eligibility of the certificate.</p>
    pub fn set_eligible_to_renew(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.eligible_to_renew = input;
        self
    }
    /// <p>The renewal eligibility of the certificate.</p>
    pub fn get_eligible_to_renew(&self) -> &::std::option::Option<::std::string::String> {
        &self.eligible_to_renew
    }
    /// <p>An object that describes the status of the certificate renewal managed by Lightsail.</p>
    pub fn renewal_summary(mut self, input: crate::types::RenewalSummary) -> Self {
        self.renewal_summary = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that describes the status of the certificate renewal managed by Lightsail.</p>
    pub fn set_renewal_summary(mut self, input: ::std::option::Option<crate::types::RenewalSummary>) -> Self {
        self.renewal_summary = input;
        self
    }
    /// <p>An object that describes the status of the certificate renewal managed by Lightsail.</p>
    pub fn get_renewal_summary(&self) -> &::std::option::Option<crate::types::RenewalSummary> {
        &self.renewal_summary
    }
    /// <p>The timestamp when the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
    pub fn revoked_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.revoked_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
    pub fn set_revoked_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.revoked_at = input;
        self
    }
    /// <p>The timestamp when the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
    pub fn get_revoked_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.revoked_at
    }
    /// <p>The reason the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
    pub fn revocation_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.revocation_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
    pub fn set_revocation_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.revocation_reason = input;
        self
    }
    /// <p>The reason the certificate was revoked. This value is present only when the certificate status is <code>REVOKED</code>.</p>
    pub fn get_revocation_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.revocation_reason
    }
    /// 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 support code. Include this code in your email to support when you have questions about your Lightsail certificate. 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 your Lightsail certificate. 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 your Lightsail certificate. 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
    }
    /// Consumes the builder and constructs a [`Certificate`](crate::types::Certificate).
    pub fn build(self) -> crate::types::Certificate {
        crate::types::Certificate {
            arn: self.arn,
            name: self.name,
            domain_name: self.domain_name,
            status: self.status,
            serial_number: self.serial_number,
            subject_alternative_names: self.subject_alternative_names,
            domain_validation_records: self.domain_validation_records,
            request_failure_reason: self.request_failure_reason,
            in_use_resource_count: self.in_use_resource_count.unwrap_or_default(),
            key_algorithm: self.key_algorithm,
            created_at: self.created_at,
            issued_at: self.issued_at,
            issuer_ca: self.issuer_ca,
            not_before: self.not_before,
            not_after: self.not_after,
            eligible_to_renew: self.eligible_to_renew,
            renewal_summary: self.renewal_summary,
            revoked_at: self.revoked_at,
            revocation_reason: self.revocation_reason,
            tags: self.tags,
            support_code: self.support_code,
        }
    }
}