# SpaceDelimitedTextPattern

Space delimited text pattern.

Implements: [IFilterPattern](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.IFilterPattern.html)
Obtainable from: [FilterPattern.spaceDelimited](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.FilterPattern.html#spacedelimited), SpaceDelimitedTextPattern.construct
Returned by: SpaceDelimitedTextPattern.whereNumber, SpaceDelimitedTextPattern.whereString

- 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#L304)

## Example

TypeScript:

```ts
// Search for all events where the component is "HttpServer" and the
// result code is not equal to 200.
const pattern = logs.FilterPattern.spaceDelimited('time', 'component', '...', 'result_code', 'latency')
  .whereString('component', '=', 'HttpServer')
  .whereNumber('result_code', '!=', 200);
```

Python:

```python
# Search for all events where the component is "HttpServer" and the
# result code is not equal to 200.
pattern = logs.FilterPattern.space_delimited("time", "component", "...", "result_code", "latency").where_string("component", "=", "HttpServer").where_number("result_code", "!=", 200)
```

Java:

```java
// Search for all events where the component is "HttpServer" and the
// result code is not equal to 200.
SpaceDelimitedTextPattern pattern = FilterPattern.spaceDelimited("time", "component", "...", "result_code", "latency").whereString("component", "=", "HttpServer").whereNumber("result_code", "!=", 200);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// Search for all events where the component is "HttpServer" and the
// result code is not equal to 200.
var pattern = FilterPattern.SpaceDelimited("time", "component", "...", "result_code", "latency").WhereString("component", "=", "HttpServer").WhereNumber("result_code", "!=", 200);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// Search for all events where the component is "HttpServer" and the
// result code is not equal to 200.
pattern := logs.FilterPattern_SpaceDelimited(jsii.String("time"), jsii.String("component"), jsii.String("..."), jsii.String("result_code"), jsii.String("latency")).WhereString(jsii.String("component"), jsii.String("="), jsii.String("HttpServer")).WhereNumber(jsii.String("result_code"), jsii.String("!="), jsii.Number(200))
```

## Properties

- `logPatternString`: string

## Methods

- `construct(columns: string[]): SpaceDelimitedTextPattern // chainable` (static) — Construct a new instance of a space delimited text pattern.

  Since this class must be public, we can't rely on the user only creating it through
  the `LogPattern.spaceDelimited()` factory function. We must therefore validate the
  argument in the constructor. Since we're returning a copy on every mutation, and we
  don't want to re-validate the same things on every construction, we provide a limited
  set of mutator functions and only validate the new data every time.

- `whereNumber(columnName: string, comparison: string, value: number): SpaceDelimitedTextPattern // chainable` — Restrict where the pattern applies.

- `whereString(columnName: string, comparison: string, value: string): SpaceDelimitedTextPattern // chainable` — Restrict where the pattern applies.
