ResourceGroupCostManagementExport

class ResourceGroupCostManagementExport : KotlinCustomResource

Manages a Cost Management Export for a Resource Group.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Container;
import com.pulumi.azure.storage.ContainerArgs;
import com.pulumi.azure.core.ResourceGroupCostManagementExport;
import com.pulumi.azure.core.ResourceGroupCostManagementExportArgs;
import com.pulumi.azure.core.inputs.ResourceGroupCostManagementExportExportDataStorageLocationArgs;
import com.pulumi.azure.core.inputs.ResourceGroupCostManagementExportExportDataOptionsArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
.storageAccountName(exampleAccount.name())
.build());
var exampleResourceGroupCostManagementExport = new ResourceGroupCostManagementExport("exampleResourceGroupCostManagementExport", ResourceGroupCostManagementExportArgs.builder()
.resourceGroupId(exampleResourceGroup.id())
.recurrenceType("Monthly")
.recurrencePeriodStartDate("2020-08-18T00:00:00Z")
.recurrencePeriodEndDate("2020-09-18T00:00:00Z")
.exportDataStorageLocation(ResourceGroupCostManagementExportExportDataStorageLocationArgs.builder()
.containerId(exampleContainer.resourceManagerId())
.rootFolderPath("/root/updated")
.build())
.exportDataOptions(ResourceGroupCostManagementExportExportDataOptionsArgs.builder()
.type("Usage")
.timeFrame("WeekToDate")
.build())
.build());
}
}

Import

Cost Management Export for a Resource Group can be imported using the resource id, e.g.

$ pulumi import azure:core/resourceGroupCostManagementExport:ResourceGroupCostManagementExport example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.CostManagement/exports/export1

Properties

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

Is the cost management export active? Default is true.

Link copied to clipboard

A export_data_options block as defined below.

Link copied to clipboard

A export_data_storage_location block as defined below.

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

Specifies the name of the Cost Management Export. Changing this forces a new resource to be created.

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

The date the export will stop capturing information.

Link copied to clipboard

The date the export will start capturing information.

Link copied to clipboard
val recurrenceType: Output<String>

How often the requested information will be exported. Valid values include Annually, Daily, Monthly, Weekly.

Link copied to clipboard
val resourceGroupId: Output<String>

The id of the resource group on which to create an export. Changing this forces a new resource to be created.

Link copied to clipboard
val urn: Output<String>