Export

class Export : KotlinCustomResource

An export resource. Uses Azure REST API version 2024-08-01. In version 2.x of the Azure Native provider, it used API version 2023-03-01. Other available API versions: 2019-01-01, 2019-09-01, 2019-10-01, 2019-11-01, 2020-06-01, 2020-12-01-preview, 2021-01-01, 2021-10-01, 2022-10-01, 2023-03-01, 2023-04-01-preview, 2023-07-01-preview, 2023-08-01, 2023-09-01, 2023-11-01, 2024-10-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native costmanagement [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

ExportCreateOrUpdateByBillingAccount

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 main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
"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
})
}
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());
}
}

ExportCreateOrUpdateByDepartment

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/12/departments/1234",
});
});
package main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
"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/12/departments/1234"),
})
if err != nil {
return err
}
return nil
})
}
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/12/departments/1234")
.build());
}
}

ExportCreateOrUpdateByEnrollmentAccount

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/100/enrollmentAccounts/456",
});
});
package main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
"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/100/enrollmentAccounts/456"),
})
if err != nil {
return err
}
return nil
})
}
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/100/enrollmentAccounts/456")
.build());
}
}

ExportCreateOrUpdateByManagementGroup

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 main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
"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
})
}
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());
}
}

ExportCreateOrUpdateByResourceGroup

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 = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG",
});
});
package main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
"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("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG"),
})
if err != nil {
return err
}
return nil
})
}
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("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG")
.build());
}
}

ExportCreateOrUpdateBySubscription

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 = "subscriptions/00000000-0000-0000-0000-000000000000",
});
});
package main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
"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("subscriptions/00000000-0000-0000-0000-000000000000"),
})
if err != nil {
return err
}
return nil
})
}
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("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:costmanagement:Export TestExport /{scope}/providers/Microsoft.CostManagement/exports/{exportName}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard

Has the definition for the export.

Link copied to clipboard

Has delivery information for the export.

Link copied to clipboard
val eTag: Output<String>?

eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

Link copied to clipboard
val format: Output<String>?

The format of the export being delivered. Currently only 'Csv' is supported.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The managed identity associated with Export

Link copied to clipboard
val location: Output<String>?

The location of the Export's managed identity. Only required when utilizing managed identity.

Link copied to clipboard
val name: Output<String>

Resource name.

Link copied to clipboard

If the export has an active schedule, provides an estimate of the next run time.

Link copied to clipboard
val partitionData: Output<Boolean>?

If set to true, exported data will be partitioned by size and placed in a blob directory together with a manifest file. Note: this option is currently available only for Microsoft Customer Agreement commerce scopes.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

If requested, has the most recent run history for the export.

Link copied to clipboard

Has schedule information for the export.

Link copied to clipboard
val type: Output<String>

Resource type.

Link copied to clipboard
val urn: Output<String>