AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

ApplicationListenerRule

Define a new listener rule.

Import

import { ApplicationListenerRule } from 'aws-cdk-lib/aws-elasticloadbalancingv2';

Or use the module namespace:

import * as elasticloadbalancingv2 from 'aws-cdk-lib/aws-elasticloadbalancingv2';
// elasticloadbalancingv2.ApplicationListenerRule

Properties

Configuration passed to the constructor as ApplicationListenerRuleProps.

listenerRequired
IApplicationListener

The listener to attach the rule to.

4 properties inherited from BaseApplicationListenerRuleProps
priorityRequiredinherited from BaseApplicationListenerRuleProps
number

Priority of the rule. The rule with the lowest priority will be used for every request. Priorities must be unique.

actionOptionalinherited from BaseApplicationListenerRuleProps
ListenerAction

Action to perform when requests are received. Only one of `action`, `fixedResponse`, `redirectResponse` or `targetGroups` can be specified.

Default: - No action

conditionsOptionalinherited from BaseApplicationListenerRuleProps
ListenerCondition[]

Rule applies if matches the conditions.

Default: - No conditions.

targetGroupsOptionalinherited from BaseApplicationListenerRuleProps
IApplicationTargetGroup[]

Target groups to forward requests to. Only one of `action`, `fixedResponse`, `redirectResponse` or `targetGroups` can be specified. Implies a `forward` action.

Default: - No target groups.

Get the Elastic Load Balancing V2 Cheat Sheet

Everything you need to know about Elastic Load Balancing V2 on one page. HD quality, print-friendly.

Download Free Infographic