ReportQuery¶
-
class
oci.usage_api.models.
ReportQuery
(**kwargs)¶ Bases:
object
The request of the generated Cost Analysis report.
Attributes
DATE_RANGE_NAME_ALL
A constant which can be used with the date_range_name property of a ReportQuery. DATE_RANGE_NAME_CUSTOM
A constant which can be used with the date_range_name property of a ReportQuery. DATE_RANGE_NAME_LAST_ONE_YEAR
A constant which can be used with the date_range_name property of a ReportQuery. DATE_RANGE_NAME_LAST_SEVEN_DAYS
A constant which can be used with the date_range_name property of a ReportQuery. DATE_RANGE_NAME_LAST_SIX_MONTHS
A constant which can be used with the date_range_name property of a ReportQuery. DATE_RANGE_NAME_LAST_TEN_DAYS
A constant which can be used with the date_range_name property of a ReportQuery. DATE_RANGE_NAME_LAST_THREE_MONTHS
A constant which can be used with the date_range_name property of a ReportQuery. DATE_RANGE_NAME_LAST_TWO_MONTHS
A constant which can be used with the date_range_name property of a ReportQuery. DATE_RANGE_NAME_MTD
A constant which can be used with the date_range_name property of a ReportQuery. DATE_RANGE_NAME_YTD
A constant which can be used with the date_range_name property of a ReportQuery. GRANULARITY_DAILY
A constant which can be used with the granularity property of a ReportQuery. GRANULARITY_HOURLY
A constant which can be used with the granularity property of a ReportQuery. GRANULARITY_MONTHLY
A constant which can be used with the granularity property of a ReportQuery. GRANULARITY_TOTAL
A constant which can be used with the granularity property of a ReportQuery. QUERY_TYPE_ALLCREDIT
A constant which can be used with the query_type property of a ReportQuery. QUERY_TYPE_COST
A constant which can be used with the query_type property of a ReportQuery. QUERY_TYPE_CREDIT
A constant which can be used with the query_type property of a ReportQuery. QUERY_TYPE_EXPIREDCREDIT
A constant which can be used with the query_type property of a ReportQuery. QUERY_TYPE_USAGE
A constant which can be used with the query_type property of a ReportQuery. compartment_depth
Gets the compartment_depth of this ReportQuery. date_range_name
Gets the date_range_name of this ReportQuery. filter
Gets the filter of this ReportQuery. forecast
Gets the forecast of this ReportQuery. granularity
[Required] Gets the granularity of this ReportQuery. group_by
Gets the group_by of this ReportQuery. group_by_tag
Gets the group_by_tag of this ReportQuery. is_aggregate_by_time
Gets the is_aggregate_by_time of this ReportQuery. query_type
Gets the query_type of this ReportQuery. tenant_id
[Required] Gets the tenant_id of this ReportQuery. time_usage_ended
Gets the time_usage_ended of this ReportQuery. time_usage_started
Gets the time_usage_started of this ReportQuery. Methods
__init__
(**kwargs)Initializes a new ReportQuery object with values from keyword arguments. -
DATE_RANGE_NAME_ALL
= 'ALL'¶ A constant which can be used with the date_range_name property of a ReportQuery. This constant has a value of “ALL”
-
DATE_RANGE_NAME_CUSTOM
= 'CUSTOM'¶ A constant which can be used with the date_range_name property of a ReportQuery. This constant has a value of “CUSTOM”
-
DATE_RANGE_NAME_LAST_ONE_YEAR
= 'LAST_ONE_YEAR'¶ A constant which can be used with the date_range_name property of a ReportQuery. This constant has a value of “LAST_ONE_YEAR”
-
DATE_RANGE_NAME_LAST_SEVEN_DAYS
= 'LAST_SEVEN_DAYS'¶ A constant which can be used with the date_range_name property of a ReportQuery. This constant has a value of “LAST_SEVEN_DAYS”
-
DATE_RANGE_NAME_LAST_SIX_MONTHS
= 'LAST_SIX_MONTHS'¶ A constant which can be used with the date_range_name property of a ReportQuery. This constant has a value of “LAST_SIX_MONTHS”
-
DATE_RANGE_NAME_LAST_TEN_DAYS
= 'LAST_TEN_DAYS'¶ A constant which can be used with the date_range_name property of a ReportQuery. This constant has a value of “LAST_TEN_DAYS”
-
DATE_RANGE_NAME_LAST_THREE_MONTHS
= 'LAST_THREE_MONTHS'¶ A constant which can be used with the date_range_name property of a ReportQuery. This constant has a value of “LAST_THREE_MONTHS”
-
DATE_RANGE_NAME_LAST_TWO_MONTHS
= 'LAST_TWO_MONTHS'¶ A constant which can be used with the date_range_name property of a ReportQuery. This constant has a value of “LAST_TWO_MONTHS”
-
DATE_RANGE_NAME_MTD
= 'MTD'¶ A constant which can be used with the date_range_name property of a ReportQuery. This constant has a value of “MTD”
-
DATE_RANGE_NAME_YTD
= 'YTD'¶ A constant which can be used with the date_range_name property of a ReportQuery. This constant has a value of “YTD”
-
GRANULARITY_DAILY
= 'DAILY'¶ A constant which can be used with the granularity property of a ReportQuery. This constant has a value of “DAILY”
-
GRANULARITY_HOURLY
= 'HOURLY'¶ A constant which can be used with the granularity property of a ReportQuery. This constant has a value of “HOURLY”
-
GRANULARITY_MONTHLY
= 'MONTHLY'¶ A constant which can be used with the granularity property of a ReportQuery. This constant has a value of “MONTHLY”
-
GRANULARITY_TOTAL
= 'TOTAL'¶ A constant which can be used with the granularity property of a ReportQuery. This constant has a value of “TOTAL”
-
QUERY_TYPE_ALLCREDIT
= 'ALLCREDIT'¶ A constant which can be used with the query_type property of a ReportQuery. This constant has a value of “ALLCREDIT”
-
QUERY_TYPE_COST
= 'COST'¶ A constant which can be used with the query_type property of a ReportQuery. This constant has a value of “COST”
-
QUERY_TYPE_CREDIT
= 'CREDIT'¶ A constant which can be used with the query_type property of a ReportQuery. This constant has a value of “CREDIT”
-
QUERY_TYPE_EXPIREDCREDIT
= 'EXPIREDCREDIT'¶ A constant which can be used with the query_type property of a ReportQuery. This constant has a value of “EXPIREDCREDIT”
-
QUERY_TYPE_USAGE
= 'USAGE'¶ A constant which can be used with the query_type property of a ReportQuery. This constant has a value of “USAGE”
-
__init__
(**kwargs)¶ Initializes a new ReportQuery object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - tenant_id (str) – The value to assign to the tenant_id property of this ReportQuery.
- time_usage_started (datetime) – The value to assign to the time_usage_started property of this ReportQuery.
- time_usage_ended (datetime) – The value to assign to the time_usage_ended property of this ReportQuery.
- granularity (str) – The value to assign to the granularity property of this ReportQuery. Allowed values for this property are: “HOURLY”, “DAILY”, “MONTHLY”, “TOTAL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- is_aggregate_by_time (bool) – The value to assign to the is_aggregate_by_time property of this ReportQuery.
- forecast (oci.usage_api.models.Forecast) – The value to assign to the forecast property of this ReportQuery.
- query_type (str) – The value to assign to the query_type property of this ReportQuery. Allowed values for this property are: “USAGE”, “COST”, “CREDIT”, “EXPIREDCREDIT”, “ALLCREDIT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- group_by (list[str]) – The value to assign to the group_by property of this ReportQuery.
- group_by_tag (list[oci.usage_api.models.Tag]) – The value to assign to the group_by_tag property of this ReportQuery.
- compartment_depth (float) – The value to assign to the compartment_depth property of this ReportQuery.
- filter (oci.usage_api.models.Filter) – The value to assign to the filter property of this ReportQuery.
- date_range_name (str) – The value to assign to the date_range_name property of this ReportQuery. Allowed values for this property are: “LAST_SEVEN_DAYS”, “LAST_TEN_DAYS”, “MTD”, “LAST_TWO_MONTHS”, “LAST_THREE_MONTHS”, “ALL”, “LAST_SIX_MONTHS”, “LAST_ONE_YEAR”, “YTD”, “CUSTOM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
-
compartment_depth
¶ Gets the compartment_depth of this ReportQuery. The compartment depth level.
Returns: The compartment_depth of this ReportQuery. Return type: float
-
date_range_name
¶ Gets the date_range_name of this ReportQuery. The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
Allowed values for this property are: “LAST_SEVEN_DAYS”, “LAST_TEN_DAYS”, “MTD”, “LAST_TWO_MONTHS”, “LAST_THREE_MONTHS”, “ALL”, “LAST_SIX_MONTHS”, “LAST_ONE_YEAR”, “YTD”, “CUSTOM”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The date_range_name of this ReportQuery. Return type: str
-
filter
¶ Gets the filter of this ReportQuery.
Returns: The filter of this ReportQuery. Return type: oci.usage_api.models.Filter
-
forecast
¶ Gets the forecast of this ReportQuery.
Returns: The forecast of this ReportQuery. Return type: oci.usage_api.models.Forecast
-
granularity
¶ [Required] Gets the granularity of this ReportQuery. The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
Allowed values for this property are: “HOURLY”, “DAILY”, “MONTHLY”, “TOTAL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The granularity of this ReportQuery. Return type: str
-
group_by
¶ Gets the group_by of this ReportQuery. Aggregate the result by. example:
- `[“tagNamespace”, “tagKey”, “tagValue”, “service”, “skuName”, “skuPartNumber”, “unit”,
- “compartmentName”, “compartmentPath”, “compartmentId”, “platform”, “region”, “logicalAd”, “resourceId”, “tenantId”, “tenantName”]`
Returns: The group_by of this ReportQuery. Return type: list[str]
-
group_by_tag
¶ Gets the group_by_tag of this ReportQuery. 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”]Returns: The group_by_tag of this ReportQuery. Return type: list[oci.usage_api.models.Tag]
-
is_aggregate_by_time
¶ Gets the is_aggregate_by_time of this ReportQuery. Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
Returns: The is_aggregate_by_time of this ReportQuery. Return type: bool
-
query_type
¶ Gets the query_type of this ReportQuery. 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
Allowed values for this property are: “USAGE”, “COST”, “CREDIT”, “EXPIREDCREDIT”, “ALLCREDIT”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The query_type of this ReportQuery. Return type: str
-
tenant_id
¶ [Required] Gets the tenant_id of this ReportQuery. Tenant ID.
Returns: The tenant_id of this ReportQuery. Return type: str
-
time_usage_ended
¶ Gets the time_usage_ended of this ReportQuery. The usage end time.
Returns: The time_usage_ended of this ReportQuery. Return type: datetime
-
time_usage_started
¶ Gets the time_usage_started of this ReportQuery. The usage start time.
Returns: The time_usage_started of this ReportQuery. Return type: datetime
-