ArmCarbonOptimizationModelFactory.CarbonEmissionQueryFilter Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of CarbonEmissionQueryFilter.
public static Azure.ResourceManager.CarbonOptimization.Models.CarbonEmissionQueryFilter CarbonEmissionQueryFilter(string reportType = default, Azure.ResourceManager.CarbonOptimization.Models.CarbonEmissionQueryDateRange dateRange = default, System.Collections.Generic.IEnumerable<string> subscriptionList = default, System.Collections.Generic.IEnumerable<string> resourceGroupUrlList = default, System.Collections.Generic.IEnumerable<Azure.Core.ResourceType> resourceTypeList = default, System.Collections.Generic.IEnumerable<Azure.Core.AzureLocation> locationList = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.CarbonOptimization.Models.CarbonEmissionScope> carbonScopeList = default);
static member CarbonEmissionQueryFilter : string * Azure.ResourceManager.CarbonOptimization.Models.CarbonEmissionQueryDateRange * seq<string> * seq<string> * seq<Azure.Core.ResourceType> * seq<Azure.Core.AzureLocation> * seq<Azure.ResourceManager.CarbonOptimization.Models.CarbonEmissionScope> -> Azure.ResourceManager.CarbonOptimization.Models.CarbonEmissionQueryFilter
Public Shared Function CarbonEmissionQueryFilter (Optional reportType As String = Nothing, Optional dateRange As CarbonEmissionQueryDateRange = Nothing, Optional subscriptionList As IEnumerable(Of String) = Nothing, Optional resourceGroupUrlList As IEnumerable(Of String) = Nothing, Optional resourceTypeList As IEnumerable(Of ResourceType) = Nothing, Optional locationList As IEnumerable(Of AzureLocation) = Nothing, Optional carbonScopeList As IEnumerable(Of CarbonEmissionScope) = Nothing) As CarbonEmissionQueryFilter
Parameters
- reportType
- String
The ReportType requested for carbon emissions data. Required. Specifies how data is aggregated and displayed in the output, as explained in the ReportTypeEnum.
- dateRange
- CarbonEmissionQueryDateRange
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).
- subscriptionList
- IEnumerable<String>
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.
- resourceGroupUrlList
- IEnumerable<String>
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.
- resourceTypeList
- IEnumerable<ResourceType>
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'.
- locationList
- IEnumerable<AzureLocation>
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.
- carbonScopeList
- IEnumerable<CarbonEmissionScope>
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.
Returns
A new CarbonEmissionQueryFilter instance for mocking.