ExportArgs

data class ExportArgs(val definition: Output<ExportDefinitionArgs>? = null, val deliveryInfo: Output<ExportDeliveryInfoArgs>? = null, val eTag: Output<String>? = null, val exportName: Output<String>? = null, val format: Output<Either<String, FormatType>>? = null, val identity: Output<SystemAssignedServiceIdentityArgs>? = null, val location: Output<String>? = null, val partitionData: Output<Boolean>? = null, val schedule: Output<ExportScheduleArgs>? = null, val scope: Output<String>? = null) : ConvertibleToJava<ExportArgs>

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, 2025-03-01. 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/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
})
}
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/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/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/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/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/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
})
}
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/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("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/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("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}

Constructors

Link copied to clipboard
constructor(definition: Output<ExportDefinitionArgs>? = null, deliveryInfo: Output<ExportDeliveryInfoArgs>? = null, eTag: Output<String>? = null, exportName: Output<String>? = null, format: Output<Either<String, FormatType>>? = null, identity: Output<SystemAssignedServiceIdentityArgs>? = null, location: Output<String>? = null, partitionData: Output<Boolean>? = null, schedule: Output<ExportScheduleArgs>? = null, scope: Output<String>? = null)

Properties

Link copied to clipboard
val definition: Output<ExportDefinitionArgs>? = null

Has the definition for the export.

Link copied to clipboard

Has delivery information for the export.

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

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 exportName: Output<String>? = null

Export Name.

Link copied to clipboard
val format: Output<Either<String, FormatType>>? = null

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

Link copied to clipboard

The managed identity associated with Export

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

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

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

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 schedule: Output<ExportScheduleArgs>? = null

Has schedule information for the export.

Link copied to clipboard
val scope: Output<String>? = null

The scope associated with export operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.

Functions

Link copied to clipboard
open override fun toJava(): ExportArgs