Class ServiceConnectService.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • portMappingName

      @Stability(Stable) public ServiceConnectService.Builder portMappingName(String portMappingName)
      Parameters:
      portMappingName - portMappingName specifies which port and protocol combination should be used for this service connect service. This parameter is required.
      Returns:
      this
    • discoveryName

      @Stability(Stable) public ServiceConnectService.Builder discoveryName(String discoveryName)
      Parameters:
      discoveryName - Optionally specifies an intermediate dns name to register in the CloudMap namespace. This is required if you wish to use the same port mapping name in more than one service.
      Returns:
      this
    • dnsName

      @Stability(Stable) public ServiceConnectService.Builder dnsName(String dnsName)
      Parameters:
      dnsName - The terse DNS alias to use for this port mapping in the service connect mesh. Service Connect-enabled clients will be able to reach this service at http://dnsName:port.
      Returns:
      this
    • idleTimeout

      @Stability(Stable) public ServiceConnectService.Builder idleTimeout(Duration idleTimeout)
      Parameters:
      idleTimeout - The amount of time in seconds a connection for Service Connect will stay active while idle. A value of 0 can be set to disable idleTimeout.

      If idleTimeout is set to a time that is less than perRequestTimeout, the connection will close when the idleTimeout is reached and not the perRequestTimeout.

      Returns:
      this
    • ingressPortOverride

      @Stability(Stable) public ServiceConnectService.Builder ingressPortOverride(Number ingressPortOverride)
      Parameters:
      ingressPortOverride - Optional. The port on the Service Connect agent container to use for traffic ingress to this service.
      Returns:
      this
    • perRequestTimeout

      @Stability(Stable) public ServiceConnectService.Builder perRequestTimeout(Duration perRequestTimeout)
      Parameters:
      perRequestTimeout - The amount of time waiting for the upstream to respond with a complete response per request for Service Connect. A value of 0 can be set to disable perRequestTimeout. Can only be set when the appProtocol for the application container is HTTP/HTTP2/GRPC.

      If idleTimeout is set to a time that is less than perRequestTimeout, the connection will close when the idleTimeout is reached and not the perRequestTimeout.

      Returns:
      this
    • port

      @Stability(Stable) public ServiceConnectService.Builder port(Number port)
      Parameters:
      port - The port for clients to use to communicate with this service via Service Connect.
      Returns:
      this
    • build

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