INNER CODE UNIT · Go
sum
kubernetes/k8s.io · infra/aws/aws-costexplorer-export/main.go:189
sum = sum[:32]
id, _ := uuid.Parse(sum)
return id.String()
}
// usageClient stores the client for costexplorer
type usageClient struct {
client *costexplorer.Client
config AWSCostExplorerExportConfig
}
// GetInputForUsage returns an input for making the cost and usage data request
func (c usageClient) GetInputForUsage(nextPageToken *string) *costexplorer.GetCostAndUsageInput {
start := now.
Add(-time.Duration(time.Hour * 24 * time.Duration(c.config.AmountOfDaysToReportFrom))).
Format(usageDateFormat)
end := now.Format(usageDateFormat)
input := &costexplorer.GetCostAndUsageInput{