blib/lib/Paws/ELB/CreateLoadBalancer.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::ELB::CreateLoadBalancer;
3 use Moose;
4 has AvailabilityZones => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
5 has Listeners => (is => 'ro', isa => 'ArrayRef[Paws::ELB::Listener]', required => 1);
6 has LoadBalancerName => (is => 'ro', isa => 'Str', required => 1);
7 has Scheme => (is => 'ro', isa => 'Str');
8 has SecurityGroups => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
9 has Subnets => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
10 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::ELB::Tag]');
11  
12 use MooseX::ClassAttribute;
13  
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateLoadBalancer');
15 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ELB::CreateAccessPointOutput');
16 class_has _result_key => (isa => 'Str', is => 'ro', default => 'CreateLoadBalancerResult');
17 1;
18  
19 ### main pod documentation begin ###
20  
21 =head1 NAME
22  
23 Paws::ELB::CreateLoadBalancer - Arguments for method CreateLoadBalancer on L<Paws::ELB>
24  
25 =head1 DESCRIPTION
26  
27 This class represents the parameters used for calling the method CreateLoadBalancer on the
28 L<Elastic Load Balancing|Paws::ELB> service. Use the attributes of this class
29 as arguments to method CreateLoadBalancer.
30  
31 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateLoadBalancer.
32  
33 =head1 SYNOPSIS
34  
35 my $elasticloadbalancing = Paws->service('ELB');
36 # To create an HTTP load balancer in a VPC
37 # This example creates a load balancer with an HTTP listener in a VPC.
38 my $CreateAccessPointOutput = $elasticloadbalancing->CreateLoadBalancer(
39 'Listeners' => [
40  
41 {
42 'InstancePort' => 80,
43 'InstanceProtocol' => 'HTTP',
44 'LoadBalancerPort' => 80,
45 'Protocol' => 'HTTP'
46 }
47 ],
48 'LoadBalancerName' => 'my-load-balancer',
49 'SecurityGroups' => ['sg-a61988c3'],
50 'Subnets' => ['subnet-15aaab61']
51 );
52  
53 # Results:
54 my $DNSName = $CreateAccessPointOutput->DNSName;
55  
56 # Returns a L<Paws::ELB::CreateAccessPointOutput> object.
57 # To create an HTTP load balancer in EC2-Classic
58 # This example creates a load balancer with an HTTP listener in EC2-Classic.
59 my $CreateAccessPointOutput = $elasticloadbalancing->CreateLoadBalancer(
60 'AvailabilityZones' => ['us-west-2a'],
61 'Listeners' => [
62  
63 {
64 'InstancePort' => 80,
65 'InstanceProtocol' => 'HTTP',
66 'LoadBalancerPort' => 80,
67 'Protocol' => 'HTTP'
68 }
69 ],
70 'LoadBalancerName' => 'my-load-balancer'
71 );
72  
73 # Results:
74 my $DNSName = $CreateAccessPointOutput->DNSName;
75  
76 # Returns a L<Paws::ELB::CreateAccessPointOutput> object.
77 # To create an HTTPS load balancer in a VPC
78 # This example creates a load balancer with an HTTPS listener in a VPC.
79 my $CreateAccessPointOutput = $elasticloadbalancing->CreateLoadBalancer(
80 'Listeners' => [
81  
82 {
83 'InstancePort' => 80,
84 'InstanceProtocol' => 'HTTP',
85 'LoadBalancerPort' => 80,
86 'Protocol' => 'HTTP'
87 },
88  
89 {
90 'InstancePort' => 80,
91 'InstanceProtocol' => 'HTTP',
92 'LoadBalancerPort' => 443,
93 'Protocol' => 'HTTPS',
94 'SSLCertificateId' =>
95 'arn:aws:iam::123456789012:server-certificate/my-server-cert'
96 }
97 ],
98 'LoadBalancerName' => 'my-load-balancer',
99 'SecurityGroups' => ['sg-a61988c3'],
100 'Subnets' => ['subnet-15aaab61']
101 );
102  
103 # Results:
104 my $DNSName = $CreateAccessPointOutput->DNSName;
105  
106 # Returns a L<Paws::ELB::CreateAccessPointOutput> object.
107 # To create an HTTPS load balancer in EC2-Classic
108 # This example creates a load balancer with an HTTPS listener in EC2-Classic.
109 my $CreateAccessPointOutput = $elasticloadbalancing->CreateLoadBalancer(
110 'AvailabilityZones' => ['us-west-2a'],
111 'Listeners' => [
112  
113 {
114 'InstancePort' => 80,
115 'InstanceProtocol' => 'HTTP',
116 'LoadBalancerPort' => 80,
117 'Protocol' => 'HTTP'
118 },
119  
120 {
121 'InstancePort' => 80,
122 'InstanceProtocol' => 'HTTP',
123 'LoadBalancerPort' => 443,
124 'Protocol' => 'HTTPS',
125 'SSLCertificateId' =>
126 'arn:aws:iam::123456789012:server-certificate/my-server-cert'
127 }
128 ],
129 'LoadBalancerName' => 'my-load-balancer'
130 );
131  
132 # Results:
133 my $DNSName = $CreateAccessPointOutput->DNSName;
134  
135 # Returns a L<Paws::ELB::CreateAccessPointOutput> object.
136 # To create an internal load balancer
137 # This example creates an internal load balancer with an HTTP listener in a VPC.
138 my $CreateAccessPointOutput = $elasticloadbalancing->CreateLoadBalancer(
139 'Listeners' => [
140  
141 {
142 'InstancePort' => 80,
143 'InstanceProtocol' => 'HTTP',
144 'LoadBalancerPort' => 80,
145 'Protocol' => 'HTTP'
146 }
147 ],
148 'LoadBalancerName' => 'my-load-balancer',
149 'Scheme' => 'internal',
150 'SecurityGroups' => ['sg-a61988c3'],
151 'Subnets' => ['subnet-15aaab61']
152 );
153  
154 # Results:
155 my $DNSName = $CreateAccessPointOutput->DNSName;
156  
157 # Returns a L<Paws::ELB::CreateAccessPointOutput> object.
158  
159 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
160 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing/CreateLoadBalancer>
161  
162 =head1 ATTRIBUTES
163  
164  
165 =head2 AvailabilityZones => ArrayRef[Str|Undef]
166  
167 One or more Availability Zones from the same region as the load
168 balancer.
169  
170 You must specify at least one Availability Zone.
171  
172 You can add more Availability Zones after you create the load balancer
173 using EnableAvailabilityZonesForLoadBalancer.
174  
175  
176  
177 =head2 B<REQUIRED> Listeners => ArrayRef[L<Paws::ELB::Listener>]
178  
179 The listeners.
180  
181 For more information, see Listeners for Your Classic Load Balancer
182 (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html)
183 in the I<Classic Load Balancers Guide>.
184  
185  
186  
187 =head2 B<REQUIRED> LoadBalancerName => Str
188  
189 The name of the load balancer.
190  
191 This name must be unique within your set of load balancers for the
192 region, must have a maximum of 32 characters, must contain only
193 alphanumeric characters or hyphens, and cannot begin or end with a
194 hyphen.
195  
196  
197  
198 =head2 Scheme => Str
199  
200 The type of a load balancer. Valid only for load balancers in a VPC.
201  
202 By default, Elastic Load Balancing creates an Internet-facing load
203 balancer with a DNS name that resolves to public IP addresses. For more
204 information about Internet-facing and Internal load balancers, see Load
205 Balancer Scheme
206 (https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html#load-balancer-scheme)
207 in the I<Elastic Load Balancing User Guide>.
208  
209 Specify C<internal> to create a load balancer with a DNS name that
210 resolves to private IP addresses.
211  
212  
213  
214 =head2 SecurityGroups => ArrayRef[Str|Undef]
215  
216 The IDs of the security groups to assign to the load balancer.
217  
218  
219  
220 =head2 Subnets => ArrayRef[Str|Undef]
221  
222 The IDs of the subnets in your VPC to attach to the load balancer.
223 Specify one subnet per Availability Zone specified in
224 C<AvailabilityZones>.
225  
226  
227  
228 =head2 Tags => ArrayRef[L<Paws::ELB::Tag>]
229  
230 A list of tags to assign to the load balancer.
231  
232 For more information about tagging your load balancer, see Tag Your
233 Classic Load Balancer
234 (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html)
235 in the I<Classic Load Balancers Guide>.
236  
237  
238  
239  
240 =head1 SEE ALSO
241  
242 This class forms part of L<Paws>, documenting arguments for method CreateLoadBalancer in L<Paws::ELB>
243  
244 =head1 BUGS and CONTRIBUTIONS
245  
246 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
247  
248 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
249  
250 =cut
251