@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-07-06T20:02:57.001Z") public interface Ec2ServiceProps extends BaseServiceOptions
Example:
Cluster cluster; TaskDefinition taskDefinition; Vpc vpc; Ec2Service service = Ec2Service.Builder.create(this, "Service").cluster(cluster).taskDefinition(taskDefinition).build(); LoadBalancer lb = LoadBalancer.Builder.create(this, "LB").vpc(vpc).build(); lb.addListener(LoadBalancerListener.builder().externalPort(80).build()); lb.addTarget(service.loadBalancerTarget(LoadBalancerTargetOptions.builder() .containerName("MyContainer") .containerPort(80) .build()));
Modifier and Type | Interface and Description |
---|---|
static class |
Ec2ServiceProps.Builder
A builder for
Ec2ServiceProps |
static class |
Ec2ServiceProps.Jsii$Proxy
An implementation for
Ec2ServiceProps |
Modifier and Type | Method and Description |
---|---|
static Ec2ServiceProps.Builder |
builder() |
default java.lang.Boolean |
getAssignPublicIp()
Specifies whether the task's elastic network interface receives a public IP address.
|
default java.lang.Boolean |
getDaemon()
Specifies whether the service will use the daemon scheduling strategy.
|
default java.util.List<PlacementConstraint> |
getPlacementConstraints()
The placement constraints to use for tasks in the service.
|
default java.util.List<PlacementStrategy> |
getPlacementStrategies()
The placement strategies to use for tasks in the service.
|
default ISecurityGroup |
getSecurityGroup()
Deprecated.
use securityGroups instead.
|
default java.util.List<ISecurityGroup> |
getSecurityGroups()
The security groups to associate with the service.
|
TaskDefinition |
getTaskDefinition()
The task definition to use for tasks in the service.
|
default SubnetSelection |
getVpcSubnets()
The subnets to associate with the service.
|
getCapacityProviderStrategies, getCircuitBreaker, getCloudMapOptions, getCluster, getDeploymentController, getDesiredCount, getEnableECSManagedTags, getEnableExecuteCommand, getHealthCheckGracePeriod, getMaxHealthyPercent, getMinHealthyPercent, getPropagateTags, getPropagateTaskTagsFrom, getServiceName
TaskDefinition getTaskDefinition()
[disable-awslint:ref-via-interface]
default java.lang.Boolean getAssignPublicIp()
If true, each task will receive a public IP address.
This property is only used for tasks that use the awsvpc network mode.
Default: false
default java.lang.Boolean getDaemon()
If true, the service scheduler deploys exactly one task on each container instance in your cluster.
When you are using this strategy, do not specify a desired number of tasks orany task placement strategies.
Default: false
default java.util.List<PlacementConstraint> getPlacementConstraints()
For more information, see Amazon ECS Task Placement Constraints.
Default: - No constraints.
default java.util.List<PlacementStrategy> getPlacementStrategies()
For more information, see Amazon ECS Task Placement Strategies.
Default: - No strategies.
@Deprecated default ISecurityGroup getSecurityGroup()
If you do not specify a security group, a new security group is created.
This property is only used for tasks that use the awsvpc network mode.
Default: - A new security group is created.
default java.util.List<ISecurityGroup> getSecurityGroups()
If you do not specify a security group, a new security group is created.
This property is only used for tasks that use the awsvpc network mode.
Default: - A new security group is created.
default SubnetSelection getVpcSubnets()
This property is only used for tasks that use the awsvpc network mode.
Default: - Public subnets if `assignPublicIp` is set, otherwise the first available one of Private, Isolated, Public, in that order.
static Ec2ServiceProps.Builder builder()
builder
in interface BaseServiceOptions
Ec2ServiceProps.Builder
of Ec2ServiceProps