awslogs: Replace depreacted WithEndpointResolver usage

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski 2024-02-14 18:34:12 +01:00
parent 70a4a9c969
commit 2aa13e950d
No known key found for this signature in database
GPG key ID: B85EFCFE26DEF92A

View file

@ -406,12 +406,11 @@ func newAWSLogsClient(info logger.Info, configOpts ...func(*config.LoadOptions)
clientOpts = append(
clientOpts,
cloudwatchlogs.WithAPIOptions(middleware.AddUserAgentKeyValue("Docker", dockerversion.Version)),
func(o *cloudwatchlogs.Options) {
o.BaseEndpoint = endpoint
},
)
if endpoint != nil {
clientOpts = append(clientOpts, cloudwatchlogs.WithEndpointResolver(cloudwatchlogs.EndpointResolverFromURL(*endpoint)))
}
client := cloudwatchlogs.NewFromConfig(cfg, clientOpts...)
return client, nil