CfnTaskSetProps
- class aws_cdk.aws_ecs.CfnTaskSetProps(*, cluster, service, task_definition, capacity_provider_strategy=None, external_id=None, launch_type=None, load_balancers=None, network_configuration=None, platform_version=None, scale=None, service_registries=None, tags=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. If a revision isn’t specified, the latestACTIVE
revision is used.capacity_provider_strategy (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,CapacityProviderStrategyItemProperty
,Dict
[str
,Any
]]],None
]) – The capacity provider strategy that are associated with the task set.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 theECS_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 alaunchType
is specified, thecapacityProviderStrategy
parameter must be omitted.load_balancers (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,LoadBalancerProperty
,Dict
[str
,Any
]]],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
,Dict
[str
,Any
],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, theLATEST
platform version is used.scale (
Union
[IResolvable
,ScaleProperty
,Dict
[str
,Any
],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
,Dict
[str
,Any
]]],None
]) – The details of the service discovery registries to assign to this task set. For more information, see Service discovery .tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – The metadata that you apply to the task set to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. The following basic restrictions apply to tags: - Maximum number of tags per resource - 50 - For each resource, each tag key must be unique, and each tag key can have only one value. - Maximum key length - 128 Unicode characters in UTF-8 - Maximum value length - 256 Unicode characters in UTF-8 - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : /
- See:
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. from aws_cdk import aws_ecs as ecs cfn_task_set_props = ecs.CfnTaskSetProps( cluster="cluster", service="service", task_definition="taskDefinition", # the properties below are optional capacity_provider_strategy=[ecs.CfnTaskSet.CapacityProviderStrategyItemProperty( base=123, capacity_provider="capacityProvider", weight=123 )], external_id="externalId", launch_type="launchType", load_balancers=[ecs.CfnTaskSet.LoadBalancerProperty( container_name="containerName", container_port=123, 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" )], tags=[CfnTag( key="key", value="value" )] )
Attributes
- capacity_provider_strategy
The capacity provider strategy that are associated with the task set.
- cluster
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.
- 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.
- 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, thecapacityProviderStrategy
parameter must be omitted.
- 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.
- network_configuration
The network configuration for the task set.
- 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.
- scale
A floating-point percentage of your desired number of tasks to place and keep running in the task set.
- service
The short name or full Amazon Resource Name (ARN) of the service to create the task set in.
- service_registries
The details of the service discovery registries to assign to this task set.
For more information, see Service discovery .
- tags
The metadata that you apply to the task set to help you categorize and organize them.
Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
Maximum number of tags per resource - 50
For each resource, each tag key must be unique, and each tag key can have only one value.
Maximum key length - 128 Unicode characters in UTF-8
Maximum value length - 256 Unicode characters in UTF-8
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : /
.
Tag keys and values are case-sensitive.
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
- task_definition
The task definition for the tasks in the task set to use.
If a revision isn’t specified, the latest
ACTIVE
revision is used.