HttpTimeout

class aws_cdk.aws_appmesh.HttpTimeout(*, idle=None, per_request=None)

Bases: object

Represents timeouts for HTTP protocols.

Parameters:
  • idle (Optional[Duration]) – Represents an idle timeout. The amount of time that a connection may be idle. Default: - none

  • per_request (Optional[Duration]) – Represents per request timeout. Default: - 15 s

ExampleMetadata:

infused

Example:

# mesh: appmesh.Mesh
# service: cloudmap.Service


node = appmesh.VirtualNode(self, "node",
    mesh=mesh,
    service_discovery=appmesh.ServiceDiscovery.cloud_map(service),
    listeners=[appmesh.VirtualNodeListener.http(
        port=8080,
        health_check=appmesh.HealthCheck.http(
            healthy_threshold=3,
            interval=cdk.Duration.seconds(5),
            path="/ping",
            timeout=cdk.Duration.seconds(2),
            unhealthy_threshold=2
        ),
        timeout=appmesh.HttpTimeout(
            idle=cdk.Duration.seconds(5)
        )
    )],
    backend_defaults=appmesh.BackendDefaults(
        tls_client_policy=appmesh.TlsClientPolicy(
            validation=appmesh.TlsValidation(
                trust=appmesh.TlsValidationTrust.file("/keys/local_cert_chain.pem")
            )
        )
    ),
    access_log=appmesh.AccessLog.from_file_path("/dev/stdout")
)

cdk.Tags.of(node).add("Environment", "Dev")

Attributes

idle

Represents an idle timeout.

The amount of time that a connection may be idle.

Default:
  • none

per_request

Represents per request timeout.

Default:
  • 15 s