1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
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.
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor 3 Jahren
Thanks! I was looking for this solution everywhere.