Skip to main content

aws_lite_rs/types/
route53.rs

1//! Types for the Amazon Route 53 API (v1).
2//!
3//! Auto-generated from the AWS Botocore Model.
4//! **Do not edit manually** — modify the manifest and re-run codegen.
5
6use serde::{Deserialize, Serialize};
7
8/// Possible values for `route53.ResourceRecordSet.Type`.
9///
10/// **AWS API**: `route53.ResourceRecordSet.Type`
11#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
12#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
13pub enum RRType {
14    Soa,
15
16    A,
17
18    Txt,
19
20    Ns,
21
22    Cname,
23
24    Mx,
25
26    Naptr,
27
28    Ptr,
29
30    Srv,
31
32    Spf,
33
34    Aaaa,
35
36    Caa,
37
38    Ds,
39
40    Tlsa,
41
42    Sshfp,
43
44    Svcb,
45
46    Https,
47
48    /// Unknown or future value not yet represented.
49    #[serde(other)]
50    Unknown,
51}
52
53/// Possible values for `route53.HealthCheckConfig.Type`.
54///
55/// **AWS API**: `route53.HealthCheckConfig.Type`
56#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
57#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
58pub enum HealthCheckType {
59    Http,
60
61    Https,
62
63    HttpStrMatch,
64
65    HttpsStrMatch,
66
67    Tcp,
68
69    Calculated,
70
71    CloudwatchMetric,
72
73    RecoveryControl,
74
75    /// Unknown or future value not yet represented.
76    #[serde(other)]
77    Unknown,
78}
79
80/// Possible values for `route53.Change.Action`.
81///
82/// **AWS API**: `route53.Change.Action`
83#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
84#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
85pub enum ChangeAction {
86    Create,
87
88    Delete,
89
90    Upsert,
91
92    /// Unknown or future value not yet represented.
93    #[serde(other)]
94    Unknown,
95}
96
97/// Possible values for `route53.ChangeInfo.Status`.
98///
99/// **AWS API**: `route53.ChangeInfo.Status`
100#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
101#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
102pub enum ChangeStatus {
103    Pending,
104
105    Insync,
106
107    /// Unknown or future value not yet represented.
108    #[serde(other)]
109    Unknown,
110}
111
112///
113/// **AWS API**: `route53.v1.ListHostedZonesResponse`
114#[derive(Debug, Clone, Default, Serialize, Deserialize)]
115#[serde(rename_all = "PascalCase")]
116pub struct ListHostedZonesResponse {
117    /// A complex type that contains general information about the hosted zone.
118    #[serde(default)]
119    pub hosted_zones: Vec<HostedZone>,
120
121    /// For the second and subsequent calls to ListHostedZones, Marker is the value that you
122    /// specified for the marker parameter in the request that produced the current response.
123    #[serde(skip_serializing_if = "Option::is_none")]
124    pub marker: Option<String>,
125
126    /// A flag indicating whether there are more hosted zones to be listed. If the response was
127    /// truncated, you can get more hosted zones by submitting another ListHostedZones request
128    /// and specifying the value of NextMarker in the marker parameter.
129    #[serde(default)]
130    pub is_truncated: bool,
131
132    /// If IsTruncated is true, the value of NextMarker identifies the first hosted zone in the
133    /// next group of hosted zones. Submit another ListHostedZones request, and specify the
134    /// value of NextMarker from the response in the marker parameter. This element is present
135    /// only if IsTruncated is true.
136    #[serde(skip_serializing_if = "Option::is_none")]
137    pub next_marker: Option<String>,
138
139    /// The value that you specified for the maxitems parameter in the call to ListHostedZones
140    /// that produced the current response.
141    pub max_items: String,
142}
143
144impl ListHostedZonesResponse {
145    #[cfg(any(test, feature = "test-support"))]
146    /// Create a fixture instance for testing.
147    pub fn fixture() -> Self {
148        Self {
149            hosted_zones: vec![],
150            marker: Some("test-marker".into()),
151            is_truncated: false,
152            next_marker: Some("test-next_marker".into()),
153            max_items: "test-max_items".into(),
154        }
155    }
156}
157
158/// A complex type that contains general information about the hosted zone.
159///
160/// **AWS API**: `route53.v1.HostedZone`
161///
162/// ## Coverage
163/// 5 of 7 fields included.
164/// Omitted fields:
165/// - `LinkedService` — not selected in manifest
166/// - `Features` — not selected in manifest
167#[derive(Debug, Clone, Default, Serialize, Deserialize)]
168#[serde(rename_all = "PascalCase")]
169pub struct HostedZone {
170    /// The ID that Amazon Route 53 assigned to the hosted zone when you created it.
171    pub id: String,
172
173    /// The name of the domain. For public hosted zones, this is the name that you have
174    /// registered with your DNS registrar. For information about how to specify characters
175    /// other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names,
176    /// see CreateHostedZone.
177    pub name: String,
178
179    /// The value that you specified for CallerReference when you created the hosted zone.
180    pub caller_reference: String,
181
182    /// A complex type that includes the Comment and PrivateZone elements. If you omitted the
183    /// HostedZoneConfig and Comment elements from the request, the Config and Comment elements
184    /// don't appear in the response.
185    #[serde(skip_serializing_if = "Option::is_none")]
186    pub config: Option<HostedZoneConfig>,
187
188    /// The number of resource record sets in the hosted zone.
189    #[serde(skip_serializing_if = "Option::is_none")]
190    pub resource_record_set_count: Option<i64>,
191}
192
193impl HostedZone {
194    #[cfg(any(test, feature = "test-support"))]
195    /// Create a fixture instance for testing.
196    pub fn fixture() -> Self {
197        Self {
198            id: "test-id".into(),
199            name: "test-name".into(),
200            caller_reference: "test-caller_reference".into(),
201            config: Some(HostedZoneConfig::fixture()),
202            resource_record_set_count: Some(100),
203        }
204    }
205}
206
207/// A complex type that contains an optional comment about your hosted zone. If you don't want
208/// to specify a comment, omit both the HostedZoneConfig and Comment elements.
209///
210/// **AWS API**: `route53.v1.HostedZoneConfig`
211#[derive(Debug, Clone, Default, Serialize, Deserialize)]
212#[serde(rename_all = "PascalCase")]
213pub struct HostedZoneConfig {
214    /// Any comments that you want to include about the hosted zone.
215    #[serde(skip_serializing_if = "Option::is_none")]
216    pub comment: Option<String>,
217
218    /// A value that indicates whether this is a private hosted zone.
219    #[serde(skip_serializing_if = "Option::is_none")]
220    pub private_zone: Option<bool>,
221}
222
223impl HostedZoneConfig {
224    #[cfg(any(test, feature = "test-support"))]
225    /// Create a fixture instance for testing.
226    pub fn fixture() -> Self {
227        Self {
228            comment: Some("test-comment".into()),
229            private_zone: Some(false),
230        }
231    }
232}
233
234/// A complex type that contains list information for the resource record set.
235///
236/// **AWS API**: `route53.v1.ListResourceRecordSetsResponse`
237///
238/// ## Coverage
239/// 5 of 6 fields included.
240/// Omitted fields:
241/// - `NextRecordIdentifier` — not selected in manifest
242#[derive(Debug, Clone, Default, Serialize, Deserialize)]
243#[serde(rename_all = "PascalCase")]
244pub struct ListResourceRecordSetsResponse {
245    /// Information about multiple resource record sets.
246    #[serde(default)]
247    pub resource_record_sets: Vec<ResourceRecordSet>,
248
249    /// A flag that indicates whether more resource record sets remain to be listed. If your
250    /// results were truncated, you can make a follow-up pagination request by using the
251    /// NextRecordName element.
252    #[serde(default)]
253    pub is_truncated: bool,
254
255    /// If the results were truncated, the name of the next record in the list. This element is
256    /// present only if IsTruncated is true.
257    #[serde(skip_serializing_if = "Option::is_none")]
258    pub next_record_name: Option<String>,
259
260    /// If the results were truncated, the type of the next record in the list. This element is
261    /// present only if IsTruncated is true.
262    #[serde(skip_serializing_if = "Option::is_none")]
263    pub next_record_type: Option<String>,
264
265    /// The maximum number of records you requested.
266    pub max_items: String,
267}
268
269impl ListResourceRecordSetsResponse {
270    #[cfg(any(test, feature = "test-support"))]
271    /// Create a fixture instance for testing.
272    pub fn fixture() -> Self {
273        Self {
274            resource_record_sets: vec![],
275            is_truncated: false,
276            next_record_name: Some("test-next_record_name".into()),
277            next_record_type: Some("test-next_record_type".into()),
278            max_items: "test-max_items".into(),
279        }
280    }
281}
282
283/// Information about the resource record set to create or delete.
284///
285/// **AWS API**: `route53.v1.ResourceRecordSet`
286///
287/// ## Coverage
288/// 8 of 15 fields included.
289/// Omitted fields:
290/// - `Region` — not selected in manifest
291/// - `GeoLocation` — not selected in manifest
292/// - `Failover` — not selected in manifest
293/// - `MultiValueAnswer` — not selected in manifest
294/// - `TrafficPolicyInstanceId` — not selected in manifest
295/// - `CidrRoutingConfig` — not selected in manifest
296/// - `GeoProximityLocation` — not selected in manifest
297#[derive(Debug, Clone, Default, Serialize, Deserialize)]
298#[serde(rename_all = "PascalCase")]
299pub struct ResourceRecordSet {
300    /// For ChangeResourceRecordSets requests, the name of the record that you want to create,
301    /// update, or delete. For ListResourceRecordSets responses, the name of a record in the
302    /// specified hosted zone. ChangeResourceRecordSets Only Enter a fully qualified domain
303    /// name, for example, www.example.com. You can optionally include a trailing dot. If you
304    /// omit the trailing dot, Amazon Route 53 assumes that the domain name that you specify is
305    /// fully qualified. This means that Route 53 treats www.example.com (without a trailing
306    /// dot) and www.example.com. (with a trailing dot) as identical. For information about how
307    /// to specify characters other than a-z, 0-9, and - (hyphen) and how to specify
308    /// internationalized domain names, see DNS Domain Name Format in the Amazon Route 53
309    /// Developer Guide. You can use the asterisk (*) wildcard to replace the leftmost label in
310    /// a domain name, for example, *.example.com. Note the following: The
311    /// * must replace the entire label. For example, you can't specify *prod.example.com or
312    ///   prod*.example.com. The
313    /// * can't replace any of the middle labels, for example, marketing.*.example.com. If you
314    ///   include
315    /// * in any position other than the leftmost label in a domain name, DNS treats it as an
316    /// * character (ASCII 42), not as a wildcard. You can't use the
317    /// * wildcard for resource records sets that have a type of NS.
318    pub name: String,
319
320    /// The DNS record type. For information about different record types and how data is
321    /// encoded for them, see Supported DNS Resource Record Types in the Amazon Route 53
322    /// Developer Guide. Valid values for basic resource record sets: A | AAAA | CAA | CNAME |
323    /// DS |MX | NAPTR | NS | PTR | SOA | SPF | SRV | TXT| TLSA| SSHFP| SVCB| HTTPS Values for
324    /// weighted, latency, geolocation, and failover resource record sets: A | AAAA | CAA |
325    /// CNAME | MX | NAPTR | PTR | SPF | SRV | TXT| TLSA| SSHFP| SVCB| HTTPS. When creating a
326    /// group of weighted, latency, geolocation, or failover resource record sets, specify the
327    /// same value for all of the resource record sets in the group. Valid values for multivalue
328    /// answer resource record sets: A | AAAA | MX | NAPTR | PTR | SPF | SRV | TXT| CAA| TLSA|
329    /// SSHFP| SVCB| HTTPS SPF records were formerly used to verify the identity of the sender
330    /// of email messages. However, we no longer recommend that you create resource record sets
331    /// for which the value of Type is SPF. RFC 7208, Sender Policy Framework (SPF) for
332    /// Authorizing Use of Domains in Email, Version 1, has been updated to say, "...[I]ts
333    /// existence and mechanism defined in [RFC4408] have led to some interoperability issues.
334    /// Accordingly, its use is no longer appropriate for SPF version 1; implementations are not
335    /// to use it." In RFC 7208, see section 14.1, The SPF DNS Record Type. Values for alias
336    /// resource record sets: Amazon API Gateway custom regional APIs and edge-optimized APIs: A
337    /// CloudFront distributions: A If IPv6 is enabled for the distribution, create two resource
338    /// record sets to route traffic to your distribution, one with a value of A and one with a
339    /// value of AAAA. Amazon API Gateway environment that has a regionalized subdomain: A ELB
340    /// load balancers: A | AAAA Amazon S3 buckets: A Amazon Virtual Private Cloud interface VPC
341    /// endpoints A Another resource record set in this hosted zone: Specify the type of the
342    /// resource record set that you're creating the alias for. All values are supported except
343    /// NS and SOA. If you're creating an alias record that has the same name as the hosted zone
344    /// (known as the zone apex), you can't route traffic to a record for which the value of
345    /// Type is CNAME. This is because the alias record must have the same type as the record
346    /// you're routing traffic to, and creating a CNAME record for the zone apex isn't supported
347    /// even for an alias record.
348    #[serde(rename = "Type")]
349    #[serde(skip_serializing_if = "Option::is_none")]
350    pub r#type: Option<RRType>,
351
352    /// The resource record cache time to live (TTL), in seconds. Note the following: If you're
353    /// creating or updating an alias resource record set, omit TTL. Amazon Route 53 uses the
354    /// value of TTL for the alias target. If you're associating this resource record set with a
355    /// health check (if you're adding a HealthCheckId element), we recommend that you specify a
356    /// TTL of 60 seconds or less so clients respond quickly to changes in health status. All of
357    /// the resource record sets in a group of weighted resource record sets must have the same
358    /// value for TTL. If a group of weighted resource record sets includes one or more weighted
359    /// alias resource record sets for which the alias target is an ELB load balancer, we
360    /// recommend that you specify a TTL of 60 seconds for all of the non-alias weighted
361    /// resource record sets that have the same name and type. Values other than 60 seconds (the
362    /// TTL for load balancers) will change the effect of the values that you specify for
363    /// Weight.
364    #[serde(rename = "TTL")]
365    #[serde(skip_serializing_if = "Option::is_none")]
366    pub ttl: Option<i64>,
367
368    /// Information about the resource records to act upon. If you're creating an alias resource
369    /// record set, omit ResourceRecords.
370    #[serde(default)]
371    #[serde(skip_serializing_if = "Vec::is_empty")]
372    pub resource_records: Vec<ResourceRecord>,
373
374    /// If you want Amazon Route 53 to return this resource record set in response to a DNS
375    /// query only when the status of a health check is healthy, include the HealthCheckId
376    /// element and specify the ID of the applicable health check. Route 53 determines whether a
377    /// resource record set is healthy based on one of the following: By periodically sending a
378    /// request to the endpoint that is specified in the health check By aggregating the status
379    /// of a specified group of health checks (calculated health checks) By determining the
380    /// current state of a CloudWatch alarm (CloudWatch metric health checks) Route 53 doesn't
381    /// check the health of the endpoint that is specified in the resource record set, for
382    /// example, the endpoint specified by the IP address in the Value element. When you add a
383    /// HealthCheckId element to a resource record set, Route 53 checks the health of the
384    /// endpoint that you specified in the health check. For more information, see the following
385    /// topics in the Amazon Route 53 Developer Guide: How Amazon Route 53 Determines Whether an
386    /// Endpoint Is Healthy Route 53 Health Checks and DNS Failover Configuring Failover in a
387    /// Private Hosted Zone When to Specify HealthCheckId Specifying a value for HealthCheckId
388    /// is useful only when Route 53 is choosing between two or more resource record sets to
389    /// respond to a DNS query, and you want Route 53 to base the choice in part on the status
390    /// of a health check. Configuring health checks makes sense only in the following
391    /// configurations: Non-alias resource record sets: You're checking the health of a group of
392    /// non-alias resource record sets that have the same routing policy, name, and type (such
393    /// as multiple weighted records named www.example.com with a type of A) and you specify
394    /// health check IDs for all the resource record sets. If the health check status for a
395    /// resource record set is healthy, Route 53 includes the record among the records that it
396    /// responds to DNS queries with. If the health check status for a resource record set is
397    /// unhealthy, Route 53 stops responding to DNS queries using the value for that resource
398    /// record set. If the health check status for all resource record sets in the group is
399    /// unhealthy, Route 53 considers all resource record sets in the group healthy and responds
400    /// to DNS queries accordingly. Alias resource record sets: You specify the following
401    /// settings: You set EvaluateTargetHealth to true for an alias resource record set in a
402    /// group of resource record sets that have the same routing policy, name, and type (such as
403    /// multiple weighted records named www.example.com with a type of A). You configure the
404    /// alias resource record set to route traffic to a non-alias resource record set in the
405    /// same hosted zone. You specify a health check ID for the non-alias resource record set.
406    /// If the health check status is healthy, Route 53 considers the alias resource record set
407    /// to be healthy and includes the alias record among the records that it responds to DNS
408    /// queries with. If the health check status is unhealthy, Route 53 stops responding to DNS
409    /// queries using the alias resource record set. The alias resource record set can also
410    /// route traffic to a group of non-alias resource record sets that have the same routing
411    /// policy, name, and type. In that configuration, associate health checks with all of the
412    /// resource record sets in the group of non-alias resource record sets. Geolocation Routing
413    /// For geolocation resource record sets, if an endpoint is unhealthy, Route 53 looks for a
414    /// resource record set for the larger, associated geographic region. For example, suppose
415    /// you have resource record sets for a state in the United States, for the entire United
416    /// States, for North America, and a resource record set that has
417    /// * for CountryCode is *, which applies to all locations. If the endpoint for the state
418    ///   resource record set is unhealthy, Route 53 checks for healthy resource record sets in
419    ///   the following order until it finds a resource record set for which the endpoint is
420    ///   healthy: The United States North America The default resource record set Specifying
421    ///   the Health Check Endpoint by Domain Name If your health checks specify the endpoint
422    ///   only by domain name, we recommend that you create a separate health check for each
423    ///   endpoint. For example, create a health check for each HTTP server that is serving
424    ///   content for www.example.com. For the value of FullyQualifiedDomainName, specify the
425    ///   domain name of the server (such as us-east-2-www.example.com), not the name of the
426    ///   resource record sets (www.example.com). Health check results will be unpredictable if
427    ///   you do the following: Create a health check that has the same value for
428    ///   FullyQualifiedDomainName as the name of a resource record set. Associate that health
429    ///   check with the resource record set.
430    #[serde(skip_serializing_if = "Option::is_none")]
431    pub health_check_id: Option<String>,
432
433    /// Resource record sets that have a routing policy other than simple: An identifier that
434    /// differentiates among multiple resource record sets that have the same combination of
435    /// name and type, such as multiple weighted resource record sets named acme.example.com
436    /// that have a type of A. In a group of resource record sets that have the same name and
437    /// type, the value of SetIdentifier must be unique for each resource record set. For
438    /// information about routing policies, see Choosing a Routing Policy in the Amazon Route 53
439    /// Developer Guide.
440    #[serde(skip_serializing_if = "Option::is_none")]
441    pub set_identifier: Option<String>,
442
443    /// Weighted resource record sets only: Among resource record sets that have the same
444    /// combination of DNS name and type, a value that determines the proportion of DNS queries
445    /// that Amazon Route 53 responds to using the current resource record set. Route 53
446    /// calculates the sum of the weights for the resource record sets that have the same
447    /// combination of DNS name and type. Route 53 then responds to queries based on the ratio
448    /// of a resource's weight to the total. Note the following: You must specify a value for
449    /// the Weight element for every weighted resource record set. You can only specify one
450    /// ResourceRecord per weighted resource record set. You can't create latency, failover, or
451    /// geolocation resource record sets that have the same values for the Name and Type
452    /// elements as weighted resource record sets. You can create a maximum of 100 weighted
453    /// resource record sets that have the same values for the Name and Type elements. For
454    /// weighted (but not weighted alias) resource record sets, if you set Weight to 0 for a
455    /// resource record set, Route 53 never responds to queries with the applicable value for
456    /// that resource record set. However, if you set Weight to 0 for all resource record sets
457    /// that have the same combination of DNS name and type, traffic is routed to all resources
458    /// with equal probability. The effect of setting Weight to 0 is different when you
459    /// associate health checks with weighted resource record sets. For more information, see
460    /// Options for Configuring Route 53 Active-Active and Active-Passive Failover in the Amazon
461    /// Route 53 Developer Guide.
462    #[serde(skip_serializing_if = "Option::is_none")]
463    pub weight: Option<i64>,
464
465    /// Alias resource record sets only: Information about the Amazon Web Services resource,
466    /// such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic
467    /// to. If you're creating resource records sets for a private hosted zone, note the
468    /// following: You can't create an alias resource record set in a private hosted zone to
469    /// route traffic to a CloudFront distribution. For information about creating failover
470    /// resource record sets in a private hosted zone, see Configuring Failover in a Private
471    /// Hosted Zone in the Amazon Route 53 Developer Guide.
472    #[serde(skip_serializing_if = "Option::is_none")]
473    pub alias_target: Option<AliasTarget>,
474}
475
476impl ResourceRecordSet {
477    #[cfg(any(test, feature = "test-support"))]
478    /// Create a fixture instance for testing.
479    pub fn fixture() -> Self {
480        Self {
481            name: "test-name".into(),
482            ttl: Some(100),
483            resource_records: vec![],
484            health_check_id: Some("test-health_check_id".into()),
485            set_identifier: Some("test-set_identifier".into()),
486            weight: Some(100),
487            alias_target: Some(AliasTarget::fixture()),
488            ..Default::default()
489        }
490    }
491}
492
493/// Information specific to the resource record. If you're creating an alias resource record
494/// set, omit ResourceRecord.
495///
496/// **AWS API**: `route53.v1.ResourceRecord`
497#[derive(Debug, Clone, Default, Serialize, Deserialize)]
498#[serde(rename_all = "PascalCase")]
499pub struct ResourceRecord {
500    /// The current or new DNS record value, not to exceed 4,000 characters. In the case of a
501    /// DELETE action, if the current value does not match the actual value, an error is
502    /// returned. For descriptions about how to format Value for different record types, see
503    /// Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide. You can
504    /// specify more than one value for all record types except CNAME and SOA. If you're
505    /// creating an alias resource record set, omit Value.
506    pub value: String,
507}
508
509impl ResourceRecord {
510    #[cfg(any(test, feature = "test-support"))]
511    /// Create a fixture instance for testing.
512    pub fn fixture() -> Self {
513        Self {
514            value: "test-value".into(),
515        }
516    }
517}
518
519/// Alias resource record sets only: Information about the Amazon Web Services resource, such as
520/// a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to. When
521/// creating resource record sets for a private hosted zone, note the following: For information
522/// about creating failover resource record sets in a private hosted zone, see Configuring
523/// Failover in a Private Hosted Zone.
524///
525/// **AWS API**: `route53.v1.AliasTarget`
526#[derive(Debug, Clone, Default, Serialize, Deserialize)]
527#[serde(rename_all = "PascalCase")]
528pub struct AliasTarget {
529    /// Alias resource records sets only: The value used depends on where you want to route
530    /// traffic: Amazon API Gateway custom regional APIs and edge-optimized APIs Specify the
531    /// hosted zone ID for your API. You can get the applicable value using the CLI command get-
532    /// domain-names: For regional APIs, specify the value of regionalHostedZoneId. For edge-
533    /// optimized APIs, specify the value of distributionHostedZoneId. Amazon Virtual Private
534    /// Cloud interface VPC endpoint Specify the hosted zone ID for your interface endpoint. You
535    /// can get the value of HostedZoneId using the CLI command describe-vpc-endpoints.
536    /// CloudFront distribution Specify Z2FDTNDATAQYW2. Alias resource record sets for
537    /// CloudFront can't be created in a private zone. Elastic Beanstalk environment Specify the
538    /// hosted zone ID for the region that you created the environment in. The environment must
539    /// have a regionalized subdomain. For a list of regions and the corresponding hosted zone
540    /// IDs, see Elastic Beanstalk endpoints and quotas in the Amazon Web Services General
541    /// Reference. ELB load balancer Specify the value of the hosted zone ID for the load
542    /// balancer. Use the following methods to get the hosted zone ID: Elastic Load Balancing
543    /// endpoints and quotas topic in the Amazon Web Services General Reference: Use the value
544    /// that corresponds with the region that you created your load balancer in. Note that there
545    /// are separate columns for Application and Classic Load Balancers and for Network Load
546    /// Balancers. Amazon Web Services Management Console: Go to the Amazon EC2 page, choose
547    /// Load Balancers in the navigation pane, select the load balancer, and get the value of
548    /// the Hosted zone field on the Description tab. Elastic Load Balancing API: Use
549    /// DescribeLoadBalancers to get the applicable value. For more information, see the
550    /// applicable guide: Classic Load Balancers: Use DescribeLoadBalancers to get the value of
551    /// CanonicalHostedZoneNameId. Application and Network Load Balancers: Use
552    /// DescribeLoadBalancers to get the value of CanonicalHostedZoneId. CLI: Use describe-load-
553    /// balancers to get the applicable value. For more information, see the applicable guide:
554    /// Classic Load Balancers: Use describe-load-balancers to get the value of
555    /// CanonicalHostedZoneNameId. Application and Network Load Balancers: Use describe-load-
556    /// balancers to get the value of CanonicalHostedZoneId. Global Accelerator accelerator
557    /// Specify Z2BJ6XQ5FK7U4H. An Amazon S3 bucket configured as a static website Specify the
558    /// hosted zone ID for the region that you created the bucket in. For more information about
559    /// valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services
560    /// General Reference. Another Route 53 resource record set in your hosted zone Specify the
561    /// hosted zone ID of your hosted zone. (An alias resource record set can't reference a
562    /// resource record set in a different hosted zone.)
563    pub hosted_zone_id: String,
564
565    /// Alias resource record sets only: The value that you specify depends on where you want to
566    /// route queries: Amazon API Gateway custom regional APIs and edge-optimized APIs Specify
567    /// the applicable domain name for your API. You can get the applicable value using the CLI
568    /// command get-domain-names: For regional APIs, specify the value of regionalDomainName.
569    /// For edge-optimized APIs, specify the value of distributionDomainName. This is the name
570    /// of the associated CloudFront distribution, such as da1b2c3d4e5.cloudfront.net. The name
571    /// of the record that you're creating must match a custom domain name for your API, such as
572    /// api.example.com. Amazon Virtual Private Cloud interface VPC endpoint Enter the API
573    /// endpoint for the interface endpoint, such as vpce-123456789abcdef01-example-us-
574    /// east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com. For edge-optimized APIs, this
575    /// is the domain name for the corresponding CloudFront distribution. You can get the value
576    /// of DnsName using the CLI command describe-vpc-endpoints. CloudFront distribution Specify
577    /// the domain name that CloudFront assigned when you created your distribution. Your
578    /// CloudFront distribution must include an alternate domain name that matches the name of
579    /// the resource record set. For example, if the name of the resource record set is
580    /// acme.example.com, your CloudFront distribution must include acme.example.com as one of
581    /// the alternate domain names. For more information, see Using Alternate Domain Names
582    /// (CNAMEs) in the Amazon CloudFront Developer Guide. You can't create a resource record
583    /// set in a private hosted zone to route traffic to a CloudFront distribution. For failover
584    /// alias records, you can't specify a CloudFront distribution for both the primary and
585    /// secondary records. A distribution must include an alternate domain name that matches the
586    /// name of the record. However, the primary and secondary records have the same name, and
587    /// you can't include the same alternate domain name in more than one distribution. Elastic
588    /// Beanstalk environment If the domain name for your Elastic Beanstalk environment includes
589    /// the region that you deployed the environment in, you can create an alias record that
590    /// routes traffic to the environment. For example, the domain name my-environment.us-
591    /// west-2.elasticbeanstalk.com is a regionalized domain name. For environments that were
592    /// created before early 2016, the domain name doesn't include the region. To route traffic
593    /// to these environments, you must create a CNAME record instead of an alias record. Note
594    /// that you can't create a CNAME record for the root domain name. For example, if your
595    /// domain name is example.com, you can create a record that routes traffic for
596    /// acme.example.com to your Elastic Beanstalk environment, but you can't create a record
597    /// that routes traffic for example.com to your Elastic Beanstalk environment. For Elastic
598    /// Beanstalk environments that have regionalized subdomains, specify the CNAME attribute
599    /// for the environment. You can use the following methods to get the value of the CNAME
600    /// attribute: Amazon Web Services Management Console: For information about how to get the
601    /// value by using the console, see Using Custom Domains with Elastic Beanstalk in the
602    /// Elastic Beanstalk Developer Guide. Elastic Beanstalk API: Use the DescribeEnvironments
603    /// action to get the value of the CNAME attribute. For more information, see
604    /// DescribeEnvironments in the Elastic Beanstalk API Reference. CLI: Use the describe-
605    /// environments command to get the value of the CNAME attribute. For more information, see
606    /// describe-environments in the CLI Command Reference. ELB load balancer Specify the DNS
607    /// name that is associated with the load balancer. Get the DNS name by using the Amazon Web
608    /// Services Management Console, the ELB API, or the CLI. Amazon Web Services Management
609    /// Console: Go to the EC2 page, choose Load Balancers in the navigation pane, choose the
610    /// load balancer, choose the Description tab, and get the value of the DNS name field. If
611    /// you're routing traffic to a Classic Load Balancer, get the value that begins with
612    /// dualstack. If you're routing traffic to another type of load balancer, get the value
613    /// that applies to the record type, A or AAAA. Elastic Load Balancing API: Use
614    /// DescribeLoadBalancers to get the value of DNSName. For more information, see the
615    /// applicable guide: Classic Load Balancers: DescribeLoadBalancers Application and Network
616    /// Load Balancers: DescribeLoadBalancers CLI: Use describe-load-balancers to get the value
617    /// of DNSName. For more information, see the applicable guide: Classic Load Balancers:
618    /// describe-load-balancers Application and Network Load Balancers: describe-load-balancers
619    /// Global Accelerator accelerator Specify the DNS name for your accelerator: Global
620    /// Accelerator API: To get the DNS name, use DescribeAccelerator. CLI: To get the DNS name,
621    /// use describe-accelerator. Amazon S3 bucket that is configured as a static website
622    /// Specify the domain name of the Amazon S3 website endpoint that you created the bucket
623    /// in, for example, s3-website.us-east-2.amazonaws.com. For more information about valid
624    /// values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General
625    /// Reference. For more information about using S3 buckets for websites, see Getting Started
626    /// with Amazon Route 53 in the Amazon Route 53 Developer Guide. Another Route 53 resource
627    /// record set Specify the value of the Name element for a resource record set in the
628    /// current hosted zone. If you're creating an alias record that has the same name as the
629    /// hosted zone (known as the zone apex), you can't specify the domain name for a record for
630    /// which the value of Type is CNAME. This is because the alias record must have the same
631    /// type as the record that you're routing traffic to, and creating a CNAME record for the
632    /// zone apex isn't supported even for an alias record.
633    #[serde(rename = "DNSName")]
634    pub dns_name: String,
635
636    /// Applies only to alias, failover alias, geolocation alias, latency alias, and weighted
637    /// alias resource record sets: When EvaluateTargetHealth is true, an alias resource record
638    /// set inherits the health of the referenced Amazon Web Services resource, such as an ELB
639    /// load balancer or another resource record set in the hosted zone. Note the following:
640    /// CloudFront distributions You can't set EvaluateTargetHealth to true when the alias
641    /// target is a CloudFront distribution. Elastic Beanstalk environments that have
642    /// regionalized subdomains If you specify an Elastic Beanstalk environment in DNSName and
643    /// the environment contains an ELB load balancer, Elastic Load Balancing routes queries
644    /// only to the healthy Amazon EC2 instances that are registered with the load balancer. (An
645    /// environment automatically contains an ELB load balancer if it includes more than one
646    /// Amazon EC2 instance.) If you set EvaluateTargetHealth to true and either no Amazon EC2
647    /// instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries
648    /// to other available resources that are healthy, if any. If the environment contains a
649    /// single Amazon EC2 instance, there are no special requirements. ELB load balancers Health
650    /// checking behavior depends on the type of load balancer: Classic Load Balancers: If you
651    /// specify an ELB Classic Load Balancer in DNSName, Elastic Load Balancing routes queries
652    /// only to the healthy Amazon EC2 instances that are registered with the load balancer. If
653    /// you set EvaluateTargetHealth to true and either no EC2 instances are healthy or the load
654    /// balancer itself is unhealthy, Route 53 routes queries to other resources. Application
655    /// and Network Load Balancers: If you specify an ELB Application or Network Load Balancer
656    /// and you set EvaluateTargetHealth to true, Route 53 routes queries to the load balancer
657    /// based on the health of the target groups that are associated with the load balancer: For
658    /// an Application or Network Load Balancer to be considered healthy, every target group
659    /// that contains targets must contain at least one healthy target. If any target group
660    /// contains only unhealthy targets, the load balancer is considered unhealthy, and Route 53
661    /// routes queries to other resources. A target group that has no registered targets is
662    /// considered unhealthy. When you create a load balancer, you configure settings for
663    /// Elastic Load Balancing health checks; they're not Route 53 health checks, but they
664    /// perform a similar function. Do not create Route 53 health checks for the EC2 instances
665    /// that you register with an ELB load balancer. API Gateway APIs There are no special
666    /// requirements for setting EvaluateTargetHealth to true when the alias target is an API
667    /// Gateway API. However, because API Gateway is highly available by design,
668    /// EvaluateTargetHealth provides no operational benefit and Route 53 health checks are
669    /// recommended instead for failover scenarios. S3 buckets There are no special requirements
670    /// for setting EvaluateTargetHealth to true when the alias target is an S3 bucket. However,
671    /// because S3 buckets are highly available by design, EvaluateTargetHealth provides no
672    /// operational benefit and Route 53 health checks are recommended instead for failover
673    /// scenarios. VPC interface endpoints There are no special requirements for setting
674    /// EvaluateTargetHealth to true when the alias target is a VPC interface endpoint. However,
675    /// because VPC interface endpoints are highly available by design, EvaluateTargetHealth
676    /// provides no operational benefit and Route 53 health checks are recommended instead for
677    /// failover scenarios. Other records in the same hosted zone If the Amazon Web Services
678    /// resource that you specify in DNSName is a record or a group of records (for example, a
679    /// group of weighted records) but is not another alias record, we recommend that you
680    /// associate a health check with all of the records in the alias target. For more
681    /// information, see What Happens When You Omit Health Checks? in the Amazon Route 53
682    /// Developer Guide. While EvaluateTargetHealth can be set to true for highly available
683    /// Amazon Web Services services (such as S3 buckets, VPC interface endpoints, and API
684    /// Gateway), these services are designed for high availability and rarely experience
685    /// outages that would be detected by this feature. For failover scenarios with these
686    /// services, consider using Route 53 health checks that monitor your application's ability
687    /// to access the service instead. For more information and examples, see Amazon Route 53
688    /// Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
689    #[serde(default)]
690    pub evaluate_target_health: bool,
691}
692
693impl AliasTarget {
694    #[cfg(any(test, feature = "test-support"))]
695    /// Create a fixture instance for testing.
696    pub fn fixture() -> Self {
697        Self {
698            hosted_zone_id: "test-hosted_zone_id".into(),
699            dns_name: "test-dns_name".into(),
700            evaluate_target_health: false,
701        }
702    }
703}
704
705/// A complex type that contains the response to a ListHealthChecks request.
706///
707/// **AWS API**: `route53.v1.ListHealthChecksResponse`
708#[derive(Debug, Clone, Default, Serialize, Deserialize)]
709#[serde(rename_all = "PascalCase")]
710pub struct ListHealthChecksResponse {
711    /// A complex type that contains one HealthCheck element for each health check that is
712    /// associated with the current Amazon Web Services account.
713    #[serde(default)]
714    pub health_checks: Vec<HealthCheck>,
715
716    /// For the second and subsequent calls to ListHealthChecks, Marker is the value that you
717    /// specified for the marker parameter in the previous request.
718    #[serde(skip_serializing_if = "Option::is_none")]
719    pub marker: Option<String>,
720
721    /// A flag that indicates whether there are more health checks to be listed. If the response
722    /// was truncated, you can get the next group of health checks by submitting another
723    /// ListHealthChecks request and specifying the value of NextMarker in the marker parameter.
724    #[serde(default)]
725    pub is_truncated: bool,
726
727    /// If IsTruncated is true, the value of NextMarker identifies the first health check that
728    /// Amazon Route 53 returns if you submit another ListHealthChecks request and specify the
729    /// value of NextMarker in the marker parameter.
730    #[serde(skip_serializing_if = "Option::is_none")]
731    pub next_marker: Option<String>,
732
733    /// The value that you specified for the maxitems parameter in the call to ListHealthChecks
734    /// that produced the current response.
735    pub max_items: String,
736}
737
738impl ListHealthChecksResponse {
739    #[cfg(any(test, feature = "test-support"))]
740    /// Create a fixture instance for testing.
741    pub fn fixture() -> Self {
742        Self {
743            health_checks: vec![],
744            marker: Some("test-marker".into()),
745            is_truncated: false,
746            next_marker: Some("test-next_marker".into()),
747            max_items: "test-max_items".into(),
748        }
749    }
750}
751
752/// A complex type that contains information about one health check that is associated with the
753/// current Amazon Web Services account.
754///
755/// **AWS API**: `route53.v1.HealthCheck`
756///
757/// ## Coverage
758/// 4 of 6 fields included.
759/// Omitted fields:
760/// - `LinkedService` — not selected in manifest
761/// - `CloudWatchAlarmConfiguration` — not selected in manifest
762#[derive(Debug, Clone, Default, Serialize, Deserialize)]
763#[serde(rename_all = "PascalCase")]
764pub struct HealthCheck {
765    /// The identifier that Amazon Route 53 assigned to the health check when you created it.
766    /// When you add or update a resource record set, you use this value to specify which health
767    /// check to use. The value can be up to 64 characters long.
768    pub id: String,
769
770    /// A unique string that you specified when you created the health check.
771    pub caller_reference: String,
772
773    /// A complex type that contains detailed information about one health check.
774    pub health_check_config: HealthCheckConfig,
775
776    /// The version of the health check. You can optionally pass this value in a call to
777    /// UpdateHealthCheck to prevent overwriting another change to the health check.
778    pub health_check_version: i64,
779}
780
781impl HealthCheck {
782    #[cfg(any(test, feature = "test-support"))]
783    /// Create a fixture instance for testing.
784    pub fn fixture() -> Self {
785        Self {
786            id: "test-id".into(),
787            caller_reference: "test-caller_reference".into(),
788            health_check_config: HealthCheckConfig::fixture(),
789            health_check_version: 100,
790        }
791    }
792}
793
794/// A complex type that contains information about the health check.
795///
796/// **AWS API**: `route53.v1.HealthCheckConfig`
797///
798/// ## Coverage
799/// 7 of 18 fields included.
800/// Omitted fields:
801/// - `SearchString` — not selected in manifest
802/// - `MeasureLatency` — not selected in manifest
803/// - `Inverted` — not selected in manifest
804/// - `Disabled` — not selected in manifest
805/// - `HealthThreshold` — not selected in manifest
806/// - `ChildHealthChecks` — not selected in manifest
807/// - `EnableSNI` — not selected in manifest
808/// - `Regions` — not selected in manifest
809/// - `AlarmIdentifier` — not selected in manifest
810/// - `InsufficientDataHealthStatus` — not selected in manifest
811/// - `RoutingControlArn` — not selected in manifest
812#[derive(Debug, Clone, Default, Serialize, Deserialize)]
813#[serde(rename_all = "PascalCase")]
814pub struct HealthCheckConfig {
815    /// The type of health check that you want to create, which indicates how Amazon Route 53
816    /// determines whether an endpoint is healthy. You can't change the value of Type after you
817    /// create a health check. You can create the following types of health checks: HTTP: Route
818    /// 53 tries to establish a TCP connection. If successful, Route 53 submits an HTTP request
819    /// and waits for an HTTP status code of 200 or greater and less than 400. HTTPS: Route 53
820    /// tries to establish a TCP connection. If successful, Route 53 submits an HTTPS request
821    /// and waits for an HTTP status code of 200 or greater and less than 400. If you specify
822    /// HTTPS for the value of Type, the endpoint must support TLS v1.0, v1.1, or v1.2.
823    /// HTTP_STR_MATCH: Route 53 tries to establish a TCP connection. If successful, Route 53
824    /// submits an HTTP request and searches the first 5,120 bytes of the response body for the
825    /// string that you specify in SearchString. HTTPS_STR_MATCH: Route 53 tries to establish a
826    /// TCP connection. If successful, Route 53 submits an HTTPS request and searches the first
827    /// 5,120 bytes of the response body for the string that you specify in SearchString. TCP:
828    /// Route 53 tries to establish a TCP connection. CLOUDWATCH_METRIC: The health check is
829    /// associated with a CloudWatch alarm. If the state of the alarm is OK, the health check is
830    /// considered healthy. If the state is ALARM, the health check is considered unhealthy. If
831    /// CloudWatch doesn't have sufficient data to determine whether the state is OK or ALARM,
832    /// the health check status depends on the setting for InsufficientDataHealthStatus:
833    /// Healthy, Unhealthy, or LastKnownStatus. CALCULATED: For health checks that monitor the
834    /// status of other health checks, Route 53 adds up the number of health checks that Route
835    /// 53 health checkers consider to be healthy and compares that number with the value of
836    /// HealthThreshold. RECOVERY_CONTROL: The health check is associated with a Route53
837    /// Application Recovery Controller routing control. If the routing control state is ON, the
838    /// health check is considered healthy. If the state is OFF, the health check is considered
839    /// unhealthy. For more information, see How Route 53 Determines Whether an Endpoint Is
840    /// Healthy in the Amazon Route 53 Developer Guide.
841    #[serde(rename = "Type")]
842    #[serde(skip_serializing_if = "Option::is_none")]
843    pub r#type: Option<HealthCheckType>,
844
845    /// The IPv4 or IPv6 IP address of the endpoint that you want Amazon Route 53 to perform
846    /// health checks on. If you don't specify a value for IPAddress, Route 53 sends a DNS
847    /// request to resolve the domain name that you specify in FullyQualifiedDomainName at the
848    /// interval that you specify in RequestInterval. Using an IP address returned by DNS, Route
849    /// 53 then checks the health of the endpoint. Use one of the following formats for the
850    /// value of IPAddress: IPv4 address: four values between 0 and 255, separated by periods
851    /// (.), for example, 192.0.2.44. IPv6 address: eight groups of four hexadecimal values,
852    /// separated by colons (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. You can
853    /// also shorten IPv6 addresses as described in RFC 5952, for example,
854    /// 2001:db8:85a3::abcd:1:2345. If the endpoint is an EC2 instance, we recommend that you
855    /// create an Elastic IP address, associate it with your EC2 instance, and specify the
856    /// Elastic IP address for IPAddress. This ensures that the IP address of your instance will
857    /// never change. For more information, see FullyQualifiedDomainName. Constraints: Route 53
858    /// can't check the health of endpoints for which the IP address is in local, private, non-
859    /// routable, or multicast ranges. For more information about IP addresses for which you
860    /// can't create health checks, see the following documents: RFC 5735, Special Use IPv4
861    /// Addresses RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space RFC 5156,
862    /// Special-Use IPv6 Addresses When the value of Type is CALCULATED or CLOUDWATCH_METRIC,
863    /// omit IPAddress.
864    #[serde(rename = "IPAddress")]
865    #[serde(skip_serializing_if = "Option::is_none")]
866    pub ip_address: Option<String>,
867
868    /// The port on the endpoint that you want Amazon Route 53 to perform health checks on.
869    /// Don't specify a value for Port when you specify a value for Type of CLOUDWATCH_METRIC or
870    /// CALCULATED.
871    #[serde(skip_serializing_if = "Option::is_none")]
872    pub port: Option<i32>,
873
874    /// Amazon Route 53 behavior depends on whether you specify a value for IPAddress. If you
875    /// specify a value for IPAddress: Amazon Route 53 sends health check requests to the
876    /// specified IPv4 or IPv6 address and passes the value of FullyQualifiedDomainName in the
877    /// Host header for all health checks except TCP health checks. This is typically the fully
878    /// qualified DNS name of the endpoint on which you want Route 53 to perform health checks.
879    /// When Route 53 checks the health of an endpoint, here is how it constructs the Host
880    /// header: If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for Type, Route
881    /// 53 passes the value of FullyQualifiedDomainName to the endpoint in the Host header. If
882    /// you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH for Type, Route 53
883    /// passes the value of FullyQualifiedDomainName to the endpoint in the Host header. If you
884    /// specify another value for Port and any value except TCP for Type, Route 53 passes
885    /// FullyQualifiedDomainName:Port to the endpoint in the Host header. If you don't specify a
886    /// value for FullyQualifiedDomainName, Route 53 substitutes the value of IPAddress in the
887    /// Host header in each of the preceding cases. If you don't specify a value for IPAddress:
888    /// Route 53 sends a DNS request to the domain that you specify for FullyQualifiedDomainName
889    /// at the interval that you specify for RequestInterval. Using an IPv4 address that DNS
890    /// returns, Route 53 then checks the health of the endpoint. If you don't specify a value
891    /// for IPAddress, Route 53 uses only IPv4 to send health checks to the endpoint. If there's
892    /// no resource record set with a type of A for the name that you specify for
893    /// FullyQualifiedDomainName, the health check fails with a "DNS resolution failed" error.
894    /// If you want to check the health of weighted, latency, or failover resource record sets
895    /// and you choose to specify the endpoint only by FullyQualifiedDomainName, we recommend
896    /// that you create a separate health check for each endpoint. For example, create a health
897    /// check for each HTTP server that is serving content for www.example.com. For the value of
898    /// FullyQualifiedDomainName, specify the domain name of the server (such as us-
899    /// east-2-www.example.com), not the name of the resource record sets (www.example.com). In
900    /// this configuration, if you create a health check for which the value of
901    /// FullyQualifiedDomainName matches the name of the resource record sets and you then
902    /// associate the health check with those resource record sets, health check results will be
903    /// unpredictable. In addition, if the value that you specify for Type is HTTP, HTTPS,
904    /// HTTP_STR_MATCH, or HTTPS_STR_MATCH, Route 53 passes the value of
905    /// FullyQualifiedDomainName in the Host header, as it does when you specify a value for
906    /// IPAddress. If the value of Type is TCP, Route 53 doesn't pass a Host header.
907    #[serde(skip_serializing_if = "Option::is_none")]
908    pub fully_qualified_domain_name: Option<String>,
909
910    /// The path, if any, that you want Amazon Route 53 to request when performing health
911    /// checks. The path can be any value for which your endpoint will return an HTTP status
912    /// code of 2xx or 3xx when the endpoint is healthy, for example, the file
913    /// /docs/route53-health-check.html. You can also include query string parameters, for
914    /// example, /welcome.html?language=jp&amp;login=y.
915    #[serde(skip_serializing_if = "Option::is_none")]
916    pub resource_path: Option<String>,
917
918    /// The number of seconds between the time that Amazon Route 53 gets a response from your
919    /// endpoint and the time that it sends the next health check request. Each Route 53 health
920    /// checker makes requests at this interval. RequestInterval is not supported when you
921    /// specify a value for Type of RECOVERY_CONTROL. You can't change the value of
922    /// RequestInterval after you create a health check. If you don't specify a value for
923    /// RequestInterval, the default value is 30 seconds.
924    #[serde(skip_serializing_if = "Option::is_none")]
925    pub request_interval: Option<i32>,
926
927    /// The number of consecutive health checks that an endpoint must pass or fail for Amazon
928    /// Route 53 to change the current status of the endpoint from unhealthy to healthy or vice
929    /// versa. For more information, see How Amazon Route 53 Determines Whether an Endpoint Is
930    /// Healthy in the Amazon Route 53 Developer Guide. FailureThreshold is not supported when
931    /// you specify a value for Type of RECOVERY_CONTROL. Otherwise, if you don't specify a
932    /// value for FailureThreshold, the default value is three health checks.
933    #[serde(skip_serializing_if = "Option::is_none")]
934    pub failure_threshold: Option<i32>,
935}
936
937impl HealthCheckConfig {
938    #[cfg(any(test, feature = "test-support"))]
939    /// Create a fixture instance for testing.
940    pub fn fixture() -> Self {
941        Self {
942            ip_address: Some("test-ip_address".into()),
943            port: Some(100),
944            fully_qualified_domain_name: Some("test-fully_qualified_domain_name".into()),
945            resource_path: Some("test-resource_path".into()),
946            request_interval: Some(100),
947            failure_threshold: Some(100),
948            ..Default::default()
949        }
950    }
951}
952
953/// A complex type that contains the response to a GetHealthCheck request.
954///
955/// **AWS API**: `route53.v1.GetHealthCheckStatusResponse`
956#[derive(Debug, Clone, Default, Serialize, Deserialize)]
957#[serde(rename_all = "PascalCase")]
958pub struct GetHealthCheckStatusResponse {
959    /// A list that contains one HealthCheckObservation element for each Amazon Route 53 health
960    /// checker that is reporting a status about the health check endpoint.
961    #[serde(default)]
962    pub health_check_observations: Vec<HealthCheckObservation>,
963}
964
965impl GetHealthCheckStatusResponse {
966    #[cfg(any(test, feature = "test-support"))]
967    /// Create a fixture instance for testing.
968    pub fn fixture() -> Self {
969        Self {
970            health_check_observations: vec![],
971        }
972    }
973}
974
975/// A complex type that contains the last failure reason as reported by one Amazon Route 53
976/// health checker.
977///
978/// **AWS API**: `route53.v1.HealthCheckObservation`
979#[derive(Debug, Clone, Default, Serialize, Deserialize)]
980#[serde(rename_all = "PascalCase")]
981pub struct HealthCheckObservation {
982    /// The region of the Amazon Route 53 health checker that provided the status in
983    /// StatusReport.
984    #[serde(skip_serializing_if = "Option::is_none")]
985    pub region: Option<String>,
986
987    /// The IP address of the Amazon Route 53 health checker that provided the failure reason in
988    /// StatusReport.
989    #[serde(rename = "IPAddress")]
990    #[serde(skip_serializing_if = "Option::is_none")]
991    pub ip_address: Option<String>,
992
993    /// A complex type that contains the last failure reason as reported by one Amazon Route 53
994    /// health checker and the time of the failed health check.
995    #[serde(skip_serializing_if = "Option::is_none")]
996    pub status_report: Option<StatusReport>,
997}
998
999impl HealthCheckObservation {
1000    #[cfg(any(test, feature = "test-support"))]
1001    /// Create a fixture instance for testing.
1002    pub fn fixture() -> Self {
1003        Self {
1004            region: Some("test-region".into()),
1005            ip_address: Some("test-ip_address".into()),
1006            status_report: Some(StatusReport::fixture()),
1007        }
1008    }
1009}
1010
1011/// A complex type that contains the status that one Amazon Route 53 health checker reports and
1012/// the time of the health check.
1013///
1014/// **AWS API**: `route53.v1.StatusReport`
1015#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1016#[serde(rename_all = "PascalCase")]
1017pub struct StatusReport {
1018    /// A description of the status of the health check endpoint as reported by one of the
1019    /// Amazon Route 53 health checkers.
1020    #[serde(skip_serializing_if = "Option::is_none")]
1021    pub status: Option<String>,
1022
1023    /// The date and time that the health checker performed the health check in ISO 8601 format
1024    /// and Coordinated Universal Time (UTC). For example, the value 2017-03-27T17:48:16.751Z
1025    /// represents March 27, 2017 at 17:48:16.751 UTC.
1026    #[serde(skip_serializing_if = "Option::is_none")]
1027    pub checked_time: Option<String>,
1028}
1029
1030impl StatusReport {
1031    #[cfg(any(test, feature = "test-support"))]
1032    /// Create a fixture instance for testing.
1033    pub fn fixture() -> Self {
1034        Self {
1035            status: Some("test-status".into()),
1036            checked_time: Some("test-checked_time".into()),
1037        }
1038    }
1039}
1040
1041/// A complex type that contains the health check request information.
1042///
1043/// **AWS API**: `route53.v1.CreateHealthCheckRequest`
1044#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1045#[serde(rename_all = "PascalCase")]
1046pub struct CreateHealthCheckRequest {
1047    /// A unique string that identifies the request and that allows you to retry a failed
1048    /// CreateHealthCheck request without the risk of creating two identical health checks: If
1049    /// you send a CreateHealthCheck request with the same CallerReference and settings as a
1050    /// previous request, and if the health check doesn't exist, Amazon Route 53 creates the
1051    /// health check. If the health check does exist, Route 53 returns the health check
1052    /// configuration in the response. If you send a CreateHealthCheck request with the same
1053    /// CallerReference as a deleted health check, regardless of the settings, Route 53 returns
1054    /// a HealthCheckAlreadyExists error. If you send a CreateHealthCheck request with the same
1055    /// CallerReference as an existing health check but with different settings, Route 53
1056    /// returns a HealthCheckAlreadyExists error. If you send a CreateHealthCheck request with a
1057    /// unique CallerReference but settings identical to an existing health check, Route 53
1058    /// creates the health check. Route 53 does not store the CallerReference for a deleted
1059    /// health check indefinitely. The CallerReference for a deleted health check will be
1060    /// deleted after a number of days.
1061    pub caller_reference: String,
1062
1063    /// A complex type that contains settings for a new health check.
1064    pub health_check_config: HealthCheckConfig,
1065}
1066
1067impl CreateHealthCheckRequest {
1068    #[cfg(any(test, feature = "test-support"))]
1069    /// Create a fixture instance for testing.
1070    pub fn fixture() -> Self {
1071        Self {
1072            caller_reference: "test-caller_reference".into(),
1073            health_check_config: HealthCheckConfig::fixture(),
1074        }
1075    }
1076}
1077
1078/// A complex type containing the response information for the new health check.
1079///
1080/// **AWS API**: `route53.v1.CreateHealthCheckResponse`
1081///
1082/// ## Coverage
1083/// 1 of 2 fields included.
1084/// Omitted fields:
1085/// - `Location` — not selected in manifest
1086#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1087#[serde(rename_all = "PascalCase")]
1088pub struct CreateHealthCheckResponse {
1089    /// A complex type that contains identifying information about the health check.
1090    pub health_check: HealthCheck,
1091}
1092
1093impl CreateHealthCheckResponse {
1094    #[cfg(any(test, feature = "test-support"))]
1095    /// Create a fixture instance for testing.
1096    pub fn fixture() -> Self {
1097        Self {
1098            health_check: HealthCheck::fixture(),
1099        }
1100    }
1101}
1102
1103/// A complex type that contains change information for the resource record set.
1104///
1105/// **AWS API**: `route53.v1.ChangeResourceRecordSetsRequest`
1106///
1107/// ## Coverage
1108/// 1 of 2 fields included.
1109/// Omitted fields:
1110/// - `HostedZoneId` — not selected in manifest
1111#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1112#[serde(rename_all = "PascalCase")]
1113pub struct ChangeResourceRecordSetsRequest {
1114    /// A complex type that contains an optional comment and the Changes element.
1115    pub change_batch: ChangeBatch,
1116}
1117
1118impl ChangeResourceRecordSetsRequest {
1119    #[cfg(any(test, feature = "test-support"))]
1120    /// Create a fixture instance for testing.
1121    pub fn fixture() -> Self {
1122        Self {
1123            change_batch: ChangeBatch::fixture(),
1124        }
1125    }
1126}
1127
1128/// The information for a change request.
1129///
1130/// **AWS API**: `route53.v1.ChangeBatch`
1131#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1132#[serde(rename_all = "PascalCase")]
1133pub struct ChangeBatch {
1134    /// Optional: Any comments you want to include about a change batch request.
1135    #[serde(skip_serializing_if = "Option::is_none")]
1136    pub comment: Option<String>,
1137
1138    /// Information about the changes to make to the record sets.
1139    #[serde(default)]
1140    pub changes: Vec<Change>,
1141}
1142
1143impl ChangeBatch {
1144    #[cfg(any(test, feature = "test-support"))]
1145    /// Create a fixture instance for testing.
1146    pub fn fixture() -> Self {
1147        Self {
1148            comment: Some("test-comment".into()),
1149            changes: vec![],
1150        }
1151    }
1152}
1153
1154/// The information for each resource record set that you want to change.
1155///
1156/// **AWS API**: `route53.v1.Change`
1157#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1158#[serde(rename_all = "PascalCase")]
1159pub struct Change {
1160    /// The action to perform: CREATE: Creates a resource record set that has the specified
1161    /// values. DELETE: Deletes a existing resource record set. To delete the resource record
1162    /// set that is associated with a traffic policy instance, use DeleteTrafficPolicyInstance.
1163    /// Amazon Route 53 will delete the resource record set automatically. If you delete the
1164    /// resource record set by using ChangeResourceRecordSets, Route 53 doesn't automatically
1165    /// delete the traffic policy instance, and you'll continue to be charged for it even though
1166    /// it's no longer in use. UPSERT: If a resource record set doesn't already exist, Route 53
1167    /// creates it. If a resource record set does exist, Route 53 updates it with the values in
1168    /// the request.
1169    #[serde(skip_serializing_if = "Option::is_none")]
1170    pub action: Option<ChangeAction>,
1171
1172    /// Information about the resource record set to create, delete, or update.
1173    pub resource_record_set: ResourceRecordSet,
1174}
1175
1176impl Change {
1177    #[cfg(any(test, feature = "test-support"))]
1178    /// Create a fixture instance for testing.
1179    pub fn fixture() -> Self {
1180        Self {
1181            resource_record_set: ResourceRecordSet::fixture(),
1182            ..Default::default()
1183        }
1184    }
1185}
1186
1187/// A complex type containing the response for the request.
1188///
1189/// **AWS API**: `route53.v1.ChangeResourceRecordSetsResponse`
1190#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1191#[serde(rename_all = "PascalCase")]
1192pub struct ChangeResourceRecordSetsResponse {
1193    /// A complex type that contains information about changes made to your hosted zone. This
1194    /// element contains an ID that you use when performing a GetChange action to get detailed
1195    /// information about the change.
1196    pub change_info: ChangeInfo,
1197}
1198
1199impl ChangeResourceRecordSetsResponse {
1200    #[cfg(any(test, feature = "test-support"))]
1201    /// Create a fixture instance for testing.
1202    pub fn fixture() -> Self {
1203        Self {
1204            change_info: ChangeInfo::fixture(),
1205        }
1206    }
1207}
1208
1209/// A complex type that describes change information about changes made to your hosted zone.
1210///
1211/// **AWS API**: `route53.v1.ChangeInfo`
1212#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1213#[serde(rename_all = "PascalCase")]
1214pub struct ChangeInfo {
1215    /// This element contains an ID that you use when performing a GetChange action to get
1216    /// detailed information about the change.
1217    pub id: String,
1218
1219    /// The current state of the request. PENDING indicates that this request has not yet been
1220    /// applied to all Amazon Route 53 DNS servers.
1221    #[serde(skip_serializing_if = "Option::is_none")]
1222    pub status: Option<ChangeStatus>,
1223
1224    /// The date and time that the change request was submitted in ISO 8601 format and
1225    /// Coordinated Universal Time (UTC). For example, the value 2017-03-27T17:48:16.751Z
1226    /// represents March 27, 2017 at 17:48:16.751 UTC.
1227    pub submitted_at: String,
1228
1229    /// A comment you can provide.
1230    #[serde(skip_serializing_if = "Option::is_none")]
1231    pub comment: Option<String>,
1232}
1233
1234impl ChangeInfo {
1235    #[cfg(any(test, feature = "test-support"))]
1236    /// Create a fixture instance for testing.
1237    pub fn fixture() -> Self {
1238        Self {
1239            id: "test-id".into(),
1240            submitted_at: "test-submitted_at".into(),
1241            comment: Some("test-comment".into()),
1242            ..Default::default()
1243        }
1244    }
1245}