UsageCarbonEmissionsReportQuery¶
-
class
oci.usage_api.models.
UsageCarbonEmissionsReportQuery
(**kwargs)¶ Bases:
object
The request of the generated usage carbon emissions report.
Attributes
DATE_RANGE_NAME_CUSTOM
A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery. DATE_RANGE_NAME_LAST_ONE_YEAR
A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery. DATE_RANGE_NAME_LAST_SIX_MONTHS
A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery. DATE_RANGE_NAME_LAST_THREE_MONTHS
A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery. DATE_RANGE_NAME_LAST_TWO_MONTHS
A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery. compartment_depth
Gets the compartment_depth of this UsageCarbonEmissionsReportQuery. date_range_name
Gets the date_range_name of this UsageCarbonEmissionsReportQuery. filter
Gets the filter of this UsageCarbonEmissionsReportQuery. group_by
Gets the group_by of this UsageCarbonEmissionsReportQuery. group_by_tag
Gets the group_by_tag of this UsageCarbonEmissionsReportQuery. is_aggregate_by_time
Gets the is_aggregate_by_time of this UsageCarbonEmissionsReportQuery. tenant_id
[Required] Gets the tenant_id of this UsageCarbonEmissionsReportQuery. time_usage_ended
Gets the time_usage_ended of this UsageCarbonEmissionsReportQuery. time_usage_started
Gets the time_usage_started of this UsageCarbonEmissionsReportQuery. Methods
__init__
(**kwargs)Initializes a new UsageCarbonEmissionsReportQuery object with values from keyword arguments. -
DATE_RANGE_NAME_CUSTOM
= 'CUSTOM'¶ A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery. 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 UsageCarbonEmissionsReportQuery. This constant has a value of “LAST_ONE_YEAR”
-
DATE_RANGE_NAME_LAST_SIX_MONTHS
= 'LAST_SIX_MONTHS'¶ A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery. This constant has a value of “LAST_SIX_MONTHS”
-
DATE_RANGE_NAME_LAST_THREE_MONTHS
= 'LAST_THREE_MONTHS'¶ A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery. 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 UsageCarbonEmissionsReportQuery. This constant has a value of “LAST_TWO_MONTHS”
-
__init__
(**kwargs)¶ Initializes a new UsageCarbonEmissionsReportQuery 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 UsageCarbonEmissionsReportQuery.
- time_usage_started (datetime) – The value to assign to the time_usage_started property of this UsageCarbonEmissionsReportQuery.
- time_usage_ended (datetime) – The value to assign to the time_usage_ended property of this UsageCarbonEmissionsReportQuery.
- is_aggregate_by_time (bool) – The value to assign to the is_aggregate_by_time property of this UsageCarbonEmissionsReportQuery.
- group_by (list[str]) – The value to assign to the group_by property of this UsageCarbonEmissionsReportQuery.
- group_by_tag (list[oci.usage_api.models.Tag]) – The value to assign to the group_by_tag property of this UsageCarbonEmissionsReportQuery.
- compartment_depth (int) – The value to assign to the compartment_depth property of this UsageCarbonEmissionsReportQuery.
- filter (oci.usage_api.models.Filter) – The value to assign to the filter property of this UsageCarbonEmissionsReportQuery.
- date_range_name (str) – The value to assign to the date_range_name property of this UsageCarbonEmissionsReportQuery. Allowed values for this property are: “LAST_TWO_MONTHS”, “LAST_THREE_MONTHS”, “LAST_SIX_MONTHS”, “LAST_ONE_YEAR”, “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 UsageCarbonEmissionsReportQuery. The compartment depth level.
Returns: The compartment_depth of this UsageCarbonEmissionsReportQuery. Return type: int
-
date_range_name
¶ Gets the date_range_name of this UsageCarbonEmissionsReportQuery. The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
Allowed values for this property are: “LAST_TWO_MONTHS”, “LAST_THREE_MONTHS”, “LAST_SIX_MONTHS”, “LAST_ONE_YEAR”, “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 UsageCarbonEmissionsReportQuery. Return type: str
-
filter
¶ Gets the filter of this UsageCarbonEmissionsReportQuery.
Returns: The filter of this UsageCarbonEmissionsReportQuery. Return type: oci.usage_api.models.Filter
-
group_by
¶ Gets the group_by of this UsageCarbonEmissionsReportQuery. Specifies what to aggregate the result by. For example:
- `[“tagNamespace”, “tagKey”, “tagValue”, “service”, “skuName”, “skuPartNumber”, “unit”,
- “compartmentName”, “compartmentPath”, “compartmentId”, “platform”, “region”, “logicalAd”, “resourceId”, “tenantId”, “tenantName”]`
Returns: The group_by of this UsageCarbonEmissionsReportQuery. Return type: list[str]
-
group_by_tag
¶ Gets the group_by_tag of this UsageCarbonEmissionsReportQuery. 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 UsageCarbonEmissionsReportQuery. Return type: list[oci.usage_api.models.Tag]
-
is_aggregate_by_time
¶ Gets the is_aggregate_by_time of this UsageCarbonEmissionsReportQuery. Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
Returns: The is_aggregate_by_time of this UsageCarbonEmissionsReportQuery. Return type: bool
-
tenant_id
¶ [Required] Gets the tenant_id of this UsageCarbonEmissionsReportQuery. Tenant ID.
Returns: The tenant_id of this UsageCarbonEmissionsReportQuery. Return type: str
-
time_usage_ended
¶ Gets the time_usage_ended of this UsageCarbonEmissionsReportQuery. The usage end time.
Returns: The time_usage_ended of this UsageCarbonEmissionsReportQuery. Return type: datetime
-
time_usage_started
¶ Gets the time_usage_started of this UsageCarbonEmissionsReportQuery. The usage start time.
Returns: The time_usage_started of this UsageCarbonEmissionsReportQuery. Return type: datetime
-