Interface FixedResponseOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
FixedResponseOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)",
date="2023-10-26T00:56:07.961Z")
@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("text/plain")
.messageBody("OK")
.build()))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forFixedResponseOptionsstatic final classAn implementation forFixedResponseOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic FixedResponseOptions.Builderbuilder()default StringContent Type of the response.default StringThe response body.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getContentType
Content Type of the response.Valid Values: text/plain | text/css | text/html | application/javascript | application/json
Default: - Automatically determined
-
getMessageBody
The response body.Default: - No body
-
builder
- Returns:
- a
FixedResponseOptions.BuilderofFixedResponseOptions
-