UsageCarbonEmissionsReportQuery¶
- class oci.usage_api.models.UsageCarbonEmissionsReportQuery(**kwargs)¶
Bases:
objectThe request of the generated carbon emissions usage report.
Attributes:
A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery.
A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery.
A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery.
A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery.
A constant which can be used with the date_range_name property of a UsageCarbonEmissionsReportQuery.
Gets the compartment_depth of this UsageCarbonEmissionsReportQuery.
Gets the date_range_name of this UsageCarbonEmissionsReportQuery.
Gets the emission_calculation_method of this UsageCarbonEmissionsReportQuery.
Gets the emission_type of this UsageCarbonEmissionsReportQuery.
Gets the filter of this UsageCarbonEmissionsReportQuery.
Gets the granularity of this UsageCarbonEmissionsReportQuery.
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"].
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"].
Gets the is_aggregate_by_time of this UsageCarbonEmissionsReportQuery.
[Required] Gets the tenant_id of this UsageCarbonEmissionsReportQuery.
Gets the time_usage_ended of this UsageCarbonEmissionsReportQuery.
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.
emission_calculation_method (str) – The value to assign to the emission_calculation_method property of this UsageCarbonEmissionsReportQuery.
emission_type (str) – The value to assign to the emission_type property of this UsageCarbonEmissionsReportQuery.
granularity (str) – The value to assign to the granularity 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’.
- property compartment_depth¶
Gets the compartment_depth of this UsageCarbonEmissionsReportQuery. The compartment depth level.
- Returns
The compartment_depth of this UsageCarbonEmissionsReportQuery.
- Return type
int
- property date_range_name¶
Gets the date_range_name of this UsageCarbonEmissionsReportQuery. The user interface date range, for example, LAST_THREE_MONTHS. Overrides the 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
- property emission_calculation_method¶
Gets the emission_calculation_method of this UsageCarbonEmissionsReportQuery. Specifies the method used for emission calculation, such as POWER_BASED or SPEND_BASED
- Returns
The emission_calculation_method of this UsageCarbonEmissionsReportQuery.
- Return type
str
- property emission_type¶
Gets the emission_type of this UsageCarbonEmissionsReportQuery. Specifies the type of emission, such as MARKET_BASED or LOCATION_BASED.
- Returns
The emission_type of this UsageCarbonEmissionsReportQuery.
- Return type
str
- property filter¶
Gets the filter of this UsageCarbonEmissionsReportQuery.
- Returns
The filter of this UsageCarbonEmissionsReportQuery.
- Return type
- property granularity¶
Gets the granularity of this UsageCarbonEmissionsReportQuery. The carbon emission granularity. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation.
- Returns
The granularity of this UsageCarbonEmissionsReportQuery.
- Return type
str
- property 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]
- property 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]
- property 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 costs over the query time period are summed.
- Returns
The is_aggregate_by_time of this UsageCarbonEmissionsReportQuery.
- Return type
bool
- property tenant_id¶
[Required] Gets the tenant_id of this UsageCarbonEmissionsReportQuery. Tenant ID.
- Returns
The tenant_id of this UsageCarbonEmissionsReportQuery.
- Return type
str
- property 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
- property 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