Class LoadBalancerTargetOptions.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.LoadBalancerTargetOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LoadBalancerTargetOptions>
- Enclosing interface:
LoadBalancerTargetOptions
@Stability(Stable)
public static final class LoadBalancerTargetOptions.Builder
extends Object
implements software.amazon.jsii.Builder<LoadBalancerTargetOptions>
A builder for
LoadBalancerTargetOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.containerName
(String containerName) Sets the value ofLoadBalancerTargetOptions.getContainerName()
containerPort
(Number containerPort) Sets the value ofLoadBalancerTargetOptions.getContainerPort()
Sets the value ofLoadBalancerTargetOptions.getProtocol()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
containerName
Sets the value ofLoadBalancerTargetOptions.getContainerName()
- Parameters:
containerName
- The name of the container. This parameter is required.- Returns:
this
-
containerPort
Sets the value ofLoadBalancerTargetOptions.getContainerPort()
- Parameters:
containerPort
- The port number of the container. Only applicable when using application/network load balancers.- Returns:
this
-
protocol
Sets the value ofLoadBalancerTargetOptions.getProtocol()
- Parameters:
protocol
- The protocol used for the port mapping. Only applicable when using application load balancers.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LoadBalancerTargetOptions>
- Returns:
- a new instance of
LoadBalancerTargetOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-