- class aws_cdk.aws_elasticloadbalancingv2.NetworkListenerAction(action_json, next=None)
What to do when a client makes a request to a listener.
Some actions can be combined with other ones (specifically, you can perform authentication before serving the request).
Multiple actions form a linked chain; the chain must always terminate in a (weighted)forward, fixedResponse or redirect action.
If an action supports chaining, the next action can be indicated by passing it in the
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_elasticloadbalancingv2 as elbv2 import aws_cdk.core as cdk # network_target_group: elbv2.NetworkTargetGroup network_listener_action = elbv2.NetworkListenerAction.forward([network_target_group], stickiness_duration=cdk.Duration.minutes(30) )
Create an instance of NetworkListenerAction.
The default class should be good enough for most cases and should be created by using one of the static factory functions, but allow overriding to make sure we allow flexibility for the future.
- bind(scope, listener)
Called when the action is being used in a listener.
- classmethod forward(target_groups, *, stickiness_duration=None)
Forward to one or more Target Groups.
- classmethod weighted_forward(target_groups, *, stickiness_duration=None)
Forward to one or more Target Groups which are weighted differently.