Interface FixedResponseOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
FixedResponseOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2025-01-15T21:09:19.249Z")
@Stability(Stable)
public interface FixedResponseOptions
extends software.amazon.jsii.JsiiSerializable
Options for
ListenerAction.fixedResponse()
.
Example:
import software.amazon.awscdk.services.certificatemanager.*; Certificate certificate; ApplicationLoadBalancer lb; Bucket bucket; TrustStore trustStore = TrustStore.Builder.create(this, "Store") .bucket(bucket) .key("rootCA_cert.pem") .build(); lb.addListener("Listener", BaseApplicationListenerProps.builder() .port(443) .protocol(ApplicationProtocol.HTTPS) .certificates(List.of(certificate)) // mTLS settings .mutualAuthentication(MutualAuthentication.builder() .ignoreClientCertificateExpiry(false) .mutualAuthenticationMode(MutualAuthenticationMode.VERIFY) .trustStore(trustStore) .build()) .defaultAction(ListenerAction.fixedResponse(200, FixedResponseOptions.builder().contentType("text/plain").messageBody("Success mTLS").build())) .build());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forFixedResponseOptions
static final class
An implementation forFixedResponseOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic FixedResponseOptions.Builder
builder()
default String
Content Type of the response.default String
The 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.Builder
ofFixedResponseOptions
-