az carbon
Note
This reference is part of the carbon extension for the Azure CLI (version 2.70.0 or higher). The extension will automatically install the first time you run an az carbon command. Learn more about extensions.
Manage Carbon.
Commands
Name | Description | Type | Status |
---|---|---|---|
az carbon get-emission-data-available-date-range |
API for query carbon emission data available date range. |
Extension | GA |
az carbon get-emission-report |
API for Carbon Emissions Reports. |
Extension | GA |
az carbon get-emission-data-available-date-range
API for query carbon emission data available date range.
az carbon get-emission-data-available-date-range
Examples
Query Carbon Emission Data Available Date Range
az carbon get-emission-data-available-date-range
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az carbon get-emission-report
API for Carbon Emissions Reports.
az carbon get-emission-report --carbon-scope-list
--date-range
--subscription-list
[--item-details]
[--location-list]
[--monthly-summary]
[--overall-summary]
[--resource-group-urls]
[--resource-type-list]
[--top-items-monthly]
[--top-items-summary]
Examples
QueryCarbonEmission Overall Summary Report
az carbon get-emission-report --subscription-list "[00000000-0000-0000-0000-000000000000]" --carbon-scope-list "[Scope1,Scope2,Scope3]" --date-range "{start:2024-03-01,end:2025-03-01}" --overall-summary
QueryCarbonEmission Monthly Summary Report
az carbon get-emission-report --subscription-list "[00000000-0000-0000-0000-000000000000]" --carbon-scope-list "[Scope1,Scope2,Scope3]" --date-range "{start:2024-03-01,end:2025-03-01}" --monthly-summary
QueryCarbonEmission Item Details Report
az carbon get-emission-report --subscription-list "[00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000001]" --carbon-scope-list "[Scope1,Scope2,Scope3]" --date-range "{start:2025-03-01,end:2025-03-01}" --item-details "{category-type:ResourceType,order-by:itemName,page-size:10,sort-direction:asc}"
QueryCarbonEmission Top Items Summary Report
az carbon get-emission-report --subscription-list "[00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000001]" --carbon-scope-list "[Scope1,Scope2,Scope3]" --date-range "{start:2025-03-01,end:2025-03-01}" --top-items-summary "{category-type:ResourceType,top-items:5}"
QueryCarbonEmission Top Items Monthly Summary Report
az carbon get-emission-report --subscription-list "[00000000-0000-0000-0000-000000000000]" --carbon-scope-list "[Scope1,Scope2,Scope3]" --date-range "{start:2024-03-01,end:2025-03-01}" --top-items-monthly "{category-type:ResourceType,top-items:5}
Required Parameters
List of carbon emission scopes. Required. Accepts one or more values from EmissionScopeEnum (e.g., Scope1, Scope2, Scope3) in list form. The output will include the total emissions for the specified scopes. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
The start and end dates for carbon emissions data. Required. For ItemDetailsReport and TopItemsSummaryReport, only one month of data is supported at a time, so start and end dates should be equal within DateRange (e.g., start: 2024-06-01 and end: 2024-06-01). Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
List of subscription IDs for which carbon emissions data is requested. Required. Each subscription ID should be in lowercase format. The max length of list is 100. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Use this option to get the Item Details Report Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
List of locations(Azure Region Display Name) for carbon emissions data, with each location specified in lowercase (e.g., 'east us'). Optional. You can use the command 'az account list-locations -o table' to find Azure Region Display Names. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
Use this option to get Monthly summary report Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
Use this option to get overall summary report Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
List of resource group URLs for carbon emissions data. Optional. Each URL must follow the format '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}', and should be in all lowercase. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
List of resource types for carbon emissions data. Optional. Each resource type should be specified in lowercase, following the format 'microsoft.{service}/{resourceType}', e.g., 'microsoft.storage/storageaccounts'. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
Use this option to get the Top Items Monthly Summary Report Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
Use this option to get Top Items Summary Report Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | QueryParameters Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |