Skip to content

Commit 1c9e64e

Browse files
authored
docs: improve documentation for AwsRetryPolicy (#1678)
1 parent d6feb4b commit 1c9e64e

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"id": "13ef4936-91c8-45ec-9cb3-98f651488130",
3+
"type": "documentation",
4+
"description": "Improve documentation for [`AwsRetryPolicy`](https://docs.aws.amazon.com/sdk-for-kotlin/api/latest/aws-http/aws.sdk.kotlin.runtime.http.retries/-aws-retry-policy/)"
5+
}

aws-runtime/aws-http/common/src/aws/sdk/kotlin/runtime/http/retries/AwsRetryPolicy.kt

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,41 @@ import aws.smithy.kotlin.runtime.ServiceErrorMetadata
99
import aws.smithy.kotlin.runtime.ServiceException
1010
import aws.smithy.kotlin.runtime.http.response.HttpResponse
1111
import aws.smithy.kotlin.runtime.retries.policy.RetryDirective
12-
import aws.smithy.kotlin.runtime.retries.policy.RetryErrorType.*
12+
import aws.smithy.kotlin.runtime.retries.policy.RetryErrorType.Throttling
13+
import aws.smithy.kotlin.runtime.retries.policy.RetryErrorType.Transient
1314
import aws.smithy.kotlin.runtime.retries.policy.StandardRetryPolicy
1415

16+
/**
17+
* The standard policy for AWS service clients that defines which error conditions are retryable and how. This policy
18+
* will evaluate the following exceptions as retryable:
19+
*
20+
* * Any [ServiceException] with an `sdkErrorMetadata.errorCode` of:
21+
* * `BandwidthLimitExceeded`
22+
* * `EC2ThrottledException`
23+
* * `IDPCommunicationError`
24+
* * `LimitExceededException`
25+
* * `PriorRequestNotComplete`
26+
* * `ProvisionedThroughputExceededException`
27+
* * `RequestLimitExceeded`
28+
* * `RequestThrottled`
29+
* * `RequestThrottledException`
30+
* * `RequestTimeout`
31+
* * `RequestTimeoutException`
32+
* * `SlowDown`
33+
* * `ThrottledException`
34+
* * `Throttling`
35+
* * `ThrottlingException`
36+
* * `TooManyRequestsException`
37+
* * `TransactionInProgressException`
38+
* * Any [ServiceException] with an `sdkErrorMetadata.statusCode` of:
39+
* * 500 (Internal Service Error)
40+
* * 502 (Bad Gateway)
41+
* * 503 (Service Unavailable)
42+
* * 504 (Gateway Timeout)
43+
*
44+
* If none of those conditions match, this policy delegates to [StandardRetryPolicy]. See that class's documentation for
45+
* more information about how it evaluates exceptions.
46+
*/
1547
public open class AwsRetryPolicy : StandardRetryPolicy() {
1648
public companion object {
1749
/**

0 commit comments

Comments
 (0)