Skip to content

Commit

Permalink
feat(clients): add retryModeProvider in runtimeConfig (#2440)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Jun 1, 2021
1 parent 7985995 commit fc0a5da
Show file tree
Hide file tree
Showing 814 changed files with 2,730 additions and 542 deletions.
6 changes: 6 additions & 0 deletions clients/client-accessanalyzer/AccessAnalyzerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
maxAttempts?: number | __Provider<number>;

/**
* Specifies provider for retry algorithm to use.
* @internal
*/
retryModeProvider?: __Provider<string>;

/**
* Optional logger for logging debug/info/warn/error.
*/
Expand Down
3 changes: 2 additions & 1 deletion clients/client-accessanalyzer/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import packageInfo from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
Expand All @@ -28,6 +28,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
retryModeProvider: () => Promise.resolve(DEFAULT_RETRY_MODE),
sha256: Sha256,
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
3 changes: 2 additions & 1 deletion clients/client-accessanalyzer/runtimeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
Expand All @@ -31,6 +31,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
retryModeProvider: loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: Hash.bind(null, "sha256"),
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
6 changes: 6 additions & 0 deletions clients/client-acm-pca/ACMPCAClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
maxAttempts?: number | __Provider<number>;

/**
* Specifies provider for retry algorithm to use.
* @internal
*/
retryModeProvider?: __Provider<string>;

/**
* Optional logger for logging debug/info/warn/error.
*/
Expand Down
3 changes: 2 additions & 1 deletion clients/client-acm-pca/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import packageInfo from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
Expand All @@ -28,6 +28,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
retryModeProvider: () => Promise.resolve(DEFAULT_RETRY_MODE),
sha256: Sha256,
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
3 changes: 2 additions & 1 deletion clients/client-acm-pca/runtimeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
Expand All @@ -31,6 +31,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
retryModeProvider: loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: Hash.bind(null, "sha256"),
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
6 changes: 6 additions & 0 deletions clients/client-acm/ACMClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
maxAttempts?: number | __Provider<number>;

/**
* Specifies provider for retry algorithm to use.
* @internal
*/
retryModeProvider?: __Provider<string>;

/**
* Optional logger for logging debug/info/warn/error.
*/
Expand Down
3 changes: 2 additions & 1 deletion clients/client-acm/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import packageInfo from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
Expand All @@ -28,6 +28,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
retryModeProvider: () => Promise.resolve(DEFAULT_RETRY_MODE),
sha256: Sha256,
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
3 changes: 2 additions & 1 deletion clients/client-acm/runtimeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
Expand All @@ -31,6 +31,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
retryModeProvider: loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: Hash.bind(null, "sha256"),
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
6 changes: 6 additions & 0 deletions clients/client-alexa-for-business/AlexaForBusinessClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
maxAttempts?: number | __Provider<number>;

/**
* Specifies provider for retry algorithm to use.
* @internal
*/
retryModeProvider?: __Provider<string>;

/**
* Optional logger for logging debug/info/warn/error.
*/
Expand Down
3 changes: 2 additions & 1 deletion clients/client-alexa-for-business/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import packageInfo from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
Expand All @@ -28,6 +28,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
retryModeProvider: () => Promise.resolve(DEFAULT_RETRY_MODE),
sha256: Sha256,
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
3 changes: 2 additions & 1 deletion clients/client-alexa-for-business/runtimeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
Expand All @@ -31,6 +31,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
retryModeProvider: loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: Hash.bind(null, "sha256"),
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
6 changes: 6 additions & 0 deletions clients/client-amp/AmpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
maxAttempts?: number | __Provider<number>;

/**
* Specifies provider for retry algorithm to use.
* @internal
*/
retryModeProvider?: __Provider<string>;

/**
* Optional logger for logging debug/info/warn/error.
*/
Expand Down
3 changes: 2 additions & 1 deletion clients/client-amp/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import packageInfo from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
Expand All @@ -28,6 +28,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
retryModeProvider: () => Promise.resolve(DEFAULT_RETRY_MODE),
sha256: Sha256,
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
3 changes: 2 additions & 1 deletion clients/client-amp/runtimeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
Expand All @@ -31,6 +31,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
retryModeProvider: loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: Hash.bind(null, "sha256"),
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
6 changes: 6 additions & 0 deletions clients/client-amplify/AmplifyClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
maxAttempts?: number | __Provider<number>;

/**
* Specifies provider for retry algorithm to use.
* @internal
*/
retryModeProvider?: __Provider<string>;

/**
* Optional logger for logging debug/info/warn/error.
*/
Expand Down
3 changes: 2 additions & 1 deletion clients/client-amplify/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import packageInfo from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
Expand All @@ -28,6 +28,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
retryModeProvider: () => Promise.resolve(DEFAULT_RETRY_MODE),
sha256: Sha256,
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
3 changes: 2 additions & 1 deletion clients/client-amplify/runtimeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
Expand All @@ -31,6 +31,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
retryModeProvider: loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: Hash.bind(null, "sha256"),
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
6 changes: 6 additions & 0 deletions clients/client-amplifybackend/AmplifyBackendClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
maxAttempts?: number | __Provider<number>;

/**
* Specifies provider for retry algorithm to use.
* @internal
*/
retryModeProvider?: __Provider<string>;

/**
* Optional logger for logging debug/info/warn/error.
*/
Expand Down
3 changes: 2 additions & 1 deletion clients/client-amplifybackend/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import packageInfo from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
Expand All @@ -28,6 +28,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
retryModeProvider: () => Promise.resolve(DEFAULT_RETRY_MODE),
sha256: Sha256,
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
3 changes: 2 additions & 1 deletion clients/client-amplifybackend/runtimeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
Expand All @@ -31,6 +31,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
retryModeProvider: loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: Hash.bind(null, "sha256"),
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
6 changes: 6 additions & 0 deletions clients/client-api-gateway/APIGatewayClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
maxAttempts?: number | __Provider<number>;

/**
* Specifies provider for retry algorithm to use.
* @internal
*/
retryModeProvider?: __Provider<string>;

/**
* Optional logger for logging debug/info/warn/error.
*/
Expand Down
3 changes: 2 additions & 1 deletion clients/client-api-gateway/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import packageInfo from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
Expand All @@ -28,6 +28,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
retryModeProvider: () => Promise.resolve(DEFAULT_RETRY_MODE),
sha256: Sha256,
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
3 changes: 2 additions & 1 deletion clients/client-api-gateway/runtimeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
Expand All @@ -31,6 +31,7 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
maxAttempts: loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
region: loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
requestHandler: new NodeHttpHandler(),
retryModeProvider: loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS),
sha256: Hash.bind(null, "sha256"),
streamCollector,
utf8Decoder: fromUtf8,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
maxAttempts?: number | __Provider<number>;

/**
* Specifies provider for retry algorithm to use.
* @internal
*/
retryModeProvider?: __Provider<string>;

/**
* Optional logger for logging debug/info/warn/error.
*/
Expand Down
Loading

0 comments on commit fc0a5da

Please sign in to comment.