Skip to main content

carbon_service

Creates, updates, deletes, gets or lists a carbon_service resource.

Overview

Namecarbon_service
TypeResource
Idazure.carbon_optimization.carbon_service

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
dataTypestringThe 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".
latestMonthEmissionsnumberTotal 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.
monthOverMonthEmissionsChangeRationumberThe percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions - previousMonthEmissions) / previousMonthEmissions.
monthlyEmissionsChangeValuenumberThe change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions.
previousMonthEmissionsnumberTotal 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
query_carbon_emission_reportsselectAPI for Carbon Emissions Reports.
query_carbon_emission_data_available_date_rangeselectAPI 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.

NameDatatypeDescription

SELECT examples

API for Carbon Emissions Reports.

SELECT
dataType,
latestMonthEmissions,
monthOverMonthEmissionsChangeRatio,
monthlyEmissionsChangeValue,
previousMonthEmissions
FROM azure.carbon_optimization.carbon_service
;