# ChainDefinitionBody

Extends: [DefinitionBody](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.DefinitionBody.html) › ChainDefinitionBody

- Source: [`aws-stepfunctions/lib/state-machine.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions/lib/state-machine.ts#L842)
- 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 chainable: stepfunctions.IChainable;
const chainDefinitionBody = stepfunctions.ChainDefinitionBody.fromChainable(chainable);
```

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

# chainable: stepfunctions.IChainable

chain_definition_body = stepfunctions.ChainDefinitionBody.from_chainable(chainable)
```

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

IChainable chainable;

DefinitionBody chainDefinitionBody = ChainDefinitionBody.fromChainable(chainable);
```

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;

IChainable chainable;

var chainDefinitionBody = ChainDefinitionBody.FromChainable(chainable);
```

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 chainable IChainable

chainDefinitionBody := awscdk.Aws_stepfunctions.ChainDefinitionBody_FromChainable(chainable)
```

## Initializer

TypeScript:

```ts
new ChainDefinitionBody(chainable: IChainable)
```

Python:

```python
ChainDefinitionBody(chainable: IChainable)
```

Java:

```java
new ChainDefinitionBody(IChainable chainable)
```

C# / .NET:

```csharp
new ChainDefinitionBody(IChainable chainable)
```

Golang:

```go
NewChainDefinitionBody(Chainable IChainable)
```

## Properties

- `chainable`: [IChainable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.IChainable.html)

## Methods

- `bind(scope: Construct, _sfnPrincipal: IPrincipal, sfnProps: StateMachineProps, graph?: StateGraph): DefinitionConfig`

- `fromChainable(chainable: IChainable): DefinitionBody` (static)

- `fromFile(path: string, options?: AssetOptions): DefinitionBody` (static)

- `fromString(definition: string): DefinitionBody` (static)
