Configuration
in package
Resolves the default socket (inactivity) timeout for a service, in seconds.
This is the single home for every decision in the default-socket-timeout feature: the opt-in gate, the per-service tier lookup, and the millisecond to second conversion. Keeping it independent of the client (and of DefaultsMode) makes each branch unit-testable without constructing a client, and guarantees the millisecond/second boundary is crossed in exactly one place.
The feature exists to eliminate the "no socket timeout at all" case, where a connection establishes, exchanges some bytes, then goes silent and hangs until the OS gives up. See the Socket Read Timeout Risk Mitigation SEP.
Table of Contents
Methods
- resolve() : int|null
- Resolve the inactivity timeout, in SECONDS, for a service, or null when no timeout should be attached (gate off, or the service is fully exempt).
Methods
resolve()
Resolve the inactivity timeout, in SECONDS, for a service, or null when no timeout should be attached (gate off, or the service is fully exempt).
public
static resolve(string $serviceId) : int|null
Parameters
- $serviceId : string
-
The service's sdkId, from Service::getMetadata('serviceId'). The tier table is keyed by this exact value (e.g. "S3", "Kinesis", "Bedrock Runtime").
Return values
int|null —Seconds for cURL's CURLOPT_LOW_SPEED_TIME, or null.