aws-cdk-lib.aws_ecs.CfnTaskSetProps

interface CfnTaskSetProps

LanguageType name
.NETAmazon.CDK.AWS.ECS.CfnTaskSetProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecs#CfnTaskSetProps
Javasoftware.amazon.awscdk.services.ecs.CfnTaskSetProps
Pythonaws_cdk.aws_ecs.CfnTaskSetProps
TypeScript aws-cdk-lib » aws_ecs » CfnTaskSetProps

Properties for defining a CfnTaskSet.

Example

// 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';
const cfnTaskSetProps: ecs.CfnTaskSetProps = {
  cluster: 'cluster',
  service: 'service',
  taskDefinition: 'taskDefinition',

  // the properties below are optional
  externalId: 'externalId',
  launchType: 'launchType',
  loadBalancers: [{
    containerName: 'containerName',
    containerPort: 123,
    loadBalancerName: 'loadBalancerName',
    targetGroupArn: 'targetGroupArn',
  }],
  networkConfiguration: {
    awsVpcConfiguration: {
      subnets: ['subnets'],

      // the properties below are optional
      assignPublicIp: 'assignPublicIp',
      securityGroups: ['securityGroups'],
    },
  },
  platformVersion: 'platformVersion',
  scale: {
    unit: 'unit',
    value: 123,
  },
  serviceRegistries: [{
    containerName: 'containerName',
    containerPort: 123,
    port: 123,
    registryArn: 'registryArn',
  }],
};

Properties

NameTypeDescription
clusterstringThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.
servicestringThe short name or full Amazon Resource Name (ARN) of the service to create the task set in.
taskDefinitionstringThe task definition for the tasks in the task set to use.
externalId?stringAn optional non-unique tag that identifies this task set in external systems.
launchType?stringThe launch type that new tasks in the task set uses.
loadBalancers?IResolvable | IResolvable | LoadBalancerProperty[]A load balancer object representing the load balancer to use with the task set.
networkConfiguration?IResolvable | NetworkConfigurationPropertyThe network configuration for the task set.
platformVersion?stringThe platform version that the tasks in the task set uses.
scale?IResolvable | ScalePropertyA floating-point percentage of your desired number of tasks to place and keep running in the task set.
serviceRegistries?IResolvable | IResolvable | ServiceRegistryProperty[]The details of the service discovery registries to assign to this task set.

cluster

Type: string

The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.


service

Type: string

The short name or full Amazon Resource Name (ARN) of the service to create the task set in.


taskDefinition

Type: string

The task definition for the tasks in the task set to use.


externalId?

Type: string (optional)

An optional non-unique tag that identifies this task set in external systems.

If the task set is associated with a service discovery registry, the tasks in this task set will have the ECS_TASK_SET_EXTERNAL_ID AWS Cloud Map attribute set to the provided value.


launchType?

Type: string (optional)

The launch type that new tasks in the task set uses.

For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide .

If a launchType is specified, the capacityProviderStrategy parameter must be omitted.


loadBalancers?

Type: IResolvable | IResolvable | LoadBalancerProperty[] (optional)

A load balancer object representing the load balancer to use with the task set.

The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.


networkConfiguration?

Type: IResolvable | NetworkConfigurationProperty (optional)

The network configuration for the task set.


platformVersion?

Type: string (optional)

The platform version that the tasks in the task set uses.

A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the LATEST platform version is used.


scale?

Type: IResolvable | ScaleProperty (optional)

A floating-point percentage of your desired number of tasks to place and keep running in the task set.


serviceRegistries?

Type: IResolvable | IResolvable | ServiceRegistryProperty[] (optional)

The details of the service discovery registries to assign to this task set.

For more information, see Service discovery .