Class FargateServiceProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.FargateServiceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FargateServiceProps>
- Enclosing interface:
FargateServiceProps
@Stability(Stable)
public static final class FargateServiceProps.Builder
extends Object
implements software.amazon.jsii.Builder<FargateServiceProps>
A builder for
FargateServiceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignPublicIp
(Boolean assignPublicIp) Sets the value ofFargateServiceProps.getAssignPublicIp()
build()
Builds the configured instance.capacityProviderStrategies
(List<? extends CapacityProviderStrategy> capacityProviderStrategies) Sets the value ofBaseServiceOptions.getCapacityProviderStrategies()
circuitBreaker
(DeploymentCircuitBreaker circuitBreaker) Sets the value ofBaseServiceOptions.getCircuitBreaker()
cloudMapOptions
(CloudMapOptions cloudMapOptions) Sets the value ofBaseServiceOptions.getCloudMapOptions()
Sets the value ofBaseServiceOptions.getCluster()
deploymentAlarms
(DeploymentAlarmConfig deploymentAlarms) Sets the value ofBaseServiceOptions.getDeploymentAlarms()
deploymentController
(DeploymentController deploymentController) Sets the value ofBaseServiceOptions.getDeploymentController()
desiredCount
(Number desiredCount) Sets the value ofBaseServiceOptions.getDesiredCount()
enableEcsManagedTags
(Boolean enableEcsManagedTags) Sets the value ofinvalid @link
FargateServiceProps#getEnableEcsManagedTags
enableExecuteCommand
(Boolean enableExecuteCommand) Sets the value ofBaseServiceOptions.getEnableExecuteCommand()
healthCheckGracePeriod
(Duration healthCheckGracePeriod) Sets the value ofBaseServiceOptions.getHealthCheckGracePeriod()
maxHealthyPercent
(Number maxHealthyPercent) Sets the value ofBaseServiceOptions.getMaxHealthyPercent()
minHealthyPercent
(Number minHealthyPercent) Sets the value ofBaseServiceOptions.getMinHealthyPercent()
platformVersion
(FargatePlatformVersion platformVersion) Sets the value ofFargateServiceProps.getPlatformVersion()
propagateTags
(PropagatedTagSource propagateTags) Sets the value ofBaseServiceOptions.getPropagateTags()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofFargateServiceProps.getSecurityGroups()
serviceConnectConfiguration
(ServiceConnectProps serviceConnectConfiguration) Sets the value ofBaseServiceOptions.getServiceConnectConfiguration()
serviceName
(String serviceName) Sets the value ofBaseServiceOptions.getServiceName()
taskDefinition
(TaskDefinition taskDefinition) Sets the value ofFargateServiceProps.getTaskDefinition()
taskDefinitionRevision
(TaskDefinitionRevision taskDefinitionRevision) Sets the value ofBaseServiceOptions.getTaskDefinitionRevision()
volumeConfigurations
(List<? extends ServiceManagedVolume> volumeConfigurations) Sets the value ofBaseServiceOptions.getVolumeConfigurations()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofFargateServiceProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
taskDefinition
Sets the value ofFargateServiceProps.getTaskDefinition()
- Parameters:
taskDefinition
- The task definition to use for tasks in the service. This parameter is required. [disable-awslint:ref-via-interface]- Returns:
this
-
assignPublicIp
Sets the value ofFargateServiceProps.getAssignPublicIp()
- Parameters:
assignPublicIp
- Specifies whether the task's elastic network interface receives a public IP address. If true, each task will receive a public IP address.- Returns:
this
-
platformVersion
@Stability(Stable) public FargateServiceProps.Builder platformVersion(FargatePlatformVersion platformVersion) Sets the value ofFargateServiceProps.getPlatformVersion()
- Parameters:
platformVersion
- 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.- Returns:
this
-
securityGroups
@Stability(Stable) public FargateServiceProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofFargateServiceProps.getSecurityGroups()
- Parameters:
securityGroups
- The security groups to associate with the service. If you do not specify a security group, a new security group is created.- Returns:
this
-
vpcSubnets
Sets the value ofFargateServiceProps.getVpcSubnets()
- Parameters:
vpcSubnets
- The subnets to associate with the service.- Returns:
this
-
cluster
Sets the value ofBaseServiceOptions.getCluster()
- Parameters:
cluster
- The name of the cluster that hosts the service. This parameter is required.- Returns:
this
-
capacityProviderStrategies
@Stability(Stable) public FargateServiceProps.Builder capacityProviderStrategies(List<? extends CapacityProviderStrategy> capacityProviderStrategies) Sets the value ofBaseServiceOptions.getCapacityProviderStrategies()
- Parameters:
capacityProviderStrategies
- A list of Capacity Provider strategies used to place a service.- Returns:
this
-
circuitBreaker
@Stability(Stable) public FargateServiceProps.Builder circuitBreaker(DeploymentCircuitBreaker circuitBreaker) Sets the value ofBaseServiceOptions.getCircuitBreaker()
- Parameters:
circuitBreaker
- Whether to enable the deployment circuit breaker. If this property is defined, circuit breaker will be implicitly enabled.- Returns:
this
-
cloudMapOptions
@Stability(Stable) public FargateServiceProps.Builder cloudMapOptions(CloudMapOptions cloudMapOptions) Sets the value ofBaseServiceOptions.getCloudMapOptions()
- Parameters:
cloudMapOptions
- The options for configuring an Amazon ECS service to use service discovery.- Returns:
this
-
deploymentAlarms
@Stability(Stable) public FargateServiceProps.Builder deploymentAlarms(DeploymentAlarmConfig deploymentAlarms) Sets the value ofBaseServiceOptions.getDeploymentAlarms()
- Parameters:
deploymentAlarms
- The alarm(s) to monitor during deployment, and behavior to apply if at least one enters a state of alarm during the deployment or bake time.- Returns:
this
-
deploymentController
@Stability(Stable) public FargateServiceProps.Builder deploymentController(DeploymentController deploymentController) Sets the value ofBaseServiceOptions.getDeploymentController()
- Parameters:
deploymentController
- Specifies which deployment controller to use for the service. For more information, see Amazon ECS Deployment Types- Returns:
this
-
desiredCount
Sets the value ofBaseServiceOptions.getDesiredCount()
- Parameters:
desiredCount
- The desired number of instantiations of the task definition to keep running on the service.- Returns:
this
-
enableEcsManagedTags
@Stability(Stable) public FargateServiceProps.Builder enableEcsManagedTags(Boolean enableEcsManagedTags) Sets the value ofinvalid @link
FargateServiceProps#getEnableEcsManagedTags
- Parameters:
enableEcsManagedTags
- Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see Tagging Your Amazon ECS Resources- Returns:
this
-
enableExecuteCommand
@Stability(Stable) public FargateServiceProps.Builder enableExecuteCommand(Boolean enableExecuteCommand) Sets the value ofBaseServiceOptions.getEnableExecuteCommand()
- Parameters:
enableExecuteCommand
- Whether to enable the ability to execute into a container.- Returns:
this
-
healthCheckGracePeriod
@Stability(Stable) public FargateServiceProps.Builder healthCheckGracePeriod(Duration healthCheckGracePeriod) Sets the value ofBaseServiceOptions.getHealthCheckGracePeriod()
- Parameters:
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.- Returns:
this
-
maxHealthyPercent
Sets the value ofBaseServiceOptions.getMaxHealthyPercent()
- Parameters:
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.- Returns:
this
-
minHealthyPercent
Sets the value ofBaseServiceOptions.getMinHealthyPercent()
- Parameters:
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.- Returns:
this
-
propagateTags
@Stability(Stable) public FargateServiceProps.Builder propagateTags(PropagatedTagSource propagateTags) Sets the value ofBaseServiceOptions.getPropagateTags()
- Parameters:
propagateTags
- Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE- Returns:
this
-
serviceConnectConfiguration
@Stability(Stable) public FargateServiceProps.Builder serviceConnectConfiguration(ServiceConnectProps serviceConnectConfiguration) Sets the value ofBaseServiceOptions.getServiceConnectConfiguration()
- Parameters:
serviceConnectConfiguration
- Configuration for Service Connect.- Returns:
this
-
serviceName
Sets the value ofBaseServiceOptions.getServiceName()
- Parameters:
serviceName
- The name of the service.- Returns:
this
-
taskDefinitionRevision
@Stability(Stable) public FargateServiceProps.Builder taskDefinitionRevision(TaskDefinitionRevision taskDefinitionRevision) Sets the value ofBaseServiceOptions.getTaskDefinitionRevision()
- Parameters:
taskDefinitionRevision
- Revision number for the task definition orlatest
to use the latest active task revision.- Returns:
this
-
volumeConfigurations
@Stability(Stable) public FargateServiceProps.Builder volumeConfigurations(List<? extends ServiceManagedVolume> volumeConfigurations) Sets the value ofBaseServiceOptions.getVolumeConfigurations()
- Parameters:
volumeConfigurations
- Configuration details for a volume used by the service. This allows you to specify details about the EBS volume that can be attched to ECS tasks.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<FargateServiceProps>
- Returns:
- a new instance of
FargateServiceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-