# AssignableStateOptions

Option properties for state that can assign variables.

- Source: [`aws-stepfunctions/lib/states/state.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-stepfunctions/lib/states/state.ts#L137)
- Type last changed: v2.178.0 · 6 Feb 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_stepfunctions as stepfunctions } from 'aws-cdk-lib';

declare const assign: any;
const assignableStateOptions: stepfunctions.AssignableStateOptions = {
  assign: {
    assignKey: assign,
  },
};
```

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

# assign: Any

assignable_state_options = stepfunctions.AssignableStateOptions(
    assign={
        "assign_key": assign
    }
)
```

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 assign;

AssignableStateOptions assignableStateOptions = AssignableStateOptions.builder()
        .assign(Map.of(
                "assignKey", assign))
        .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 assign;

var assignableStateOptions = new AssignableStateOptions {
    Assign = new Dictionary<string, object> {
        { "assignKey", assign }
    }
};
```

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

assignableStateOptions := &AssignableStateOptions{
	Assign: map[string]interface{}{
		"assignKey": assign,
	},
}
```

## Properties

- `assign`: { [key: string]: any } — Workflow variables to store in this step.

  **Default:** Not assign variables

  Using workflow variables, you can store data in a step and retrieve that data in future steps.
