# ResponseInspectionStatusCodeProperty

Configures inspection of the response status code. This is part of the `ResponseInspection` configuration for `AWSManagedRulesATPRuleSet` and `AWSManagedRulesACFPRuleSet` .

> Response inspection is available only in web ACLs that protect Amazon CloudFront distributions.

- 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_wafv2 as wafv2 } from 'aws-cdk-lib';
const responseInspectionStatusCodeProperty: wafv2.CfnWebACL.ResponseInspectionStatusCodeProperty = {
  failureCodes: [123],
  successCodes: [123],
};
```

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_wafv2 as wafv2

response_inspection_status_code_property = wafv2.CfnWebACL.ResponseInspectionStatusCodeProperty(
    failure_codes=[123],
    success_codes=[123]
)
```

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.wafv2.*;

ResponseInspectionStatusCodeProperty responseInspectionStatusCodeProperty = ResponseInspectionStatusCodeProperty.builder()
        .failureCodes(List.of(123))
        .successCodes(List.of(123))
        .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.WAFv2;

var responseInspectionStatusCodeProperty = new ResponseInspectionStatusCodeProperty {
    FailureCodes = new [] { 123 },
    SuccessCodes = new [] { 123 }
};
```

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"

responseInspectionStatusCodeProperty := &ResponseInspectionStatusCodeProperty{
	FailureCodes: []interface{}{
		jsii.Number(123),
	},
	SuccessCodes: []interface{}{
		jsii.Number(123),
	},
}
```

## Properties

- `failureCodes`: number[] | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — Status codes in the response that indicate a failed login or account creation attempt.

  To be counted as a failure, the response status code must match one of these. Each code must be unique among the success and failure status codes.

  JSON example: `"FailureCodes": [ 400, 404 ]`

- `successCodes`: number[] | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — Status codes in the response that indicate a successful login or account creation attempt.

  To be counted as a success, the response status code must match one of these. Each code must be unique among the success and failure status codes.

  JSON example: `"SuccessCodes": [ 200, 201 ]`
