| 1 | |||
| 2 | package Paws::ELBv2::CreateListener; | ||
| 3 | use Moose; | ||
| 4 | has AlpnPolicy => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 5 | has Certificates => (is => 'ro', isa => 'ArrayRef[Paws::ELBv2::Certificate]'); | ||
| 6 | has DefaultActions => (is => 'ro', isa => 'ArrayRef[Paws::ELBv2::Action]', required => 1); | ||
| 7 | has LoadBalancerArn => (is => 'ro', isa => 'Str', required => 1); | ||
| 8 | has Port => (is => 'ro', isa => 'Int'); | ||
| 9 | has Protocol => (is => 'ro', isa => 'Str'); | ||
| 10 | has SslPolicy => (is => 'ro', isa => 'Str'); | ||
| 11 | has Tags => (is => 'ro', isa => 'ArrayRef[Paws::ELBv2::Tag]'); | ||
| 12 | |||
| 13 | use MooseX::ClassAttribute; | ||
| 14 | |||
| 15 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateListener'); | ||
| 16 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ELBv2::CreateListenerOutput'); | ||
| 17 | class_has _result_key => (isa => 'Str', is => 'ro', default => 'CreateListenerResult'); | ||
| 18 | 1; | ||
| 19 | |||
| 20 | ### main pod documentation begin ### | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | Paws::ELBv2::CreateListener - Arguments for method CreateListener on L<Paws::ELBv2> | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | This class represents the parameters used for calling the method CreateListener on the | ||
| 29 | L<Elastic Load Balancing|Paws::ELBv2> service. Use the attributes of this class | ||
| 30 | as arguments to method CreateListener. | ||
| 31 | |||
| 32 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateListener. | ||
| 33 | |||
| 34 | =head1 SYNOPSIS | ||
| 35 | |||
| 36 | my $elasticloadbalancing = Paws->service('ELBv2'); | ||
| 37 | # To create an HTTP listener | ||
| 38 | # This example creates an HTTP listener for the specified load balancer that | ||
| 39 | # forwards requests to the specified target group. | ||
| 40 | my $CreateListenerOutput = $elasticloadbalancing->CreateListener( | ||
| 41 | 'DefaultActions' => [ | ||
| 42 | |||
| 43 | { | ||
| 44 | 'TargetGroupArn' => | ||
| 45 | 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', | ||
| 46 | 'Type' => 'forward' | ||
| 47 | } | ||
| 48 | ], | ||
| 49 | 'LoadBalancerArn' => | ||
| 50 | 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', | ||
| 51 | 'Port' => 80, | ||
| 52 | 'Protocol' => 'HTTP' | ||
| 53 | ); | ||
| 54 | |||
| 55 | # Results: | ||
| 56 | my $Listeners = $CreateListenerOutput->Listeners; | ||
| 57 | |||
| 58 | # Returns a L<Paws::ELBv2::CreateListenerOutput> object. | ||
| 59 | # To create an HTTPS listener | ||
| 60 | # This example creates an HTTPS listener for the specified load balancer that | ||
| 61 | # forwards requests to the specified target group. Note that you must specify an | ||
| 62 | # SSL certificate for an HTTPS listener. You can create and manage certificates | ||
| 63 | # using AWS Certificate Manager (ACM). Alternatively, you can create a | ||
| 64 | # certificate using SSL/TLS tools, get the certificate signed by a certificate | ||
| 65 | # authority (CA), and upload the certificate to AWS Identity and Access | ||
| 66 | # Management (IAM). | ||
| 67 | my $CreateListenerOutput = $elasticloadbalancing->CreateListener( | ||
| 68 | 'Certificates' => [ | ||
| 69 | |||
| 70 | { | ||
| 71 | 'CertificateArn' => | ||
| 72 | 'arn:aws:iam::123456789012:server-certificate/my-server-cert' | ||
| 73 | } | ||
| 74 | ], | ||
| 75 | 'DefaultActions' => [ | ||
| 76 | |||
| 77 | { | ||
| 78 | 'TargetGroupArn' => | ||
| 79 | 'arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', | ||
| 80 | 'Type' => 'forward' | ||
| 81 | } | ||
| 82 | ], | ||
| 83 | 'LoadBalancerArn' => | ||
| 84 | 'arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188', | ||
| 85 | 'Port' => 443, | ||
| 86 | 'Protocol' => 'HTTPS', | ||
| 87 | 'SslPolicy' => 'ELBSecurityPolicy-2015-05' | ||
| 88 | ); | ||
| 89 | |||
| 90 | # Results: | ||
| 91 | my $Listeners = $CreateListenerOutput->Listeners; | ||
| 92 | |||
| 93 | # Returns a L<Paws::ELBv2::CreateListenerOutput> object. | ||
| 94 | |||
| 95 | 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. | ||
| 96 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing/CreateListener> | ||
| 97 | |||
| 98 | =head1 ATTRIBUTES | ||
| 99 | |||
| 100 | |||
| 101 | =head2 AlpnPolicy => ArrayRef[Str|Undef] | ||
| 102 | |||
| 103 | [TLS listeners] The name of the Application-Layer Protocol Negotiation | ||
| 104 | (ALPN) policy. You can specify one policy name. The following are the | ||
| 105 | possible values: | ||
| 106 | |||
| 107 | =over | ||
| 108 | |||
| 109 | =item * | ||
| 110 | |||
| 111 | C<HTTP1Only> | ||
| 112 | |||
| 113 | =item * | ||
| 114 | |||
| 115 | C<HTTP2Only> | ||
| 116 | |||
| 117 | =item * | ||
| 118 | |||
| 119 | C<HTTP2Optional> | ||
| 120 | |||
| 121 | =item * | ||
| 122 | |||
| 123 | C<HTTP2Preferred> | ||
| 124 | |||
| 125 | =item * | ||
| 126 | |||
| 127 | C<None> | ||
| 128 | |||
| 129 | =back | ||
| 130 | |||
| 131 | For more information, see ALPN policies | ||
| 132 | (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#alpn-policies) | ||
| 133 | in the I<Network Load Balancers Guide>. | ||
| 134 | |||
| 135 | |||
| 136 | |||
| 137 | =head2 Certificates => ArrayRef[L<Paws::ELBv2::Certificate>] | ||
| 138 | |||
| 139 | [HTTPS and TLS listeners] The default certificate for the listener. You | ||
| 140 | must provide exactly one certificate. Set C<CertificateArn> to the | ||
| 141 | certificate ARN but do not set C<IsDefault>. | ||
| 142 | |||
| 143 | |||
| 144 | |||
| 145 | =head2 B<REQUIRED> DefaultActions => ArrayRef[L<Paws::ELBv2::Action>] | ||
| 146 | |||
| 147 | The actions for the default rule. | ||
| 148 | |||
| 149 | |||
| 150 | |||
| 151 | =head2 B<REQUIRED> LoadBalancerArn => Str | ||
| 152 | |||
| 153 | The Amazon Resource Name (ARN) of the load balancer. | ||
| 154 | |||
| 155 | |||
| 156 | |||
| 157 | =head2 Port => Int | ||
| 158 | |||
| 159 | The port on which the load balancer is listening. You cannot specify a | ||
| 160 | port for a Gateway Load Balancer. | ||
| 161 | |||
| 162 | |||
| 163 | |||
| 164 | =head2 Protocol => Str | ||
| 165 | |||
| 166 | The protocol for connections from clients to the load balancer. For | ||
| 167 | Application Load Balancers, the supported protocols are HTTP and HTTPS. | ||
| 168 | For Network Load Balancers, the supported protocols are TCP, TLS, UDP, | ||
| 169 | and TCP_UDP. You canE<rsquo>t specify the UDP or TCP_UDP protocol if | ||
| 170 | dual-stack mode is enabled. You cannot specify a protocol for a Gateway | ||
| 171 | Load Balancer. | ||
| 172 | |||
| 173 | Valid values are: C<"HTTP">, C<"HTTPS">, C<"TCP">, C<"TLS">, C<"UDP">, C<"TCP_UDP">, C<"GENEVE"> | ||
| 174 | |||
| 175 | =head2 SslPolicy => Str | ||
| 176 | |||
| 177 | [HTTPS and TLS listeners] The security policy that defines which | ||
| 178 | protocols and ciphers are supported. | ||
| 179 | |||
| 180 | For more information, see Security policies | ||
| 181 | (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) | ||
| 182 | in the I<Application Load Balancers Guide> and Security policies | ||
| 183 | (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies) | ||
| 184 | in the I<Network Load Balancers Guide>. | ||
| 185 | |||
| 186 | |||
| 187 | |||
| 188 | =head2 Tags => ArrayRef[L<Paws::ELBv2::Tag>] | ||
| 189 | |||
| 190 | The tags to assign to the listener. | ||
| 191 | |||
| 192 | |||
| 193 | |||
| 194 | |||
| 195 | =head1 SEE ALSO | ||
| 196 | |||
| 197 | This class forms part of L<Paws>, documenting arguments for method CreateListener in L<Paws::ELBv2> | ||
| 198 | |||
| 199 | =head1 BUGS and CONTRIBUTIONS | ||
| 200 | |||
| 201 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 202 | |||
| 203 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 204 | |||
| 205 | =cut | ||
| 206 |