Interface FargateServiceProps
- All Superinterfaces:
BaseServiceOptions
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
FargateServiceProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:47.345Z")
@Stability(Stable)
public interface FargateServiceProps
extends software.amazon.jsii.JsiiSerializable, BaseServiceOptions
The properties for defining a service using the Fargate launch type.
Example:
Cluster cluster; TaskDefinition taskDefinition; Vpc vpc; FargateService service = FargateService.Builder.create(this, "Service").cluster(cluster).taskDefinition(taskDefinition).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
Modifier 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 FargatePlatformVersion
The platform version on which to run your service.default ISecurityGroup
Deprecated.use securityGroups instead.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, getDeploymentController, getDesiredCount, getEnableECSManagedTags, getEnableExecuteCommand, getHealthCheckGracePeriod, getMaxHealthyPercent, getMinHealthyPercent, getPropagateTags, getPropagateTaskTagsFrom, getServiceName
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
-
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
-
getSecurityGroup
Deprecated.use securityGroups instead.(deprecated) 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.
-
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
-