# FixedResponseConfigProperty

Specifies information required when returning a custom HTTP response.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// 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.CfnListenerRule.FixedResponseConfigProperty = {
  statusCode: 'statusCode',

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

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticloadbalancingv2 as elbv2

fixed_response_config_property = elbv2.CfnListenerRule.FixedResponseConfigProperty(
    status_code="statusCode",

    # the properties below are optional
    content_type="contentType",
    message_body="messageBody"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.elasticloadbalancingv2.*;

FixedResponseConfigProperty fixedResponseConfigProperty = FixedResponseConfigProperty.builder()
        .statusCode("statusCode")

        // the properties below are optional
        .contentType("contentType")
        .messageBody("messageBody")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElasticLoadBalancingV2;

var fixedResponseConfigProperty = new FixedResponseConfigProperty {
    StatusCode = "statusCode",

    // the properties below are optional
    ContentType = "contentType",
    MessageBody = "messageBody"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

fixedResponseConfigProperty := &FixedResponseConfigProperty{
	StatusCode: jsii.String("statusCode"),

	// the properties below are optional
	ContentType: jsii.String("contentType"),
	MessageBody: jsii.String("messageBody"),
}
```

## Properties

- `contentType`: string — The content type.

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

- `messageBody`: string — The message.

- `statusCode`: string (required) — The HTTP response code (2XX, 4XX, or 5XX).
