Interface EcsTaskProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
EcsTaskProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:47.728Z")
@Stability(Stable)
public interface EcsTaskProps
extends software.amazon.jsii.JsiiSerializable
Properties to define an ECS Event Task.
Example:
import software.amazon.awscdk.services.events.Rule; import software.amazon.awscdk.services.events.Schedule; import software.amazon.awscdk.services.events.targets.EcsTask; import software.amazon.awscdk.services.ecs.Cluster; import software.amazon.awscdk.services.ecs.TaskDefinition; import software.amazon.awscdk.services.iam.Role; Cluster cluster; TaskDefinition taskDefinition; Role role; EcsTask ecsTaskTarget = EcsTask.Builder.create().cluster(cluster).taskDefinition(taskDefinition).role(role).build(); Rule.Builder.create(this, "ScheduleRule") .schedule(Schedule.cron(CronOptions.builder().minute("0").hour("4").build())) .targets(List.of(ecsTaskTarget)) .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()
Cluster where service will be deployed.default List<ContainerOverride>
Container setting overrides.default FargatePlatformVersion
The platform version on which to run your task.default IRole
getRole()
Existing IAM role to run the ECS task.default ISecurityGroup
Deprecated.use securityGroups insteaddefault List<ISecurityGroup>
Existing security groups to use for the task's ENIs.default SubnetSelection
In what subnets to place the task's ENIs.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
-
Method Details
-
getCluster
Cluster where service will be deployed. -
getTaskDefinition
Task Definition of the task that should be started. -
getContainerOverrides
Container setting overrides.Key is the name of the container to override, value is the values you want to override.
-
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:
-
getRole
Existing IAM role to run the ECS task.Default: A new IAM role is created
-
getSecurityGroup
Deprecated.use securityGroups instead(deprecated) Existing security group 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
-
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
-
getTaskCount
How many tasks should be started when this event is triggered.Default: 1
-
builder
- Returns:
- a
EcsTaskProps.Builder
ofEcsTaskProps
-