Interface CostAndUsageQuery.Builder

  • Method Details

    • metricsWithStrings

      CostAndUsageQuery.Builder metricsWithStrings(Collection<String> metrics)

      The specific cost and usage metrics to retrieve.

      Valid values for CostAndUsageQuery metrics are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.

      Parameters:
      metrics - The specific cost and usage metrics to retrieve.

      Valid values for CostAndUsageQuery metrics are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • metricsWithStrings

      CostAndUsageQuery.Builder metricsWithStrings(String... metrics)

      The specific cost and usage metrics to retrieve.

      Valid values for CostAndUsageQuery metrics are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.

      Parameters:
      metrics - The specific cost and usage metrics to retrieve.

      Valid values for CostAndUsageQuery metrics are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.

      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, and UsageQuantity.

      Parameters:
      metrics - The specific cost and usage metrics to retrieve.

      Valid values for CostAndUsageQuery metrics are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.

      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, and UsageQuantity.

      Parameters:
      metrics - The specific cost and usage metrics to retrieve.

      Valid values for CostAndUsageQuery metrics are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity.

      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 the DateTimeRange.Builder avoiding the need to create one manually via DateTimeRange.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to timeRange(DateTimeRange).

      Parameters:
      timeRange - a consumer that will call methods on DateTimeRange.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • granularity

      CostAndUsageQuery.Builder granularity(String granularity)

      The granularity of the retrieved data: HOURLY, DAILY, or MONTHLY.

      Parameters:
      granularity - The granularity of the retrieved data: HOURLY, DAILY, or MONTHLY.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • granularity

      CostAndUsageQuery.Builder granularity(Granularity granularity)

      The granularity of the retrieved data: HOURLY, DAILY, or MONTHLY.

      Parameters:
      granularity - The granularity of the retrieved data: HOURLY, DAILY, or MONTHLY.
      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, or TAG.

      Parameters:
      groupBy - Specifies how to group the retrieved data, such as by SERVICE, ACCOUNT, or TAG.
      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, or TAG.

      Parameters:
      groupBy - Specifies how to group the retrieved data, such as by SERVICE, ACCOUNT, or TAG.
      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, or TAG.

      This is a convenience method that creates an instance of the GroupDefinition.Builder avoiding the need to create one manually via GroupDefinition.builder() .

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to groupBy(List<GroupDefinition>).

      Parameters:
      groupBy - a consumer that will call methods on GroupDefinition.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 the Expression.Builder avoiding the need to create one manually via Expression.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to filter(Expression).

      Parameters:
      filter - a consumer that will call methods on Expression.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: