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