Class ExternalServiceProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.ExternalServiceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ExternalServiceProps>
- Enclosing interface:
ExternalServiceProps
@Stability(Stable)
public static final class ExternalServiceProps.Builder
extends Object
implements software.amazon.jsii.Builder<ExternalServiceProps>
A builder for
ExternalServiceProps
-
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
ExternalServiceProps#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()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofExternalServiceProps.getSecurityGroups()
serviceConnectConfiguration
(ServiceConnectProps serviceConnectConfiguration) Sets the value ofBaseServiceOptions.getServiceConnectConfiguration()
serviceName
(String serviceName) Sets the value ofBaseServiceOptions.getServiceName()
taskDefinition
(TaskDefinition taskDefinition) Sets the value ofExternalServiceProps.getTaskDefinition()
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
-
taskDefinition
@Stability(Stable) public ExternalServiceProps.Builder taskDefinition(TaskDefinition taskDefinition) Sets the value ofExternalServiceProps.getTaskDefinition()
- Parameters:
taskDefinition
- The task definition to use for tasks in the service. This parameter is required. [disable-awslint:ref-via-interface]- Returns:
this
-
securityGroups
@Stability(Stable) public ExternalServiceProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofExternalServiceProps.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
-
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 ExternalServiceProps.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 ExternalServiceProps.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 ExternalServiceProps.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 ExternalServiceProps.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 ExternalServiceProps.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 ExternalServiceProps.Builder enableEcsManagedTags(Boolean enableEcsManagedTags) Sets the value ofinvalid @link
ExternalServiceProps#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 ExternalServiceProps.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 ExternalServiceProps.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 ExternalServiceProps.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 ExternalServiceProps.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 ExternalServiceProps.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 ExternalServiceProps.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<ExternalServiceProps>
- Returns:
- a new instance of
ExternalServiceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-