1 Answer
- Newest
- Most votes
- Most comments
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.
Relevant content
- asked a year ago
- asked 2 years ago
- asked 2 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 10 months ago
Thanks! I was looking for this solution everywhere.