Class BaseServiceOptions.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.BaseServiceOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BaseServiceOptions>
- Enclosing interface:
BaseServiceOptions
@Stability(Stable)
public static final class BaseServiceOptions.Builder
extends Object
implements software.amazon.jsii.Builder<BaseServiceOptions>
A builder for
BaseServiceOptions
-
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()
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
BaseServiceOptions#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()
propagateTags
(PropagatedTagSource propagateTags) Sets the value ofBaseServiceOptions.getPropagateTags()
serviceConnectConfiguration
(ServiceConnectProps serviceConnectConfiguration) Sets the value ofBaseServiceOptions.getServiceConnectConfiguration()
serviceName
(String serviceName) Sets the value ofBaseServiceOptions.getServiceName()
taskDefinitionRevision
(TaskDefinitionRevision taskDefinitionRevision) Sets the value ofBaseServiceOptions.getTaskDefinitionRevision()
volumeConfigurations
(List<? extends ServiceManagedVolume> volumeConfigurations) Sets the value ofBaseServiceOptions.getVolumeConfigurations()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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 BaseServiceOptions.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 BaseServiceOptions.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 BaseServiceOptions.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 BaseServiceOptions.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 BaseServiceOptions.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 BaseServiceOptions.Builder enableEcsManagedTags(Boolean enableEcsManagedTags) Sets the value ofinvalid @link
BaseServiceOptions#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 BaseServiceOptions.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 BaseServiceOptions.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 BaseServiceOptions.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 BaseServiceOptions.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 BaseServiceOptions.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 BaseServiceOptions.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<BaseServiceOptions>
- Returns:
- a new instance of
BaseServiceOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-