Interface FixedResponseOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
FixedResponseOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:44.338Z") @Stability(Stable) public interface FixedResponseOptions extends software.amazon.jsii.JsiiSerializable
Options for ListenerAction.fixedResponse().

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(ContentType.TEXT_PLAIN)
                 .messageBody("OK")
                 .build()))
         .build());
 
  • Method Details

    • getContentType

      @Stability(Stable) @Nullable default String getContentType()
      Content Type of the response.

      Valid Values: text/plain | text/css | text/html | application/javascript | application/json

      Default: - Automatically determined

    • getMessageBody

      @Stability(Stable) @Nullable default String getMessageBody()
      The response body.

      Default: - No body

    • builder

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