interface ApplicationListenerRuleProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ElasticLoadBalancingV2.ApplicationListenerRuleProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancingv2#ApplicationListenerRuleProps |
Java | software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationListenerRuleProps |
Python | aws_cdk.aws_elasticloadbalancingv2.ApplicationListenerRuleProps |
TypeScript (source) | aws-cdk-lib » aws_elasticloadbalancingv2 » ApplicationListenerRuleProps |
Properties for defining a listener rule.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
declare const applicationListener: elbv2.ApplicationListener;
declare const applicationTargetGroup: elbv2.ApplicationTargetGroup;
declare const listenerAction: elbv2.ListenerAction;
declare const listenerCondition: elbv2.ListenerCondition;
const applicationListenerRuleProps: elbv2.ApplicationListenerRuleProps = {
listener: applicationListener,
priority: 123,
// the properties below are optional
action: listenerAction,
conditions: [listenerCondition],
targetGroups: [applicationTargetGroup],
};
Properties
Name | Type | Description |
---|---|---|
listener | IApplication | The listener to attach the rule to. |
priority | number | Priority of the rule. |
action? | Listener | Action to perform when requests are received. |
conditions? | Listener [] | Rule applies if matches the conditions. |
target | IApplication [] | Target groups to forward requests to. |
listener
Type:
IApplication
The listener to attach the rule to.
priority
Type:
number
Priority of the rule.
The rule with the lowest priority will be used for every request.
Priorities must be unique.
action?
Type:
Listener
(optional, default: No action)
Action to perform when requests are received.
Only one of action
, fixedResponse
, redirectResponse
or targetGroups
can be specified.
conditions?
Type:
Listener
[]
(optional, default: No conditions.)
Rule applies if matches the conditions.
See also: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html
targetGroups?
Type:
IApplication
[]
(optional, default: No target groups.)
Target groups to forward requests to.
Only one of action
, fixedResponse
, redirectResponse
or targetGroups
can be specified.
Implies a forward
action.