blib/lib/Paws/Route53/AliasTarget.pm untested

filter: Statementstmt 0.0% 0 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 7 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::Route53::AliasTarget;
3 use Moose;
4 has DNSName => (is => 'ro', isa => 'Str', required => 1);
5 has EvaluateTargetHealth => (is => 'ro', isa => 'Bool', required => 1);
6 has HostedZoneId => (is => 'ro', isa => 'Str', required => 1);
7  
8 1;
9  
10 ### main pod documentation begin ###
11  
12 =head1 NAME
13  
14 Paws::Route53::AliasTarget
15  
16 =head1 USAGE
17  
18 This class represents one of two things:
19  
20 =head3 Arguments in a call to a service
21  
22 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
23 Each attribute should be used as a named argument in the calls that expect this type of object.
24  
25 As an example, if Att1 is expected to be a Paws::Route53::AliasTarget object:
26  
27 $service_obj->Method(Att1 => { DNSName => $value, ..., HostedZoneId => $value });
28  
29 =head3 Results returned from an API call
30  
31 Use accessors for each attribute. If Att1 is expected to be an Paws::Route53::AliasTarget object:
32  
33 $result = $service_obj->Method(...);
34 $result->Att1->DNSName
35  
36 =head1 DESCRIPTION
37  
38 I<Alias resource record sets only:> Information about the AWS resource,
39 such as a CloudFront distribution or an Amazon S3 bucket, that you want
40 to route traffic to.
41  
42 When creating resource record sets for a private hosted zone, note the
43 following:
44  
45 =over
46  
47 =item *
48  
49 Creating geolocation alias resource record sets or latency alias
50 resource record sets in a private hosted zone is unsupported.
51  
52 =item *
53  
54 For information about creating failover resource record sets in a
55 private hosted zone, see Configuring Failover in a Private Hosted Zone
56 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html).
57  
58 =back
59  
60  
61 =head1 ATTRIBUTES
62  
63  
64 =head2 B<REQUIRED> DNSName => Str
65  
66 I<Alias resource record sets only:> The value that you specify depends
67 on where you want to route queries:
68  
69 =over
70  
71 =item Amazon API Gateway custom regional APIs and edge-optimized APIs
72  
73 Specify the applicable domain name for your API. You can get the
74 applicable value using the AWS CLI command get-domain-names
75 (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-domain-names.html):
76  
77 =over
78  
79 =item *
80  
81 For regional APIs, specify the value of C<regionalDomainName>.
82  
83 =item *
84  
85 For edge-optimized APIs, specify the value of
86 C<distributionDomainName>. This is the name of the associated
87 CloudFront distribution, such as C<da1b2c3d4e5.cloudfront.net>.
88  
89 =back
90  
91 The name of the record that you're creating must match a custom domain
92 name for your API, such as C<api.example.com>.
93  
94 =item Amazon Virtual Private Cloud interface VPC endpoint
95  
96 Enter the API endpoint for the interface endpoint, such as
97 C<vpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com>.
98 For edge-optimized APIs, this is the domain name for the corresponding
99 CloudFront distribution. You can get the value of C<DnsName> using the
100 AWS CLI command describe-vpc-endpoints
101 (https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html).
102  
103 =item CloudFront distribution
104  
105 Specify the domain name that CloudFront assigned when you created your
106 distribution.
107  
108 Your CloudFront distribution must include an alternate domain name that
109 matches the name of the resource record set. For example, if the name
110 of the resource record set is I<acme.example.com>, your CloudFront
111 distribution must include I<acme.example.com> as one of the alternate
112 domain names. For more information, see Using Alternate Domain Names
113 (CNAMEs)
114 (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html)
115 in the I<Amazon CloudFront Developer Guide>.
116  
117 You can't create a resource record set in a private hosted zone to
118 route traffic to a CloudFront distribution.
119  
120 For failover alias records, you can't specify a CloudFront distribution
121 for both the primary and secondary records. A distribution must include
122 an alternate domain name that matches the name of the record. However,
123 the primary and secondary records have the same name, and you can't
124 include the same alternate domain name in more than one distribution.
125  
126 =item Elastic Beanstalk environment
127  
128 If the domain name for your Elastic Beanstalk environment includes the
129 region that you deployed the environment in, you can create an alias
130 record that routes traffic to the environment. For example, the domain
131 name C<my-environment.I<us-west-2>.elasticbeanstalk.com> is a
132 regionalized domain name.
133  
134 For environments that were created before early 2016, the domain name
135 doesn't include the region. To route traffic to these environments, you
136 must create a CNAME record instead of an alias record. Note that you
137 can't create a CNAME record for the root domain name. For example, if
138 your domain name is example.com, you can create a record that routes
139 traffic for acme.example.com to your Elastic Beanstalk environment, but
140 you can't create a record that routes traffic for example.com to your
141 Elastic Beanstalk environment.
142  
143 For Elastic Beanstalk environments that have regionalized subdomains,
144 specify the C<CNAME> attribute for the environment. You can use the
145 following methods to get the value of the CNAME attribute:
146  
147 =over
148  
149 =item *
150  
151 I<AWS Management Console>: For information about how to get the value
152 by using the console, see Using Custom Domains with AWS Elastic
153 Beanstalk
154 (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html)
155 in the I<AWS Elastic Beanstalk Developer Guide>.
156  
157 =item *
158  
159 I<Elastic Beanstalk API>: Use the C<DescribeEnvironments> action to get
160 the value of the C<CNAME> attribute. For more information, see
161 DescribeEnvironments
162 (https://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_DescribeEnvironments.html)
163 in the I<AWS Elastic Beanstalk API Reference>.
164  
165 =item *
166  
167 I<AWS CLI>: Use the C<describe-environments> command to get the value
168 of the C<CNAME> attribute. For more information, see
169 describe-environments
170 (https://docs.aws.amazon.com/cli/latest/reference/elasticbeanstalk/describe-environments.html)
171 in the I<AWS CLI Command Reference>.
172  
173 =back
174  
175 =item ELB load balancer
176  
177 Specify the DNS name that is associated with the load balancer. Get the
178 DNS name by using the AWS Management Console, the ELB API, or the AWS
179 CLI.
180  
181 =over
182  
183 =item *
184  
185 B<AWS Management Console>: Go to the EC2 page, choose B<Load Balancers>
186 in the navigation pane, choose the load balancer, choose the
187 B<Description> tab, and get the value of the B<DNS name> field.
188  
189 If you're routing traffic to a Classic Load Balancer, get the value
190 that begins with B<dualstack>. If you're routing traffic to another
191 type of load balancer, get the value that applies to the record type, A
192 or AAAA.
193  
194 =item *
195  
196 B<Elastic Load Balancing API>: Use C<DescribeLoadBalancers> to get the
197 value of C<DNSName>. For more information, see the applicable guide:
198  
199 =over
200  
201 =item *
202  
203 Classic Load Balancers: DescribeLoadBalancers
204 (https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html)
205  
206 =item *
207  
208 Application and Network Load Balancers: DescribeLoadBalancers
209 (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html)
210  
211 =back
212  
213 =item *
214  
215 B<AWS CLI>: Use C<describe-load-balancers> to get the value of
216 C<DNSName>. For more information, see the applicable guide:
217  
218 =over
219  
220 =item *
221  
222 Classic Load Balancers: describe-load-balancers
223 (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html)
224  
225 =item *
226  
227 Application and Network Load Balancers: describe-load-balancers
228 (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html)
229  
230 =back
231  
232 =back
233  
234 =item AWS Global Accelerator accelerator
235  
236 Specify the DNS name for your accelerator:
237  
238 =over
239  
240 =item *
241  
242 B<Global Accelerator API:> To get the DNS name, use DescribeAccelerator
243 (https://docs.aws.amazon.com/global-accelerator/latest/api/API_DescribeAccelerator.html).
244  
245 =item *
246  
247 B<AWS CLI:> To get the DNS name, use describe-accelerator
248 (https://docs.aws.amazon.com/cli/latest/reference/globalaccelerator/describe-accelerator.html).
249  
250 =back
251  
252 =item Amazon S3 bucket that is configured as a static website
253  
254 Specify the domain name of the Amazon S3 website endpoint that you
255 created the bucket in, for example,
256 C<s3-website.us-east-2.amazonaws.com>. For more information about valid
257 values, see the table Amazon S3 Website Endpoints
258 (https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints)
259 in the I<Amazon Web Services General Reference>. For more information
260 about using S3 buckets for websites, see Getting Started with Amazon
261 Route 53
262 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html)
263 in the I<Amazon Route 53 Developer Guide.>
264  
265 =item Another Route 53 resource record set
266  
267 Specify the value of the C<Name> element for a resource record set in
268 the current hosted zone.
269  
270 If you're creating an alias record that has the same name as the hosted
271 zone (known as the zone apex), you can't specify the domain name for a
272 record for which the value of C<Type> is C<CNAME>. This is because the
273 alias record must have the same type as the record that you're routing
274 traffic to, and creating a CNAME record for the zone apex isn't
275 supported even for an alias record.
276  
277 =back
278  
279  
280  
281 =head2 B<REQUIRED> EvaluateTargetHealth => Bool
282  
283 I<Applies only to alias, failover alias, geolocation alias, latency
284 alias, and weighted alias resource record sets:> When
285 C<EvaluateTargetHealth> is C<true>, an alias resource record set
286 inherits the health of the referenced AWS resource, such as an ELB load
287 balancer or another resource record set in the hosted zone.
288  
289 Note the following:
290  
291 =over
292  
293 =item CloudFront distributions
294  
295 You can't set C<EvaluateTargetHealth> to C<true> when the alias target
296 is a CloudFront distribution.
297  
298 =item Elastic Beanstalk environments that have regionalized subdomains
299  
300 If you specify an Elastic Beanstalk environment in C<DNSName> and the
301 environment contains an ELB load balancer, Elastic Load Balancing
302 routes queries only to the healthy Amazon EC2 instances that are
303 registered with the load balancer. (An environment automatically
304 contains an ELB load balancer if it includes more than one Amazon EC2
305 instance.) If you set C<EvaluateTargetHealth> to C<true> and either no
306 Amazon EC2 instances are healthy or the load balancer itself is
307 unhealthy, Route 53 routes queries to other available resources that
308 are healthy, if any.
309  
310 If the environment contains a single Amazon EC2 instance, there are no
311 special requirements.
312  
313 =item ELB load balancers
314  
315 Health checking behavior depends on the type of load balancer:
316  
317 =over
318  
319 =item *
320  
321 B<Classic Load Balancers>: If you specify an ELB Classic Load Balancer
322 in C<DNSName>, Elastic Load Balancing routes queries only to the
323 healthy Amazon EC2 instances that are registered with the load
324 balancer. If you set C<EvaluateTargetHealth> to C<true> and either no
325 EC2 instances are healthy or the load balancer itself is unhealthy,
326 Route 53 routes queries to other resources.
327  
328 =item *
329  
330 B<Application and Network Load Balancers>: If you specify an ELB
331 Application or Network Load Balancer and you set
332 C<EvaluateTargetHealth> to C<true>, Route 53 routes queries to the load
333 balancer based on the health of the target groups that are associated
334 with the load balancer:
335  
336 =over
337  
338 =item *
339  
340 For an Application or Network Load Balancer to be considered healthy,
341 every target group that contains targets must contain at least one
342 healthy target. If any target group contains only unhealthy targets,
343 the load balancer is considered unhealthy, and Route 53 routes queries
344 to other resources.
345  
346 =item *
347  
348 A target group that has no registered targets is considered unhealthy.
349  
350 =back
351  
352 =back
353  
354 When you create a load balancer, you configure settings for Elastic
355 Load Balancing health checks; they're not Route 53 health checks, but
356 they perform a similar function. Do not create Route 53 health checks
357 for the EC2 instances that you register with an ELB load balancer.
358  
359 =item S3 buckets
360  
361 There are no special requirements for setting C<EvaluateTargetHealth>
362 to C<true> when the alias target is an S3 bucket.
363  
364 =item Other records in the same hosted zone
365  
366 If the AWS resource that you specify in C<DNSName> is a record or a
367 group of records (for example, a group of weighted records) but is not
368 another alias record, we recommend that you associate a health check
369 with all of the records in the alias target. For more information, see
370 What Happens When You Omit Health Checks?
371 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html#dns-failover-complex-configs-hc-omitting)
372 in the I<Amazon Route 53 Developer Guide>.
373  
374 =back
375  
376 For more information and examples, see Amazon Route 53 Health Checks
377 and DNS Failover
378 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html)
379 in the I<Amazon Route 53 Developer Guide>.
380  
381  
382 =head2 B<REQUIRED> HostedZoneId => Str
383  
384 I<Alias resource records sets only>: The value used depends on where
385 you want to route traffic:
386  
387 =over
388  
389 =item Amazon API Gateway custom regional APIs and edge-optimized APIs
390  
391 Specify the hosted zone ID for your API. You can get the applicable
392 value using the AWS CLI command get-domain-names
393 (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-domain-names.html):
394  
395 =over
396  
397 =item *
398  
399 For regional APIs, specify the value of C<regionalHostedZoneId>.
400  
401 =item *
402  
403 For edge-optimized APIs, specify the value of
404 C<distributionHostedZoneId>.
405  
406 =back
407  
408 =item Amazon Virtual Private Cloud interface VPC endpoint
409  
410 Specify the hosted zone ID for your interface endpoint. You can get the
411 value of C<HostedZoneId> using the AWS CLI command
412 describe-vpc-endpoints
413 (https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html).
414  
415 =item CloudFront distribution
416  
417 Specify C<Z2FDTNDATAQYW2>.
418  
419 Alias resource record sets for CloudFront can't be created in a private
420 zone.
421  
422 =item Elastic Beanstalk environment
423  
424 Specify the hosted zone ID for the region that you created the
425 environment in. The environment must have a regionalized subdomain. For
426 a list of regions and the corresponding hosted zone IDs, see AWS
427 Elastic Beanstalk endpoints and quotas
428 (https://docs.aws.amazon.com/general/latest/gr/elasticbeanstalk.html)
429 in the the I<Amazon Web Services General Reference>.
430  
431 =item ELB load balancer
432  
433 Specify the value of the hosted zone ID for the load balancer. Use the
434 following methods to get the hosted zone ID:
435  
436 =over
437  
438 =item *
439  
440 Elastic Load Balancing endpoints and quotas
441 (https://docs.aws.amazon.com/general/latest/gr/elb.html) topic in the
442 I<Amazon Web Services General Reference>: Use the value that
443 corresponds with the region that you created your load balancer in.
444 Note that there are separate columns for Application and Classic Load
445 Balancers and for Network Load Balancers.
446  
447 =item *
448  
449 B<AWS Management Console>: Go to the Amazon EC2 page, choose B<Load
450 Balancers> in the navigation pane, select the load balancer, and get
451 the value of the B<Hosted zone> field on the B<Description> tab.
452  
453 =item *
454  
455 B<Elastic Load Balancing API>: Use C<DescribeLoadBalancers> to get the
456 applicable value. For more information, see the applicable guide:
457  
458 =over
459  
460 =item *
461  
462 Classic Load Balancers: Use DescribeLoadBalancers
463 (https://docs.aws.amazon.com/elasticloadbalancing/2012-06-01/APIReference/API_DescribeLoadBalancers.html)
464 to get the value of C<CanonicalHostedZoneNameId>.
465  
466 =item *
467  
468 Application and Network Load Balancers: Use DescribeLoadBalancers
469 (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html)
470 to get the value of C<CanonicalHostedZoneId>.
471  
472 =back
473  
474 =item *
475  
476 B<AWS CLI>: Use C<describe-load-balancers> to get the applicable value.
477 For more information, see the applicable guide:
478  
479 =over
480  
481 =item *
482  
483 Classic Load Balancers: Use describe-load-balancers
484 (http://docs.aws.amazon.com/cli/latest/reference/elb/describe-load-balancers.html)
485 to get the value of C<CanonicalHostedZoneNameId>.
486  
487 =item *
488  
489 Application and Network Load Balancers: Use describe-load-balancers
490 (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html)
491 to get the value of C<CanonicalHostedZoneId>.
492  
493 =back
494  
495 =back
496  
497 =item AWS Global Accelerator accelerator
498  
499 Specify C<Z2BJ6XQ5FK7U4H>.
500  
501 =item An Amazon S3 bucket configured as a static website
502  
503 Specify the hosted zone ID for the region that you created the bucket
504 in. For more information about valid values, see the table Amazon S3
505 Website Endpoints
506 (https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints)
507 in the I<Amazon Web Services General Reference>.
508  
509 =item Another Route 53 resource record set in your hosted zone
510  
511 Specify the hosted zone ID of your hosted zone. (An alias resource
512 record set can't reference a resource record set in a different hosted
513 zone.)
514  
515 =back
516  
517  
518  
519  
520 =head1 SEE ALSO
521  
522 This class forms part of L<Paws>, describing an object used in L<Paws::Route53>
523  
524 =head1 BUGS and CONTRIBUTIONS
525  
526 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
527  
528 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
529  
530 =cut
531