Cloudwatch: Revert aws sdk go v2 (#103644)
* Revert "CloudWatch: Import new grafana-aws-sdk with PDC fix (#103249)" This reverts commitf2b5b4e0c0. * Revert "CloudWatch: Migrate to aws-sdk-go-v2 (#103106)" This reverts commita65cc0df93. * make update-workspace
This commit is contained in:
@@ -6,11 +6,11 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
const defaultLogGroupLimit = int32(50)
|
||||
const defaultLogGroupLimit = int64(50)
|
||||
|
||||
type LogGroupsRequest struct {
|
||||
ResourceRequest
|
||||
Limit int32
|
||||
Limit int64
|
||||
LogGroupNamePrefix, LogGroupNamePattern *string
|
||||
ListAllLogGroups bool
|
||||
}
|
||||
@@ -45,11 +45,11 @@ func setIfNotEmptyString(paramValue string) *string {
|
||||
return ¶mValue
|
||||
}
|
||||
|
||||
func getLimit(limit string) int32 {
|
||||
func getLimit(limit string) int64 {
|
||||
logGroupLimit := defaultLogGroupLimit
|
||||
intLimit, err := strconv.ParseInt(limit, 10, 64)
|
||||
if err == nil && intLimit > 0 {
|
||||
logGroupLimit = int32(intLimit)
|
||||
logGroupLimit = intLimit
|
||||
}
|
||||
return logGroupLimit
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package resources
|
||||
|
||||
import (
|
||||
cloudwatchtypes "github.com/aws/aws-sdk-go-v2/service/cloudwatch/types"
|
||||
)
|
||||
import "github.com/aws/aws-sdk-go/service/cloudwatch"
|
||||
|
||||
type Dimension struct {
|
||||
Name string
|
||||
@@ -15,7 +13,7 @@ type ResourceResponse[T any] struct {
|
||||
}
|
||||
|
||||
type MetricResponse struct {
|
||||
Metric cloudwatchtypes.Metric
|
||||
*cloudwatch.Metric
|
||||
AccountId *string `json:"accountId,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user