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 schedule: Output<ExportScheduleArgs>? = null, val scope: Output<String>? = null) : ConvertibleToJava<ExportArgs>

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

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