Skip to content

HttpRetryPolicy

Source code in docs_src/capo_app_mesh/types/http_retry_policy.py
class HttpRetryPolicy(TypedDict, closed=True):
    per_retry_timeout: "capo_app_mesh.types.duration.Duration"
    """<p>The timeout for each retry attempt.</p>"""
    max_retries: "capo_app_mesh.types.max_retries.MaxRetries"
    """<p>The maximum number of retry attempts.</p>"""
    http_retry_events: NotRequired[
        "capo_app_mesh.types.http_retry_policy_events.HttpRetryPolicyEvents"
    ]
    """<p>Specify at least one of the following values.</p> <ul> <li> <p> <b>server-error</b> – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511</p> </li> <li> <p> <b>gateway-error</b> – HTTP status codes 502, 503, and 504</p> </li> <li> <p> <b>client-error</b> – HTTP status code 409</p> </li> <li> <p> <b>stream-error</b> – Retry on refused stream</p> </li> </ul>"""
    tcp_retry_events: NotRequired[
        "capo_app_mesh.types.tcp_retry_policy_events.TcpRetryPolicyEvents"
    ]
    """<p>Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.</p>"""

http_retry_events instance-attribute

http_retry_events: NotRequired[HttpRetryPolicyEvents]

Specify at least one of the following values.

  • server-error – HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511

  • gateway-error – HTTP status codes 502, 503, and 504

  • client-error – HTTP status code 409

  • stream-error – Retry on refused stream

max_retries instance-attribute

max_retries: MaxRetries

The maximum number of retry attempts.

per_retry_timeout instance-attribute

per_retry_timeout: Duration

The timeout for each retry attempt.

tcp_retry_events instance-attribute

tcp_retry_events: NotRequired[TcpRetryPolicyEvents]

Specify a valid value. The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable.