Export
An export resource. API Version: 2020-06-01.
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 = "Daily",
},
Timeframe = "MonthToDate",
Type = "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 = "Csv",
Schedule = new AzureNative.CostManagement.Inputs.ExportScheduleArgs
{
Recurrence = "Weekly",
RecurrencePeriod = new AzureNative.CostManagement.Inputs.ExportRecurrencePeriodArgs
{
From = "2020-06-01T00:00:00Z",
To = "2020-10-31T00:00:00Z",
},
Status = "Active",
},
Scope = "providers/Microsoft.Billing/billingAccounts/123456",
});
});
Content copied to clipboard
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 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(Map.ofEntries(
Map.entry("dataSet", Map.ofEntries(
Map.entry("configuration", Map.of("columns",
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity")),
Map.entry("granularity", "Daily")
)),
Map.entry("timeframe", "MonthToDate"),
Map.entry("type", "ActualCost")
))
.deliveryInfo(Map.of("destination", Map.ofEntries(
Map.entry("container", "exports"),
Map.entry("resourceId", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182"),
Map.entry("rootFolderPath", "ad-hoc")
)))
.exportName("TestExport")
.format("Csv")
.schedule(Map.ofEntries(
Map.entry("recurrence", "Weekly"),
Map.entry("recurrencePeriod", Map.ofEntries(
Map.entry("from", "2020-06-01T00:00:00Z"),
Map.entry("to", "2020-10-31T00:00:00Z")
)),
Map.entry("status", "Active")
))
.scope("providers/Microsoft.Billing/billingAccounts/123456")
.build());
}
}
Content copied to clipboard
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 = "Daily",
},
Timeframe = "MonthToDate",
Type = "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 = "Csv",
Schedule = new AzureNative.CostManagement.Inputs.ExportScheduleArgs
{
Recurrence = "Weekly",
RecurrencePeriod = new AzureNative.CostManagement.Inputs.ExportRecurrencePeriodArgs
{
From = "2020-06-01T00:00:00Z",
To = "2020-10-31T00:00:00Z",
},
Status = "Active",
},
Scope = "providers/Microsoft.Billing/billingAccounts/12/departments/1234",
});
});
Content copied to clipboard
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 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(Map.ofEntries(
Map.entry("dataSet", Map.ofEntries(
Map.entry("configuration", Map.of("columns",
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity")),
Map.entry("granularity", "Daily")
)),
Map.entry("timeframe", "MonthToDate"),
Map.entry("type", "ActualCost")
))
.deliveryInfo(Map.of("destination", Map.ofEntries(
Map.entry("container", "exports"),
Map.entry("resourceId", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182"),
Map.entry("rootFolderPath", "ad-hoc")
)))
.exportName("TestExport")
.format("Csv")
.schedule(Map.ofEntries(
Map.entry("recurrence", "Weekly"),
Map.entry("recurrencePeriod", Map.ofEntries(
Map.entry("from", "2020-06-01T00:00:00Z"),
Map.entry("to", "2020-10-31T00:00:00Z")
)),
Map.entry("status", "Active")
))
.scope("providers/Microsoft.Billing/billingAccounts/12/departments/1234")
.build());
}
}
Content copied to clipboard
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 = "Daily",
},
Timeframe = "MonthToDate",
Type = "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 = "Csv",
Schedule = new AzureNative.CostManagement.Inputs.ExportScheduleArgs
{
Recurrence = "Weekly",
RecurrencePeriod = new AzureNative.CostManagement.Inputs.ExportRecurrencePeriodArgs
{
From = "2020-06-01T00:00:00Z",
To = "2020-10-31T00:00:00Z",
},
Status = "Active",
},
Scope = "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456",
});
});
Content copied to clipboard
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 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(Map.ofEntries(
Map.entry("dataSet", Map.ofEntries(
Map.entry("configuration", Map.of("columns",
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity")),
Map.entry("granularity", "Daily")
)),
Map.entry("timeframe", "MonthToDate"),
Map.entry("type", "ActualCost")
))
.deliveryInfo(Map.of("destination", Map.ofEntries(
Map.entry("container", "exports"),
Map.entry("resourceId", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182"),
Map.entry("rootFolderPath", "ad-hoc")
)))
.exportName("TestExport")
.format("Csv")
.schedule(Map.ofEntries(
Map.entry("recurrence", "Weekly"),
Map.entry("recurrencePeriod", Map.ofEntries(
Map.entry("from", "2020-06-01T00:00:00Z"),
Map.entry("to", "2020-10-31T00:00:00Z")
)),
Map.entry("status", "Active")
))
.scope("providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456")
.build());
}
}
Content copied to clipboard
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 = "Daily",
},
Timeframe = "MonthToDate",
Type = "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 = "Csv",
Schedule = new AzureNative.CostManagement.Inputs.ExportScheduleArgs
{
Recurrence = "Weekly",
RecurrencePeriod = new AzureNative.CostManagement.Inputs.ExportRecurrencePeriodArgs
{
From = "2020-06-01T00:00:00Z",
To = "2020-10-31T00:00:00Z",
},
Status = "Active",
},
Scope = "providers/Microsoft.Management/managementGroups/TestMG",
});
});
Content copied to clipboard
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 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(Map.ofEntries(
Map.entry("dataSet", Map.ofEntries(
Map.entry("configuration", Map.of("columns",
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity")),
Map.entry("granularity", "Daily")
)),
Map.entry("timeframe", "MonthToDate"),
Map.entry("type", "ActualCost")
))
.deliveryInfo(Map.of("destination", Map.ofEntries(
Map.entry("container", "exports"),
Map.entry("resourceId", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182"),
Map.entry("rootFolderPath", "ad-hoc")
)))
.exportName("TestExport")
.format("Csv")
.schedule(Map.ofEntries(
Map.entry("recurrence", "Weekly"),
Map.entry("recurrencePeriod", Map.ofEntries(
Map.entry("from", "2020-06-01T00:00:00Z"),
Map.entry("to", "2020-10-31T00:00:00Z")
)),
Map.entry("status", "Active")
))
.scope("providers/Microsoft.Management/managementGroups/TestMG")
.build());
}
}
Content copied to clipboard
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 = "Daily",
},
Timeframe = "MonthToDate",
Type = "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 = "Csv",
Schedule = new AzureNative.CostManagement.Inputs.ExportScheduleArgs
{
Recurrence = "Weekly",
RecurrencePeriod = new AzureNative.CostManagement.Inputs.ExportRecurrencePeriodArgs
{
From = "2020-06-01T00:00:00Z",
To = "2020-10-31T00:00:00Z",
},
Status = "Active",
},
Scope = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG",
});
});
Content copied to clipboard
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 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(Map.ofEntries(
Map.entry("dataSet", Map.ofEntries(
Map.entry("configuration", Map.of("columns",
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity")),
Map.entry("granularity", "Daily")
)),
Map.entry("timeframe", "MonthToDate"),
Map.entry("type", "ActualCost")
))
.deliveryInfo(Map.of("destination", Map.ofEntries(
Map.entry("container", "exports"),
Map.entry("resourceId", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182"),
Map.entry("rootFolderPath", "ad-hoc")
)))
.exportName("TestExport")
.format("Csv")
.schedule(Map.ofEntries(
Map.entry("recurrence", "Weekly"),
Map.entry("recurrencePeriod", Map.ofEntries(
Map.entry("from", "2020-06-01T00:00:00Z"),
Map.entry("to", "2020-10-31T00:00:00Z")
)),
Map.entry("status", "Active")
))
.scope("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG")
.build());
}
}
Content copied to clipboard
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 = "Daily",
},
Timeframe = "MonthToDate",
Type = "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 = "Csv",
Schedule = new AzureNative.CostManagement.Inputs.ExportScheduleArgs
{
Recurrence = "Weekly",
RecurrencePeriod = new AzureNative.CostManagement.Inputs.ExportRecurrencePeriodArgs
{
From = "2020-06-01T00:00:00Z",
To = "2020-10-31T00:00:00Z",
},
Status = "Active",
},
Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
});
});
Content copied to clipboard
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 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(Map.ofEntries(
Map.entry("dataSet", Map.ofEntries(
Map.entry("configuration", Map.of("columns",
"Date",
"MeterId",
"ResourceId",
"ResourceLocation",
"Quantity")),
Map.entry("granularity", "Daily")
)),
Map.entry("timeframe", "MonthToDate"),
Map.entry("type", "ActualCost")
))
.deliveryInfo(Map.of("destination", Map.ofEntries(
Map.entry("container", "exports"),
Map.entry("resourceId", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182"),
Map.entry("rootFolderPath", "ad-hoc")
)))
.exportName("TestExport")
.format("Csv")
.schedule(Map.ofEntries(
Map.entry("recurrence", "Weekly"),
Map.entry("recurrencePeriod", Map.ofEntries(
Map.entry("from", "2020-06-01T00:00:00Z"),
Map.entry("to", "2020-10-31T00:00:00Z")
)),
Map.entry("status", "Active")
))
.scope("subscriptions/00000000-0000-0000-0000-000000000000")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:costmanagement:Export TestExport subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/exports/TestExport
Content copied to clipboard
Properties
Link copied to clipboard
Has the definition for the export.
Link copied to clipboard
Has delivery information for the export.
Link copied to clipboard
If the export has an active schedule, provides an estimate of the next execution time.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
If requested, has the most recent execution history for the export.
Link copied to clipboard
Has schedule information for the export.