CostAndUsageQuery
Defines the parameters for retrieving Amazon cost and usage data. Includes specifications for metrics, time periods, granularity, grouping dimensions, and filtering conditions.
Contents
- granularity
-
The granularity of the retrieved data:
HOURLY,DAILY, orMONTHLY.Type: String
Valid Values:
HOURLY | DAILY | MONTHLYRequired: Yes
- metrics
-
The specific cost and usage metrics to retrieve.
Note
Valid values for CostAndUsageQuery metrics are
AmortizedCost,BlendedCost,NetAmortizedCost,NetUnblendedCost,NormalizedUsageAmount,UnblendedCost, andUsageQuantity.Type: Array of strings
Valid Values:
AmortizedCost | BlendedCost | NetAmortizedCost | NetUnblendedCost | NormalizedUsageAmount | UnblendedCost | UsageQuantity | SpendCoveredBySavingsPlans | Hour | Unit | CostRequired: Yes
- timeRange
-
The time period for which to retrieve data. Can be specified as absolute dates or relative time periods.
Type: DateTimeRange object
Required: Yes
- filter
-
The filter expression to be applied to the cost and usage data.
Type: Expression object
Required: No
- groupBy
-
Specifies how to group the retrieved data, such as by
SERVICE,ACCOUNT, orTAG.Type: Array of GroupDefinition objects
Required: No
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: