Class EcsTarget.Builder

java.lang.Object
software.amazon.awscdk.services.ecs.EcsTarget.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<EcsTarget>
Enclosing interface:
EcsTarget

@Stability(Stable) public static final class EcsTarget.Builder extends Object implements software.amazon.jsii.Builder<EcsTarget>
A builder for EcsTarget
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • containerName

      @Stability(Stable) public EcsTarget.Builder containerName(String containerName)
      Parameters:
      containerName - The name of the container. This parameter is required.
      Returns:
      this
    • listener

      @Stability(Stable) public EcsTarget.Builder listener(ListenerConfig listener)
      Sets the value of EcsTarget.getListener()
      Parameters:
      listener - Listener and properties for adding target group to the listener. This parameter is required.
      Returns:
      this
    • newTargetGroupId

      @Stability(Stable) public EcsTarget.Builder newTargetGroupId(String newTargetGroupId)
      Parameters:
      newTargetGroupId - ID for a target group to be created. This parameter is required.
      Returns:
      this
    • containerPort

      @Stability(Stable) public EcsTarget.Builder containerPort(Number containerPort)
      Parameters:
      containerPort - The port number of the container. Only applicable when using application/network load balancers.
      Returns:
      this
    • protocol

      @Stability(Stable) public EcsTarget.Builder protocol(Protocol protocol)
      Sets the value of EcsTarget.getProtocol()
      Parameters:
      protocol - The protocol used for the port mapping. Only applicable when using application load balancers.
      Returns:
      this
    • build

      @Stability(Stable) public EcsTarget build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<EcsTarget>
      Returns:
      a new instance of EcsTarget
      Throws:
      NullPointerException - if any required attribute was not provided