Skip to content
v2.278.0

LaunchTargetBindOptions Struct ​

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

Example ​

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
# 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
// 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();
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
};
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 ​

clusteroptionalIClusterclusteroptionalIClusterclusteroptionalIClusterClusteroptionalIClusterClusteroptionalICluster #
A regional grouping of one or more container instances on which you can run tasks and services.

Default: No cluster

taskDefinitionITaskDefinitiontask_definitionITaskDefinitiontaskDefinitionITaskDefinitionTaskDefinitionITaskDefinitionTaskDefinitionITaskDefinition required #
Task definition to run Docker containers in Amazon ECS.