interface FixedResponseOptions
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.ElasticLoadBalancingV2.FixedResponseOptions | 
|  Go | github.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancingv2#FixedResponseOptions | 
|  Java | software.amazon.awscdk.services.elasticloadbalancingv2.FixedResponseOptions | 
|  Python | aws_cdk.aws_elasticloadbalancingv2.FixedResponseOptions | 
|  TypeScript (source) | aws-cdk-lib»aws_elasticloadbalancingv2»FixedResponseOptions | 
Options for ListenerAction.fixedResponse().
Example
import * as acm from 'aws-cdk-lib/aws-certificatemanager';
declare const certificate: acm.Certificate;
declare const lb: elbv2.ApplicationLoadBalancer;
declare const bucket: s3.Bucket;
const trustStore = new elbv2.TrustStore(this, 'Store', {
  bucket,
  key: 'rootCA_cert.pem',
});
lb.addListener('Listener', {
  port: 443,
  protocol: elbv2.ApplicationProtocol.HTTPS,
  certificates: [certificate],
  // mTLS settings
  mutualAuthentication: {
    advertiseTrustStoreCaNames: true,
    ignoreClientCertificateExpiry: false,
    mutualAuthenticationMode: elbv2.MutualAuthenticationMode.VERIFY,
    trustStore,
  },
  defaultAction: elbv2.ListenerAction.fixedResponse(200,
    { contentType: 'text/plain', messageBody: 'Success mTLS' }),
});
Properties
| Name | Type | Description | 
|---|---|---|
| content | string | Content Type of the response. | 
| message | string | The response body. | 
contentType?
Type:
string
(optional, default: Automatically determined)
Content Type of the response.
Valid Values: text/plain | text/css | text/html | application/javascript | application/json
messageBody?
Type:
string
(optional, default: No body)
The response body.
