interface ApplicationLoadBalancerRedirectConfig
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ElasticLoadBalancingV2.ApplicationLoadBalancerRedirectConfig |
![]() | software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationLoadBalancerRedirectConfig |
![]() | aws_cdk.aws_elasticloadbalancingv2.ApplicationLoadBalancerRedirectConfig |
![]() | @aws-cdk/aws-elasticloadbalancingv2 » ApplicationLoadBalancerRedirectConfig |
Properties for a redirection config.
Example
declare const lb: elbv2.ApplicationLoadBalancer;
lb.addRedirect({
sourceProtocol: elbv2.ApplicationProtocol.HTTPS,
sourcePort: 8443,
targetProtocol: elbv2.ApplicationProtocol.HTTP,
targetPort: 8080,
});
Properties
Name | Type | Description |
---|---|---|
open? | boolean | Allow anyone to connect to this listener. |
source | number | The port number to listen to. |
source | Application | The protocol of the listener being created. |
target | number | The port number to redirect to. |
target | Application | The protocol of the redirection target. |
open?
Type:
boolean
(optional, default: true)
Allow anyone to connect to this listener.
If this is specified, the listener will be opened up to anyone who can reach it. For internal load balancers this is anyone in the same VPC. For public load balancers, this is anyone on the internet.
If you want to be more selective about who can access this load
balancer, set this to false
and use the listener's connections
object to selectively grant access to the listener.
sourcePort?
Type:
number
(optional, default: 80)
The port number to listen to.
sourceProtocol?
Type:
Application
(optional, default: HTTP)
The protocol of the listener being created.
targetPort?
Type:
number
(optional, default: 443)
The port number to redirect to.
targetProtocol?
Type:
Application
(optional, default: HTTPS)
The protocol of the redirection target.