Cloudwatch: Remove unused code (#57593)

* remove not used code and refactor check health

* fix broken test

* remove not used variable
This commit is contained in:
Erik Sundell
2022-10-25 15:03:51 +02:00
committed by GitHub
parent 8d42e1b169
commit 5daa87d7a1
4 changed files with 10 additions and 218 deletions
+7 -1
View File
@@ -164,7 +164,13 @@ func (e *cloudWatchExecutor) checkHealthMetrics(pluginCtx backend.PluginContext)
Namespace: &namespace,
MetricName: &metric,
}
_, err := e.listMetrics(pluginCtx, defaultRegion, params)
session, err := e.newSession(pluginCtx, defaultRegion)
if err != nil {
return err
}
metricClient := clients.NewMetricsClient(NewMetricsAPI(session), e.cfg)
_, err = metricClient.ListMetricsWithPageLimit(params)
return err
}