@Stability(value=Stable) public static final class FargateService.Builder extends Object implements software.amazon.jsii.Builder<FargateService>
FargateService
.Modifier and Type | Method and Description |
---|---|
FargateService.Builder |
assignPublicIp(Boolean assignPublicIp)
Specifies whether the task's elastic network interface receives a public IP address.
|
FargateService |
build() |
FargateService.Builder |
capacityProviderStrategies(List<? extends CapacityProviderStrategy> capacityProviderStrategies)
A list of Capacity Provider strategies used to place a service.
|
FargateService.Builder |
circuitBreaker(DeploymentCircuitBreaker circuitBreaker)
Whether to enable the deployment circuit breaker.
|
FargateService.Builder |
cloudMapOptions(CloudMapOptions cloudMapOptions)
The options for configuring an Amazon ECS service to use service discovery.
|
FargateService.Builder |
cluster(ICluster cluster)
The name of the cluster that hosts the service.
|
static FargateService.Builder |
create(software.constructs.Construct scope,
String id) |
FargateService.Builder |
deploymentController(DeploymentController deploymentController)
Specifies which deployment controller to use for the service.
|
FargateService.Builder |
desiredCount(Number desiredCount)
The desired number of instantiations of the task definition to keep running on the service.
|
FargateService.Builder |
enableEcsManagedTags(Boolean enableEcsManagedTags)
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
|
FargateService.Builder |
healthCheckGracePeriod(Duration healthCheckGracePeriod)
The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
|
FargateService.Builder |
maxHealthyPercent(Number maxHealthyPercent)
The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
|
FargateService.Builder |
minHealthyPercent(Number minHealthyPercent)
The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
|
FargateService.Builder |
platformVersion(FargatePlatformVersion platformVersion)
The platform version on which to run your service.
|
FargateService.Builder |
propagateTags(PropagatedTagSource propagateTags)
Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
|
FargateService.Builder |
propagateTaskTagsFrom(PropagatedTagSource propagateTaskTagsFrom)
Deprecated.
Use `propagateTags` instead.
|
FargateService.Builder |
securityGroup(ISecurityGroup securityGroup)
Deprecated.
use securityGroups instead.
|
FargateService.Builder |
securityGroups(List<? extends ISecurityGroup> securityGroups)
The security groups to associate with the service.
|
FargateService.Builder |
serviceName(String serviceName)
The name of the service.
|
FargateService.Builder |
taskDefinition(TaskDefinition taskDefinition)
The task definition to use for tasks in the service.
|
FargateService.Builder |
vpcSubnets(SubnetSelection vpcSubnets)
The subnets to associate with the service.
|
@Stability(value=Stable) public static FargateService.Builder create(software.constructs.Construct scope, String id)
scope
- This parameter is required.id
- This parameter is required.FargateService.Builder
.@Stability(value=Stable) public FargateService.Builder cluster(ICluster cluster)
cluster
- The name of the cluster that hosts the service. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder capacityProviderStrategies(List<? extends CapacityProviderStrategy> capacityProviderStrategies)
Default: - undefined
capacityProviderStrategies
- A list of Capacity Provider strategies used to place a service. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder circuitBreaker(DeploymentCircuitBreaker circuitBreaker)
If this property is defined, circuit breaker will be implicitly enabled.
Default: - disabled
circuitBreaker
- Whether to enable the deployment circuit breaker. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder cloudMapOptions(CloudMapOptions cloudMapOptions)
Default: - AWS Cloud Map service discovery is not enabled.
cloudMapOptions
- The options for configuring an Amazon ECS service to use service discovery. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder deploymentController(DeploymentController deploymentController)
For more information, see Amazon ECS Deployment Types
Default: - Rolling update (ECS)
deploymentController
- Specifies which deployment controller to use for the service. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder desiredCount(Number desiredCount)
Default: - When creating the service, default is 1; when updating the service, default uses the current task number.
desiredCount
- The desired number of instantiations of the task definition to keep running on the service. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder enableEcsManagedTags(Boolean enableEcsManagedTags)
For more information, see Tagging Your Amazon ECS Resources
Default: false
enableEcsManagedTags
- Specifies whether to enable Amazon ECS managed tags for the tasks within the service. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder healthCheckGracePeriod(Duration healthCheckGracePeriod)
Default: - defaults to 60 seconds if at least one load balancer is in-use and it is not already set
healthCheckGracePeriod
- The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder maxHealthyPercent(Number maxHealthyPercent)
Default: - 100 if daemon, otherwise 200
maxHealthyPercent
- The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder minHealthyPercent(Number minHealthyPercent)
Default: - 0 if daemon, otherwise 50
minHealthyPercent
- The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder propagateTags(PropagatedTagSource propagateTags)
Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE
Default: PropagatedTagSource.NONE
propagateTags
- Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder serviceName(String serviceName)
Default: - CloudFormation-generated name.
serviceName
- The name of the service. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder taskDefinition(TaskDefinition taskDefinition)
[disable-awslint:ref-via-interface]
taskDefinition
- The task definition to use for tasks in the service. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder assignPublicIp(Boolean assignPublicIp)
If true, each task will receive a public IP address.
Default: false
assignPublicIp
- Specifies whether the task's elastic network interface receives a public IP address. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder platformVersion(FargatePlatformVersion platformVersion)
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
platformVersion
- The platform version on which to run your service. This parameter is required.this
@Stability(value=Deprecated) @Deprecated public FargateService.Builder propagateTaskTagsFrom(PropagatedTagSource propagateTaskTagsFrom)
Tags can only be propagated to the tasks within the service during service creation.
Default: PropagatedTagSource.NONE
propagateTaskTagsFrom
- Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. This parameter is required.this
@Stability(value=Deprecated) @Deprecated public FargateService.Builder securityGroup(ISecurityGroup securityGroup)
If you do not specify a security group, the default security group for the VPC is used.
Default: - A new security group is created.
securityGroup
- The security groups to associate with the service. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder securityGroups(List<? extends ISecurityGroup> securityGroups)
If you do not specify a security group, the default security group for the VPC is used.
Default: - A new security group is created.
securityGroups
- The security groups to associate with the service. This parameter is required.this
@Stability(value=Stable) public FargateService.Builder vpcSubnets(SubnetSelection vpcSubnets)
Default: - Public subnets if `assignPublicIp` is set, otherwise the first available one of Private, Isolated, Public, in that order.
vpcSubnets
- The subnets to associate with the service. This parameter is required.this
@Stability(value=Stable) public FargateService build()
build
in interface software.amazon.jsii.Builder<FargateService>
Copyright © 2021. All rights reserved.