Makes sure to set the SigV4 service namespace for Elasticsearch and Prometheus.
Fixes #38440
(cherry picked from commit 45a844e77e)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:
co-authored by
Marcus Efraimsson
parent
ea57ae7470
commit
cac03cc7fe
@@ -84,6 +84,11 @@ func newInstanceSettings() datasource.InstanceFactoryFunc {
|
||||
return nil, fmt.Errorf("error getting http options: %w", err)
|
||||
}
|
||||
|
||||
// Set SigV4 service namespace
|
||||
if httpCliOpts.SigV4 != nil {
|
||||
httpCliOpts.SigV4.Service = "es"
|
||||
}
|
||||
|
||||
version, err := coerceVersion(jsonData["esVersion"])
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -93,6 +93,11 @@ func newInstanceSettings() datasource.InstanceFactoryFunc {
|
||||
return nil, fmt.Errorf("error getting http options: %w", err)
|
||||
}
|
||||
|
||||
// Set SigV4 service namespace
|
||||
if httpCliOpts.SigV4 != nil {
|
||||
httpCliOpts.SigV4.Service = "aps"
|
||||
}
|
||||
|
||||
httpMethod, ok := jsonData["httpMethod"].(string)
|
||||
if !ok {
|
||||
httpMethod = defaultHttpMethod
|
||||
|
||||
Reference in New Issue
Block a user