# LaunchTargetBindOptions

Options for binding a launch target to an ECS run job task.

Used as argument in: [IEcsLaunchTarget.bind](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.IEcsLaunchTarget.html#bind)

- Source: [`aws-stepfunctions-tasks/lib/ecs/run-task.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/ecs/run-task.ts#L124)

## Example

TypeScript:

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

declare const cluster: ecs.Cluster;
declare const taskDefinition: ecs.TaskDefinition;
const launchTargetBindOptions: stepfunctions_tasks.LaunchTargetBindOptions = {
  taskDefinition: taskDefinition,

  // the properties below are optional
  cluster: cluster,
};
```

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_ecs as ecs
from aws_cdk import aws_stepfunctions_tasks as stepfunctions_tasks

# cluster: ecs.Cluster
# task_definition: ecs.TaskDefinition

launch_target_bind_options = stepfunctions_tasks.LaunchTargetBindOptions(
    task_definition=task_definition,

    # the properties below are optional
    cluster=cluster
)
```

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.ecs.*;
import software.amazon.awscdk.services.stepfunctions.tasks.*;

Cluster cluster;
TaskDefinition taskDefinition;

LaunchTargetBindOptions launchTargetBindOptions = LaunchTargetBindOptions.builder()
        .taskDefinition(taskDefinition)

        // the properties below are optional
        .cluster(cluster)
        .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.ECS;
using Amazon.CDK.AWS.StepFunctions.Tasks;

Cluster cluster;
TaskDefinition taskDefinition;

var launchTargetBindOptions = new LaunchTargetBindOptions {
    TaskDefinition = taskDefinition,

    // the properties below are optional
    Cluster = cluster
};
```

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"
import "github.com/aws/aws-cdk-go/awscdk"

var cluster Cluster
var taskDefinition TaskDefinition

launchTargetBindOptions := &LaunchTargetBindOptions{
	TaskDefinition: taskDefinition,

	// the properties below are optional
	Cluster: cluster,
}
```

## Properties

- `cluster`: [ICluster](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ICluster.html) — A regional grouping of one or more container instances on which you can run tasks and services.

  **Default:** No cluster

- `taskDefinition`: [ITaskDefinition](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ITaskDefinition.html) (required) — Task definition to run Docker containers in Amazon ECS.
