# ItemBatcher

Configuration for processing a group of items in a single child workflow execution.

- Source: [`aws-stepfunctions/lib/states/distributed-map/item-batcher.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions/lib/states/distributed-map/item-batcher.ts#L58)
- Type last changed: v2.127.0 · 10 Feb 2024

## Example

TypeScript:

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

declare const batchInput: any;
const itemBatcher = new stepfunctions.ItemBatcher({
  batchInput: batchInput,
  maxInputBytesPerBatch: 123,
  maxInputBytesPerBatchPath: 'maxInputBytesPerBatchPath',
  maxItemsPerBatch: 123,
  maxItemsPerBatchPath: 'maxItemsPerBatchPath',
});
```

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_stepfunctions as stepfunctions

# batch_input: Any

item_batcher = stepfunctions.ItemBatcher(
    batch_input=batch_input,
    max_input_bytes_per_batch=123,
    max_input_bytes_per_batch_path="maxInputBytesPerBatchPath",
    max_items_per_batch=123,
    max_items_per_batch_path="maxItemsPerBatchPath"
)
```

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

Object batchInput;

ItemBatcher itemBatcher = ItemBatcher.Builder.create()
        .batchInput(batchInput)
        .maxInputBytesPerBatch(123)
        .maxInputBytesPerBatchPath("maxInputBytesPerBatchPath")
        .maxItemsPerBatch(123)
        .maxItemsPerBatchPath("maxItemsPerBatchPath")
        .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.StepFunctions;

var batchInput;

var itemBatcher = new ItemBatcher(new ItemBatcherProps {
    BatchInput = batchInput,
    MaxInputBytesPerBatch = 123,
    MaxInputBytesPerBatchPath = "maxInputBytesPerBatchPath",
    MaxItemsPerBatch = 123,
    MaxItemsPerBatchPath = "maxItemsPerBatchPath"
});
```

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 batchInput interface{}

itemBatcher := awscdk.Aws_stepfunctions.NewItemBatcher(&ItemBatcherProps{
	BatchInput: batchInput,
	MaxInputBytesPerBatch: jsii.Number(123),
	MaxInputBytesPerBatchPath: jsii.String("maxInputBytesPerBatchPath"),
	MaxItemsPerBatch: jsii.Number(123),
	MaxItemsPerBatchPath: jsii.String("maxItemsPerBatchPath"),
})
```

## Initializer

TypeScript:

```ts
new ItemBatcher(props: ItemBatcherProps)
```

Python:

```python
ItemBatcher(props: ItemBatcherProps)
```

Java:

```java
new ItemBatcher(ItemBatcherProps props)
```

C# / .NET:

```csharp
new ItemBatcher(ItemBatcherProps props)
```

Golang:

```go
NewItemBatcher(Props ItemBatcherProps)
```

## Methods

- `render(): any` — Render ItemBatcher in ASL JSON format.

- `validateItemBatcher(): string[]` — Validate this ItemBatcher.
