From 777ce507a91a57a115be47b4299a72539a57fef8 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Fri, 8 Jan 2021 11:10:50 -0800 Subject: [PATCH 1/7] Add retry package documentation and examples. Refactor interface usage. --- aws/retry/doc.go | 80 +++++++++++++++++++++++++++++ aws/retry/example_test.go | 85 +++++++++++++++++++++++++++++++ aws/retry/internal/mock/client.go | 34 +++++++++++++ aws/retry/internal/mock/config.go | 17 +++++++ aws/retry/internal/mock/types.go | 14 +++++ aws/retry/middleware.go | 8 +-- aws/retry/middleware_test.go | 5 +- aws/retry/retry.go | 45 ++++------------ 8 files changed, 246 insertions(+), 42 deletions(-) create mode 100644 aws/retry/doc.go create mode 100644 aws/retry/example_test.go create mode 100644 aws/retry/internal/mock/client.go create mode 100644 aws/retry/internal/mock/config.go create mode 100644 aws/retry/internal/mock/types.go diff --git a/aws/retry/doc.go b/aws/retry/doc.go new file mode 100644 index 00000000000..42ced06e248 --- /dev/null +++ b/aws/retry/doc.go @@ -0,0 +1,80 @@ +// Package retry provides interfaces and implementations for SDK request retry behavior. +// +// Retryer Interface and Implementations +// +// This packages defines Retryer interface that is used to either implement custom retry behavior +// or to extend the existing retry implementations provided by the SDK. This packages provides a single +// retry implementations: Standard. +// +// Standard +// +// Standard is the default retryer implementation used by service clients. The standard retryer is a rate limited +// retryer that has a configurable max attempts to limit the number of retry attempts when a retryable error occurs. +// In addition, the retryer uses a configurable token bucket to rate limit the retry attempts across the client, +// and uses an additional delay policy to limit the time between a requests subsequent attempts. +// +// By default the standard retryer uses the DefaultRetryables slice of IsErrorRetryable types to determine whether +// a given error is retryable. By default this list of retryables includes the following: +// - Retrying errors that implement the RetryableError method, and return true. +// - Connection Errors +// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true. +// - Connection Reset Errors. +// - net.OpErr types that are dialing errors or are temporary. +// - HTTP Status Codes: 500, 502, 503, and 504. +// - API Error Codes +// - RequestTimeout, RequestTimeoutException +// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException, +// RequestThrottled, SlowDown, EC2ThrottledException +// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException +// - TransactionInProgressException, PriorRequestNotComplete +// +// The standard retryer will not retry a request in the event if the context associated with the request +// has been cancelled. Applications must handle this case explicitly if they wish to retry with a different context +// value. +// +// You can configure the standard retryer implementation to fit your applications by constructing a standard retryer +// using the NewStandard function, and providing one more functional arguments that mutate the StandardOptions +// structure. StandardOptions provides the ability to modify the token bucket rate limiter, retryable error conditions, +// and the retry delay policy. +// +// For example to modify the default retry attempts for the standard retryer: +// +// // configure the custom retryer +// customRetry := retry.NewStandard(func(o *retry.StandardOptions) { +// o.MaxAttempts = 5 +// }) +// +// // create a service client with the retryer +// s3.NewFromConfig(cfg, func(o *s3.Options) { +// o.Retryer = customRetry +// }) +// +// Utilities +// +// A number of package functions have been provided to easily wrap retryer implementations in an implementation agnostic +// way. These are: +// +// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable +// in addition to those considered retryable by the provided retryer. +// +// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping +// a retryer implementation. +// +// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a +// request by wrapping a retryer implementation. +// +// The following package functions have been provided to easily satisfy different retry interfaces to further customize +// a given retryer's behavior: +// +// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example, +// you can use this method to easily create custom back off policies to be used with the +// standard retryer. +// +// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example, +// this can be used to extend the standard retryer to add additional logic ot determine if a +// error should be retried. +// +// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example, +// this can be used to extend the standard retryer to add additional logic to determine if an +// error should be considered a timeout. +package retry diff --git a/aws/retry/example_test.go b/aws/retry/example_test.go new file mode 100644 index 00000000000..b3b042d522c --- /dev/null +++ b/aws/retry/example_test.go @@ -0,0 +1,85 @@ +package retry_test + +import ( + "context" + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/retry" + config "github.com/aws/aws-sdk-go-v2/aws/retry/internal/mock" + s3 "github.com/aws/aws-sdk-go-v2/aws/retry/internal/mock" + types "github.com/aws/aws-sdk-go-v2/aws/retry/internal/mock" +) + +func Example_overrideForAllClients() { + custom := retry.AddWithMaxBackoffDelay(retry.NewStandard(), time.Second*5) + + cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRetryer(custom)) + if err != nil { + log.Fatal(err) + return + } + + client := s3.NewFromConfig(cfg) + _ = client +} + +func Example_overrideForSpecificClient() { + cfg, err := config.LoadDefaultConfig(context.TODO()) + if err != nil { + log.Fatal(err) + return + } + + client := s3.NewFromConfig(cfg, func(options *s3.Options) { + options.Retryer = retry.AddWithMaxBackoffDelay(options.Retryer, time.Second*5) + }) + _ = client +} + +func Example_overrideSpecificOperation() { + cfg, err := config.LoadDefaultConfig(context.TODO()) + if err != nil { + log.Fatal(err) + return + } + + client := s3.NewFromConfig(cfg) + + // Wrap the default client retryer with an additional retryable error code for this specific + // operation invocation + _, err = client.GetObject(context.Background(), &s3.GetObjectInput{ + Bucket: aws.String("my-bucket"), + Key: aws.String("my-key"), + }, func(options *types.Options) { + options.Retryer = retry.AddWithErrorCodes(options.Retryer, (*types.NoSuchBucketException)(nil).ErrorCode()) + }) + if err != nil { + log.Fatal(err) + return + } +} + +func ExampleAddWithErrorCodes() { + // Wrap a standard retyer and add the types.NoSuchBucketException Amazon S3 error code as retryable + custom := retry.AddWithErrorCodes(retry.NewStandard(), (*types.NoSuchBucketException)(nil).ErrorCode()) + + fmt.Println(custom.IsErrorRetryable(&types.NoSuchBucketException{})) + // Output: true +} + +func ExampleAddWithMaxAttempts() { + // Wrap a standard retyer and set the max attempts to 5 + custom := retry.AddWithMaxAttempts(retry.NewStandard(), 5) + + fmt.Println(custom.MaxAttempts()) + // Output: 5 +} + +func ExampleAddWithMaxBackoffDelay() { + // Wrap a standard retyer and add tthe NoSuchBucket API error code to the list of retryables + custom := retry.AddWithMaxBackoffDelay(retry.NewStandard(), time.Second*5) + _ = custom +} diff --git a/aws/retry/internal/mock/client.go b/aws/retry/internal/mock/client.go new file mode 100644 index 00000000000..1df971b449e --- /dev/null +++ b/aws/retry/internal/mock/client.go @@ -0,0 +1,34 @@ +package mock + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/aws" +) + +// Options is a mock client Options +type Options struct { + Retryer aws.Retryer +} + +// Options is a mock Client +type Client struct{} + +// GetObjectInput is mock input +type GetObjectInput struct { + Bucket *string + Key *string +} + +// GetObjectOutput is mock output +type GetObjectOutput struct{} + +// NewFromConfig is a mock client constructor +func NewFromConfig(aws.Config, ...func(options *Options)) Client { + return Client{} +} + +// GetObject is a mock GetObject API +func (Client) GetObject(context.Context, *GetObjectInput, ...func(*Options)) (o *GetObjectOutput, err error) { + return o, err +} diff --git a/aws/retry/internal/mock/config.go b/aws/retry/internal/mock/config.go new file mode 100644 index 00000000000..1c3f8f45734 --- /dev/null +++ b/aws/retry/internal/mock/config.go @@ -0,0 +1,17 @@ +package mock + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/aws" +) + +// LoadDefaultConfig is a mock for config.LoadDefaultConfig +func LoadDefaultConfig(context.Context, ...func()) (cfg aws.Config, err error) { + return cfg, err +} + +// WithRetryer is a mock for config.WithRetryer +func WithRetryer(v aws.Retryer) (f func()) { + return f +} diff --git a/aws/retry/internal/mock/types.go b/aws/retry/internal/mock/types.go new file mode 100644 index 00000000000..463f5fd08d6 --- /dev/null +++ b/aws/retry/internal/mock/types.go @@ -0,0 +1,14 @@ +package mock + +// NoSuchBucketException is a mock error +type NoSuchBucketException struct{} + +// Error is a mock error message +func (*NoSuchBucketException) Error() string { + return "mock error message" +} + +// ErrorCode is a mock error code +func (*NoSuchBucketException) ErrorCode() string { + return "NoSuchBucketException" +} diff --git a/aws/retry/middleware.go b/aws/retry/middleware.go index 965b69ca2c6..c5b70d2b90c 100644 --- a/aws/retry/middleware.go +++ b/aws/retry/middleware.go @@ -34,12 +34,12 @@ type Attempt struct { // This will include logging retry attempts, unretryable errors, and when max attempts are reached. LogAttempts bool - retryer Retryer + retryer aws.Retryer requestCloner RequestCloner } -// NewAttemptMiddleware returns a new Attempt -func NewAttemptMiddleware(retryer Retryer, requestCloner RequestCloner, optFns ...func(*Attempt)) *Attempt { +// NewAttemptMiddleware returns a new Attempt retry middleware. +func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optFns ...func(*Attempt)) *Attempt { m := &Attempt{retryer: retryer, requestCloner: requestCloner} for _, fn := range optFns { fn(m) @@ -213,7 +213,7 @@ func setRetryMetadata(ctx context.Context, metadata retryMetadata) context.Conte // AddRetryMiddlewaresOptions is the set of options that can be passed to AddRetryMiddlewares for configuring retry // associated middleware. type AddRetryMiddlewaresOptions struct { - Retryer Retryer + Retryer aws.Retryer // Enable the logging of retry attempts performed by the SDK. // This will include logging retry attempts, unretryable errors, and when max attempts are reached. diff --git a/aws/retry/middleware_test.go b/aws/retry/middleware_test.go index 3fa5ba35380..b472e0c91a5 100644 --- a/aws/retry/middleware_test.go +++ b/aws/retry/middleware_test.go @@ -9,6 +9,7 @@ import ( "testing" "time" + "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/sdk" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -86,10 +87,10 @@ func TestMetricsHeaderMiddleware(t *testing.T) { } type retryProvider struct { - Retryer Retryer + Retryer aws.Retryer } -func (t retryProvider) GetRetryer() Retryer { +func (t retryProvider) GetRetryer() aws.Retryer { return t.Retryer } diff --git a/aws/retry/retry.go b/aws/retry/retry.go index 9d8fc51aa81..ad81b8c9831 100644 --- a/aws/retry/retry.go +++ b/aws/retry/retry.go @@ -1,41 +1,14 @@ package retry import ( - "context" "time" "github.com/aws/aws-sdk-go-v2/aws" ) -// Retryer defines an interface for extension utilities to extend the built in -// retryer. -type Retryer interface { - // IsErrorRetryable returns if the failed request is retryable. This check - // should determine if the error can be retried, or if the error is - // terminal. - IsErrorRetryable(error) bool - - // MaxAttempts returns the maximum number of attempts that can be made for - // a request before failing. A value of 0 implies that the request should - // be retried until it succeeds if the errors are retryable. - MaxAttempts() int - - // RetryDelay returns the delay that should be used before retrying the - // request. Will return error if the if the delay could not be determined. - RetryDelay(attempt int, opErr error) (time.Duration, error) - - // GetRetryToken attempts to deduct the retry cost from the retry token pool. - // Returning the token release function, or error. - GetRetryToken(ctx context.Context, opErr error) (releaseToken func(error) error, err error) - - // GetInitalToken returns the initial request token that can increment the - // retry token pool if the request is successful. - GetInitialToken() (releaseToken func(error) error) -} - // AddWithErrorCodes returns a Retryer with additional error codes considered // for determining if the error should be retried. -func AddWithErrorCodes(r Retryer, codes ...string) Retryer { +func AddWithErrorCodes(r aws.Retryer, codes ...string) aws.Retryer { retryable := &RetryableErrorCode{ Codes: map[string]struct{}{}, } @@ -50,7 +23,7 @@ func AddWithErrorCodes(r Retryer, codes ...string) Retryer { } type withIsErrorRetryable struct { - Retryer + aws.Retryer Retryable IsErrorRetryable } @@ -63,7 +36,7 @@ func (r *withIsErrorRetryable) IsErrorRetryable(err error) bool { // AddWithMaxAttempts returns a Retryer with MaxAttempts set to the value // specified. -func AddWithMaxAttempts(r Retryer, max int) Retryer { +func AddWithMaxAttempts(r aws.Retryer, max int) aws.Retryer { return &withMaxAttempts{ Retryer: r, Max: max, @@ -71,7 +44,7 @@ func AddWithMaxAttempts(r Retryer, max int) Retryer { } type withMaxAttempts struct { - Retryer + aws.Retryer Max int } @@ -82,18 +55,18 @@ func (w *withMaxAttempts) MaxAttempts() int { // AddWithMaxBackoffDelay returns a retryer wrapping the passed in retryer // overriding the RetryDelay behavior for a alternate minimum initial backoff // delay. -func AddWithMaxBackoffDelay(r Retryer, delay time.Duration) Retryer { - return &withMinBackoffDelay{ +func AddWithMaxBackoffDelay(r aws.Retryer, delay time.Duration) aws.Retryer { + return &withMaxBackoffDelay{ Retryer: r, backoff: NewExponentialJitterBackoff(delay), } } -type withMinBackoffDelay struct { - Retryer +type withMaxBackoffDelay struct { + aws.Retryer backoff *ExponentialJitterBackoff } -func (r *withMinBackoffDelay) RetryDelay(attempt int, err error) (time.Duration, error) { +func (r *withMaxBackoffDelay) RetryDelay(attempt int, err error) (time.Duration, error) { return r.backoff.BackoffDelay(attempt, err) } From 0253c2d11de780b62677eff0622379496347f9d7 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Mon, 11 Jan 2021 19:19:04 -0800 Subject: [PATCH 2/7] Update imds and endpoint client to use aws.Retryer interface. --- credentials/endpointcreds/internal/client/client.go | 3 ++- feature/ec2/imds/api_client.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/credentials/endpointcreds/internal/client/client.go b/credentials/endpointcreds/internal/client/client.go index 208ff011ec6..c97bad18f69 100644 --- a/credentials/endpointcreds/internal/client/client.go +++ b/credentials/endpointcreds/internal/client/client.go @@ -6,6 +6,7 @@ import ( "net/http" "time" + "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" @@ -33,7 +34,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // Set of options to modify how the credentials operation is invoked. APIOptions []func(*smithymiddleware.Stack) error diff --git a/feature/ec2/imds/api_client.go b/feature/ec2/imds/api_client.go index 7502afc4cbd..4eb73c979f9 100644 --- a/feature/ec2/imds/api_client.go +++ b/feature/ec2/imds/api_client.go @@ -130,7 +130,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // Changes if the EC2 Instance Metadata client is enabled or not. Client // will default to enabled if not set to ClientDisabled. When the client is From e95826505cfcfab355a6289248163d231ec2f03a Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Mon, 11 Jan 2021 19:19:36 -0800 Subject: [PATCH 3/7] Update codegen clients to use aws.Retryer interface. --- .../amazon/smithy/aws/go/codegen/AddAwsConfigFields.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java index 1c541b2b4cd..aa114e2bd2c 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java @@ -61,7 +61,7 @@ public class AddAwsConfigFields implements GoIntegration { .build(), AwsConfigField.builder() .name(RETRYER_CONFIG_NAME) - .type(getAwsRetrySymbol("Retryer")) + .type(getAwsCoreSymbol("Retryer")) .documentation("Retryer guides how HTTP requests should be retried in case of\n" + "recoverable failures. When nil the API client will use a default\n" + "retryer.") From 4ab10e19857f09428c90356714d304a54ad8d34a Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Tue, 12 Jan 2021 15:42:21 -0800 Subject: [PATCH 4/7] Change aws.Config#Retryer to be a value provider. --- aws/config.go | 11 ++++++++--- aws/retry/example_test.go | 8 +++++--- aws/retry/internal/mock/client.go | 2 +- aws/retry/internal/mock/config.go | 2 +- config/load_options.go | 10 +++++----- config/provider.go | 4 ++-- config/resolve_credentials.go | 13 +++++++++---- feature/ec2/imds/api_client.go | 5 ++++- .../apigateway/internal/customizations/unit_test.go | 4 +++- service/ec2/internal/customizations/unit_test.go | 4 +++- .../customizations/custom_error_deser_test.go | 4 +++- .../internal/customizations/sanitizeurl_test.go | 4 +++- service/s3/internal/customizations/presign_test.go | 4 +++- service/s3/internal/customizations/unit_test.go | 4 +++- 14 files changed, 53 insertions(+), 26 deletions(-) diff --git a/aws/config.go b/aws/config.go index f2c977e058a..481aa156381 100644 --- a/aws/config.go +++ b/aws/config.go @@ -42,10 +42,15 @@ type Config struct { // service and region Please see the `aws.EndpointResolver` documentation on usage. EndpointResolver EndpointResolver - // Retryer guides how HTTP requests should be retried in case of - // recoverable failures. When nil the API client will use a default + // Retryer is a function that provides a Retryer implementation. A Retryer guides how HTTP requests should be + // retried in case of recoverable failures. When nil the API client will use a default // retryer. - Retryer Retryer + // + // In general, the provider function should return a new instance of a Retyer if you are attempting + // to provide a consistent Retryer configuration across all clients. This will ensure that each client will be + // provided a new instance of the Retryer implementation, and will avoid issues such as sharing the same retry token + // bucket across services. + Retryer func() Retryer // ConfigSources are the sources that were used to construct the Config. // Allows for additional configuration to be loaded by clients. diff --git a/aws/retry/example_test.go b/aws/retry/example_test.go index b3b042d522c..d135559c858 100644 --- a/aws/retry/example_test.go +++ b/aws/retry/example_test.go @@ -14,9 +14,11 @@ import ( ) func Example_overrideForAllClients() { - custom := retry.AddWithMaxBackoffDelay(retry.NewStandard(), time.Second*5) - - cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRetryer(custom)) + cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRetryer(func() aws.Retryer { + // Generally you will always want to return new instance of a Retryer. This will avoid a global rate limit + // bucket being shared between across all service clients. + return retry.AddWithMaxBackoffDelay(retry.NewStandard(), time.Second*5) + })) if err != nil { log.Fatal(err) return diff --git a/aws/retry/internal/mock/client.go b/aws/retry/internal/mock/client.go index 1df971b449e..33821dedb6a 100644 --- a/aws/retry/internal/mock/client.go +++ b/aws/retry/internal/mock/client.go @@ -11,7 +11,7 @@ type Options struct { Retryer aws.Retryer } -// Options is a mock Client +// Client is a mock service client type Client struct{} // GetObjectInput is mock input diff --git a/aws/retry/internal/mock/config.go b/aws/retry/internal/mock/config.go index 1c3f8f45734..88f0ac377bd 100644 --- a/aws/retry/internal/mock/config.go +++ b/aws/retry/internal/mock/config.go @@ -12,6 +12,6 @@ func LoadDefaultConfig(context.Context, ...func()) (cfg aws.Config, err error) { } // WithRetryer is a mock for config.WithRetryer -func WithRetryer(v aws.Retryer) (f func()) { +func WithRetryer(v func() aws.Retryer) (f func()) { return f } diff --git a/config/load_options.go b/config/load_options.go index c296033271c..bd12a1fde61 100644 --- a/config/load_options.go +++ b/config/load_options.go @@ -33,9 +33,9 @@ type LoadOptions struct { // service and region Please see the `aws.EndpointResolver` documentation on usage. EndpointResolver aws.EndpointResolver - // Retryer guides how HTTP requests should be retried in case of - // recoverable failures. - Retryer aws.Retryer + // Retryer is a function that provides a Retryer implementation. A Retryer guides how HTTP requests should be + // retried in case of recoverable failures. + Retryer func() aws.Retryer // APIOptions provides the set of middleware mutations modify how the API // client requests will be handled. This is useful for adding additional @@ -477,7 +477,7 @@ func WithAPIOptions(v []func(*middleware.Stack) error) LoadOptionsFunc { } } -func (o LoadOptions) getRetryer(ctx context.Context) (aws.Retryer, bool, error) { +func (o LoadOptions) getRetryer(ctx context.Context) (func() aws.Retryer, bool, error) { if o.Retryer == nil { return nil, false, nil } @@ -489,7 +489,7 @@ func (o LoadOptions) getRetryer(ctx context.Context) (aws.Retryer, bool, error) // that sets Retryer on LoadOptions. If Retryer is set to nil, the // Retryer value is ignored. If multiple WithRetryer calls are // made, the last call overrides the previous call values. -func WithRetryer(v aws.Retryer) LoadOptionsFunc { +func WithRetryer(v func() aws.Retryer) LoadOptionsFunc { return func(o *LoadOptions) error { o.Retryer = v return nil diff --git a/config/provider.go b/config/provider.go index cd282923517..68406c6b881 100644 --- a/config/provider.go +++ b/config/provider.go @@ -373,10 +373,10 @@ func getClientLogMode(ctx context.Context, configs configs) (m aws.ClientLogMode // retryProvider is an configuration provider for custom Retryer. type retryProvider interface { - getRetryer(ctx context.Context) (aws.Retryer, bool, error) + getRetryer(ctx context.Context) (func() aws.Retryer, bool, error) } -func getRetryer(ctx context.Context, configs configs) (v aws.Retryer, found bool, err error) { +func getRetryer(ctx context.Context, configs configs) (v func() aws.Retryer, found bool, err error) { for _, c := range configs { if p, ok := c.(retryProvider); ok { v, found, err = p.getRetryer(ctx) diff --git a/config/resolve_credentials.go b/config/resolve_credentials.go index ddadc54ef11..35b48c4391c 100644 --- a/config/resolve_credentials.go +++ b/config/resolve_credentials.go @@ -202,7 +202,9 @@ func resolveHTTPCredProvider(ctx context.Context, cfg *aws.Config, url, authToke options.AuthorizationToken = authToken } options.APIOptions = cfg.APIOptions - options.Retryer = cfg.Retryer + if cfg.Retryer != nil { + options.Retryer = cfg.Retryer() + } }, } @@ -258,10 +260,13 @@ func resolveEC2RoleCredentials(ctx context.Context, cfg *aws.Config, configs con optFns = append(optFns, func(o *ec2rolecreds.Options) { // Only define a client from config if not already defined. if o.Client != nil { - o.Client = imds.New(imds.Options{ + options := imds.Options{ HTTPClient: cfg.HTTPClient, - Retryer: cfg.Retryer, - }) + } + if cfg.Retryer != nil { + options.Retryer = cfg.Retryer() + } + o.Client = imds.New(options) } }) diff --git a/feature/ec2/imds/api_client.go b/feature/ec2/imds/api_client.go index 4eb73c979f9..9d512f857d5 100644 --- a/feature/ec2/imds/api_client.go +++ b/feature/ec2/imds/api_client.go @@ -101,7 +101,10 @@ func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ APIOptions: append([]func(*middleware.Stack) error{}, cfg.APIOptions...), HTTPClient: cfg.HTTPClient, - Retryer: cfg.Retryer, + } + + if cfg.Retryer != nil { + opts.Retryer = cfg.Retryer() } return New(opts, optFns...) diff --git a/service/apigateway/internal/customizations/unit_test.go b/service/apigateway/internal/customizations/unit_test.go index 6c13c4a46a6..86eb219b3d0 100644 --- a/service/apigateway/internal/customizations/unit_test.go +++ b/service/apigateway/internal/customizations/unit_test.go @@ -51,7 +51,9 @@ func Test_EmptyResponse(t *testing.T) { SigningName: "apigateway", }, nil }), - Retryer: aws.NopRetryer{}, + Retryer: func() aws.Retryer { + return aws.NopRetryer{} + }, } client := apigateway.NewFromConfig(cfg) diff --git a/service/ec2/internal/customizations/unit_test.go b/service/ec2/internal/customizations/unit_test.go index bacb89b4f7c..e8bbfae7bcf 100644 --- a/service/ec2/internal/customizations/unit_test.go +++ b/service/ec2/internal/customizations/unit_test.go @@ -51,7 +51,9 @@ func Test_EmptyResponse(t *testing.T) { SigningName: "ec2", }, nil }), - Retryer: aws.NopRetryer{}, + Retryer: func() aws.Retryer { + return aws.NopRetryer{} + }, } client := ec2.NewFromConfig(cfg) diff --git a/service/route53/internal/customizations/custom_error_deser_test.go b/service/route53/internal/customizations/custom_error_deser_test.go index de976a6e824..4e269fbdfec 100644 --- a/service/route53/internal/customizations/custom_error_deser_test.go +++ b/service/route53/internal/customizations/custom_error_deser_test.go @@ -80,7 +80,9 @@ func TestCustomErrorDeserialization(t *testing.T) { SigningName: "route53", }, nil }), - Retryer: aws.NopRetryer{}, + Retryer: func() aws.Retryer { + return aws.NopRetryer{} + }, }) resp, err := svc.ChangeResourceRecordSets(context.Background(), &route53.ChangeResourceRecordSetsInput{ ChangeBatch: &types.ChangeBatch{ diff --git a/service/route53/internal/customizations/sanitizeurl_test.go b/service/route53/internal/customizations/sanitizeurl_test.go index 0aea417a029..5d275203cd8 100644 --- a/service/route53/internal/customizations/sanitizeurl_test.go +++ b/service/route53/internal/customizations/sanitizeurl_test.go @@ -37,7 +37,9 @@ func TestSanitizeURLMiddleware(t *testing.T) { t.Run(name, func(t *testing.T) { cfg := aws.Config{ Credentials: unit.StubCredentialsProvider{}, - Retryer: aws.NopRetryer{}, + Retryer: func() aws.Retryer { + return aws.NopRetryer{} + }, Region: "mock-region", } diff --git a/service/s3/internal/customizations/presign_test.go b/service/s3/internal/customizations/presign_test.go index d97d4495f4b..e5b63d67556 100644 --- a/service/s3/internal/customizations/presign_test.go +++ b/service/s3/internal/customizations/presign_test.go @@ -133,7 +133,9 @@ func TestPutObject_PresignURL(t *testing.T) { cfg := aws.Config{ Region: "us-west-2", Credentials: unit.StubCredentialsProvider{}, - Retryer: aws.NopRetryer{}, + Retryer: func() aws.Retryer { + return aws.NopRetryer{} + }, } presignClient := s3.NewPresignClient(s3.NewFromConfig(cfg), func(options *s3.PresignOptions) { options = &c.options diff --git a/service/s3/internal/customizations/unit_test.go b/service/s3/internal/customizations/unit_test.go index 4bf401c1f70..41b3e15805a 100644 --- a/service/s3/internal/customizations/unit_test.go +++ b/service/s3/internal/customizations/unit_test.go @@ -51,7 +51,9 @@ func Test_EmptyResponse(t *testing.T) { SigningName: "s3", }, nil }), - Retryer: aws.NopRetryer{}, + Retryer: func() aws.Retryer { + return aws.NopRetryer{} + }, } client := s3.NewFromConfig(cfg, func(options *s3.Options) { From 0bd2e6bad24233ca6466cdd23ecb198ce66afb58 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Tue, 12 Jan 2021 15:42:49 -0800 Subject: [PATCH 5/7] Codegen changes for aws.Config#Retryer changes --- .../smithy/aws/go/codegen/AddAwsConfigFields.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java index aa114e2bd2c..5f9ad89858e 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java @@ -52,6 +52,7 @@ public class AddAwsConfigFields implements GoIntegration { private static final String RESOLVE_HTTP_CLIENT = "resolveHTTPClient"; private static final String RESOLVE_RETRYER = "resolveRetryer"; private static final String RESOLVE_AWS_CONFIG_ENDPOINT_RESOLVER = "resolveAWSEndpointResolver"; + private static final String RESOLVE_AWS_CONFIG_RETRYER_PROVIDER = "resolveAWSRetryerProvider"; private static final List AWS_CONFIG_FIELDS = ListUtils.of( AwsConfigField.builder() @@ -66,6 +67,8 @@ public class AddAwsConfigFields implements GoIntegration { + "recoverable failures. When nil the API client will use a default\n" + "retryer.") .resolveFunction(SymbolUtils.createValueSymbolBuilder(RESOLVE_RETRYER).build()) + .awsResolveFunction(SymbolUtils.createValueSymbolBuilder(RESOLVE_AWS_CONFIG_RETRYER_PROVIDER) + .build()) .build(), AwsConfigField.builder() .name(HTTP_CLIENT_CONFIG_NAME) @@ -153,17 +156,22 @@ public void writeAdditionalFiles( private void writeAwsDefaultResolvers(GoWriter writer) { writeHttpClientResolver(writer); - writeRetryerResolver(writer); + writeRetryerResolvers(writer); writeAwsConfigEndpointResolver(writer); } - private void writeRetryerResolver(GoWriter writer) { + private void writeRetryerResolvers(GoWriter writer) { writer.openBlock("func $L(o *Options) {", "}", RESOLVE_RETRYER, () -> { writer.openBlock("if o.$L != nil {", "}", RETRYER_CONFIG_NAME, () -> writer.write("return")); writer.write("o.$L = $T()", RETRYER_CONFIG_NAME, SymbolUtils.createValueSymbolBuilder("NewStandard", AwsGoDependency.AWS_RETRY).build()); }); writer.write(""); + writer.openBlock("func $L(cfg aws.Config, o *Options) {", "}", RESOLVE_AWS_CONFIG_RETRYER_PROVIDER, () -> { + writer.openBlock("if cfg.$L == nil {", "}", RETRYER_CONFIG_NAME, () -> writer.write("return")); + writer.write("o.$L = cfg.$L()", RETRYER_CONFIG_NAME, RETRYER_CONFIG_NAME); + }); + writer.write(""); } private void writeHttpClientResolver(GoWriter writer) { @@ -225,7 +233,7 @@ private void writeAwsConfigConstructor(Model model, ServiceShape service, GoWrit List configFields = new ArrayList<>(AWS_CONFIG_FIELDS); // add client specific config fields - for (AwsConfigField cfgField: ResolveClientConfig.AWS_CONFIG_FIELDS) { + for (AwsConfigField cfgField : ResolveClientConfig.AWS_CONFIG_FIELDS) { configFields.add(cfgField); } From 38fbde88b8427845595147f2118b39e5de8b0f9d Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Mon, 11 Jan 2021 19:20:42 -0800 Subject: [PATCH 6/7] Regenerated Clients --- internal/protocoltest/awsrestjson/api_client.go | 11 +++++++++-- internal/protocoltest/ec2query/api_client.go | 11 +++++++++-- internal/protocoltest/jsonrpc/api_client.go | 11 +++++++++-- internal/protocoltest/jsonrpc10/api_client.go | 11 +++++++++-- internal/protocoltest/query/api_client.go | 11 +++++++++-- internal/protocoltest/restxml/api_client.go | 11 +++++++++-- service/accessanalyzer/api_client.go | 11 +++++++++-- service/acm/api_client.go | 11 +++++++++-- service/acmpca/api_client.go | 11 +++++++++-- service/alexaforbusiness/api_client.go | 11 +++++++++-- service/amplify/api_client.go | 11 +++++++++-- service/apigateway/api_client.go | 11 +++++++++-- service/apigatewaymanagementapi/api_client.go | 11 +++++++++-- service/apigatewayv2/api_client.go | 11 +++++++++-- service/appconfig/api_client.go | 11 +++++++++-- service/appflow/api_client.go | 11 +++++++++-- service/appintegrations/api_client.go | 11 +++++++++-- service/applicationautoscaling/api_client.go | 11 +++++++++-- service/applicationdiscoveryservice/api_client.go | 11 +++++++++-- service/applicationinsights/api_client.go | 11 +++++++++-- service/appmesh/api_client.go | 11 +++++++++-- service/appstream/api_client.go | 11 +++++++++-- service/appsync/api_client.go | 11 +++++++++-- service/athena/api_client.go | 11 +++++++++-- service/auditmanager/api_client.go | 11 +++++++++-- service/autoscaling/api_client.go | 11 +++++++++-- service/autoscalingplans/api_client.go | 11 +++++++++-- service/backup/api_client.go | 11 +++++++++-- service/batch/api_client.go | 11 +++++++++-- service/braket/api_client.go | 11 +++++++++-- service/budgets/api_client.go | 11 +++++++++-- service/chime/api_client.go | 11 +++++++++-- service/cloud9/api_client.go | 11 +++++++++-- service/clouddirectory/api_client.go | 11 +++++++++-- service/cloudformation/api_client.go | 11 +++++++++-- service/cloudfront/api_client.go | 11 +++++++++-- service/cloudhsm/api_client.go | 11 +++++++++-- service/cloudhsmv2/api_client.go | 11 +++++++++-- service/cloudsearch/api_client.go | 11 +++++++++-- service/cloudsearchdomain/api_client.go | 11 +++++++++-- service/cloudtrail/api_client.go | 11 +++++++++-- service/cloudwatch/api_client.go | 11 +++++++++-- service/cloudwatchevents/api_client.go | 11 +++++++++-- service/cloudwatchlogs/api_client.go | 11 +++++++++-- service/codeartifact/api_client.go | 11 +++++++++-- service/codebuild/api_client.go | 11 +++++++++-- service/codecommit/api_client.go | 11 +++++++++-- service/codedeploy/api_client.go | 11 +++++++++-- service/codeguruprofiler/api_client.go | 11 +++++++++-- service/codegurureviewer/api_client.go | 11 +++++++++-- service/codepipeline/api_client.go | 11 +++++++++-- service/codestar/api_client.go | 11 +++++++++-- service/codestarconnections/api_client.go | 11 +++++++++-- service/codestarnotifications/api_client.go | 11 +++++++++-- service/cognitoidentity/api_client.go | 11 +++++++++-- service/cognitoidentityprovider/api_client.go | 11 +++++++++-- service/cognitosync/api_client.go | 11 +++++++++-- service/comprehend/api_client.go | 11 +++++++++-- service/comprehendmedical/api_client.go | 11 +++++++++-- service/computeoptimizer/api_client.go | 11 +++++++++-- service/configservice/api_client.go | 11 +++++++++-- service/connect/api_client.go | 11 +++++++++-- service/connectcontactlens/api_client.go | 11 +++++++++-- service/connectparticipant/api_client.go | 11 +++++++++-- service/costandusagereportservice/api_client.go | 11 +++++++++-- service/costexplorer/api_client.go | 11 +++++++++-- service/customerprofiles/api_client.go | 11 +++++++++-- service/databasemigrationservice/api_client.go | 11 +++++++++-- service/databrew/api_client.go | 11 +++++++++-- service/dataexchange/api_client.go | 11 +++++++++-- service/datapipeline/api_client.go | 11 +++++++++-- service/datasync/api_client.go | 11 +++++++++-- service/dax/api_client.go | 11 +++++++++-- service/detective/api_client.go | 11 +++++++++-- service/devicefarm/api_client.go | 11 +++++++++-- service/devopsguru/api_client.go | 11 +++++++++-- service/directconnect/api_client.go | 11 +++++++++-- service/directoryservice/api_client.go | 11 +++++++++-- service/dlm/api_client.go | 11 +++++++++-- service/docdb/api_client.go | 11 +++++++++-- service/dynamodb/api_client.go | 11 +++++++++-- service/dynamodbstreams/api_client.go | 11 +++++++++-- service/ebs/api_client.go | 11 +++++++++-- service/ec2/api_client.go | 11 +++++++++-- service/ec2instanceconnect/api_client.go | 11 +++++++++-- service/ecr/api_client.go | 11 +++++++++-- service/ecrpublic/api_client.go | 11 +++++++++-- service/ecs/api_client.go | 11 +++++++++-- service/efs/api_client.go | 11 +++++++++-- service/eks/api_client.go | 11 +++++++++-- service/elasticache/api_client.go | 11 +++++++++-- service/elasticbeanstalk/api_client.go | 11 +++++++++-- service/elasticinference/api_client.go | 11 +++++++++-- service/elasticloadbalancing/api_client.go | 11 +++++++++-- service/elasticloadbalancingv2/api_client.go | 11 +++++++++-- service/elasticsearchservice/api_client.go | 11 +++++++++-- service/elastictranscoder/api_client.go | 11 +++++++++-- service/emr/api_client.go | 11 +++++++++-- service/emrcontainers/api_client.go | 11 +++++++++-- service/eventbridge/api_client.go | 11 +++++++++-- service/firehose/api_client.go | 11 +++++++++-- service/fms/api_client.go | 11 +++++++++-- service/forecast/api_client.go | 11 +++++++++-- service/forecastquery/api_client.go | 11 +++++++++-- service/frauddetector/api_client.go | 11 +++++++++-- service/fsx/api_client.go | 11 +++++++++-- service/gamelift/api_client.go | 11 +++++++++-- service/glacier/api_client.go | 11 +++++++++-- service/globalaccelerator/api_client.go | 11 +++++++++-- service/glue/api_client.go | 11 +++++++++-- service/greengrass/api_client.go | 11 +++++++++-- service/greengrassv2/api_client.go | 11 +++++++++-- service/groundstation/api_client.go | 11 +++++++++-- service/guardduty/api_client.go | 11 +++++++++-- service/health/api_client.go | 11 +++++++++-- service/healthlake/api_client.go | 11 +++++++++-- service/honeycode/api_client.go | 11 +++++++++-- service/iam/api_client.go | 11 +++++++++-- service/identitystore/api_client.go | 11 +++++++++-- service/imagebuilder/api_client.go | 11 +++++++++-- service/inspector/api_client.go | 11 +++++++++-- service/iot/api_client.go | 11 +++++++++-- service/iot1clickdevicesservice/api_client.go | 11 +++++++++-- service/iot1clickprojects/api_client.go | 11 +++++++++-- service/iotanalytics/api_client.go | 11 +++++++++-- service/iotdataplane/api_client.go | 11 +++++++++-- service/iotdeviceadvisor/api_client.go | 11 +++++++++-- service/iotevents/api_client.go | 11 +++++++++-- service/ioteventsdata/api_client.go | 11 +++++++++-- service/iotfleethub/api_client.go | 11 +++++++++-- service/iotjobsdataplane/api_client.go | 11 +++++++++-- service/iotsecuretunneling/api_client.go | 11 +++++++++-- service/iotsitewise/api_client.go | 11 +++++++++-- service/iotthingsgraph/api_client.go | 11 +++++++++-- service/iotwireless/api_client.go | 11 +++++++++-- service/ivs/api_client.go | 11 +++++++++-- service/kafka/api_client.go | 11 +++++++++-- service/kendra/api_client.go | 11 +++++++++-- service/kinesis/api_client.go | 11 +++++++++-- service/kinesisanalytics/api_client.go | 11 +++++++++-- service/kinesisanalyticsv2/api_client.go | 11 +++++++++-- service/kinesisvideo/api_client.go | 11 +++++++++-- service/kinesisvideoarchivedmedia/api_client.go | 11 +++++++++-- service/kinesisvideomedia/api_client.go | 11 +++++++++-- service/kinesisvideosignaling/api_client.go | 11 +++++++++-- service/kms/api_client.go | 11 +++++++++-- service/lakeformation/api_client.go | 11 +++++++++-- service/lambda/api_client.go | 11 +++++++++-- service/lexmodelbuildingservice/api_client.go | 11 +++++++++-- service/lexruntimeservice/api_client.go | 11 +++++++++-- service/licensemanager/api_client.go | 11 +++++++++-- service/lightsail/api_client.go | 11 +++++++++-- service/lookoutvision/api_client.go | 11 +++++++++-- service/machinelearning/api_client.go | 11 +++++++++-- service/macie/api_client.go | 11 +++++++++-- service/macie2/api_client.go | 11 +++++++++-- service/managedblockchain/api_client.go | 11 +++++++++-- service/marketplacecatalog/api_client.go | 11 +++++++++-- service/marketplacecommerceanalytics/api_client.go | 11 +++++++++-- service/marketplaceentitlementservice/api_client.go | 11 +++++++++-- service/marketplacemetering/api_client.go | 11 +++++++++-- service/mediaconnect/api_client.go | 11 +++++++++-- service/mediaconvert/api_client.go | 11 +++++++++-- service/medialive/api_client.go | 11 +++++++++-- service/mediapackage/api_client.go | 11 +++++++++-- service/mediapackagevod/api_client.go | 11 +++++++++-- service/mediastore/api_client.go | 11 +++++++++-- service/mediastoredata/api_client.go | 11 +++++++++-- service/mediatailor/api_client.go | 11 +++++++++-- service/migrationhub/api_client.go | 11 +++++++++-- service/migrationhubconfig/api_client.go | 11 +++++++++-- service/mobile/api_client.go | 11 +++++++++-- service/mq/api_client.go | 11 +++++++++-- service/mturk/api_client.go | 11 +++++++++-- service/neptune/api_client.go | 11 +++++++++-- service/networkfirewall/api_client.go | 11 +++++++++-- service/networkmanager/api_client.go | 11 +++++++++-- service/opsworks/api_client.go | 11 +++++++++-- service/opsworkscm/api_client.go | 11 +++++++++-- service/organizations/api_client.go | 11 +++++++++-- service/outposts/api_client.go | 11 +++++++++-- service/personalize/api_client.go | 11 +++++++++-- service/personalizeevents/api_client.go | 11 +++++++++-- service/personalizeruntime/api_client.go | 11 +++++++++-- service/pi/api_client.go | 11 +++++++++-- service/pinpoint/api_client.go | 11 +++++++++-- service/pinpointemail/api_client.go | 11 +++++++++-- service/pinpointsmsvoice/api_client.go | 11 +++++++++-- service/polly/api_client.go | 11 +++++++++-- service/pricing/api_client.go | 11 +++++++++-- service/qldb/api_client.go | 11 +++++++++-- service/qldbsession/api_client.go | 11 +++++++++-- service/quicksight/api_client.go | 11 +++++++++-- service/ram/api_client.go | 11 +++++++++-- service/rds/api_client.go | 11 +++++++++-- service/rdsdata/api_client.go | 11 +++++++++-- service/redshift/api_client.go | 11 +++++++++-- service/redshiftdata/api_client.go | 11 +++++++++-- service/rekognition/api_client.go | 11 +++++++++-- service/resourcegroups/api_client.go | 11 +++++++++-- service/resourcegroupstaggingapi/api_client.go | 11 +++++++++-- service/robomaker/api_client.go | 11 +++++++++-- service/route53/api_client.go | 11 +++++++++-- service/route53domains/api_client.go | 11 +++++++++-- service/route53resolver/api_client.go | 11 +++++++++-- service/s3/api_client.go | 11 +++++++++-- service/s3control/api_client.go | 11 +++++++++-- service/s3outposts/api_client.go | 11 +++++++++-- service/sagemaker/api_client.go | 11 +++++++++-- service/sagemakera2iruntime/api_client.go | 11 +++++++++-- service/sagemakeredge/api_client.go | 11 +++++++++-- service/sagemakerfeaturestoreruntime/api_client.go | 11 +++++++++-- service/sagemakerruntime/api_client.go | 11 +++++++++-- service/savingsplans/api_client.go | 11 +++++++++-- service/schemas/api_client.go | 11 +++++++++-- service/secretsmanager/api_client.go | 11 +++++++++-- service/securityhub/api_client.go | 11 +++++++++-- service/serverlessapplicationrepository/api_client.go | 11 +++++++++-- service/servicecatalog/api_client.go | 11 +++++++++-- service/servicecatalogappregistry/api_client.go | 11 +++++++++-- service/servicediscovery/api_client.go | 11 +++++++++-- service/servicequotas/api_client.go | 11 +++++++++-- service/ses/api_client.go | 11 +++++++++-- service/sesv2/api_client.go | 11 +++++++++-- service/sfn/api_client.go | 11 +++++++++-- service/shield/api_client.go | 11 +++++++++-- service/signer/api_client.go | 11 +++++++++-- service/sms/api_client.go | 11 +++++++++-- service/snowball/api_client.go | 11 +++++++++-- service/sns/api_client.go | 11 +++++++++-- service/sqs/api_client.go | 11 +++++++++-- service/ssm/api_client.go | 11 +++++++++-- service/sso/api_client.go | 11 +++++++++-- service/ssoadmin/api_client.go | 11 +++++++++-- service/ssooidc/api_client.go | 11 +++++++++-- service/storagegateway/api_client.go | 11 +++++++++-- service/sts/api_client.go | 11 +++++++++-- service/support/api_client.go | 11 +++++++++-- service/swf/api_client.go | 11 +++++++++-- service/synthetics/api_client.go | 11 +++++++++-- service/textract/api_client.go | 11 +++++++++-- service/timestreamquery/api_client.go | 11 +++++++++-- service/timestreamwrite/api_client.go | 11 +++++++++-- service/transcribe/api_client.go | 11 +++++++++-- service/transfer/api_client.go | 11 +++++++++-- service/translate/api_client.go | 11 +++++++++-- service/waf/api_client.go | 11 +++++++++-- service/wafregional/api_client.go | 11 +++++++++-- service/wafv2/api_client.go | 11 +++++++++-- service/wellarchitected/api_client.go | 11 +++++++++-- service/workdocs/api_client.go | 11 +++++++++-- service/worklink/api_client.go | 11 +++++++++-- service/workmail/api_client.go | 11 +++++++++-- service/workmailmessageflow/api_client.go | 11 +++++++++-- service/workspaces/api_client.go | 11 +++++++++-- service/xray/api_client.go | 11 +++++++++-- 256 files changed, 2304 insertions(+), 512 deletions(-) diff --git a/internal/protocoltest/awsrestjson/api_client.go b/internal/protocoltest/awsrestjson/api_client.go index 2e05c74b171..0f89d157fca 100644 --- a/internal/protocoltest/awsrestjson/api_client.go +++ b/internal/protocoltest/awsrestjson/api_client.go @@ -79,7 +79,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -152,12 +152,12 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -176,6 +176,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/internal/protocoltest/ec2query/api_client.go b/internal/protocoltest/ec2query/api_client.go index b3021334f59..e7f0f68555d 100644 --- a/internal/protocoltest/ec2query/api_client.go +++ b/internal/protocoltest/ec2query/api_client.go @@ -79,7 +79,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -152,12 +152,12 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -176,6 +176,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/internal/protocoltest/jsonrpc/api_client.go b/internal/protocoltest/jsonrpc/api_client.go index b6187a2387e..6a6e702982a 100644 --- a/internal/protocoltest/jsonrpc/api_client.go +++ b/internal/protocoltest/jsonrpc/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/internal/protocoltest/jsonrpc10/api_client.go b/internal/protocoltest/jsonrpc10/api_client.go index 092f7375e11..896ed4005d4 100644 --- a/internal/protocoltest/jsonrpc10/api_client.go +++ b/internal/protocoltest/jsonrpc10/api_client.go @@ -71,7 +71,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -144,12 +144,12 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -168,6 +168,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/internal/protocoltest/query/api_client.go b/internal/protocoltest/query/api_client.go index 3522c8ac44c..6bae3029371 100644 --- a/internal/protocoltest/query/api_client.go +++ b/internal/protocoltest/query/api_client.go @@ -79,7 +79,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -152,12 +152,12 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -176,6 +176,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/internal/protocoltest/restxml/api_client.go b/internal/protocoltest/restxml/api_client.go index d6bb75bbca8..5ac50f197e3 100644 --- a/internal/protocoltest/restxml/api_client.go +++ b/internal/protocoltest/restxml/api_client.go @@ -79,7 +79,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -152,12 +152,12 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -176,6 +176,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/accessanalyzer/api_client.go b/service/accessanalyzer/api_client.go index 0486e069214..202e00d0038 100644 --- a/service/accessanalyzer/api_client.go +++ b/service/accessanalyzer/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/acm/api_client.go b/service/acm/api_client.go index 81c132e48ee..8b355f3d4a4 100644 --- a/service/acm/api_client.go +++ b/service/acm/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/acmpca/api_client.go b/service/acmpca/api_client.go index 0219c0737ae..06736732204 100644 --- a/service/acmpca/api_client.go +++ b/service/acmpca/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/alexaforbusiness/api_client.go b/service/alexaforbusiness/api_client.go index b830f99cc22..77d386adfe8 100644 --- a/service/alexaforbusiness/api_client.go +++ b/service/alexaforbusiness/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/amplify/api_client.go b/service/amplify/api_client.go index 155ea70ac32..0d28edce8a8 100644 --- a/service/amplify/api_client.go +++ b/service/amplify/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/apigateway/api_client.go b/service/apigateway/api_client.go index 6fe3bd5a669..109e20fb677 100644 --- a/service/apigateway/api_client.go +++ b/service/apigateway/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/apigatewaymanagementapi/api_client.go b/service/apigatewaymanagementapi/api_client.go index a1890a585f8..a269b09eb62 100644 --- a/service/apigatewaymanagementapi/api_client.go +++ b/service/apigatewaymanagementapi/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/apigatewayv2/api_client.go b/service/apigatewayv2/api_client.go index 5a5a5b62eed..3609e5c1fdb 100644 --- a/service/apigatewayv2/api_client.go +++ b/service/apigatewayv2/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/appconfig/api_client.go b/service/appconfig/api_client.go index 49993eb3aab..269b26b001e 100644 --- a/service/appconfig/api_client.go +++ b/service/appconfig/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/appflow/api_client.go b/service/appflow/api_client.go index 4497c775a8f..862d9f78485 100644 --- a/service/appflow/api_client.go +++ b/service/appflow/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/appintegrations/api_client.go b/service/appintegrations/api_client.go index 267c282bdd0..7998b737ded 100644 --- a/service/appintegrations/api_client.go +++ b/service/appintegrations/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/applicationautoscaling/api_client.go b/service/applicationautoscaling/api_client.go index 12dbb477047..72bb0e72c93 100644 --- a/service/applicationautoscaling/api_client.go +++ b/service/applicationautoscaling/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/applicationdiscoveryservice/api_client.go b/service/applicationdiscoveryservice/api_client.go index f308bb5efbe..90aec26bf7e 100644 --- a/service/applicationdiscoveryservice/api_client.go +++ b/service/applicationdiscoveryservice/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/applicationinsights/api_client.go b/service/applicationinsights/api_client.go index e51d6b4bcfd..649dd0e9143 100644 --- a/service/applicationinsights/api_client.go +++ b/service/applicationinsights/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/appmesh/api_client.go b/service/appmesh/api_client.go index 8818a3d5bbd..60a85319015 100644 --- a/service/appmesh/api_client.go +++ b/service/appmesh/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/appstream/api_client.go b/service/appstream/api_client.go index daa11ab25aa..7881a649c70 100644 --- a/service/appstream/api_client.go +++ b/service/appstream/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/appsync/api_client.go b/service/appsync/api_client.go index 350b4574ee0..5900e3257dd 100644 --- a/service/appsync/api_client.go +++ b/service/appsync/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/athena/api_client.go b/service/athena/api_client.go index ec9683de3ae..2d674074f78 100644 --- a/service/athena/api_client.go +++ b/service/athena/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/auditmanager/api_client.go b/service/auditmanager/api_client.go index cf41347ebc3..4bab5c0efd0 100644 --- a/service/auditmanager/api_client.go +++ b/service/auditmanager/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/autoscaling/api_client.go b/service/autoscaling/api_client.go index 091d3427d4a..625b1c5009a 100644 --- a/service/autoscaling/api_client.go +++ b/service/autoscaling/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/autoscalingplans/api_client.go b/service/autoscalingplans/api_client.go index 2cc336372bf..8258b343bd8 100644 --- a/service/autoscalingplans/api_client.go +++ b/service/autoscalingplans/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/backup/api_client.go b/service/backup/api_client.go index 31401c69644..503ac4fd0cf 100644 --- a/service/backup/api_client.go +++ b/service/backup/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/batch/api_client.go b/service/batch/api_client.go index c0344f3bb06..543a300716a 100644 --- a/service/batch/api_client.go +++ b/service/batch/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/braket/api_client.go b/service/braket/api_client.go index 2e1612baebc..b5eccf12f2e 100644 --- a/service/braket/api_client.go +++ b/service/braket/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/budgets/api_client.go b/service/budgets/api_client.go index 7f049a777c8..58ed3a20fc5 100644 --- a/service/budgets/api_client.go +++ b/service/budgets/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/chime/api_client.go b/service/chime/api_client.go index e4976c4fc83..5bc1624c979 100644 --- a/service/chime/api_client.go +++ b/service/chime/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloud9/api_client.go b/service/cloud9/api_client.go index 75d251b799d..d392dc3f7bb 100644 --- a/service/cloud9/api_client.go +++ b/service/cloud9/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/clouddirectory/api_client.go b/service/clouddirectory/api_client.go index cfc9623da64..ca3164a0c59 100644 --- a/service/clouddirectory/api_client.go +++ b/service/clouddirectory/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloudformation/api_client.go b/service/cloudformation/api_client.go index ca333e37353..9f7f28bd1ff 100644 --- a/service/cloudformation/api_client.go +++ b/service/cloudformation/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloudfront/api_client.go b/service/cloudfront/api_client.go index c6a07fbfa34..b998b293dba 100644 --- a/service/cloudfront/api_client.go +++ b/service/cloudfront/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloudhsm/api_client.go b/service/cloudhsm/api_client.go index d939fd4a77d..44a4a0e6218 100644 --- a/service/cloudhsm/api_client.go +++ b/service/cloudhsm/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloudhsmv2/api_client.go b/service/cloudhsmv2/api_client.go index d4b1977b544..cd93e6840c9 100644 --- a/service/cloudhsmv2/api_client.go +++ b/service/cloudhsmv2/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloudsearch/api_client.go b/service/cloudsearch/api_client.go index 0a0a5f67bc4..9a3a014a279 100644 --- a/service/cloudsearch/api_client.go +++ b/service/cloudsearch/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloudsearchdomain/api_client.go b/service/cloudsearchdomain/api_client.go index 10f45de15db..bccd0a32acd 100644 --- a/service/cloudsearchdomain/api_client.go +++ b/service/cloudsearchdomain/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloudtrail/api_client.go b/service/cloudtrail/api_client.go index 35129cff8d3..1b74b6a5b12 100644 --- a/service/cloudtrail/api_client.go +++ b/service/cloudtrail/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloudwatch/api_client.go b/service/cloudwatch/api_client.go index 23bfbe52772..0394042f9ac 100644 --- a/service/cloudwatch/api_client.go +++ b/service/cloudwatch/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloudwatchevents/api_client.go b/service/cloudwatchevents/api_client.go index d3e2dfca578..df4cbecc719 100644 --- a/service/cloudwatchevents/api_client.go +++ b/service/cloudwatchevents/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cloudwatchlogs/api_client.go b/service/cloudwatchlogs/api_client.go index c0e691a2f52..0d13544124b 100644 --- a/service/cloudwatchlogs/api_client.go +++ b/service/cloudwatchlogs/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/codeartifact/api_client.go b/service/codeartifact/api_client.go index 6ef2438ba29..e5b817514a4 100644 --- a/service/codeartifact/api_client.go +++ b/service/codeartifact/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/codebuild/api_client.go b/service/codebuild/api_client.go index ca227f704b1..6f77b8e2998 100644 --- a/service/codebuild/api_client.go +++ b/service/codebuild/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/codecommit/api_client.go b/service/codecommit/api_client.go index b230deccda5..5e5060dac5d 100644 --- a/service/codecommit/api_client.go +++ b/service/codecommit/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/codedeploy/api_client.go b/service/codedeploy/api_client.go index e28a7804955..0734a6d9137 100644 --- a/service/codedeploy/api_client.go +++ b/service/codedeploy/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/codeguruprofiler/api_client.go b/service/codeguruprofiler/api_client.go index 29fbd9734f6..4138470fa06 100644 --- a/service/codeguruprofiler/api_client.go +++ b/service/codeguruprofiler/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/codegurureviewer/api_client.go b/service/codegurureviewer/api_client.go index d4a6f550d12..f1d8aeb60ad 100644 --- a/service/codegurureviewer/api_client.go +++ b/service/codegurureviewer/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/codepipeline/api_client.go b/service/codepipeline/api_client.go index 3c34557018d..aa20ff8b345 100644 --- a/service/codepipeline/api_client.go +++ b/service/codepipeline/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/codestar/api_client.go b/service/codestar/api_client.go index 00ace4e0927..6a886b783fe 100644 --- a/service/codestar/api_client.go +++ b/service/codestar/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/codestarconnections/api_client.go b/service/codestarconnections/api_client.go index 2cef472586d..ddcd56916da 100644 --- a/service/codestarconnections/api_client.go +++ b/service/codestarconnections/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/codestarnotifications/api_client.go b/service/codestarnotifications/api_client.go index 6ed18d8aa61..4c5b5ea5c49 100644 --- a/service/codestarnotifications/api_client.go +++ b/service/codestarnotifications/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cognitoidentity/api_client.go b/service/cognitoidentity/api_client.go index 3b22a54e79b..e746f32466f 100644 --- a/service/cognitoidentity/api_client.go +++ b/service/cognitoidentity/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cognitoidentityprovider/api_client.go b/service/cognitoidentityprovider/api_client.go index cc9b4fffc27..4bb3b79fd6d 100644 --- a/service/cognitoidentityprovider/api_client.go +++ b/service/cognitoidentityprovider/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/cognitosync/api_client.go b/service/cognitosync/api_client.go index 3559c097b52..ba4a390038d 100644 --- a/service/cognitosync/api_client.go +++ b/service/cognitosync/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/comprehend/api_client.go b/service/comprehend/api_client.go index 9d3f2e1c356..402c96c26f7 100644 --- a/service/comprehend/api_client.go +++ b/service/comprehend/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/comprehendmedical/api_client.go b/service/comprehendmedical/api_client.go index a155f6872b8..00b547ea6be 100644 --- a/service/comprehendmedical/api_client.go +++ b/service/comprehendmedical/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/computeoptimizer/api_client.go b/service/computeoptimizer/api_client.go index 9f9617dc274..52d91a2e689 100644 --- a/service/computeoptimizer/api_client.go +++ b/service/computeoptimizer/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/configservice/api_client.go b/service/configservice/api_client.go index 4096032697a..64e94e9c96e 100644 --- a/service/configservice/api_client.go +++ b/service/configservice/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/connect/api_client.go b/service/connect/api_client.go index f293833afd5..95c6004accc 100644 --- a/service/connect/api_client.go +++ b/service/connect/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/connectcontactlens/api_client.go b/service/connectcontactlens/api_client.go index 77f6f99097c..05a98acf18c 100644 --- a/service/connectcontactlens/api_client.go +++ b/service/connectcontactlens/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/connectparticipant/api_client.go b/service/connectparticipant/api_client.go index a93b4b306ea..a933627c045 100644 --- a/service/connectparticipant/api_client.go +++ b/service/connectparticipant/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/costandusagereportservice/api_client.go b/service/costandusagereportservice/api_client.go index 3c390b47430..3931c48f5dd 100644 --- a/service/costandusagereportservice/api_client.go +++ b/service/costandusagereportservice/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/costexplorer/api_client.go b/service/costexplorer/api_client.go index cc5be0c2ad9..6eb927ac926 100644 --- a/service/costexplorer/api_client.go +++ b/service/costexplorer/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/customerprofiles/api_client.go b/service/customerprofiles/api_client.go index b34390f795a..add60f0ed02 100644 --- a/service/customerprofiles/api_client.go +++ b/service/customerprofiles/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/databasemigrationservice/api_client.go b/service/databasemigrationservice/api_client.go index b192466bcf3..aae98fc704e 100644 --- a/service/databasemigrationservice/api_client.go +++ b/service/databasemigrationservice/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/databrew/api_client.go b/service/databrew/api_client.go index 60696dc10ac..9058cd0405e 100644 --- a/service/databrew/api_client.go +++ b/service/databrew/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/dataexchange/api_client.go b/service/dataexchange/api_client.go index 74350006987..3670eed680b 100644 --- a/service/dataexchange/api_client.go +++ b/service/dataexchange/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/datapipeline/api_client.go b/service/datapipeline/api_client.go index 98fd8511325..dd7739d58ce 100644 --- a/service/datapipeline/api_client.go +++ b/service/datapipeline/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/datasync/api_client.go b/service/datasync/api_client.go index 9b4e9951764..d13098096b4 100644 --- a/service/datasync/api_client.go +++ b/service/datasync/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/dax/api_client.go b/service/dax/api_client.go index adbcf2ed262..981389f2741 100644 --- a/service/dax/api_client.go +++ b/service/dax/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/detective/api_client.go b/service/detective/api_client.go index 79b69d3bc7d..ba9079dca17 100644 --- a/service/detective/api_client.go +++ b/service/detective/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/devicefarm/api_client.go b/service/devicefarm/api_client.go index df92c0188fd..2fe17015acc 100644 --- a/service/devicefarm/api_client.go +++ b/service/devicefarm/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/devopsguru/api_client.go b/service/devopsguru/api_client.go index 546d7b70c26..429e660aff3 100644 --- a/service/devopsguru/api_client.go +++ b/service/devopsguru/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/directconnect/api_client.go b/service/directconnect/api_client.go index a8f08432d06..b3747459eeb 100644 --- a/service/directconnect/api_client.go +++ b/service/directconnect/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/directoryservice/api_client.go b/service/directoryservice/api_client.go index 52c887f78f5..b6cd458bb8b 100644 --- a/service/directoryservice/api_client.go +++ b/service/directoryservice/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/dlm/api_client.go b/service/dlm/api_client.go index 1979af5cdab..98d9f3491c4 100644 --- a/service/dlm/api_client.go +++ b/service/dlm/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/docdb/api_client.go b/service/docdb/api_client.go index 21402197a0a..73a1be95656 100644 --- a/service/docdb/api_client.go +++ b/service/docdb/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/dynamodb/api_client.go b/service/dynamodb/api_client.go index 83791a5dd23..84eccad3a9f 100644 --- a/service/dynamodb/api_client.go +++ b/service/dynamodb/api_client.go @@ -99,7 +99,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -172,13 +172,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -197,6 +197,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/dynamodbstreams/api_client.go b/service/dynamodbstreams/api_client.go index 7b30542a6cc..9eb076480e2 100644 --- a/service/dynamodbstreams/api_client.go +++ b/service/dynamodbstreams/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ebs/api_client.go b/service/ebs/api_client.go index 4f03c3384fe..4b8ccc47d6e 100644 --- a/service/ebs/api_client.go +++ b/service/ebs/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ec2/api_client.go b/service/ec2/api_client.go index 4b6acefc128..cd1826217e2 100644 --- a/service/ec2/api_client.go +++ b/service/ec2/api_client.go @@ -92,7 +92,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -165,13 +165,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -190,6 +190,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ec2instanceconnect/api_client.go b/service/ec2instanceconnect/api_client.go index 39c9608a889..cef947285e6 100644 --- a/service/ec2instanceconnect/api_client.go +++ b/service/ec2instanceconnect/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ecr/api_client.go b/service/ecr/api_client.go index c7bdd55b4b4..268a49fe2f0 100644 --- a/service/ecr/api_client.go +++ b/service/ecr/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ecrpublic/api_client.go b/service/ecrpublic/api_client.go index 97b3d6ed01e..4d233bc0ec1 100644 --- a/service/ecrpublic/api_client.go +++ b/service/ecrpublic/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ecs/api_client.go b/service/ecs/api_client.go index c1b2db9d1f0..c2277a1ee38 100644 --- a/service/ecs/api_client.go +++ b/service/ecs/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/efs/api_client.go b/service/efs/api_client.go index e3350cb7e23..40868505dd4 100644 --- a/service/efs/api_client.go +++ b/service/efs/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/eks/api_client.go b/service/eks/api_client.go index 8dc84ba90f4..6844540f0a8 100644 --- a/service/eks/api_client.go +++ b/service/eks/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/elasticache/api_client.go b/service/elasticache/api_client.go index 22e79b9d9c4..16830fceb34 100644 --- a/service/elasticache/api_client.go +++ b/service/elasticache/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/elasticbeanstalk/api_client.go b/service/elasticbeanstalk/api_client.go index 23303e25e70..c92b96a66a1 100644 --- a/service/elasticbeanstalk/api_client.go +++ b/service/elasticbeanstalk/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/elasticinference/api_client.go b/service/elasticinference/api_client.go index b39a6fa2edc..0c360714344 100644 --- a/service/elasticinference/api_client.go +++ b/service/elasticinference/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/elasticloadbalancing/api_client.go b/service/elasticloadbalancing/api_client.go index 1370b4908e4..5ac8bedeb37 100644 --- a/service/elasticloadbalancing/api_client.go +++ b/service/elasticloadbalancing/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/elasticloadbalancingv2/api_client.go b/service/elasticloadbalancingv2/api_client.go index b1e22273c79..e7b503b9221 100644 --- a/service/elasticloadbalancingv2/api_client.go +++ b/service/elasticloadbalancingv2/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/elasticsearchservice/api_client.go b/service/elasticsearchservice/api_client.go index 33563446444..7831666ce17 100644 --- a/service/elasticsearchservice/api_client.go +++ b/service/elasticsearchservice/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/elastictranscoder/api_client.go b/service/elastictranscoder/api_client.go index 5362ca57e8b..f915b6d02cb 100644 --- a/service/elastictranscoder/api_client.go +++ b/service/elastictranscoder/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/emr/api_client.go b/service/emr/api_client.go index bfefce0b15f..f2bc193b06e 100644 --- a/service/emr/api_client.go +++ b/service/emr/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/emrcontainers/api_client.go b/service/emrcontainers/api_client.go index fab93855c82..e98b58a90df 100644 --- a/service/emrcontainers/api_client.go +++ b/service/emrcontainers/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/eventbridge/api_client.go b/service/eventbridge/api_client.go index 1d6b064879f..61ff2a70fc1 100644 --- a/service/eventbridge/api_client.go +++ b/service/eventbridge/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/firehose/api_client.go b/service/firehose/api_client.go index c3f4274e89d..42153653620 100644 --- a/service/firehose/api_client.go +++ b/service/firehose/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/fms/api_client.go b/service/fms/api_client.go index 8759e00ce63..e779d8fcfa1 100644 --- a/service/fms/api_client.go +++ b/service/fms/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/forecast/api_client.go b/service/forecast/api_client.go index 5e8bf4a1946..a08a71dc404 100644 --- a/service/forecast/api_client.go +++ b/service/forecast/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/forecastquery/api_client.go b/service/forecastquery/api_client.go index 09b81bba7b7..edf901f8ab3 100644 --- a/service/forecastquery/api_client.go +++ b/service/forecastquery/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/frauddetector/api_client.go b/service/frauddetector/api_client.go index a0649c0fa07..d20d593f947 100644 --- a/service/frauddetector/api_client.go +++ b/service/frauddetector/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/fsx/api_client.go b/service/fsx/api_client.go index 9c7443bf511..958a3384b4c 100644 --- a/service/fsx/api_client.go +++ b/service/fsx/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/gamelift/api_client.go b/service/gamelift/api_client.go index 339673190d0..c010348321f 100644 --- a/service/gamelift/api_client.go +++ b/service/gamelift/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/glacier/api_client.go b/service/glacier/api_client.go index c95920b33c0..b392bcbffdc 100644 --- a/service/glacier/api_client.go +++ b/service/glacier/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/globalaccelerator/api_client.go b/service/globalaccelerator/api_client.go index b9b1bec4dba..10fccab4319 100644 --- a/service/globalaccelerator/api_client.go +++ b/service/globalaccelerator/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/glue/api_client.go b/service/glue/api_client.go index f6cfbd54a15..b5b95373f9b 100644 --- a/service/glue/api_client.go +++ b/service/glue/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/greengrass/api_client.go b/service/greengrass/api_client.go index a193352d2df..e5a3f2ef5b7 100644 --- a/service/greengrass/api_client.go +++ b/service/greengrass/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/greengrassv2/api_client.go b/service/greengrassv2/api_client.go index 6a390203e17..0d200eb009b 100644 --- a/service/greengrassv2/api_client.go +++ b/service/greengrassv2/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/groundstation/api_client.go b/service/groundstation/api_client.go index 85731a73bbf..a87de682724 100644 --- a/service/groundstation/api_client.go +++ b/service/groundstation/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/guardduty/api_client.go b/service/guardduty/api_client.go index 065f9a15d15..3f0e29669fd 100644 --- a/service/guardduty/api_client.go +++ b/service/guardduty/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/health/api_client.go b/service/health/api_client.go index 9a1b4af25eb..f46aae203b9 100644 --- a/service/health/api_client.go +++ b/service/health/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/healthlake/api_client.go b/service/healthlake/api_client.go index 848a75d0213..20fde3cf8b8 100644 --- a/service/healthlake/api_client.go +++ b/service/healthlake/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/honeycode/api_client.go b/service/honeycode/api_client.go index 5f6a4377145..1b3cb5405f7 100644 --- a/service/honeycode/api_client.go +++ b/service/honeycode/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iam/api_client.go b/service/iam/api_client.go index d1723178477..56a5c94bacb 100644 --- a/service/iam/api_client.go +++ b/service/iam/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/identitystore/api_client.go b/service/identitystore/api_client.go index bff3fc80eeb..861ac157688 100644 --- a/service/identitystore/api_client.go +++ b/service/identitystore/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/imagebuilder/api_client.go b/service/imagebuilder/api_client.go index 98276503f4a..b4d6e6149ff 100644 --- a/service/imagebuilder/api_client.go +++ b/service/imagebuilder/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/inspector/api_client.go b/service/inspector/api_client.go index 1d4190e18b8..639fdc99d57 100644 --- a/service/inspector/api_client.go +++ b/service/inspector/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iot/api_client.go b/service/iot/api_client.go index 2b0df44aa17..b7970e9cd7b 100644 --- a/service/iot/api_client.go +++ b/service/iot/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iot1clickdevicesservice/api_client.go b/service/iot1clickdevicesservice/api_client.go index 53a1bb3a83e..91a2b57e958 100644 --- a/service/iot1clickdevicesservice/api_client.go +++ b/service/iot1clickdevicesservice/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iot1clickprojects/api_client.go b/service/iot1clickprojects/api_client.go index a36ef961e45..058a2fe9b9f 100644 --- a/service/iot1clickprojects/api_client.go +++ b/service/iot1clickprojects/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iotanalytics/api_client.go b/service/iotanalytics/api_client.go index 3fd79886da5..365bb413c6f 100644 --- a/service/iotanalytics/api_client.go +++ b/service/iotanalytics/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iotdataplane/api_client.go b/service/iotdataplane/api_client.go index c8f588199c8..d6aacb76ee0 100644 --- a/service/iotdataplane/api_client.go +++ b/service/iotdataplane/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iotdeviceadvisor/api_client.go b/service/iotdeviceadvisor/api_client.go index 85ca521bce8..f7f1fe3252f 100644 --- a/service/iotdeviceadvisor/api_client.go +++ b/service/iotdeviceadvisor/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iotevents/api_client.go b/service/iotevents/api_client.go index 395088f06f4..84c26e31b1c 100644 --- a/service/iotevents/api_client.go +++ b/service/iotevents/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ioteventsdata/api_client.go b/service/ioteventsdata/api_client.go index 7fd71bad92b..1880da0f0da 100644 --- a/service/ioteventsdata/api_client.go +++ b/service/ioteventsdata/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iotfleethub/api_client.go b/service/iotfleethub/api_client.go index f2d6296ebf9..981d352b117 100644 --- a/service/iotfleethub/api_client.go +++ b/service/iotfleethub/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iotjobsdataplane/api_client.go b/service/iotjobsdataplane/api_client.go index a244b008d36..fbf0f468fa5 100644 --- a/service/iotjobsdataplane/api_client.go +++ b/service/iotjobsdataplane/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iotsecuretunneling/api_client.go b/service/iotsecuretunneling/api_client.go index c97e01ebcf1..d6368b66a48 100644 --- a/service/iotsecuretunneling/api_client.go +++ b/service/iotsecuretunneling/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iotsitewise/api_client.go b/service/iotsitewise/api_client.go index 0539fd71394..ce00cc64667 100644 --- a/service/iotsitewise/api_client.go +++ b/service/iotsitewise/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iotthingsgraph/api_client.go b/service/iotthingsgraph/api_client.go index de2dd0c4d20..977d03cf8b1 100644 --- a/service/iotthingsgraph/api_client.go +++ b/service/iotthingsgraph/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/iotwireless/api_client.go b/service/iotwireless/api_client.go index 7f534a79077..c6671e333a7 100644 --- a/service/iotwireless/api_client.go +++ b/service/iotwireless/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ivs/api_client.go b/service/ivs/api_client.go index 5613bf7b395..fd7708f5d59 100644 --- a/service/ivs/api_client.go +++ b/service/ivs/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/kafka/api_client.go b/service/kafka/api_client.go index 9c0f8172744..2b358f09df9 100644 --- a/service/kafka/api_client.go +++ b/service/kafka/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/kendra/api_client.go b/service/kendra/api_client.go index ccd018b0166..644dc848a33 100644 --- a/service/kendra/api_client.go +++ b/service/kendra/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/kinesis/api_client.go b/service/kinesis/api_client.go index a452aacdb39..9cd411b4f84 100644 --- a/service/kinesis/api_client.go +++ b/service/kinesis/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/kinesisanalytics/api_client.go b/service/kinesisanalytics/api_client.go index 278fce11337..a249047982b 100644 --- a/service/kinesisanalytics/api_client.go +++ b/service/kinesisanalytics/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/kinesisanalyticsv2/api_client.go b/service/kinesisanalyticsv2/api_client.go index 4a18a4b9efd..23f96644731 100644 --- a/service/kinesisanalyticsv2/api_client.go +++ b/service/kinesisanalyticsv2/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/kinesisvideo/api_client.go b/service/kinesisvideo/api_client.go index 06c33c3105a..dd301381405 100644 --- a/service/kinesisvideo/api_client.go +++ b/service/kinesisvideo/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/kinesisvideoarchivedmedia/api_client.go b/service/kinesisvideoarchivedmedia/api_client.go index ec172144434..0a6fbedfed6 100644 --- a/service/kinesisvideoarchivedmedia/api_client.go +++ b/service/kinesisvideoarchivedmedia/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/kinesisvideomedia/api_client.go b/service/kinesisvideomedia/api_client.go index 166d54b4445..b30ecf6e522 100644 --- a/service/kinesisvideomedia/api_client.go +++ b/service/kinesisvideomedia/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/kinesisvideosignaling/api_client.go b/service/kinesisvideosignaling/api_client.go index e1511afbdc9..474ca7f997f 100644 --- a/service/kinesisvideosignaling/api_client.go +++ b/service/kinesisvideosignaling/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/kms/api_client.go b/service/kms/api_client.go index 7e144df6779..11dbd04b730 100644 --- a/service/kms/api_client.go +++ b/service/kms/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/lakeformation/api_client.go b/service/lakeformation/api_client.go index 7486b03c90a..ed8fc094f45 100644 --- a/service/lakeformation/api_client.go +++ b/service/lakeformation/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/lambda/api_client.go b/service/lambda/api_client.go index 84129f2fc96..dd92f5b9039 100644 --- a/service/lambda/api_client.go +++ b/service/lambda/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/lexmodelbuildingservice/api_client.go b/service/lexmodelbuildingservice/api_client.go index 661e0554b49..20f71a33274 100644 --- a/service/lexmodelbuildingservice/api_client.go +++ b/service/lexmodelbuildingservice/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/lexruntimeservice/api_client.go b/service/lexruntimeservice/api_client.go index b6442c80ec0..25be223de08 100644 --- a/service/lexruntimeservice/api_client.go +++ b/service/lexruntimeservice/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/licensemanager/api_client.go b/service/licensemanager/api_client.go index f216251e2fd..d37d67deebc 100644 --- a/service/licensemanager/api_client.go +++ b/service/licensemanager/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/lightsail/api_client.go b/service/lightsail/api_client.go index d74d92f6ded..f0a8a1b7644 100644 --- a/service/lightsail/api_client.go +++ b/service/lightsail/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/lookoutvision/api_client.go b/service/lookoutvision/api_client.go index 851c07c1154..598571e0b67 100644 --- a/service/lookoutvision/api_client.go +++ b/service/lookoutvision/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/machinelearning/api_client.go b/service/machinelearning/api_client.go index 9c89ba17bcd..ae1701b0842 100644 --- a/service/machinelearning/api_client.go +++ b/service/machinelearning/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/macie/api_client.go b/service/macie/api_client.go index 2951e4ff249..e3bc3587d0e 100644 --- a/service/macie/api_client.go +++ b/service/macie/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/macie2/api_client.go b/service/macie2/api_client.go index fba1b542928..8ef39b2d68a 100644 --- a/service/macie2/api_client.go +++ b/service/macie2/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/managedblockchain/api_client.go b/service/managedblockchain/api_client.go index 5a9a99530f6..21c51d0b614 100644 --- a/service/managedblockchain/api_client.go +++ b/service/managedblockchain/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/marketplacecatalog/api_client.go b/service/marketplacecatalog/api_client.go index 72288f34fac..6c8689600d4 100644 --- a/service/marketplacecatalog/api_client.go +++ b/service/marketplacecatalog/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/marketplacecommerceanalytics/api_client.go b/service/marketplacecommerceanalytics/api_client.go index 664c7ca9cb6..248f8e80cca 100644 --- a/service/marketplacecommerceanalytics/api_client.go +++ b/service/marketplacecommerceanalytics/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/marketplaceentitlementservice/api_client.go b/service/marketplaceentitlementservice/api_client.go index 5da06dfd27a..290fc3e170b 100644 --- a/service/marketplaceentitlementservice/api_client.go +++ b/service/marketplaceentitlementservice/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/marketplacemetering/api_client.go b/service/marketplacemetering/api_client.go index 0bb5e4dfb61..59368ac7da8 100644 --- a/service/marketplacemetering/api_client.go +++ b/service/marketplacemetering/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/mediaconnect/api_client.go b/service/mediaconnect/api_client.go index 3277af7d422..3a303fdc0af 100644 --- a/service/mediaconnect/api_client.go +++ b/service/mediaconnect/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/mediaconvert/api_client.go b/service/mediaconvert/api_client.go index 7efaeb36d09..a8a713a98df 100644 --- a/service/mediaconvert/api_client.go +++ b/service/mediaconvert/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/medialive/api_client.go b/service/medialive/api_client.go index ed604588a7c..af7af74327b 100644 --- a/service/medialive/api_client.go +++ b/service/medialive/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/mediapackage/api_client.go b/service/mediapackage/api_client.go index 7314f037f01..a9e05412642 100644 --- a/service/mediapackage/api_client.go +++ b/service/mediapackage/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/mediapackagevod/api_client.go b/service/mediapackagevod/api_client.go index 8a041c27486..edafba641e6 100644 --- a/service/mediapackagevod/api_client.go +++ b/service/mediapackagevod/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/mediastore/api_client.go b/service/mediastore/api_client.go index 5bc0dd9077c..cda14dad810 100644 --- a/service/mediastore/api_client.go +++ b/service/mediastore/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/mediastoredata/api_client.go b/service/mediastoredata/api_client.go index 1de0749a410..7e38656c78a 100644 --- a/service/mediastoredata/api_client.go +++ b/service/mediastoredata/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/mediatailor/api_client.go b/service/mediatailor/api_client.go index 8b3f1baa34b..603f5730bdc 100644 --- a/service/mediatailor/api_client.go +++ b/service/mediatailor/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/migrationhub/api_client.go b/service/migrationhub/api_client.go index ac0a7f960bb..f6bcb972252 100644 --- a/service/migrationhub/api_client.go +++ b/service/migrationhub/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/migrationhubconfig/api_client.go b/service/migrationhubconfig/api_client.go index feb1d694fc9..6c5ed3034ba 100644 --- a/service/migrationhubconfig/api_client.go +++ b/service/migrationhubconfig/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/mobile/api_client.go b/service/mobile/api_client.go index 0c3ec3f83b5..8f1ca7c31a1 100644 --- a/service/mobile/api_client.go +++ b/service/mobile/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/mq/api_client.go b/service/mq/api_client.go index 33e1441feae..4dd0d913d59 100644 --- a/service/mq/api_client.go +++ b/service/mq/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/mturk/api_client.go b/service/mturk/api_client.go index 1c46c10b231..08f6a679c18 100644 --- a/service/mturk/api_client.go +++ b/service/mturk/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/neptune/api_client.go b/service/neptune/api_client.go index f6b190fbc8f..674aff106fc 100644 --- a/service/neptune/api_client.go +++ b/service/neptune/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/networkfirewall/api_client.go b/service/networkfirewall/api_client.go index ebee67f6c47..40dab9d63c9 100644 --- a/service/networkfirewall/api_client.go +++ b/service/networkfirewall/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/networkmanager/api_client.go b/service/networkmanager/api_client.go index 0e4e56b6f9e..90d54c40bc0 100644 --- a/service/networkmanager/api_client.go +++ b/service/networkmanager/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/opsworks/api_client.go b/service/opsworks/api_client.go index ed289c8b39b..e613214c5e8 100644 --- a/service/opsworks/api_client.go +++ b/service/opsworks/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/opsworkscm/api_client.go b/service/opsworkscm/api_client.go index 25535dfc04f..5e51e6ba531 100644 --- a/service/opsworkscm/api_client.go +++ b/service/opsworkscm/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/organizations/api_client.go b/service/organizations/api_client.go index b40377f2dd1..272701f44f7 100644 --- a/service/organizations/api_client.go +++ b/service/organizations/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/outposts/api_client.go b/service/outposts/api_client.go index 3becd5a3c15..d6ce367d7b4 100644 --- a/service/outposts/api_client.go +++ b/service/outposts/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/personalize/api_client.go b/service/personalize/api_client.go index 31912eb2fa0..28fe99e1ae6 100644 --- a/service/personalize/api_client.go +++ b/service/personalize/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/personalizeevents/api_client.go b/service/personalizeevents/api_client.go index e4ddd17c0e5..12b158ddb84 100644 --- a/service/personalizeevents/api_client.go +++ b/service/personalizeevents/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/personalizeruntime/api_client.go b/service/personalizeruntime/api_client.go index f3dde76c590..f773b62feed 100644 --- a/service/personalizeruntime/api_client.go +++ b/service/personalizeruntime/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/pi/api_client.go b/service/pi/api_client.go index 35ee43b8417..24d28039e50 100644 --- a/service/pi/api_client.go +++ b/service/pi/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/pinpoint/api_client.go b/service/pinpoint/api_client.go index a2e3507f841..05e9d3071db 100644 --- a/service/pinpoint/api_client.go +++ b/service/pinpoint/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/pinpointemail/api_client.go b/service/pinpointemail/api_client.go index c3a81aea8cf..c94fe48cd88 100644 --- a/service/pinpointemail/api_client.go +++ b/service/pinpointemail/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/pinpointsmsvoice/api_client.go b/service/pinpointsmsvoice/api_client.go index 58f6662d516..8a721a364ab 100644 --- a/service/pinpointsmsvoice/api_client.go +++ b/service/pinpointsmsvoice/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/polly/api_client.go b/service/polly/api_client.go index 926042606a0..d635fc37aa3 100644 --- a/service/polly/api_client.go +++ b/service/polly/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/pricing/api_client.go b/service/pricing/api_client.go index 9c694b43bf8..4891b62fa80 100644 --- a/service/pricing/api_client.go +++ b/service/pricing/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/qldb/api_client.go b/service/qldb/api_client.go index f066e870079..46ba0d225a7 100644 --- a/service/qldb/api_client.go +++ b/service/qldb/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/qldbsession/api_client.go b/service/qldbsession/api_client.go index 93efa0d1766..8b97ad5349a 100644 --- a/service/qldbsession/api_client.go +++ b/service/qldbsession/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/quicksight/api_client.go b/service/quicksight/api_client.go index cfdc3f21061..5e86d19c798 100644 --- a/service/quicksight/api_client.go +++ b/service/quicksight/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ram/api_client.go b/service/ram/api_client.go index 51ebc4a00d1..2f29d562154 100644 --- a/service/ram/api_client.go +++ b/service/ram/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/rds/api_client.go b/service/rds/api_client.go index 14ced6d8c81..a94e2f4e407 100644 --- a/service/rds/api_client.go +++ b/service/rds/api_client.go @@ -84,7 +84,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -157,13 +157,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -182,6 +182,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/rdsdata/api_client.go b/service/rdsdata/api_client.go index 3a1e3e7d883..c89621676da 100644 --- a/service/rdsdata/api_client.go +++ b/service/rdsdata/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/redshift/api_client.go b/service/redshift/api_client.go index b552dc9bdbf..2510f7a97b2 100644 --- a/service/redshift/api_client.go +++ b/service/redshift/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/redshiftdata/api_client.go b/service/redshiftdata/api_client.go index 1139cdc0550..9301f43e088 100644 --- a/service/redshiftdata/api_client.go +++ b/service/redshiftdata/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/rekognition/api_client.go b/service/rekognition/api_client.go index be48c2db946..3ad385a6c56 100644 --- a/service/rekognition/api_client.go +++ b/service/rekognition/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/resourcegroups/api_client.go b/service/resourcegroups/api_client.go index 3791cd0f765..02bc0383515 100644 --- a/service/resourcegroups/api_client.go +++ b/service/resourcegroups/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/resourcegroupstaggingapi/api_client.go b/service/resourcegroupstaggingapi/api_client.go index 9f481eba01f..61eb9d200a4 100644 --- a/service/resourcegroupstaggingapi/api_client.go +++ b/service/resourcegroupstaggingapi/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/robomaker/api_client.go b/service/robomaker/api_client.go index 05026bddf36..1a6a222564b 100644 --- a/service/robomaker/api_client.go +++ b/service/robomaker/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/route53/api_client.go b/service/route53/api_client.go index e923d9de1e9..e8bb9f0b6bd 100644 --- a/service/route53/api_client.go +++ b/service/route53/api_client.go @@ -83,7 +83,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -156,13 +156,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -181,6 +181,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/route53domains/api_client.go b/service/route53domains/api_client.go index 6443f89f390..0f60ef879c1 100644 --- a/service/route53domains/api_client.go +++ b/service/route53domains/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/route53resolver/api_client.go b/service/route53resolver/api_client.go index e3281384f25..e25a4593e73 100644 --- a/service/route53resolver/api_client.go +++ b/service/route53resolver/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/s3/api_client.go b/service/s3/api_client.go index 00047d641e0..1bf658f4bd2 100644 --- a/service/s3/api_client.go +++ b/service/s3/api_client.go @@ -88,7 +88,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // Allows you to enable arn region support for the service. UseARNRegion bool @@ -180,13 +180,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveClientConfig(cfg, &opts) return New(opts, optFns...) @@ -206,6 +206,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/s3control/api_client.go b/service/s3control/api_client.go index 26c8c81b1cf..c50daea6195 100644 --- a/service/s3control/api_client.go +++ b/service/s3control/api_client.go @@ -91,7 +91,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // Allows you to enable arn region support for the service. UseARNRegion bool @@ -170,13 +170,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveClientConfig(cfg, &opts) return New(opts, optFns...) @@ -196,6 +196,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/s3outposts/api_client.go b/service/s3outposts/api_client.go index d2a3dbaf61f..3f2ea889447 100644 --- a/service/s3outposts/api_client.go +++ b/service/s3outposts/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sagemaker/api_client.go b/service/sagemaker/api_client.go index ac321da08bf..a62de2e8318 100644 --- a/service/sagemaker/api_client.go +++ b/service/sagemaker/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sagemakera2iruntime/api_client.go b/service/sagemakera2iruntime/api_client.go index b6390943d34..7e9e17ebc78 100644 --- a/service/sagemakera2iruntime/api_client.go +++ b/service/sagemakera2iruntime/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sagemakeredge/api_client.go b/service/sagemakeredge/api_client.go index 379cfe68e43..3d2972e04b1 100644 --- a/service/sagemakeredge/api_client.go +++ b/service/sagemakeredge/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sagemakerfeaturestoreruntime/api_client.go b/service/sagemakerfeaturestoreruntime/api_client.go index 32addba4b68..fc026448624 100644 --- a/service/sagemakerfeaturestoreruntime/api_client.go +++ b/service/sagemakerfeaturestoreruntime/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sagemakerruntime/api_client.go b/service/sagemakerruntime/api_client.go index 1919d6ce97f..bf9b7397002 100644 --- a/service/sagemakerruntime/api_client.go +++ b/service/sagemakerruntime/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/savingsplans/api_client.go b/service/savingsplans/api_client.go index cbc8b7eafce..6f16e7f40f2 100644 --- a/service/savingsplans/api_client.go +++ b/service/savingsplans/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/schemas/api_client.go b/service/schemas/api_client.go index 6246fa2962c..82b627b978a 100644 --- a/service/schemas/api_client.go +++ b/service/schemas/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/secretsmanager/api_client.go b/service/secretsmanager/api_client.go index fb723c7b45b..edf4702e4d7 100644 --- a/service/secretsmanager/api_client.go +++ b/service/secretsmanager/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/securityhub/api_client.go b/service/securityhub/api_client.go index 708a5c388b7..9e308919c8b 100644 --- a/service/securityhub/api_client.go +++ b/service/securityhub/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/serverlessapplicationrepository/api_client.go b/service/serverlessapplicationrepository/api_client.go index 1a632349663..85957b3cdd3 100644 --- a/service/serverlessapplicationrepository/api_client.go +++ b/service/serverlessapplicationrepository/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/servicecatalog/api_client.go b/service/servicecatalog/api_client.go index 95734382197..d8d5771222f 100644 --- a/service/servicecatalog/api_client.go +++ b/service/servicecatalog/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/servicecatalogappregistry/api_client.go b/service/servicecatalogappregistry/api_client.go index 773311b7fb7..7db85e7948e 100644 --- a/service/servicecatalogappregistry/api_client.go +++ b/service/servicecatalogappregistry/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/servicediscovery/api_client.go b/service/servicediscovery/api_client.go index 0e1ae778c88..81cb01ac6d4 100644 --- a/service/servicediscovery/api_client.go +++ b/service/servicediscovery/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/servicequotas/api_client.go b/service/servicequotas/api_client.go index e0a91ac248d..4a50cee6251 100644 --- a/service/servicequotas/api_client.go +++ b/service/servicequotas/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ses/api_client.go b/service/ses/api_client.go index c35b37b02cd..ce3c25b7a90 100644 --- a/service/ses/api_client.go +++ b/service/ses/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sesv2/api_client.go b/service/sesv2/api_client.go index f4b7ef0805a..b48976ba9da 100644 --- a/service/sesv2/api_client.go +++ b/service/sesv2/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sfn/api_client.go b/service/sfn/api_client.go index 213e7bedd0a..f5d13b7f617 100644 --- a/service/sfn/api_client.go +++ b/service/sfn/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/shield/api_client.go b/service/shield/api_client.go index cecd8873852..49bdc01ca57 100644 --- a/service/shield/api_client.go +++ b/service/shield/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/signer/api_client.go b/service/signer/api_client.go index f23596357aa..7ae29984d89 100644 --- a/service/signer/api_client.go +++ b/service/signer/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sms/api_client.go b/service/sms/api_client.go index 8ba0a72f976..2cdc09fd95e 100644 --- a/service/sms/api_client.go +++ b/service/sms/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/snowball/api_client.go b/service/snowball/api_client.go index b7a3d42385f..52562903cc0 100644 --- a/service/snowball/api_client.go +++ b/service/snowball/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sns/api_client.go b/service/sns/api_client.go index 9826b4aa096..9f8ac65e7d7 100644 --- a/service/sns/api_client.go +++ b/service/sns/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sqs/api_client.go b/service/sqs/api_client.go index 75921cbb9c2..c6597f3aca5 100644 --- a/service/sqs/api_client.go +++ b/service/sqs/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ssm/api_client.go b/service/ssm/api_client.go index 3156d65ea11..2a1b17a2406 100644 --- a/service/ssm/api_client.go +++ b/service/ssm/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sso/api_client.go b/service/sso/api_client.go index 59497e2f725..992ac47e8cd 100644 --- a/service/sso/api_client.go +++ b/service/sso/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ssoadmin/api_client.go b/service/ssoadmin/api_client.go index 6daac551f2a..663f86d2dc3 100644 --- a/service/ssoadmin/api_client.go +++ b/service/ssoadmin/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/ssooidc/api_client.go b/service/ssooidc/api_client.go index 9e64a9e50cf..76415094857 100644 --- a/service/ssooidc/api_client.go +++ b/service/ssooidc/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/storagegateway/api_client.go b/service/storagegateway/api_client.go index d026ef73236..0d7e56c0b0a 100644 --- a/service/storagegateway/api_client.go +++ b/service/storagegateway/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/sts/api_client.go b/service/sts/api_client.go index 6d6334955fe..1d445abfd04 100644 --- a/service/sts/api_client.go +++ b/service/sts/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/support/api_client.go b/service/support/api_client.go index 938051d8f3e..209a3ac2686 100644 --- a/service/support/api_client.go +++ b/service/support/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/swf/api_client.go b/service/swf/api_client.go index 6d3a033880c..61b8907dded 100644 --- a/service/swf/api_client.go +++ b/service/swf/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/synthetics/api_client.go b/service/synthetics/api_client.go index 6b4303e6953..c05d3ad5561 100644 --- a/service/synthetics/api_client.go +++ b/service/synthetics/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/textract/api_client.go b/service/textract/api_client.go index e4c8bb81715..9058accee2f 100644 --- a/service/textract/api_client.go +++ b/service/textract/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/timestreamquery/api_client.go b/service/timestreamquery/api_client.go index 1f20a1651dd..fc544fefa1b 100644 --- a/service/timestreamquery/api_client.go +++ b/service/timestreamquery/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/timestreamwrite/api_client.go b/service/timestreamwrite/api_client.go index cebb46afc2f..1001e2a4063 100644 --- a/service/timestreamwrite/api_client.go +++ b/service/timestreamwrite/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/transcribe/api_client.go b/service/transcribe/api_client.go index 0a4caaecd8d..af4b72a9cde 100644 --- a/service/transcribe/api_client.go +++ b/service/transcribe/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/transfer/api_client.go b/service/transfer/api_client.go index 21a724e3bfd..3797ac2104c 100644 --- a/service/transfer/api_client.go +++ b/service/transfer/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/translate/api_client.go b/service/translate/api_client.go index 39bd09f2385..28c1d8f9739 100644 --- a/service/translate/api_client.go +++ b/service/translate/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/waf/api_client.go b/service/waf/api_client.go index 28c57ed5473..2cd6fa6469d 100644 --- a/service/waf/api_client.go +++ b/service/waf/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/wafregional/api_client.go b/service/wafregional/api_client.go index 11a4ffff757..ac9c3b2b082 100644 --- a/service/wafregional/api_client.go +++ b/service/wafregional/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/wafv2/api_client.go b/service/wafv2/api_client.go index 66c0bf56d1e..1ca281a8a2a 100644 --- a/service/wafv2/api_client.go +++ b/service/wafv2/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/wellarchitected/api_client.go b/service/wellarchitected/api_client.go index a93876256c6..d40ec345e36 100644 --- a/service/wellarchitected/api_client.go +++ b/service/wellarchitected/api_client.go @@ -90,7 +90,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -163,13 +163,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -188,6 +188,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/workdocs/api_client.go b/service/workdocs/api_client.go index 9003bb6fcc3..d6072553ea3 100644 --- a/service/workdocs/api_client.go +++ b/service/workdocs/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/worklink/api_client.go b/service/worklink/api_client.go index 7a655ee225b..8b413e65310 100644 --- a/service/worklink/api_client.go +++ b/service/worklink/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/workmail/api_client.go b/service/workmail/api_client.go index 429f03c48ad..407a583d75e 100644 --- a/service/workmail/api_client.go +++ b/service/workmail/api_client.go @@ -89,7 +89,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -162,13 +162,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -187,6 +187,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/workmailmessageflow/api_client.go b/service/workmailmessageflow/api_client.go index ff5f1046006..87928da2f7d 100644 --- a/service/workmailmessageflow/api_client.go +++ b/service/workmailmessageflow/api_client.go @@ -82,7 +82,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -155,13 +155,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -180,6 +180,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/workspaces/api_client.go b/service/workspaces/api_client.go index 515a339a42b..da087c71124 100644 --- a/service/workspaces/api_client.go +++ b/service/workspaces/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return diff --git a/service/xray/api_client.go b/service/xray/api_client.go index e8fb4710937..784db1649a7 100644 --- a/service/xray/api_client.go +++ b/service/xray/api_client.go @@ -81,7 +81,7 @@ type Options struct { // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. - Retryer retry.Retryer + Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. @@ -154,13 +154,13 @@ func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, - Retryer: cfg.Retryer, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } + resolveAWSRetryerProvider(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) return New(opts, optFns...) } @@ -179,6 +179,13 @@ func resolveRetryer(o *Options) { o.Retryer = retry.NewStandard() } +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil { return From b3062b3eb087eabf574239f4816ba1aa5a59ceb9 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Tue, 12 Jan 2021 16:13:27 -0800 Subject: [PATCH 7/7] Add Change Metadata --- .../config-feature-1610496608654196000.json | 9 + ...edentials-feature-1610496796301711000.json | 9 + ....ec2.imds-feature-1610496712636622000.json | 9 + ....wildcard-feature-1610496371066060000.json | 260 ++++++++++++++++++ 4 files changed, 287 insertions(+) create mode 100644 .changes/next-release/config-feature-1610496608654196000.json create mode 100644 .changes/next-release/credentials-feature-1610496796301711000.json create mode 100644 .changes/next-release/feature.ec2.imds-feature-1610496712636622000.json create mode 100644 .changes/next-release/service.wildcard-feature-1610496371066060000.json diff --git a/.changes/next-release/config-feature-1610496608654196000.json b/.changes/next-release/config-feature-1610496608654196000.json new file mode 100644 index 00000000000..0557b909dc5 --- /dev/null +++ b/.changes/next-release/config-feature-1610496608654196000.json @@ -0,0 +1,9 @@ +{ + "ID": "config-feature-1610496608654196000", + "SchemaVersion": 1, + "Module": "config", + "Type": "feature", + "Description": "Breaking Change: WithRetryer and LoadOptions has been updated to make Retryer a provider function", + "MinVersion": "", + "AffectedModules": null +} \ No newline at end of file diff --git a/.changes/next-release/credentials-feature-1610496796301711000.json b/.changes/next-release/credentials-feature-1610496796301711000.json new file mode 100644 index 00000000000..8d3b4e8521d --- /dev/null +++ b/.changes/next-release/credentials-feature-1610496796301711000.json @@ -0,0 +1,9 @@ +{ + "ID": "credentials-feature-1610496796301711000", + "SchemaVersion": 1, + "Module": "credentials", + "Type": "feature", + "Description": "endpointcreds Options Retryer member has been updated to be type aws.Retryer", + "MinVersion": "", + "AffectedModules": null +} diff --git a/.changes/next-release/feature.ec2.imds-feature-1610496712636622000.json b/.changes/next-release/feature.ec2.imds-feature-1610496712636622000.json new file mode 100644 index 00000000000..925611e5daa --- /dev/null +++ b/.changes/next-release/feature.ec2.imds-feature-1610496712636622000.json @@ -0,0 +1,9 @@ +{ + "ID": "feature.ec2.imds-feature-1610496712636622000", + "SchemaVersion": 1, + "Module": "feature/ec2/imds", + "Type": "feature", + "Description": "IMDS Client has been updated to utilize the Retryer provider function from aws.Config", + "MinVersion": "", + "AffectedModules": null +} diff --git a/.changes/next-release/service.wildcard-feature-1610496371066060000.json b/.changes/next-release/service.wildcard-feature-1610496371066060000.json new file mode 100644 index 00000000000..3897f1e966d --- /dev/null +++ b/.changes/next-release/service.wildcard-feature-1610496371066060000.json @@ -0,0 +1,260 @@ +{ + "ID": "service.wildcard-feature-1610496371066060000", + "SchemaVersion": 1, + "Module": "service/...", + "Type": "feature", + "Description": "Breaking Change: The Options Retryer memeber has been updated to be type aws.Retryer", + "MinVersion": "", + "AffectedModules": [ + "service/accessanalyzer", + "service/acm", + "service/acmpca", + "service/alexaforbusiness", + "service/amplify", + "service/apigateway", + "service/apigatewaymanagementapi", + "service/apigatewayv2", + "service/appconfig", + "service/appflow", + "service/appintegrations", + "service/applicationautoscaling", + "service/applicationdiscoveryservice", + "service/applicationinsights", + "service/appmesh", + "service/appstream", + "service/appsync", + "service/athena", + "service/auditmanager", + "service/autoscaling", + "service/autoscalingplans", + "service/backup", + "service/batch", + "service/braket", + "service/budgets", + "service/chime", + "service/cloud9", + "service/clouddirectory", + "service/cloudformation", + "service/cloudfront", + "service/cloudhsm", + "service/cloudhsmv2", + "service/cloudsearch", + "service/cloudsearchdomain", + "service/cloudtrail", + "service/cloudwatch", + "service/cloudwatchevents", + "service/cloudwatchlogs", + "service/codeartifact", + "service/codebuild", + "service/codecommit", + "service/codedeploy", + "service/codeguruprofiler", + "service/codegurureviewer", + "service/codepipeline", + "service/codestar", + "service/codestarconnections", + "service/codestarnotifications", + "service/cognitoidentity", + "service/cognitoidentityprovider", + "service/cognitosync", + "service/comprehend", + "service/comprehendmedical", + "service/computeoptimizer", + "service/configservice", + "service/connect", + "service/connectcontactlens", + "service/connectparticipant", + "service/costandusagereportservice", + "service/costexplorer", + "service/customerprofiles", + "service/databasemigrationservice", + "service/databrew", + "service/dataexchange", + "service/datapipeline", + "service/datasync", + "service/dax", + "service/detective", + "service/devicefarm", + "service/devopsguru", + "service/directconnect", + "service/directoryservice", + "service/dlm", + "service/docdb", + "service/dynamodb", + "service/dynamodbstreams", + "service/ebs", + "service/ec2", + "service/ec2instanceconnect", + "service/ecr", + "service/ecrpublic", + "service/ecs", + "service/efs", + "service/eks", + "service/elasticache", + "service/elasticbeanstalk", + "service/elasticinference", + "service/elasticloadbalancing", + "service/elasticloadbalancingv2", + "service/elasticsearchservice", + "service/elastictranscoder", + "service/emr", + "service/emrcontainers", + "service/eventbridge", + "service/firehose", + "service/fms", + "service/forecast", + "service/forecastquery", + "service/frauddetector", + "service/fsx", + "service/gamelift", + "service/glacier", + "service/globalaccelerator", + "service/glue", + "service/greengrass", + "service/greengrassv2", + "service/groundstation", + "service/guardduty", + "service/health", + "service/healthlake", + "service/honeycode", + "service/iam", + "service/identitystore", + "service/imagebuilder", + "service/inspector", + "service/iot", + "service/iot1clickdevicesservice", + "service/iot1clickprojects", + "service/iotanalytics", + "service/iotdataplane", + "service/iotdeviceadvisor", + "service/iotevents", + "service/ioteventsdata", + "service/iotfleethub", + "service/iotjobsdataplane", + "service/iotsecuretunneling", + "service/iotsitewise", + "service/iotthingsgraph", + "service/iotwireless", + "service/ivs", + "service/kafka", + "service/kendra", + "service/kinesis", + "service/kinesisanalytics", + "service/kinesisanalyticsv2", + "service/kinesisvideo", + "service/kinesisvideoarchivedmedia", + "service/kinesisvideomedia", + "service/kinesisvideosignaling", + "service/kms", + "service/lakeformation", + "service/lambda", + "service/lexmodelbuildingservice", + "service/lexruntimeservice", + "service/licensemanager", + "service/lightsail", + "service/lookoutvision", + "service/machinelearning", + "service/macie", + "service/macie2", + "service/managedblockchain", + "service/marketplacecatalog", + "service/marketplacecommerceanalytics", + "service/marketplaceentitlementservice", + "service/marketplacemetering", + "service/mediaconnect", + "service/mediaconvert", + "service/medialive", + "service/mediapackage", + "service/mediapackagevod", + "service/mediastore", + "service/mediastoredata", + "service/mediatailor", + "service/migrationhub", + "service/migrationhubconfig", + "service/mobile", + "service/mq", + "service/mturk", + "service/neptune", + "service/networkfirewall", + "service/networkmanager", + "service/opsworks", + "service/opsworkscm", + "service/organizations", + "service/outposts", + "service/personalize", + "service/personalizeevents", + "service/personalizeruntime", + "service/pi", + "service/pinpoint", + "service/pinpointemail", + "service/pinpointsmsvoice", + "service/polly", + "service/pricing", + "service/qldb", + "service/qldbsession", + "service/quicksight", + "service/ram", + "service/rds", + "service/rdsdata", + "service/redshift", + "service/redshiftdata", + "service/rekognition", + "service/resourcegroups", + "service/resourcegroupstaggingapi", + "service/robomaker", + "service/route53", + "service/route53domains", + "service/route53resolver", + "service/s3", + "service/s3control", + "service/s3outposts", + "service/sagemaker", + "service/sagemakera2iruntime", + "service/sagemakeredge", + "service/sagemakerfeaturestoreruntime", + "service/sagemakerruntime", + "service/savingsplans", + "service/schemas", + "service/secretsmanager", + "service/securityhub", + "service/serverlessapplicationrepository", + "service/servicecatalog", + "service/servicecatalogappregistry", + "service/servicediscovery", + "service/servicequotas", + "service/ses", + "service/sesv2", + "service/sfn", + "service/shield", + "service/signer", + "service/sms", + "service/snowball", + "service/sns", + "service/sqs", + "service/ssm", + "service/sso", + "service/ssoadmin", + "service/ssooidc", + "service/storagegateway", + "service/sts", + "service/support", + "service/swf", + "service/synthetics", + "service/textract", + "service/timestreamquery", + "service/timestreamwrite", + "service/transcribe", + "service/transfer", + "service/translate", + "service/waf", + "service/wafregional", + "service/wafv2", + "service/wellarchitected", + "service/workdocs", + "service/worklink", + "service/workmail", + "service/workmailmessageflow", + "service/workspaces", + "service/xray" + ] +} \ No newline at end of file