From 38fbde88b8427845595147f2118b39e5de8b0f9d Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Mon, 11 Jan 2021 19:20:42 -0800 Subject: [PATCH] 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