ApplicationListenerRuleProps

class aws_cdk.aws_elasticloadbalancingv2.ApplicationListenerRuleProps(*, priority, fixed_response=None, host_header=None, path_pattern=None, redirect_response=None, target_groups=None, listener)

Bases: aws_cdk.aws_elasticloadbalancingv2.BaseApplicationListenerRuleProps

__init__(*, priority, fixed_response=None, host_header=None, path_pattern=None, redirect_response=None, target_groups=None, listener)

Properties for defining a listener rule.

Parameters
  • priority (Union[int, float]) – Priority of the rule. The rule with the lowest priority will be used for every request. Priorities must be unique.

  • fixed_response (Optional[FixedResponse]) – Fixed response to return. Only one of fixedResponse, redirectResponse or targetGroups can be specified. Default: - No fixed response.

  • host_header (Optional[str]) – Rule applies if the requested host matches the indicated host. May contain up to three ‘*’ wildcards. Default: - No host condition.

  • path_pattern (Optional[str]) – Rule applies if the requested path matches the given path pattern. May contain up to three ‘*’ wildcards. Default: - No path condition.

  • redirect_response (Optional[RedirectResponse]) – Redirect response to return. Only one of fixedResponse, redirectResponse or targetGroups can be specified. Default: - No redirect response.

  • target_groups (Optional[List[IApplicationTargetGroup]]) – Target groups to forward requests to. Only one of fixedResponse, redirectResponse or targetGroups can be specified. Default: - No target groups.

  • listener (IApplicationListener) – The listener to attach the rule to.

Attributes

fixed_response

Fixed response to return.

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

default :default: - No fixed response.

Return type

Optional[FixedResponse]

host_header

Rule applies if the requested host matches the indicated host.

May contain up to three ‘*’ wildcards.

default :default: - No host condition.

see :see: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#host-conditions

Return type

Optional[str]

listener

The listener to attach the rule to.

Return type

IApplicationListener

path_pattern

Rule applies if the requested path matches the given path pattern.

May contain up to three ‘*’ wildcards.

default :default: - No path condition.

see :see: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#path-conditions

Return type

Optional[str]

priority

Priority of the rule.

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

Priorities must be unique.

Return type

Union[int, float]

redirect_response

Redirect response to return.

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

default :default: - No redirect response.

Return type

Optional[RedirectResponse]

target_groups

Target groups to forward requests to.

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

default :default: - No target groups.

Return type

Optional[List[IApplicationTargetGroup]]