Interface HttpTimeout

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
HttpTimeout.Jsii$Proxy

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:55:53.224Z") @Stability(Stable) public interface HttpTimeout extends software.amazon.jsii.JsiiSerializable
Represents timeouts for HTTP protocols.

Example:

 Mesh mesh;
 Service service;
 VirtualNode node = VirtualNode.Builder.create(this, "node")
         .mesh(mesh)
         .serviceDiscovery(ServiceDiscovery.cloudMap(service))
         .listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder()
                 .port(8080)
                 .healthCheck(HealthCheck.http(HttpHealthCheckOptions.builder()
                         .healthyThreshold(3)
                         .interval(Duration.seconds(5))
                         .path("/ping")
                         .timeout(Duration.seconds(2))
                         .unhealthyThreshold(2)
                         .build()))
                 .timeout(HttpTimeout.builder()
                         .idle(Duration.seconds(5))
                         .build())
                 .build())))
         .backendDefaults(BackendDefaults.builder()
                 .tlsClientPolicy(TlsClientPolicy.builder()
                         .validation(TlsValidation.builder()
                                 .trust(TlsValidationTrust.file("/keys/local_cert_chain.pem"))
                                 .build())
                         .build())
                 .build())
         .accessLog(AccessLog.fromFilePath("/dev/stdout"))
         .build();
 Tags.of(node).add("Environment", "Dev");
 
  • Method Details

    • getIdle

      @Stability(Stable) @Nullable default Duration getIdle()
      Represents an idle timeout.

      The amount of time that a connection may be idle.

      Default: - none

    • getPerRequest

      @Stability(Stable) @Nullable default Duration getPerRequest()
      Represents per request timeout.

      Default: - 15 s

    • builder

      @Stability(Stable) static HttpTimeout.Builder builder()
      Returns:
      a HttpTimeout.Builder of HttpTimeout