/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include An object that represents a retry policy. Specify at least one value for at
* least one of the types of RetryEvents
, a value for
* maxRetries
, and a value for perRetryTimeout
. Both
* server-error
and gateway-error
under
* httpRetryEvents
include the Envoy reset
policy. For
* more information on the reset
policy, see the Envoy
* documentation.See Also:
AWS
* API Reference
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
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
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
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
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
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
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
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
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
The maximum number of retry attempts.
*/ inline long long GetMaxRetries() const{ return m_maxRetries; } /** *The maximum number of retry attempts.
*/ inline bool MaxRetriesHasBeenSet() const { return m_maxRetriesHasBeenSet; } /** *The maximum number of retry attempts.
*/ inline void SetMaxRetries(long long value) { m_maxRetriesHasBeenSet = true; m_maxRetries = value; } /** *The maximum number of retry attempts.
*/ inline HttpRetryPolicy& WithMaxRetries(long long value) { SetMaxRetries(value); return *this;} /** *The timeout for each retry attempt.
*/ inline const Duration& GetPerRetryTimeout() const{ return m_perRetryTimeout; } /** *The timeout for each retry attempt.
*/ inline bool PerRetryTimeoutHasBeenSet() const { return m_perRetryTimeoutHasBeenSet; } /** *The timeout for each retry attempt.
*/ inline void SetPerRetryTimeout(const Duration& value) { m_perRetryTimeoutHasBeenSet = true; m_perRetryTimeout = value; } /** *The timeout for each retry attempt.
*/ inline void SetPerRetryTimeout(Duration&& value) { m_perRetryTimeoutHasBeenSet = true; m_perRetryTimeout = std::move(value); } /** *The timeout for each retry attempt.
*/ inline HttpRetryPolicy& WithPerRetryTimeout(const Duration& value) { SetPerRetryTimeout(value); return *this;} /** *The timeout for each retry attempt.
*/ inline HttpRetryPolicy& WithPerRetryTimeout(Duration&& value) { SetPerRetryTimeout(std::move(value)); return *this;} /** *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.
*/ inline const Aws::VectorSpecify 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.
*/ inline bool TcpRetryEventsHasBeenSet() const { return m_tcpRetryEventsHasBeenSet; } /** *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.
*/ inline void SetTcpRetryEvents(const Aws::VectorSpecify 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.
*/ inline void SetTcpRetryEvents(Aws::VectorSpecify 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.
*/ inline HttpRetryPolicy& WithTcpRetryEvents(const Aws::VectorSpecify 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.
*/ inline HttpRetryPolicy& WithTcpRetryEvents(Aws::VectorSpecify 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.
*/ inline HttpRetryPolicy& AddTcpRetryEvents(const TcpRetryPolicyEvent& value) { m_tcpRetryEventsHasBeenSet = true; m_tcpRetryEvents.push_back(value); return *this; } /** *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.
*/ inline HttpRetryPolicy& AddTcpRetryEvents(TcpRetryPolicyEvent&& value) { m_tcpRetryEventsHasBeenSet = true; m_tcpRetryEvents.push_back(std::move(value)); return *this; } private: Aws::Vector