Class BaseServiceProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.BaseServiceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BaseServiceProps>
- Enclosing interface:
- BaseServiceProps
@Stability(Stable)
public static final class BaseServiceProps.Builder
extends Object
implements software.amazon.jsii.Builder<BaseServiceProps>
A builder for
BaseServiceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
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()
deploymentController
(DeploymentController deploymentController) Sets the value ofBaseServiceOptions.getDeploymentController()
desiredCount
(Number desiredCount) Sets the value ofBaseServiceOptions.getDesiredCount()
enableEcsManagedTags
(Boolean enableEcsManagedTags) Sets the value ofBaseServiceProps#getEnableEcsManagedTags
enableExecuteCommand
(Boolean enableExecuteCommand) Sets the value ofBaseServiceOptions.getEnableExecuteCommand()
healthCheckGracePeriod
(Duration healthCheckGracePeriod) Sets the value ofBaseServiceOptions.getHealthCheckGracePeriod()
launchType
(LaunchType launchType) Sets the value ofBaseServiceProps.getLaunchType()
maxHealthyPercent
(Number maxHealthyPercent) Sets the value ofBaseServiceOptions.getMaxHealthyPercent()
minHealthyPercent
(Number minHealthyPercent) Sets the value ofBaseServiceOptions.getMinHealthyPercent()
propagateTags
(PropagatedTagSource propagateTags) Sets the value ofBaseServiceOptions.getPropagateTags()
propagateTaskTagsFrom
(PropagatedTagSource propagateTaskTagsFrom) Deprecated.Use `propagateTags` instead.serviceName
(String serviceName) Sets the value ofBaseServiceOptions.getServiceName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
launchType
Sets the value ofBaseServiceProps.getLaunchType()
- Parameters:
launchType
- The launch type on which to run your service. This parameter is required. LaunchType will be omitted if capacity provider strategies are specified on 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 BaseServiceProps.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 BaseServiceProps.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
Sets the value ofBaseServiceOptions.getCloudMapOptions()
- Parameters:
cloudMapOptions
- The options for configuring an Amazon ECS service to use service discovery.- Returns:
this
-
deploymentController
@Stability(Stable) public BaseServiceProps.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 BaseServiceProps.Builder enableEcsManagedTags(Boolean enableEcsManagedTags) Sets the value ofBaseServiceProps#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 BaseServiceProps.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 BaseServiceProps.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
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
-
propagateTaskTagsFrom
@Stability(Deprecated) @Deprecated public BaseServiceProps.Builder propagateTaskTagsFrom(PropagatedTagSource propagateTaskTagsFrom) Deprecated.Use `propagateTags` instead.Sets the value ofBaseServiceOptions.getPropagateTaskTagsFrom()
- Parameters:
propagateTaskTagsFrom
- Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. Tags can only be propagated to the tasks within the service during service creation.- Returns:
this
-
serviceName
Sets the value ofBaseServiceOptions.getServiceName()
- Parameters:
serviceName
- The name of the service.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BaseServiceProps>
- Returns:
- a new instance of
BaseServiceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-