@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.692Z") @Stability(value=Stable) public interface Ec2ServiceProps extends software.amazon.jsii.JsiiSerializable, 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 Boolean |
getAssignPublicIp()
Specifies whether the task's elastic network interface receives a public IP address.
|
default Boolean |
getDaemon()
Specifies whether the service will use the daemon scheduling strategy.
|
default List<PlacementConstraint> |
getPlacementConstraints()
The placement constraints to use for tasks in the service.
|
default List<PlacementStrategy> |
getPlacementStrategies()
The placement strategies to use for tasks in the service.
|
default 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, getServiceName@Stability(value=Stable) @NotNull TaskDefinition getTaskDefinition()
[disable-awslint:ref-via-interface]
@Stability(value=Stable) @Nullable default 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
@Stability(value=Stable) @Nullable default 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
@Stability(value=Stable) @Nullable default List<PlacementConstraint> getPlacementConstraints()
For more information, see Amazon ECS Task Placement Constraints.
Default: - No constraints.
@Stability(value=Stable) @Nullable default List<PlacementStrategy> getPlacementStrategies()
For more information, see Amazon ECS Task Placement Strategies.
Default: - No strategies.
@Stability(value=Stable) @Nullable default 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.
@Stability(value=Stable) @Nullable 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.
@Stability(value=Stable) static Ec2ServiceProps.Builder builder()
builder in interface BaseServiceOptionsEc2ServiceProps.Builder of Ec2ServicePropsCopyright © 2022. All rights reserved.