Skip to content
v2.278.0

ResponseInspectionStatusCodeProperty Struct ​

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.

Example ​

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
# 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
// 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();
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 }
};
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 ​

failureCodesnumber[] | IResolvablefailure_codestyping.Union[typing.List[int | float], IResolvable]failureCodesList<Number>FailureCodesdouble[]FailureCodesinterface{} 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 ]

successCodesnumber[] | IResolvablesuccess_codestyping.Union[typing.List[int | float], IResolvable]successCodesList<Number>SuccessCodesdouble[]SuccessCodesinterface{} 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 ]