Skip to content
v2.278.0

ConditionProperty Struct ​

A single match condition for a log filter.

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 conditionProperty: wafv2.CfnLoggingConfiguration.ConditionProperty = {
  actionCondition: {
    action: 'action',
  },
  labelNameCondition: {
    labelName: 'labelName',
  },
};
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

condition_property = wafv2.CfnLoggingConfiguration.ConditionProperty(
    action_condition=wafv2.CfnLoggingConfiguration.ActionConditionProperty(
        action="action"
    ),
    label_name_condition=wafv2.CfnLoggingConfiguration.LabelNameConditionProperty(
        label_name="labelName"
    )
)
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.*;

ConditionProperty conditionProperty = ConditionProperty.builder()
        .actionCondition(ActionConditionProperty.builder()
                .action("action")
                .build())
        .labelNameCondition(LabelNameConditionProperty.builder()
                .labelName("labelName")
                .build())
        .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 conditionProperty = new ConditionProperty {
    ActionCondition = new ActionConditionProperty {
        Action = "action"
    },
    LabelNameCondition = new LabelNameConditionProperty {
        LabelName = "labelName"
    }
};
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"

conditionProperty := &ConditionProperty{
	ActionCondition: &ActionConditionProperty{
		Action: jsii.String("action"),
	},
	LabelNameCondition: &LabelNameConditionProperty{
		LabelName: jsii.String("labelName"),
	},
}

Properties ​

actionConditionoptionalIResolvable | CfnLoggingConfiguration.ActionConditionPropertyaction_conditionoptionaltyping.Union[IResolvable, ActionConditionProperty]actionConditionoptionalIResolvableActionConditionoptionalIResolvableActionConditionoptionalinterface{} #
A single action condition.

This is the action setting that a log record must contain in order to meet the condition.

labelNameConditionoptionalIResolvable | CfnLoggingConfiguration.LabelNameConditionPropertylabel_name_conditionoptionaltyping.Union[IResolvable, LabelNameConditionProperty]labelNameConditionoptionalIResolvableLabelNameConditionoptionalIResolvableLabelNameConditionoptionalinterface{} #
A single label name condition.
notes

This is the fully qualified label name that a log record must contain in order to meet the condition. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label.