Interface AddApplicationActionProps

All Superinterfaces:
AddRuleProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AddApplicationActionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:55:58.299Z") @Stability(Stable) public interface AddApplicationActionProps extends software.amazon.jsii.JsiiSerializable, AddRuleProps
Properties for adding a new action to a listener.

Example:

 ApplicationListener listener;
 listener.addAction("Fixed", AddApplicationActionProps.builder()
         .priority(10)
         .conditions(List.of(ListenerCondition.pathPatterns(List.of("/ok"))))
         .action(ListenerAction.fixedResponse(200, FixedResponseOptions.builder()
                 .contentType("text/plain")
                 .messageBody("OK")
                 .build()))
         .build());
 
  • Method Details

    • getAction

      @Stability(Stable) @NotNull ListenerAction getAction()
      Action to perform.
    • getRemoveSuffix

      @Stability(Stable) @Nullable default Boolean getRemoveSuffix()
      ListenerRules have a Rule suffix on their logicalId by default. This allows you to remove that suffix.

      Legacy behavior of the addTargetGroups() convenience method did not include the Rule suffix on the logicalId of the generated ListenerRule. At some point, increasing complexity of requirements can require users to switch from the addTargetGroups() method to the addAction() method. When migrating ListenerRules deployed by a legacy version of addTargetGroups(), you will need to enable this flag to avoid changing the logicalId of your resource. Otherwise Cfn will attempt to replace the ListenerRule and fail.

      Default: - use standard logicalId with the `Rule` suffix

    • builder

      @Stability(Stable) static AddApplicationActionProps.Builder builder()
      Returns:
      a AddApplicationActionProps.Builder of AddApplicationActionProps