# TransformerOptions

Properties for Transformer created from LogGroup.

Used as argument in: [ILogGroup.addTransformer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.ILogGroup.html#addtransformer)

- Source: [`aws-logs/lib/log-group.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-logs/lib/log-group.ts#L881)
- Type last changed: v2.207.0 · 24 Jul 2025

## 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';

declare const processor: logs.IProcessor;
const transformerOptions: logs.TransformerOptions = {
  transformerConfig: [processor],
  transformerName: 'transformerName',
};
```

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

# processor: logs.IProcessor

transformer_options = logs.TransformerOptions(
    transformer_config=[processor],
    transformer_name="transformerName"
)
```

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

IProcessor processor;

TransformerOptions transformerOptions = TransformerOptions.builder()
        .transformerConfig(List.of(processor))
        .transformerName("transformerName")
        .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;

IProcessor processor;

var transformerOptions = new TransformerOptions {
    TransformerConfig = new [] { processor },
    TransformerName = "transformerName"
};
```

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 processor IProcessor

transformerOptions := &TransformerOptions{
	TransformerConfig: []IProcessor{
		processor,
	},
	TransformerName: jsii.String("transformerName"),
}
```

## Properties

- `transformerConfig`: [IProcessor](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.IProcessor.html)[] (required) — List of processors in a transformer.

- `transformerName`: string (required) — Name of the transformer.
