RequestUsageCarbonEmissionsDetails¶
- class oci.usage_api.models.RequestUsageCarbonEmissionsDetails(**kwargs)¶
Bases:
objectDetails for the ‘/usageCarbonEmissions’ query.
Attributes:
A constant which can be used with the emission_calculation_method property of a RequestUsageCarbonEmissionsDetails.
A constant which can be used with the emission_calculation_method property of a RequestUsageCarbonEmissionsDetails.
A constant which can be used with the emission_type property of a RequestUsageCarbonEmissionsDetails.
A constant which can be used with the emission_type property of a RequestUsageCarbonEmissionsDetails.
A constant which can be used with the granularity property of a RequestUsageCarbonEmissionsDetails.
A constant which can be used with the granularity property of a RequestUsageCarbonEmissionsDetails.
Gets the compartment_depth of this RequestUsageCarbonEmissionsDetails.
Gets the emission_calculation_method of this RequestUsageCarbonEmissionsDetails.
Gets the emission_type of this RequestUsageCarbonEmissionsDetails.
Gets the filter of this RequestUsageCarbonEmissionsDetails.
Gets the granularity of this RequestUsageCarbonEmissionsDetails.
Gets the group_by of this RequestUsageCarbonEmissionsDetails. Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"].
Gets the group_by_tag of this RequestUsageCarbonEmissionsDetails. 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 RequestUsageCarbonEmissionsDetails.
[Required] Gets the tenant_id of this RequestUsageCarbonEmissionsDetails.
[Required] Gets the time_usage_ended of this RequestUsageCarbonEmissionsDetails.
[Required] Gets the time_usage_started of this RequestUsageCarbonEmissionsDetails.
Methods:
__init__(**kwargs)Initializes a new RequestUsageCarbonEmissionsDetails object with values from keyword arguments.
- EMISSION_CALCULATION_METHOD_POWER_BASED = 'POWER_BASED'¶
A constant which can be used with the emission_calculation_method property of a RequestUsageCarbonEmissionsDetails. This constant has a value of “POWER_BASED”
- EMISSION_CALCULATION_METHOD_SPEND_BASED = 'SPEND_BASED'¶
A constant which can be used with the emission_calculation_method property of a RequestUsageCarbonEmissionsDetails. This constant has a value of “SPEND_BASED”
- EMISSION_TYPE_LOCATION_BASED = 'LOCATION_BASED'¶
A constant which can be used with the emission_type property of a RequestUsageCarbonEmissionsDetails. This constant has a value of “LOCATION_BASED”
- EMISSION_TYPE_MARKET_BASED = 'MARKET_BASED'¶
A constant which can be used with the emission_type property of a RequestUsageCarbonEmissionsDetails. This constant has a value of “MARKET_BASED”
- GRANULARITY_DAILY = 'DAILY'¶
A constant which can be used with the granularity property of a RequestUsageCarbonEmissionsDetails. This constant has a value of “DAILY”
- GRANULARITY_MONTHLY = 'MONTHLY'¶
A constant which can be used with the granularity property of a RequestUsageCarbonEmissionsDetails. This constant has a value of “MONTHLY”
- __init__(**kwargs)¶
Initializes a new RequestUsageCarbonEmissionsDetails 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 RequestUsageCarbonEmissionsDetails.
time_usage_started (datetime) – The value to assign to the time_usage_started property of this RequestUsageCarbonEmissionsDetails.
time_usage_ended (datetime) – The value to assign to the time_usage_ended property of this RequestUsageCarbonEmissionsDetails.
emission_calculation_method (str) – The value to assign to the emission_calculation_method property of this RequestUsageCarbonEmissionsDetails. Allowed values for this property are: “SPEND_BASED”, “POWER_BASED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
emission_type (str) – The value to assign to the emission_type property of this RequestUsageCarbonEmissionsDetails. Allowed values for this property are: “MARKET_BASED”, “LOCATION_BASED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
granularity (str) – The value to assign to the granularity property of this RequestUsageCarbonEmissionsDetails. Allowed values for this property are: “DAILY”, “MONTHLY”, ‘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 RequestUsageCarbonEmissionsDetails.
group_by (list[str]) – The value to assign to the group_by property of this RequestUsageCarbonEmissionsDetails.
group_by_tag (list[oci.usage_api.models.Tag]) – The value to assign to the group_by_tag property of this RequestUsageCarbonEmissionsDetails.
compartment_depth (int) – The value to assign to the compartment_depth property of this RequestUsageCarbonEmissionsDetails.
filter (oci.usage_api.models.Filter) – The value to assign to the filter property of this RequestUsageCarbonEmissionsDetails.
- property compartment_depth¶
Gets the compartment_depth of this RequestUsageCarbonEmissionsDetails. The compartment depth level.
- Returns
The compartment_depth of this RequestUsageCarbonEmissionsDetails.
- Return type
int
- property emission_calculation_method¶
Gets the emission_calculation_method of this RequestUsageCarbonEmissionsDetails. Specifies the method used for emission calculation, such as POWER_BASED or SPEND_BASED
Allowed values for this property are: “SPEND_BASED”, “POWER_BASED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The emission_calculation_method of this RequestUsageCarbonEmissionsDetails.
- Return type
str
- property emission_type¶
Gets the emission_type of this RequestUsageCarbonEmissionsDetails. Specifies the type of emission, such as MARKET_BASED or LOCATION_BASED.
Allowed values for this property are: “MARKET_BASED”, “LOCATION_BASED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The emission_type of this RequestUsageCarbonEmissionsDetails.
- Return type
str
- property filter¶
Gets the filter of this RequestUsageCarbonEmissionsDetails.
- Returns
The filter of this RequestUsageCarbonEmissionsDetails.
- Return type
- property granularity¶
Gets the granularity of this RequestUsageCarbonEmissionsDetails. The carbon emission granularity. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation.
Allowed values for this property are: “DAILY”, “MONTHLY”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The granularity of this RequestUsageCarbonEmissionsDetails.
- Return type
str
- property group_by¶
Gets the group_by of this RequestUsageCarbonEmissionsDetails. Aggregate the result by. For example:
- `[“tagNamespace”, “tagKey”, “tagValue”, “service”, “skuName”, “skuPartNumber”, “unit”,
“compartmentName”, “compartmentPath”, “compartmentId”, “platform”, “region”, “logicalAd”, “resourceId”, “resourceName”, “tenantId”, “tenantName”, “subscriptionId”]`
- Returns
The group_by of this RequestUsageCarbonEmissionsDetails.
- Return type
list[str]
- property group_by_tag¶
Gets the group_by_tag of this RequestUsageCarbonEmissionsDetails. 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 RequestUsageCarbonEmissionsDetails.
- Return type
list[oci.usage_api.models.Tag]
- property is_aggregate_by_time¶
Gets the is_aggregate_by_time of this RequestUsageCarbonEmissionsDetails. Specifies whether aggregated by time. If isAggregateByTime is true, all carbon emissions usage over the query time period are summed.
- Returns
The is_aggregate_by_time of this RequestUsageCarbonEmissionsDetails.
- Return type
bool
- property tenant_id¶
[Required] Gets the tenant_id of this RequestUsageCarbonEmissionsDetails. Tenant ID.
- Returns
The tenant_id of this RequestUsageCarbonEmissionsDetails.
- Return type
str
- property time_usage_ended¶
[Required] Gets the time_usage_ended of this RequestUsageCarbonEmissionsDetails. The usage end time.
- Returns
The time_usage_ended of this RequestUsageCarbonEmissionsDetails.
- Return type
datetime
- property time_usage_started¶
[Required] Gets the time_usage_started of this RequestUsageCarbonEmissionsDetails. The usage start time.
- Returns
The time_usage_started of this RequestUsageCarbonEmissionsDetails.
- Return type
datetime