RequestSummarizedUsagesDetails

class oci.usage_api.models.RequestSummarizedUsagesDetails(**kwargs)

Bases: object

Details for the ‘/usage’ query.

Attributes

GRANULARITY_DAILY A constant which can be used with the granularity property of a RequestSummarizedUsagesDetails.
GRANULARITY_HOURLY A constant which can be used with the granularity property of a RequestSummarizedUsagesDetails.
GRANULARITY_MONTHLY A constant which can be used with the granularity property of a RequestSummarizedUsagesDetails.
GRANULARITY_TOTAL A constant which can be used with the granularity property of a RequestSummarizedUsagesDetails.
QUERY_TYPE_ALLCREDIT A constant which can be used with the query_type property of a RequestSummarizedUsagesDetails.
QUERY_TYPE_COST A constant which can be used with the query_type property of a RequestSummarizedUsagesDetails.
QUERY_TYPE_CREDIT A constant which can be used with the query_type property of a RequestSummarizedUsagesDetails.
QUERY_TYPE_EXPIREDCREDIT A constant which can be used with the query_type property of a RequestSummarizedUsagesDetails.
QUERY_TYPE_USAGE A constant which can be used with the query_type property of a RequestSummarizedUsagesDetails.
compartment_depth Gets the compartment_depth of this RequestSummarizedUsagesDetails.
filter Gets the filter of this RequestSummarizedUsagesDetails.
forecast Gets the forecast of this RequestSummarizedUsagesDetails.
granularity [Required] Gets the granularity of this RequestSummarizedUsagesDetails.
group_by Gets the group_by of this RequestSummarizedUsagesDetails.
group_by_tag Gets the group_by_tag of this RequestSummarizedUsagesDetails.
is_aggregate_by_time Gets the is_aggregate_by_time of this RequestSummarizedUsagesDetails.
query_type Gets the query_type of this RequestSummarizedUsagesDetails.
tenant_id [Required] Gets the tenant_id of this RequestSummarizedUsagesDetails.
time_usage_ended [Required] Gets the time_usage_ended of this RequestSummarizedUsagesDetails.
time_usage_started [Required] Gets the time_usage_started of this RequestSummarizedUsagesDetails.

Methods

__init__(**kwargs) Initializes a new RequestSummarizedUsagesDetails object with values from keyword arguments.
GRANULARITY_DAILY = 'DAILY'

A constant which can be used with the granularity property of a RequestSummarizedUsagesDetails. This constant has a value of “DAILY”

GRANULARITY_HOURLY = 'HOURLY'

A constant which can be used with the granularity property of a RequestSummarizedUsagesDetails. This constant has a value of “HOURLY”

GRANULARITY_MONTHLY = 'MONTHLY'

A constant which can be used with the granularity property of a RequestSummarizedUsagesDetails. This constant has a value of “MONTHLY”

GRANULARITY_TOTAL = 'TOTAL'

A constant which can be used with the granularity property of a RequestSummarizedUsagesDetails. This constant has a value of “TOTAL”

QUERY_TYPE_ALLCREDIT = 'ALLCREDIT'

A constant which can be used with the query_type property of a RequestSummarizedUsagesDetails. This constant has a value of “ALLCREDIT”

QUERY_TYPE_COST = 'COST'

A constant which can be used with the query_type property of a RequestSummarizedUsagesDetails. This constant has a value of “COST”

QUERY_TYPE_CREDIT = 'CREDIT'

A constant which can be used with the query_type property of a RequestSummarizedUsagesDetails. This constant has a value of “CREDIT”

QUERY_TYPE_EXPIREDCREDIT = 'EXPIREDCREDIT'

A constant which can be used with the query_type property of a RequestSummarizedUsagesDetails. This constant has a value of “EXPIREDCREDIT”

QUERY_TYPE_USAGE = 'USAGE'

A constant which can be used with the query_type property of a RequestSummarizedUsagesDetails. This constant has a value of “USAGE”

__init__(**kwargs)

Initializes a new RequestSummarizedUsagesDetails 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 RequestSummarizedUsagesDetails.
  • time_usage_started (datetime) – The value to assign to the time_usage_started property of this RequestSummarizedUsagesDetails.
  • time_usage_ended (datetime) – The value to assign to the time_usage_ended property of this RequestSummarizedUsagesDetails.
  • granularity (str) – The value to assign to the granularity property of this RequestSummarizedUsagesDetails. Allowed values for this property are: “HOURLY”, “DAILY”, “MONTHLY”, “TOTAL”
  • is_aggregate_by_time (bool) – The value to assign to the is_aggregate_by_time property of this RequestSummarizedUsagesDetails.
  • forecast (oci.usage_api.models.Forecast) – The value to assign to the forecast property of this RequestSummarizedUsagesDetails.
  • query_type (str) – The value to assign to the query_type property of this RequestSummarizedUsagesDetails. Allowed values for this property are: “USAGE”, “COST”, “CREDIT”, “EXPIREDCREDIT”, “ALLCREDIT”
  • group_by (list[str]) – The value to assign to the group_by property of this RequestSummarizedUsagesDetails.
  • group_by_tag (list[oci.usage_api.models.Tag]) – The value to assign to the group_by_tag property of this RequestSummarizedUsagesDetails.
  • compartment_depth (float) – The value to assign to the compartment_depth property of this RequestSummarizedUsagesDetails.
  • filter (oci.usage_api.models.Filter) – The value to assign to the filter property of this RequestSummarizedUsagesDetails.
compartment_depth

Gets the compartment_depth of this RequestSummarizedUsagesDetails. The compartment depth level.

Returns:The compartment_depth of this RequestSummarizedUsagesDetails.
Return type:float
filter

Gets the filter of this RequestSummarizedUsagesDetails.

Returns:The filter of this RequestSummarizedUsagesDetails.
Return type:oci.usage_api.models.Filter
forecast

Gets the forecast of this RequestSummarizedUsagesDetails.

Returns:The forecast of this RequestSummarizedUsagesDetails.
Return type:oci.usage_api.models.Forecast
granularity

[Required] Gets the granularity of this RequestSummarizedUsagesDetails. 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”

Returns:The granularity of this RequestSummarizedUsagesDetails.
Return type:str
group_by

Gets the group_by of this RequestSummarizedUsagesDetails. 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 RequestSummarizedUsagesDetails.
Return type:list[str]
group_by_tag

Gets the group_by_tag of this RequestSummarizedUsagesDetails. 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 RequestSummarizedUsagesDetails.
Return type:list[oci.usage_api.models.Tag]
is_aggregate_by_time

Gets the is_aggregate_by_time of this RequestSummarizedUsagesDetails. 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 RequestSummarizedUsagesDetails.
Return type:bool
query_type

Gets the query_type of this RequestSummarizedUsagesDetails. 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”

Returns:The query_type of this RequestSummarizedUsagesDetails.
Return type:str
tenant_id

[Required] Gets the tenant_id of this RequestSummarizedUsagesDetails. Tenant ID.

Returns:The tenant_id of this RequestSummarizedUsagesDetails.
Return type:str
time_usage_ended

[Required] Gets the time_usage_ended of this RequestSummarizedUsagesDetails. The usage end time.

Returns:The time_usage_ended of this RequestSummarizedUsagesDetails.
Return type:datetime
time_usage_started

[Required] Gets the time_usage_started of this RequestSummarizedUsagesDetails. The usage start time.

Returns:The time_usage_started of this RequestSummarizedUsagesDetails.
Return type:datetime