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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.discoveryName
(String discoveryName) Sets the value ofServiceConnectService.getDiscoveryName()
Sets the value ofServiceConnectService.getDnsName()
idleTimeout
(Duration idleTimeout) Sets the value ofServiceConnectService.getIdleTimeout()
ingressPortOverride
(Number ingressPortOverride) Sets the value ofServiceConnectService.getIngressPortOverride()
perRequestTimeout
(Duration perRequestTimeout) Sets the value ofServiceConnectService.getPerRequestTimeout()
Sets the value ofServiceConnectService.getPort()
portMappingName
(String portMappingName) Sets the value ofServiceConnectService.getPortMappingName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
portMappingName
Sets the value ofServiceConnectService.getPortMappingName()
- Parameters:
portMappingName
- portMappingName specifies which port and protocol combination should be used for this service connect service. This parameter is required.- Returns:
this
-
discoveryName
Sets the value ofServiceConnectService.getDiscoveryName()
- 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
Sets the value ofServiceConnectService.getDnsName()
- 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
Sets the value ofServiceConnectService.getIdleTimeout()
- 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 disableidleTimeout
.If
idleTimeout
is set to a time that is less thanperRequestTimeout
, the connection will close when theidleTimeout
is reached and not theperRequestTimeout
.- Returns:
this
-
ingressPortOverride
@Stability(Stable) public ServiceConnectService.Builder ingressPortOverride(Number ingressPortOverride) Sets the value ofServiceConnectService.getIngressPortOverride()
- 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) Sets the value ofServiceConnectService.getPerRequestTimeout()
- 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 disableperRequestTimeout
. Can only be set when theappProtocol
for the application container is HTTP/HTTP2/GRPC.If
idleTimeout
is set to a time that is less thanperRequestTimeout
, the connection will close when theidleTimeout
is reached and not theperRequestTimeout
.- Returns:
this
-
port
Sets the value ofServiceConnectService.getPort()
- Parameters:
port
- The port for clients to use to communicate with this service via Service Connect.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServiceConnectService>
- Returns:
- a new instance of
ServiceConnectService
- Throws:
NullPointerException
- if any required attribute was not provided
-