java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.elasticloadbalancingv2.ListenerAction
All Implemented Interfaces:
IListenerAction, software.amazon.jsii.JsiiSerializable
Direct Known Subclasses:
AuthenticateCognitoAction

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:17.074Z") @Stability(Stable) public class ListenerAction extends software.amazon.jsii.JsiiObject implements IListenerAction
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 next property.

(Called ListenerAction instead of the more strictly correct ListenerAction because this is the class most users interact with, and we want to make it not too visually overwhelming).

Example:

 ApplicationListener listener;
 ApplicationTargetGroup myTargetGroup;
 listener.addAction("DefaultAction", AddApplicationActionProps.builder()
         .action(ListenerAction.authenticateOidc(AuthenticateOidcOptions.builder()
                 .authorizationEndpoint("https://example.com/openid")
                 // Other OIDC properties here
                 .clientId("...")
                 .clientSecret(SecretValue.secretsManager("..."))
                 .issuer("...")
                 .tokenEndpoint("...")
                 .userInfoEndpoint("...")
                 // Next
                 .next(ListenerAction.forward(List.of(myTargetGroup)))
                 .build()))
         .build());