Interface FargateServiceProps
- All Superinterfaces:
BaseServiceOptions
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
FargateServiceProps.Jsii$Proxy
Example:
Cluster cluster; TaskDefinition taskDefinition; Vpc vpc; FargateService service = FargateService.Builder.create(this, "Service").cluster(cluster).taskDefinition(taskDefinition).minHealthyPercent(100).build(); ApplicationLoadBalancer lb = ApplicationLoadBalancer.Builder.create(this, "LB").vpc(vpc).internetFacing(true).build(); ApplicationListener listener = lb.addListener("Listener", BaseApplicationListenerProps.builder().port(80).build()); service.registerLoadBalancerTargets(EcsTarget.builder() .containerName("web") .containerPort(80) .newTargetGroupId("ECS") .listener(ListenerConfig.applicationListener(listener, AddApplicationTargetsProps.builder() .protocol(ApplicationProtocol.HTTPS) .build())) .build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forFargateServiceProps
static final class
An implementation forFargateServiceProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic FargateServiceProps.Builder
builder()
default Boolean
Specifies whether the task's elastic network interface receives a public IP address.default AvailabilityZoneRebalancing
Whether to use Availability Zone rebalancing for the service.default FargatePlatformVersion
The platform version on which to run your service.default List<ISecurityGroup>
The security groups to associate with the service.The task definition to use for tasks in the service.default SubnetSelection
The subnets to associate with the service.Methods inherited from interface software.amazon.awscdk.services.ecs.BaseServiceOptions
getCapacityProviderStrategies, getCircuitBreaker, getCloudMapOptions, getCluster, getDeploymentAlarms, getDeploymentController, getDesiredCount, getEnableECSManagedTags, getEnableExecuteCommand, getHealthCheckGracePeriod, getMaxHealthyPercent, getMinHealthyPercent, getPropagateTags, getServiceConnectConfiguration, getServiceName, getTaskDefinitionRevision, getVolumeConfigurations
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getTaskDefinition
The task definition to use for tasks in the service.[disable-awslint:ref-via-interface]
-
getAssignPublicIp
Specifies whether the task's elastic network interface receives a public IP address.If true, each task will receive a public IP address.
Default: false
-
getAvailabilityZoneRebalancing
Whether to use Availability Zone rebalancing for the service.If enabled,
maxHealthyPercent
must be greater than 100, and the service must not be a target of a Classic Load Balancer.Default: AvailabilityZoneRebalancing.DISABLED
- See Also:
-
getPlatformVersion
The platform version on which to run your service.If one is not specified, the LATEST platform version is used by default. For more information, see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
Default: Latest
-
getSecurityGroups
The security groups to associate with the service.If you do not specify a security group, a new security group is created.
Default: - A new security group is created.
-
getVpcSubnets
The subnets to associate with the service.Default: - Public subnets if `assignPublicIp` is set, otherwise the first available one of Private, Isolated, Public, in that order.
-
builder
- Returns:
- a
FargateServiceProps.Builder
ofFargateServiceProps
-