public static class ReportQuery.Builder extends Object
Constructor and Description |
---|
Builder() |
public ReportQuery.Builder tenantId(String tenantId)
Tenant ID.
tenantId
- the value to setpublic ReportQuery.Builder timeUsageStarted(Date timeUsageStarted)
The usage start time.
timeUsageStarted
- the value to setpublic ReportQuery.Builder timeUsageEnded(Date timeUsageEnded)
The usage end time.
timeUsageEnded
- the value to setpublic ReportQuery.Builder granularity(ReportQuery.Granularity granularity)
The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
granularity
- the value to setpublic ReportQuery.Builder isAggregateByTime(Boolean isAggregateByTime)
Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
isAggregateByTime
- the value to setpublic ReportQuery.Builder forecast(Forecast forecast)
public ReportQuery.Builder queryType(ReportQuery.QueryType queryType)
The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data AllCredit - Query the credit adjustments and expired credit
queryType
- the value to setpublic ReportQuery.Builder groupBy(List<String> groupBy)
Aggregate the result by. example: ["tagNamespace", "tagKey", "tagValue",
"service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath",
"compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId",
"tenantName"]
groupBy
- the value to setpublic ReportQuery.Builder groupByTag(List<Tag> groupByTag)
GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]}
groupByTag
- the value to setpublic ReportQuery.Builder compartmentDepth(BigDecimal compartmentDepth)
The compartment depth level.
compartmentDepth
- the value to setpublic ReportQuery.Builder filter(Filter filter)
public ReportQuery.Builder dateRangeName(ReportQuery.DateRangeName dateRangeName)
The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
dateRangeName
- the value to setpublic ReportQuery build()
public ReportQuery.Builder copy(ReportQuery model)
Copyright © 2016–2024. All rights reserved.