carbon_service
Creates, updates, deletes, gets or lists a carbon_service resource.
Overview
| Name | carbon_service |
| Type | Resource |
| Id | azure.carbon_optimization.carbon_service |
Fields
The following fields are returned by SELECT queries:
- query_carbon_emission_reports
- query_carbon_emission_data_available_date_range
| Name | Datatype | Description |
|---|---|---|
dataType | string | The data type of the query result, indicating the format of the returned response. Required. Known values are: "OverallSummaryData", "MonthlySummaryData", "TopItemsSummaryData", "ResourceTopItemsSummaryData", "ResourceGroupTopItemsSummaryData", "TopItemsMonthlySummaryData", "ResourceTopItemsMonthlySummaryData", "ResourceGroupTopItemsMonthlySummaryData", "ItemDetailsData", "ResourceItemDetailsData", and "ResourceGroupItemDetailsData". |
latestMonthEmissions | number | Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions over the specified date range (e.g., March-June). Required. |
monthOverMonthEmissionsChangeRatio | number | The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions - previousMonthEmissions) / previousMonthEmissions. |
monthlyEmissionsChangeValue | number | The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. |
previousMonthEmissions | number | Total carbon emissions for the previous month’s date range, which is the same period as the specified date range but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). The value is measured in kgCO2E. Required. |
| Name | Datatype | Description |
|---|---|---|
endDate | string | End date parameter, format is yyyy-MM-dd. Required. |
startDate | string | Start date parameter, format is yyyy-MM-dd. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
query_carbon_emission_reports | select | API for Carbon Emissions Reports. | ||
query_carbon_emission_data_available_date_range | select | API for query carbon emission data available date range. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|
SELECT examples
- query_carbon_emission_reports
- query_carbon_emission_data_available_date_range
API for Carbon Emissions Reports.
SELECT
dataType,
latestMonthEmissions,
monthOverMonthEmissionsChangeRatio,
monthlyEmissionsChangeValue,
previousMonthEmissions
FROM azure.carbon_optimization.carbon_service
;
API for query carbon emission data available date range.
SELECT
endDate,
startDate
FROM azure.carbon_optimization.carbon_service
;