# Predicate

Represents a trigger predicate.

- Source: [`aws-glue/lib/triggers/trigger-options.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-glue/lib/triggers/trigger-options.ts#L183)
- Type last changed: v2.270.0 · 17 Sep 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';

declare const condition: glue.Condition;
const predicate: glue.Predicate = {
  conditions: [condition],
  logical: glue.PredicateLogical.AND,
};
```

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_glue as glue

# condition: glue.Condition

predicate = glue.Predicate(
    conditions=[condition],
    logical=glue.PredicateLogical.AND
)
```

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

Condition condition;

Predicate predicate = Predicate.builder()
        .conditions(List.of(condition))
        .logical(PredicateLogical.AND)
        .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.Glue;

Condition condition;

var predicate = new Predicate {
    Conditions = new [] { condition },
    Logical = PredicateLogical.AND
};
```

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"

var condition Condition

predicate := &Predicate{
	Conditions: []Condition{
		condition,
	},
	Logical: awscdk.Aws_glue.PredicateLogical_AND,
}
```

## Properties

- `conditions`: [Condition](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.Condition.html)[] — A list of the conditions that determine when the trigger will fire.

  **Default:** no conditions are provided

- `logical`: [PredicateLogical](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.PredicateLogical.html) — The logical operator to be applied to the conditions.

  **Default:** PredicateLogical.AND if multiple conditions are provided, no logical operator if only one condition
