# ColumnRestriction

- Source: [`aws-logs/lib/pattern.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-logs/lib/pattern.ts#L402)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from 'aws-cdk-lib';
const columnRestriction: logs.ColumnRestriction = {
  comparison: 'comparison',

  // the properties below are optional
  numberValue: 123,
  stringValue: 'stringValue',
};
```

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_logs as logs

column_restriction = logs.ColumnRestriction(
    comparison="comparison",

    # the properties below are optional
    number_value=123,
    string_value="stringValue"
)
```

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

ColumnRestriction columnRestriction = ColumnRestriction.builder()
        .comparison("comparison")

        // the properties below are optional
        .numberValue(123)
        .stringValue("stringValue")
        .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.Logs;

var columnRestriction = new ColumnRestriction {
    Comparison = "comparison",

    // the properties below are optional
    NumberValue = 123,
    StringValue = "stringValue"
};
```

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"

columnRestriction := &ColumnRestriction{
	Comparison: jsii.String("comparison"),

	// the properties below are optional
	NumberValue: jsii.Number(123),
	StringValue: jsii.String("stringValue"),
}
```

## Properties

- `comparison`: string (required) — Comparison operator to use.

- `numberValue`: number — Number value to compare to.

  Exactly one of 'stringValue' and 'numberValue' must be set.

- `stringValue`: string — String value to compare to.

  Exactly one of 'stringValue' and 'numberValue' must be set.
