CloudWatch: Pass label in GetMetricData API request when dynamic label feature toggle is enabled (#48574)

This commit is contained in:
Shirley
2022-05-05 13:59:23 +02:00
committed by GitHub
parent 610247d52a
commit b35ca8c08d
9 changed files with 201 additions and 22 deletions
+6 -3
View File
@@ -62,12 +62,15 @@ type fakeCWClient struct {
cloudwatchiface.CloudWatchAPI
cloudwatch.GetMetricDataOutput
Metrics []*cloudwatch.Metric
Metrics []*cloudwatch.Metric
MetricsPerPage int
callsGetMetricDataWithContext []*cloudwatch.GetMetricDataInput
}
func (c *fakeCWClient) GetMetricDataWithContext(aws.Context, *cloudwatch.GetMetricDataInput, ...request.Option) (*cloudwatch.GetMetricDataOutput, error) {
func (c *fakeCWClient) GetMetricDataWithContext(ctx aws.Context, input *cloudwatch.GetMetricDataInput, opts ...request.Option) (*cloudwatch.GetMetricDataOutput, error) {
c.callsGetMetricDataWithContext = append(c.callsGetMetricDataWithContext, input)
return &c.GetMetricDataOutput, nil
}