AddRuleProps

class aws_cdk.aws_elasticloadbalancingv2.AddRuleProps(*, conditions=None, priority=None)

Bases: object

Properties for adding a conditional load balancing rule.

Parameters:
  • conditions (Optional[Sequence[ListenerCondition]]) – Rule applies if matches the conditions. Default: - No conditions.

  • priority (Union[int, float, None]) – Priority of this target group. The rule with the lowest priority will be used for every request. If priority is not given, these target groups will be added as defaults, and must not have conditions. Priorities must be unique. Default: Target groups are used as defaults

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticloadbalancingv2 as elbv2

# listener_condition: elbv2.ListenerCondition

add_rule_props = elbv2.AddRuleProps(
    conditions=[listener_condition],
    priority=123
)

Attributes

conditions

Rule applies if matches the conditions.

Default:
  • No conditions.

See:

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

priority

Priority of this target group.

The rule with the lowest priority will be used for every request. If priority is not given, these target groups will be added as defaults, and must not have conditions.

Priorities must be unique.

Default:

Target groups are used as defaults