# BaseApplicationListenerRuleProps

Basic properties for defining a rule on a listener.

- Source: [`aws-elasticloadbalancingv2/lib/alb/application-listener-rule.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener-rule.ts#L18)

## Example

```ts
// 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 applicationTargetGroup: elbv2.ApplicationTargetGroup;
declare const listenerAction: elbv2.ListenerAction;
declare const listenerCondition: elbv2.ListenerCondition;
const baseApplicationListenerRuleProps: elbv2.BaseApplicationListenerRuleProps = {
  priority: 123,

  // the properties below are optional
  action: listenerAction,
  conditions: [listenerCondition],
  targetGroups: [applicationTargetGroup],
};
```

## Properties

- `action`: [ListenerAction](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ListenerAction.html) — Action to perform when requests are received.

  **Default:** No action

  Only one of `action`, `fixedResponse`, `redirectResponse` or `targetGroups` can be specified.

- `conditions`: [ListenerCondition](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ListenerCondition.html)[] — Rule applies if matches the conditions.

  **Default:** No conditions.

- `priority`: number (required) — Priority of the rule.

  The rule with the lowest priority will be used for every request.

  Priorities must be unique.

- `targetGroups`: [IApplicationTargetGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationTargetGroup.html)[] — Target groups to forward requests to.

  **Default:** No target groups.

  Only one of `action`, `fixedResponse`, `redirectResponse` or `targetGroups` can be specified.

  Implies a `forward` action.
