Export

class Export : KotlinCustomResource

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",
});
});
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());
}
}

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",
});
});
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());
}
}

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",
});
});
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());
}
}

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",
});
});
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());
}
}

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",
});
});
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());
}
}

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",
});
});
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());
}
}

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

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
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
val name: Output<String>

Resource name.

Link copied to clipboard

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

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 execution 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>