CfnTaskSetProps

class aws_cdk.aws_ecs.CfnTaskSetProps(*, cluster, service, task_definition, external_id=None, launch_type=None, load_balancers=None, network_configuration=None, platform_version=None, scale=None, service_registries=None)

Bases: object

Properties for defining a CfnTaskSet.

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

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

  • task_definition (str) – The task definition for the tasks in the task set to use.

  • external_id (Optional[str]) – 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.

  • launch_type (Optional[str]) – 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.

  • load_balancers (Union[IResolvable, Sequence[Union[IResolvable, LoadBalancerProperty]], None]) – 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.

  • network_configuration (Union[IResolvable, NetworkConfigurationProperty, None]) – The network configuration for the task set.

  • platform_version (Optional[str]) – 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 (Union[IResolvable, ScaleProperty, None]) – A floating-point percentage of your desired number of tasks to place and keep running in the task set.

  • service_registries (Union[IResolvable, Sequence[Union[IResolvable, ServiceRegistryProperty]], None]) – The details of the service discovery registries to assign to this task set. For more information, see Service Discovery .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ecs as ecs

cfn_task_set_props = ecs.CfnTaskSetProps(
    cluster="cluster",
    service="service",
    task_definition="taskDefinition",

    # the properties below are optional
    external_id="externalId",
    launch_type="launchType",
    load_balancers=[ecs.CfnTaskSet.LoadBalancerProperty(
        container_name="containerName",
        container_port=123,
        load_balancer_name="loadBalancerName",
        target_group_arn="targetGroupArn"
    )],
    network_configuration=ecs.CfnTaskSet.NetworkConfigurationProperty(
        aws_vpc_configuration=ecs.CfnTaskSet.AwsVpcConfigurationProperty(
            subnets=["subnets"],

            # the properties below are optional
            assign_public_ip="assignPublicIp",
            security_groups=["securityGroups"]
        )
    ),
    platform_version="platformVersion",
    scale=ecs.CfnTaskSet.ScaleProperty(
        unit="unit",
        value=123
    ),
    service_registries=[ecs.CfnTaskSet.ServiceRegistryProperty(
        container_name="containerName",
        container_port=123,
        port=123,
        registry_arn="registryArn"
    )]
)

Attributes

cluster

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html#cfn-ecs-taskset-cluster

Return type

str

external_id

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html#cfn-ecs-taskset-externalid

Return type

Optional[str]

launch_type

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html#cfn-ecs-taskset-launchtype

Return type

Optional[str]

load_balancers

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html#cfn-ecs-taskset-loadbalancers

Return type

Union[IResolvable, List[Union[IResolvable, LoadBalancerProperty]], None]

network_configuration

The network configuration for the task set.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html#cfn-ecs-taskset-networkconfiguration

Return type

Union[IResolvable, NetworkConfigurationProperty, None]

platform_version

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html#cfn-ecs-taskset-platformversion

Return type

Optional[str]

scale

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html#cfn-ecs-taskset-scale

Return type

Union[IResolvable, ScaleProperty, None]

service

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html#cfn-ecs-taskset-service

Return type

str

service_registries

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

For more information, see Service Discovery .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html#cfn-ecs-taskset-serviceregistries

Return type

Union[IResolvable, List[Union[IResolvable, ServiceRegistryProperty]], None]

task_definition

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskset.html#cfn-ecs-taskset-taskdefinition

Return type

str