1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
2
Hello Ori,
User-Agent values can be set using the following methods:
AddUserAgentKey AddUserAgentKeyValue For example to add a key/value to the user-agent to a specific service client:
cfg, err := config.LoadDefaultConfig(context.Background()) if err != nil { panic(err) }
sfnClient := sfn.NewFromConfig(cfg, func(options *sfn.Options) { options.APIOptions = append(options.APIOptions, middleware.AddUserAgentKeyValue("customKey", "customValue")) })
APIOptions can also be mutated per-operation if wanting to add a specific User-Agent key per-operation, or can also be specified when calling config.LoadDefaultConfig if the user wants to apply the User-Agent to all clients created from the resulting aws.Config type.
Contenus pertinents
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 2 ans
Thanks! I was looking for this solution everywhere.