aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener.FixedResponseConfigProperty

interface FixedResponseConfigProperty

LanguageType name
.NETAmazon.CDK.AWS.ElasticLoadBalancingV2.CfnListener.FixedResponseConfigProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancingv2#CfnListener_FixedResponseConfigProperty
Javasoftware.amazon.awscdk.services.elasticloadbalancingv2.CfnListener.FixedResponseConfigProperty
Pythonaws_cdk.aws_elasticloadbalancingv2.CfnListener.FixedResponseConfigProperty
TypeScript aws-cdk-lib » aws_elasticloadbalancingv2 » CfnListener » FixedResponseConfigProperty

Specifies information required when returning a custom HTTP response.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
const fixedResponseConfigProperty: elbv2.CfnListener.FixedResponseConfigProperty = {
  statusCode: 'statusCode',

  // the properties below are optional
  contentType: 'contentType',
  messageBody: 'messageBody',
};

Properties

NameTypeDescription
statusCodestringThe HTTP response code (2XX, 4XX, or 5XX).
contentType?stringThe content type.
messageBody?stringThe message.

statusCode

Type: string

The HTTP response code (2XX, 4XX, or 5XX).


contentType?

Type: string (optional)

The content type.

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


messageBody?

Type: string (optional)

The message.