Interface CostAndUsageQuery.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<CostAndUsageQuery.Builder,
,CostAndUsageQuery> SdkBuilder<CostAndUsageQuery.Builder,
,CostAndUsageQuery> SdkPojo
- Enclosing class:
CostAndUsageQuery
-
Method Summary
Modifier and TypeMethodDescriptiondefault CostAndUsageQuery.Builder
filter
(Consumer<Expression.Builder> filter) The filter expression to be applied to the cost and usage data.filter
(Expression filter) The filter expression to be applied to the cost and usage data.granularity
(String granularity) The granularity of the retrieved data:HOURLY
,DAILY
, orMONTHLY
.granularity
(Granularity granularity) The granularity of the retrieved data:HOURLY
,DAILY
, orMONTHLY
.groupBy
(Collection<GroupDefinition> groupBy) Specifies how to group the retrieved data, such as bySERVICE
,ACCOUNT
, orTAG
.groupBy
(Consumer<GroupDefinition.Builder>... groupBy) Specifies how to group the retrieved data, such as bySERVICE
,ACCOUNT
, orTAG
.groupBy
(GroupDefinition... groupBy) Specifies how to group the retrieved data, such as bySERVICE
,ACCOUNT
, orTAG
.metrics
(Collection<MetricName> metrics) The specific cost and usage metrics to retrieve.metrics
(MetricName... metrics) The specific cost and usage metrics to retrieve.metricsWithStrings
(String... metrics) The specific cost and usage metrics to retrieve.metricsWithStrings
(Collection<String> metrics) The specific cost and usage metrics to retrieve.default CostAndUsageQuery.Builder
timeRange
(Consumer<DateTimeRange.Builder> timeRange) The time period for which to retrieve data.timeRange
(DateTimeRange timeRange) The time period for which to retrieve data.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
metricsWithStrings
The specific cost and usage metrics to retrieve.
Valid values for CostAndUsageQuery metrics are
AmortizedCost
,BlendedCost
,NetAmortizedCost
,NetUnblendedCost
,NormalizedUsageAmount
,UnblendedCost
, andUsageQuantity
.- Parameters:
metrics
- The specific cost and usage metrics to retrieve.Valid values for CostAndUsageQuery metrics are
AmortizedCost
,BlendedCost
,NetAmortizedCost
,NetUnblendedCost
,NormalizedUsageAmount
,UnblendedCost
, andUsageQuantity
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricsWithStrings
The specific cost and usage metrics to retrieve.
Valid values for CostAndUsageQuery metrics are
AmortizedCost
,BlendedCost
,NetAmortizedCost
,NetUnblendedCost
,NormalizedUsageAmount
,UnblendedCost
, andUsageQuantity
.- Parameters:
metrics
- The specific cost and usage metrics to retrieve.Valid values for CostAndUsageQuery metrics are
AmortizedCost
,BlendedCost
,NetAmortizedCost
,NetUnblendedCost
,NormalizedUsageAmount
,UnblendedCost
, andUsageQuantity
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metrics
The specific cost and usage metrics to retrieve.
Valid values for CostAndUsageQuery metrics are
AmortizedCost
,BlendedCost
,NetAmortizedCost
,NetUnblendedCost
,NormalizedUsageAmount
,UnblendedCost
, andUsageQuantity
.- Parameters:
metrics
- The specific cost and usage metrics to retrieve.Valid values for CostAndUsageQuery metrics are
AmortizedCost
,BlendedCost
,NetAmortizedCost
,NetUnblendedCost
,NormalizedUsageAmount
,UnblendedCost
, andUsageQuantity
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metrics
The specific cost and usage metrics to retrieve.
Valid values for CostAndUsageQuery metrics are
AmortizedCost
,BlendedCost
,NetAmortizedCost
,NetUnblendedCost
,NormalizedUsageAmount
,UnblendedCost
, andUsageQuantity
.- Parameters:
metrics
- The specific cost and usage metrics to retrieve.Valid values for CostAndUsageQuery metrics are
AmortizedCost
,BlendedCost
,NetAmortizedCost
,NetUnblendedCost
,NormalizedUsageAmount
,UnblendedCost
, andUsageQuantity
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
timeRange
The time period for which to retrieve data. Can be specified as absolute dates or relative time periods.
- Parameters:
timeRange
- The time period for which to retrieve data. Can be specified as absolute dates or relative time periods.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
timeRange
The time period for which to retrieve data. Can be specified as absolute dates or relative time periods.
This is a convenience method that creates an instance of theDateTimeRange.Builder
avoiding the need to create one manually viaDateTimeRange.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totimeRange(DateTimeRange)
.- Parameters:
timeRange
- a consumer that will call methods onDateTimeRange.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
granularity
The granularity of the retrieved data:
HOURLY
,DAILY
, orMONTHLY
.- Parameters:
granularity
- The granularity of the retrieved data:HOURLY
,DAILY
, orMONTHLY
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
granularity
The granularity of the retrieved data:
HOURLY
,DAILY
, orMONTHLY
.- Parameters:
granularity
- The granularity of the retrieved data:HOURLY
,DAILY
, orMONTHLY
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
groupBy
Specifies how to group the retrieved data, such as by
SERVICE
,ACCOUNT
, orTAG
.- Parameters:
groupBy
- Specifies how to group the retrieved data, such as bySERVICE
,ACCOUNT
, orTAG
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
groupBy
Specifies how to group the retrieved data, such as by
SERVICE
,ACCOUNT
, orTAG
.- Parameters:
groupBy
- Specifies how to group the retrieved data, such as bySERVICE
,ACCOUNT
, orTAG
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
groupBy
Specifies how to group the retrieved data, such as by
This is a convenience method that creates an instance of theSERVICE
,ACCOUNT
, orTAG
.GroupDefinition.Builder
avoiding the need to create one manually viaGroupDefinition.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed togroupBy(List<GroupDefinition>)
.- Parameters:
groupBy
- a consumer that will call methods onGroupDefinition.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
filter
The filter expression to be applied to the cost and usage data.
- Parameters:
filter
- The filter expression to be applied to the cost and usage data.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
filter
The filter expression to be applied to the cost and usage data.
This is a convenience method that creates an instance of theExpression.Builder
avoiding the need to create one manually viaExpression.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tofilter(Expression)
.- Parameters:
filter
- a consumer that will call methods onExpression.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-