File Coverage

blib/lib/Paws/Route53/AliasTarget.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::Route53::AliasTarget;
2 1     1   683 use Moose;
  1         5  
  1         13  
3             has DNSName => (is => 'ro', isa => 'Str', required => 1);
4             has EvaluateTargetHealth => (is => 'ro', isa => 'Bool', required => 1);
5             has HostedZoneId => (is => 'ro', isa => 'Str', required => 1);
6             1;
7              
8             ### main pod documentation begin ###
9              
10             =head1 NAME
11              
12             Paws::Route53::AliasTarget
13              
14             =head1 USAGE
15              
16             This class represents one of two things:
17              
18             =head3 Arguments in a call to a service
19              
20             Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
21             Each attribute should be used as a named argument in the calls that expect this type of object.
22              
23             As an example, if Att1 is expected to be a Paws::Route53::AliasTarget object:
24              
25             $service_obj->Method(Att1 => { DNSName => $value, ..., HostedZoneId => $value });
26              
27             =head3 Results returned from an API call
28              
29             Use accessors for each attribute. If Att1 is expected to be an Paws::Route53::AliasTarget object:
30              
31             $result = $service_obj->Method(...);
32             $result->Att1->DNSName
33              
34             =head1 DESCRIPTION
35              
36             I<Alias resource record sets only:> Information about the CloudFront
37             distribution, Elastic Beanstalk environment, ELB load balancer, Amazon
38             S3 bucket, or Amazon Route 53 resource record set that you're
39             redirecting queries to. An Elastic Beanstalk environment must have a
40             regionalized subdomain.
41              
42             When creating resource record sets for a private hosted zone, note the
43             following:
44              
45             =over
46              
47             =item *
48              
49             Resource record sets can't be created for CloudFront distributions in a
50             private hosted zone.
51              
52             =item *
53              
54             Creating geolocation alias resource record sets or latency alias
55             resource record sets in a private hosted zone is unsupported.
56              
57             =item *
58              
59             For information about creating failover resource record sets in a
60             private hosted zone, see Configuring Failover in a Private Hosted Zone.
61              
62             =back
63              
64              
65             =head1 ATTRIBUTES
66              
67              
68             =head2 B<REQUIRED> DNSName => Str
69              
70             I<Alias resource record sets only:> The value that you specify depends
71             on where you want to route queries:
72              
73             =over
74              
75             =item CloudFront distribution
76              
77             Specify the domain name that CloudFront assigned when you created your
78             distribution.
79              
80             Your CloudFront distribution must include an alternate domain name that
81             matches the name of the resource record set. For example, if the name
82             of the resource record set is I<acme.example.com>, your CloudFront
83             distribution must include I<acme.example.com> as one of the alternate
84             domain names. For more information, see Using Alternate Domain Names
85             (CNAMEs) in the I<Amazon CloudFront Developer Guide>.
86              
87             =item Elastic Beanstalk environment
88              
89             Specify the C<CNAME> attribute for the environment. (The environment
90             must have a regionalized domain name.) You can use the following
91             methods to get the value of the CNAME attribute:
92              
93             =over
94              
95             =item *
96              
97             I<AWS Management Console>: For information about how to get the value
98             by using the console, see Using Custom Domains with AWS Elastic
99             Beanstalk in the I<AWS Elastic Beanstalk Developer Guide>.
100              
101             =item *
102              
103             I<Elastic Beanstalk API>: Use the C<DescribeEnvironments> action to get
104             the value of the C<CNAME> attribute. For more information, see
105             DescribeEnvironments in the I<AWS Elastic Beanstalk API Reference>.
106              
107             =item *
108              
109             I<AWS CLI>: Use the C<describe-environments> command to get the value
110             of the C<CNAME> attribute. For more information, see
111             describe-environments in the I<AWS Command Line Interface Reference>.
112              
113             =back
114              
115             =item ELB load balancer
116              
117             Specify the DNS name that is associated with the load balancer. Get the
118             DNS name by using the AWS Management Console, the ELB API, or the AWS
119             CLI.
120              
121             =over
122              
123             =item *
124              
125             B<AWS Management Console>: Go to the EC2 page, choose B<Load Balancers>
126             in the navigation pane, choose the load balancer, choose the
127             B<Description> tab, and get the value of the B<DNS name> field. (If
128             you're routing traffic to a Classic Load Balancer, get the value that
129             begins with B<dualstack>.)
130              
131             =item *
132              
133             B<Elastic Load Balancing API>: Use C<DescribeLoadBalancers> to get the
134             value of C<DNSName>. For more information, see the applicable guide:
135              
136             =over
137              
138             =item *
139              
140             Classic Load Balancers: DescribeLoadBalancers
141              
142             =item *
143              
144             Application and Network Load Balancers: DescribeLoadBalancers
145              
146             =back
147              
148             =item *
149              
150             B<AWS CLI>: Use C<describe-load-balancers> to get the value of
151             C<DNSName>. For more information, see the applicable guide:
152              
153             =over
154              
155             =item *
156              
157             Classic Load Balancers: describe-load-balancers
158              
159             =item *
160              
161             Application and Network Load Balancers: describe-load-balancers
162              
163             =back
164              
165             =back
166              
167             =item Amazon S3 bucket that is configured as a static website
168              
169             Specify the domain name of the Amazon S3 website endpoint in which you
170             created the bucket, for example, C<s3-website-us-east-2.amazonaws.com>.
171             For more information about valid values, see the table Amazon Simple
172             Storage Service (S3) Website Endpoints in the I<Amazon Web Services
173             General Reference>. For more information about using S3 buckets for
174             websites, see Getting Started with Amazon Route 53 in the I<Amazon
175             Route 53 Developer Guide.>
176              
177             =item Another Amazon Route 53 resource record set
178              
179             Specify the value of the C<Name> element for a resource record set in
180             the current hosted zone.
181              
182             =back
183              
184              
185              
186             =head2 B<REQUIRED> EvaluateTargetHealth => Bool
187              
188             I<Applies only to alias, failover alias, geolocation alias, latency
189             alias, and weighted alias resource record sets:> When
190             C<EvaluateTargetHealth> is C<true>, an alias resource record set
191             inherits the health of the referenced AWS resource, such as an ELB load
192             balancer, or the referenced resource record set.
193              
194             Note the following:
195              
196             =over
197              
198             =item *
199              
200             You can't set C<EvaluateTargetHealth> to C<true> when the alias target
201             is a CloudFront distribution.
202              
203             =item *
204              
205             If the AWS resource that you specify in C<AliasTarget> is a resource
206             record set or a group of resource record sets (for example, a group of
207             weighted resource record sets), but it is not another alias resource
208             record set, we recommend that you associate a health check with all of
209             the resource record sets in the alias target. For more information, see
210             What Happens When You Omit Health Checks? in the I<Amazon Route 53
211             Developer Guide>.
212              
213             =item *
214              
215             If you specify an Elastic Beanstalk environment in C<HostedZoneId> and
216             C<DNSName>, and if the environment contains an ELB load balancer,
217             Elastic Load Balancing routes queries only to the healthy Amazon EC2
218             instances that are registered with the load balancer. (An environment
219             automatically contains an ELB load balancer if it includes more than
220             one EC2 instance.) If you set C<EvaluateTargetHealth> to C<true> and
221             either no EC2 instances are healthy or the load balancer itself is
222             unhealthy, Amazon Route 53 routes queries to other available resources
223             that are healthy, if any.
224              
225             If the environment contains a single EC2 instance, there are no special
226             requirements.
227              
228             =item *
229              
230             If you specify an ELB load balancer in C< AliasTarget >, ELB routes
231             queries only to the healthy EC2 instances that are registered with the
232             load balancer. If no EC2 instances are healthy or if the load balancer
233             itself is unhealthy, and if C<EvaluateTargetHealth> is true for the
234             corresponding alias resource record set, Amazon Route 53 routes queries
235             to other resources. When you create a load balancer, you configure
236             settings for ELB health checks; they're not Amazon Route 53 health
237             checks, but they perform a similar function. Do not create Amazon Route
238             53 health checks for the EC2 instances that you register with an ELB
239             load balancer.
240              
241             For more information, see How Health Checks Work in More Complex Amazon
242             Route 53 Configurations in the I<Amazon Route 53 Developer Guide>.
243              
244             =item *
245              
246             We recommend that you set C<EvaluateTargetHealth> to true only when you
247             have enough idle capacity to handle the failure of one or more
248             endpoints.
249              
250             =back
251              
252             For more information and examples, see Amazon Route 53 Health Checks
253             and DNS Failover in the I<Amazon Route 53 Developer Guide>.
254              
255              
256             =head2 B<REQUIRED> HostedZoneId => Str
257              
258             I<Alias resource records sets only>: The value used depends on where
259             you want to route traffic:
260              
261             =over
262              
263             =item CloudFront distribution
264              
265             Specify C<Z2FDTNDATAQYW2>.
266              
267             Alias resource record sets for CloudFront can't be created in a private
268             zone.
269              
270             =item Elastic Beanstalk environment
271              
272             Specify the hosted zone ID for the region in which you created the
273             environment. The environment must have a regionalized subdomain. For a
274             list of regions and the corresponding hosted zone IDs, see AWS Elastic
275             Beanstalk in the "AWS Regions and Endpoints" chapter of the I<Amazon
276             Web Services General Reference>.
277              
278             =item ELB load balancer
279              
280             Specify the value of the hosted zone ID for the load balancer. Use the
281             following methods to get the hosted zone ID:
282              
283             =over
284              
285             =item *
286              
287             Elastic Load Balancing table in the "AWS Regions and Endpoints" chapter
288             of the I<Amazon Web Services General Reference>: Use the value that
289             corresponds with the region that you created your load balancer in.
290             Note that there are separate columns for Application and Classic Load
291             Balancers and for Network Load Balancers.
292              
293             =item *
294              
295             B<AWS Management Console>: Go to the Amazon EC2 page, choose B<Load
296             Balancers> in the navigation pane, select the load balancer, and get
297             the value of the B<Hosted zone> field on the B<Description> tab.
298              
299             =item *
300              
301             B<Elastic Load Balancing API>: Use C<DescribeLoadBalancers> to get the
302             value of C<CanonicalHostedZoneNameId>. For more information, see the
303             applicable guide:
304              
305             =over
306              
307             =item *
308              
309             Classic Load Balancers: DescribeLoadBalancers
310              
311             =item *
312              
313             Application and Network Load Balancers: DescribeLoadBalancers
314              
315             =back
316              
317             =item *
318              
319             B<AWS CLI>: Use C<describe-load-balancers> to get the value of
320             C<CanonicalHostedZoneNameID> (for Classic Load Balancers) or
321             C<CanonicalHostedZoneNameID> (for Application and Network Load
322             Balancers). For more information, see the applicable guide:
323              
324             =over
325              
326             =item *
327              
328             Classic Load Balancers: describe-load-balancers
329              
330             =item *
331              
332             Application and Network Load Balancers: describe-load-balancers
333              
334             =back
335              
336             =back
337              
338             =item An Amazon S3 bucket configured as a static website
339              
340             Specify the hosted zone ID for the region that you created the bucket
341             in. For more information about valid values, see the Amazon Simple
342             Storage Service Website Endpoints table in the "AWS Regions and
343             Endpoints" chapter of the I<Amazon Web Services General Reference>.
344              
345             =item Another Amazon Route 53 resource record set in your hosted zone
346              
347             Specify the hosted zone ID of your hosted zone. (An alias resource
348             record set can't reference a resource record set in a different hosted
349             zone.)
350              
351             =back
352              
353              
354              
355              
356             =head1 SEE ALSO
357              
358             This class forms part of L<Paws>, describing an object used in L<Paws::Route53>
359              
360             =head1 BUGS and CONTRIBUTIONS
361              
362             The source code is located here: https://github.com/pplu/aws-sdk-perl
363              
364             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
365              
366             =cut
367