Interface EcsTaskProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,TargetBaseProps
- All Known Implementing Classes:
EcsTaskProps.Jsii$Proxy
Example:
import software.amazon.awscdk.services.ecs.*; import software.amazon.awscdk.services.ec2.*; ICluster cluster; TaskDefinition taskDefinition; Rule rule = Rule.Builder.create(this, "Rule") .schedule(Schedule.rate(Duration.hours(1))) .build(); rule.addTarget( EcsTask.Builder.create() .cluster(cluster) .taskDefinition(taskDefinition) .assignPublicIp(true) .subnetSelection(SubnetSelection.builder().subnetType(SubnetType.PUBLIC).build()) .build());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forEcsTaskProps
static final class
An implementation forEcsTaskProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic EcsTaskProps.Builder
builder()
default Boolean
Specifies whether the task's elastic network interface receives a public IP address.Cluster where service will be deployed.default List<ContainerOverride>
Container setting overrides.default Boolean
Whether or not to enable the execute command functionality for the containers in this task.default LaunchType
Specifies the launch type on which your task is running.default FargatePlatformVersion
The platform version on which to run your task.default PropagatedTagSource
Specifies whether to propagate the tags from the task definition to the task.default IRole
getRole()
Existing IAM role to run the ECS task.default List<ISecurityGroup>
Existing security groups to use for the task's ENIs.default SubnetSelection
In what subnets to place the task's ENIs.getTags()
The metadata that you apply to the task to help you categorize and organize them.default Number
How many tasks should be started when this event is triggered.Task Definition of the task that should be started.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.events.targets.TargetBaseProps
getDeadLetterQueue, getMaxEventAge, getRetryAttempts
-
Method Details
-
getCluster
Cluster where service will be deployed. -
getTaskDefinition
Task Definition of the task that should be started. -
getAssignPublicIp
Specifies whether the task's elastic network interface receives a public IP address.You can specify true only when LaunchType is set to FARGATE.
Default: - true if the subnet type is PUBLIC, otherwise false
-
getContainerOverrides
Container setting overrides.Key is the name of the container to override, value is the values you want to override.
-
getEnableExecuteCommand
Whether or not to enable the execute command functionality for the containers in this task.If true, this enables execute command functionality on all containers in the task.
Default: - false
-
getLaunchType
Specifies the launch type on which your task is running.The launch type that you specify here must match one of the launch type (compatibilities) of the target task.
Default: - 'EC2' if `isEc2Compatible` for the `taskDefinition` is true, otherwise 'FARGATE'
-
getPlatformVersion
The platform version on which to run your task.Unless you have specific compatibility requirements, you don't need to specify this.
Default: - ECS will set the Fargate platform version to 'LATEST'
- See Also:
-
getPropagateTags
Specifies whether to propagate the tags from the task definition to the task.If no value is specified, the tags are not propagated.
Default: - Tags will not be propagated
-
getRole
Existing IAM role to run the ECS task.Default: A new IAM role is created
-
getSecurityGroups
Existing security groups to use for the task's ENIs.(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
Default: A new security group is created
-
getSubnetSelection
In what subnets to place the task's ENIs.(Only applicable in case the TaskDefinition is configured for AwsVpc networking)
Default: Private subnets
-
getTags
The metadata that you apply to the task to help you categorize and organize them.Each tag consists of a key and an optional value, both of which you define.
Default: - No additional tags are applied to the task
-
getTaskCount
How many tasks should be started when this event is triggered.Default: 1
-
builder
- Returns:
- a
EcsTaskProps.Builder
ofEcsTaskProps
-