aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancerRedirectConfig

interface ApplicationLoadBalancerRedirectConfig

LanguageType name
.NETAmazon.CDK.AWS.ElasticLoadBalancingV2.ApplicationLoadBalancerRedirectConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancingv2#ApplicationLoadBalancerRedirectConfig
Javasoftware.amazon.awscdk.services.elasticloadbalancingv2.ApplicationLoadBalancerRedirectConfig
Pythonaws_cdk.aws_elasticloadbalancingv2.ApplicationLoadBalancerRedirectConfig
TypeScript (source)aws-cdk-lib » 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

NameTypeDescription
open?booleanAllow anyone to connect to this listener.
sourcePort?numberThe port number to listen to.
sourceProtocol?ApplicationProtocolThe protocol of the listener being created.
targetPort?numberThe port number to redirect to.
targetProtocol?ApplicationProtocolThe 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: ApplicationProtocol (optional, default: HTTP)

The protocol of the listener being created.


targetPort?

Type: number (optional, default: 443)

The port number to redirect to.


targetProtocol?

Type: ApplicationProtocol (optional, default: HTTPS)

The protocol of the redirection target.