The azure-native:costmanagement:Export resource, part of the Pulumi Azure Native provider, defines automated cost data exports that write usage and billing information to Azure Storage on a schedule. This guide focuses on two capabilities: scheduled exports to Storage containers and scope-based cost aggregation across billing accounts, management groups, and subscriptions.
Exports write to existing Storage accounts and require system-assigned managed identities with Storage Blob Data Contributor permissions on the target container. The examples are intentionally small. Combine them with your own Storage infrastructure and identity configuration.
Export daily cost data to Storage on a schedule
Finance teams often need automated cost reports delivered to Storage for analysis in Excel, Power BI, or custom tooling.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const _export = new azure_native.costmanagement.Export("export", {
definition: {
dataSet: {
configuration: {
columns: [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity",
],
},
granularity: azure_native.costmanagement.GranularityType.Daily,
},
timeframe: azure_native.costmanagement.TimeframeType.MonthToDate,
type: azure_native.costmanagement.ExportType.ActualCost,
},
deliveryInfo: {
destination: {
container: "exports",
resourceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
rootFolderPath: "ad-hoc",
},
},
exportName: "TestExport",
format: azure_native.costmanagement.FormatType.Csv,
identity: {
type: azure_native.costmanagement.SystemAssignedServiceIdentityType.SystemAssigned,
},
location: "centralus",
schedule: {
recurrence: azure_native.costmanagement.RecurrenceType.Weekly,
recurrencePeriod: {
from: "2020-06-01T00:00:00Z",
to: "2020-10-31T00:00:00Z",
},
status: azure_native.costmanagement.StatusType.Active,
},
scope: "providers/Microsoft.Billing/billingAccounts/123456",
});
import pulumi
import pulumi_azure_native as azure_native
export = azure_native.costmanagement.Export("export",
definition={
"data_set": {
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity",
],
},
"granularity": azure_native.costmanagement.GranularityType.DAILY,
},
"timeframe": azure_native.costmanagement.TimeframeType.MONTH_TO_DATE,
"type": azure_native.costmanagement.ExportType.ACTUAL_COST,
},
delivery_info={
"destination": {
"container": "exports",
"resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"root_folder_path": "ad-hoc",
},
},
export_name="TestExport",
format=azure_native.costmanagement.FormatType.CSV,
identity={
"type": azure_native.costmanagement.SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED,
},
location="centralus",
schedule={
"recurrence": azure_native.costmanagement.RecurrenceType.WEEKLY,
"recurrence_period": {
"from_": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z",
},
"status": azure_native.costmanagement.StatusType.ACTIVE,
},
scope="providers/Microsoft.Billing/billingAccounts/123456")
package main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := costmanagement.NewExport(ctx, "export", &costmanagement.ExportArgs{
Definition: &costmanagement.ExportDefinitionArgs{
DataSet: &costmanagement.ExportDatasetArgs{
Configuration: &costmanagement.ExportDatasetConfigurationArgs{
Columns: pulumi.StringArray{
pulumi.String("Date"),
pulumi.String("MeterId"),
pulumi.String("ResourceId"),
pulumi.String("ResourceLocation"),
pulumi.String("Quantity"),
},
},
Granularity: pulumi.String(costmanagement.GranularityTypeDaily),
},
Timeframe: pulumi.String(costmanagement.TimeframeTypeMonthToDate),
Type: pulumi.String(costmanagement.ExportTypeActualCost),
},
DeliveryInfo: &costmanagement.ExportDeliveryInfoArgs{
Destination: &costmanagement.ExportDeliveryDestinationArgs{
Container: pulumi.String("exports"),
ResourceId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182"),
RootFolderPath: pulumi.String("ad-hoc"),
},
},
ExportName: pulumi.String("TestExport"),
Format: pulumi.String(costmanagement.FormatTypeCsv),
Identity: &costmanagement.SystemAssignedServiceIdentityArgs{
Type: pulumi.String(costmanagement.SystemAssignedServiceIdentityTypeSystemAssigned),
},
Location: pulumi.String("centralus"),
Schedule: &costmanagement.ExportScheduleArgs{
Recurrence: pulumi.String(costmanagement.RecurrenceTypeWeekly),
RecurrencePeriod: &costmanagement.ExportRecurrencePeriodArgs{
From: pulumi.String("2020-06-01T00:00:00Z"),
To: pulumi.String("2020-10-31T00:00:00Z"),
},
Status: pulumi.String(costmanagement.StatusTypeActive),
},
Scope: pulumi.String("providers/Microsoft.Billing/billingAccounts/123456"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var export = new AzureNative.CostManagement.Export("export", new()
{
Definition = new AzureNative.CostManagement.Inputs.ExportDefinitionArgs
{
DataSet = new AzureNative.CostManagement.Inputs.ExportDatasetArgs
{
Configuration = new AzureNative.CostManagement.Inputs.ExportDatasetConfigurationArgs
{
Columns = new[]
{
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity",
},
},
Granularity = AzureNative.CostManagement.GranularityType.Daily,
},
Timeframe = AzureNative.CostManagement.TimeframeType.MonthToDate,
Type = AzureNative.CostManagement.ExportType.ActualCost,
},
DeliveryInfo = new AzureNative.CostManagement.Inputs.ExportDeliveryInfoArgs
{
Destination = new AzureNative.CostManagement.Inputs.ExportDeliveryDestinationArgs
{
Container = "exports",
ResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
RootFolderPath = "ad-hoc",
},
},
ExportName = "TestExport",
Format = AzureNative.CostManagement.FormatType.Csv,
Identity = new AzureNative.CostManagement.Inputs.SystemAssignedServiceIdentityArgs
{
Type = AzureNative.CostManagement.SystemAssignedServiceIdentityType.SystemAssigned,
},
Location = "centralus",
Schedule = new AzureNative.CostManagement.Inputs.ExportScheduleArgs
{
Recurrence = AzureNative.CostManagement.RecurrenceType.Weekly,
RecurrencePeriod = new AzureNative.CostManagement.Inputs.ExportRecurrencePeriodArgs
{
From = "2020-06-01T00:00:00Z",
To = "2020-10-31T00:00:00Z",
},
Status = AzureNative.CostManagement.StatusType.Active,
},
Scope = "providers/Microsoft.Billing/billingAccounts/123456",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.costmanagement.Export;
import com.pulumi.azurenative.costmanagement.ExportArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDefinitionArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDatasetArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDatasetConfigurationArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDeliveryInfoArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDeliveryDestinationArgs;
import com.pulumi.azurenative.costmanagement.inputs.SystemAssignedServiceIdentityArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportScheduleArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportRecurrencePeriodArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var export = new Export("export", ExportArgs.builder()
.definition(ExportDefinitionArgs.builder()
.dataSet(ExportDatasetArgs.builder()
.configuration(ExportDatasetConfigurationArgs.builder()
.columns(
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity")
.build())
.granularity("Daily")
.build())
.timeframe("MonthToDate")
.type("ActualCost")
.build())
.deliveryInfo(ExportDeliveryInfoArgs.builder()
.destination(ExportDeliveryDestinationArgs.builder()
.container("exports")
.resourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
.rootFolderPath("ad-hoc")
.build())
.build())
.exportName("TestExport")
.format("Csv")
.identity(SystemAssignedServiceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.location("centralus")
.schedule(ExportScheduleArgs.builder()
.recurrence("Weekly")
.recurrencePeriod(ExportRecurrencePeriodArgs.builder()
.from("2020-06-01T00:00:00Z")
.to("2020-10-31T00:00:00Z")
.build())
.status("Active")
.build())
.scope("providers/Microsoft.Billing/billingAccounts/123456")
.build());
}
}
resources:
export:
type: azure-native:costmanagement:Export
properties:
definition:
dataSet:
configuration:
columns:
- Date
- MeterId
- ResourceId
- ResourceLocation
- Quantity
granularity: Daily
timeframe: MonthToDate
type: ActualCost
deliveryInfo:
destination:
container: exports
resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182
rootFolderPath: ad-hoc
exportName: TestExport
format: Csv
identity:
type: SystemAssigned
location: centralus
schedule:
recurrence: Weekly
recurrencePeriod:
from: 2020-06-01T00:00:00Z
to: 2020-10-31T00:00:00Z
status: Active
scope: providers/Microsoft.Billing/billingAccounts/123456
The export runs on the schedule you define, writing CSV files to the specified Storage container. The definition block controls what data gets exported: dataSet.granularity sets the aggregation level (Daily in this case), timeframe determines the date range (MonthToDate captures the current month), and type specifies ActualCost versus AmortizedCost. The deliveryInfo.destination points to your Storage account by resource ID, with container and rootFolderPath controlling where files land. The schedule.recurrence property sets how often the export runs (Weekly here), with recurrencePeriod defining the active date range. The system-assigned identity needs Storage Blob Data Contributor role on the target container to write files.
Export costs across multiple subscriptions via management group
Organizations with multiple subscriptions often consolidate cost data at the management group level to track spending across teams or business units.
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const _export = new azure_native.costmanagement.Export("export", {
definition: {
dataSet: {
configuration: {
columns: [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity",
],
},
granularity: azure_native.costmanagement.GranularityType.Daily,
},
timeframe: azure_native.costmanagement.TimeframeType.MonthToDate,
type: azure_native.costmanagement.ExportType.ActualCost,
},
deliveryInfo: {
destination: {
container: "exports",
resourceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
rootFolderPath: "ad-hoc",
},
},
exportName: "TestExport",
format: azure_native.costmanagement.FormatType.Csv,
identity: {
type: azure_native.costmanagement.SystemAssignedServiceIdentityType.SystemAssigned,
},
location: "centralus",
schedule: {
recurrence: azure_native.costmanagement.RecurrenceType.Weekly,
recurrencePeriod: {
from: "2020-06-01T00:00:00Z",
to: "2020-10-31T00:00:00Z",
},
status: azure_native.costmanagement.StatusType.Active,
},
scope: "providers/Microsoft.Management/managementGroups/TestMG",
});
import pulumi
import pulumi_azure_native as azure_native
export = azure_native.costmanagement.Export("export",
definition={
"data_set": {
"configuration": {
"columns": [
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity",
],
},
"granularity": azure_native.costmanagement.GranularityType.DAILY,
},
"timeframe": azure_native.costmanagement.TimeframeType.MONTH_TO_DATE,
"type": azure_native.costmanagement.ExportType.ACTUAL_COST,
},
delivery_info={
"destination": {
"container": "exports",
"resource_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"root_folder_path": "ad-hoc",
},
},
export_name="TestExport",
format=azure_native.costmanagement.FormatType.CSV,
identity={
"type": azure_native.costmanagement.SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED,
},
location="centralus",
schedule={
"recurrence": azure_native.costmanagement.RecurrenceType.WEEKLY,
"recurrence_period": {
"from_": "2020-06-01T00:00:00Z",
"to": "2020-10-31T00:00:00Z",
},
"status": azure_native.costmanagement.StatusType.ACTIVE,
},
scope="providers/Microsoft.Management/managementGroups/TestMG")
package main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := costmanagement.NewExport(ctx, "export", &costmanagement.ExportArgs{
Definition: &costmanagement.ExportDefinitionArgs{
DataSet: &costmanagement.ExportDatasetArgs{
Configuration: &costmanagement.ExportDatasetConfigurationArgs{
Columns: pulumi.StringArray{
pulumi.String("Date"),
pulumi.String("MeterId"),
pulumi.String("ResourceId"),
pulumi.String("ResourceLocation"),
pulumi.String("Quantity"),
},
},
Granularity: pulumi.String(costmanagement.GranularityTypeDaily),
},
Timeframe: pulumi.String(costmanagement.TimeframeTypeMonthToDate),
Type: pulumi.String(costmanagement.ExportTypeActualCost),
},
DeliveryInfo: &costmanagement.ExportDeliveryInfoArgs{
Destination: &costmanagement.ExportDeliveryDestinationArgs{
Container: pulumi.String("exports"),
ResourceId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182"),
RootFolderPath: pulumi.String("ad-hoc"),
},
},
ExportName: pulumi.String("TestExport"),
Format: pulumi.String(costmanagement.FormatTypeCsv),
Identity: &costmanagement.SystemAssignedServiceIdentityArgs{
Type: pulumi.String(costmanagement.SystemAssignedServiceIdentityTypeSystemAssigned),
},
Location: pulumi.String("centralus"),
Schedule: &costmanagement.ExportScheduleArgs{
Recurrence: pulumi.String(costmanagement.RecurrenceTypeWeekly),
RecurrencePeriod: &costmanagement.ExportRecurrencePeriodArgs{
From: pulumi.String("2020-06-01T00:00:00Z"),
To: pulumi.String("2020-10-31T00:00:00Z"),
},
Status: pulumi.String(costmanagement.StatusTypeActive),
},
Scope: pulumi.String("providers/Microsoft.Management/managementGroups/TestMG"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var export = new AzureNative.CostManagement.Export("export", new()
{
Definition = new AzureNative.CostManagement.Inputs.ExportDefinitionArgs
{
DataSet = new AzureNative.CostManagement.Inputs.ExportDatasetArgs
{
Configuration = new AzureNative.CostManagement.Inputs.ExportDatasetConfigurationArgs
{
Columns = new[]
{
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity",
},
},
Granularity = AzureNative.CostManagement.GranularityType.Daily,
},
Timeframe = AzureNative.CostManagement.TimeframeType.MonthToDate,
Type = AzureNative.CostManagement.ExportType.ActualCost,
},
DeliveryInfo = new AzureNative.CostManagement.Inputs.ExportDeliveryInfoArgs
{
Destination = new AzureNative.CostManagement.Inputs.ExportDeliveryDestinationArgs
{
Container = "exports",
ResourceId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
RootFolderPath = "ad-hoc",
},
},
ExportName = "TestExport",
Format = AzureNative.CostManagement.FormatType.Csv,
Identity = new AzureNative.CostManagement.Inputs.SystemAssignedServiceIdentityArgs
{
Type = AzureNative.CostManagement.SystemAssignedServiceIdentityType.SystemAssigned,
},
Location = "centralus",
Schedule = new AzureNative.CostManagement.Inputs.ExportScheduleArgs
{
Recurrence = AzureNative.CostManagement.RecurrenceType.Weekly,
RecurrencePeriod = new AzureNative.CostManagement.Inputs.ExportRecurrencePeriodArgs
{
From = "2020-06-01T00:00:00Z",
To = "2020-10-31T00:00:00Z",
},
Status = AzureNative.CostManagement.StatusType.Active,
},
Scope = "providers/Microsoft.Management/managementGroups/TestMG",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.costmanagement.Export;
import com.pulumi.azurenative.costmanagement.ExportArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDefinitionArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDatasetArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDatasetConfigurationArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDeliveryInfoArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportDeliveryDestinationArgs;
import com.pulumi.azurenative.costmanagement.inputs.SystemAssignedServiceIdentityArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportScheduleArgs;
import com.pulumi.azurenative.costmanagement.inputs.ExportRecurrencePeriodArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var export = new Export("export", ExportArgs.builder()
.definition(ExportDefinitionArgs.builder()
.dataSet(ExportDatasetArgs.builder()
.configuration(ExportDatasetConfigurationArgs.builder()
.columns(
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity")
.build())
.granularity("Daily")
.build())
.timeframe("MonthToDate")
.type("ActualCost")
.build())
.deliveryInfo(ExportDeliveryInfoArgs.builder()
.destination(ExportDeliveryDestinationArgs.builder()
.container("exports")
.resourceId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182")
.rootFolderPath("ad-hoc")
.build())
.build())
.exportName("TestExport")
.format("Csv")
.identity(SystemAssignedServiceIdentityArgs.builder()
.type("SystemAssigned")
.build())
.location("centralus")
.schedule(ExportScheduleArgs.builder()
.recurrence("Weekly")
.recurrencePeriod(ExportRecurrencePeriodArgs.builder()
.from("2020-06-01T00:00:00Z")
.to("2020-10-31T00:00:00Z")
.build())
.status("Active")
.build())
.scope("providers/Microsoft.Management/managementGroups/TestMG")
.build());
}
}
resources:
export:
type: azure-native:costmanagement:Export
properties:
definition:
dataSet:
configuration:
columns:
- Date
- MeterId
- ResourceId
- ResourceLocation
- Quantity
granularity: Daily
timeframe: MonthToDate
type: ActualCost
deliveryInfo:
destination:
container: exports
resourceId: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182
rootFolderPath: ad-hoc
exportName: TestExport
format: Csv
identity:
type: SystemAssigned
location: centralus
schedule:
recurrence: Weekly
recurrencePeriod:
from: 2020-06-01T00:00:00Z
to: 2020-10-31T00:00:00Z
status: Active
scope: providers/Microsoft.Management/managementGroups/TestMG
The scope property determines what costs get exported. Setting it to a management group path aggregates data from all subscriptions under that group. The export configuration (schedule, destination, columns) works the same way as subscription-scoped exports, but the system-assigned identity needs permissions across all subscriptions in the management group to read cost data.
Beyond these examples
These snippets focus on specific export-level features: scheduled exports to Azure Storage, scope-based cost aggregation, and system-assigned managed identity. They’re intentionally minimal rather than full cost management solutions.
The examples reference pre-existing infrastructure such as Azure Storage accounts with containers, and billing accounts, departments, enrollment accounts, management groups, subscriptions, or resource groups depending on scope. They focus on configuring the export rather than provisioning the surrounding infrastructure.
To keep things focused, common export patterns are omitted, including:
- Partitioned data output (partitionData)
- Custom time ranges (timeframe variations beyond MonthToDate)
- Column customization beyond the basic set
- Format options (currently only CSV supported)
These omissions are intentional: the goal is to illustrate how each export feature is wired, not provide drop-in cost management modules. See the Cost Management Export resource reference for all available configuration options.
Let's configure Azure Cost Management Exports
Get started with Pulumi Cloud, then follow our quick setup guide to deploy this infrastructure.
Try Pulumi Cloud for FREEFrequently Asked Questions
Configuration & Scope
You can export costs at multiple scope levels:
- Subscription:
/subscriptions/{subscriptionId} - Resource Group:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName} - Billing Account:
/providers/Microsoft.Billing/billingAccounts/{billingAccountId} - Department:
/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId} - Enrollment Account:
/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId} - Management Group:
/providers/Microsoft.Management/managementGroups/{managementGroupId} - Billing Profile:
/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId} - Invoice Section:
/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId} - Customer (partners):
/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}
exportName, scope, and location. To change any of these, you must delete and recreate the export.deliveryInfo.destination with three required properties: container (blob container name), resourceId (full storage account resource ID), and rootFolderPath (folder path within container). The storage account must exist before creating the export.location property is required only when using managed identity (identity.type set to SystemAssigned). This location determines where the export’s managed identity is created.Export Options & Limitations
Csv format is supported for cost exports.partitionData to true to partition exported data by size and place it in a blob directory with a manifest file. However, this option is only available for Microsoft Customer Agreement commerce scopes.definition.type property supports three types: ActualCost (actual charges incurred), AmortizedCost (costs amortized over reservation term), and Usage (raw usage data without costs).Scheduling & Data Configuration
Configure the schedule property with three components:
recurrence: Choose fromDaily,Weekly,Monthly, orAnnuallyrecurrencePeriod: Setfromandtodates (ISO 8601 format)status: Set toActiveto enable orInactiveto disable
definition.dataSet.configuration.columns to specify columns like Date, MeterId, ResourceId, ResourceLocation, and Quantity. Set definition.dataSet.granularity to Daily or Monthly to control aggregation level.