Class ApplicationTargetProps.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.patterns.ApplicationTargetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApplicationTargetProps>
- Enclosing interface:
ApplicationTargetProps
@Stability(Stable)
public static final class ApplicationTargetProps.Builder
extends Object
implements software.amazon.jsii.Builder<ApplicationTargetProps>
A builder for
ApplicationTargetProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.containerPort
(Number containerPort) Sets the value ofApplicationTargetProps.getContainerPort()
hostHeader
(String hostHeader) Sets the value ofApplicationTargetProps.getHostHeader()
Sets the value ofApplicationTargetProps.getListener()
pathPattern
(String pathPattern) Sets the value ofApplicationTargetProps.getPathPattern()
Sets the value ofApplicationTargetProps.getPriority()
Sets the value ofApplicationTargetProps.getProtocol()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
containerPort
Sets the value ofApplicationTargetProps.getContainerPort()
- Parameters:
containerPort
- The port number of the container. This parameter is required. Only applicable when using application/network load balancers.- Returns:
this
-
hostHeader
Sets the value ofApplicationTargetProps.getHostHeader()
- Parameters:
hostHeader
- Rule applies if the requested host matches the indicated host. May contain up to three '*' wildcards.Requires that priority is set.
- Returns:
this
-
listener
Sets the value ofApplicationTargetProps.getListener()
- Parameters:
listener
- Name of the listener the target group attached to.- Returns:
this
-
pathPattern
Sets the value ofApplicationTargetProps.getPathPattern()
- Parameters:
pathPattern
- Rule applies if the requested path matches the given path pattern. May contain up to three '*' wildcards.Requires that priority is set.
- Returns:
this
-
priority
Sets the value ofApplicationTargetProps.getPriority()
- Parameters:
priority
- Priority of this target group. The rule with the lowest priority will be used for every request. If priority is not given, these target groups will be added as defaults, and must not have conditions.Priorities must be unique.
- Returns:
this
-
protocol
Sets the value ofApplicationTargetProps.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<ApplicationTargetProps>
- Returns:
- a new instance of
ApplicationTargetProps
- Throws:
NullPointerException
- if any required attribute was not provided
-