All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.billing.AccountCostManagementExport Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.billing;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.billing.AccountCostManagementExportArgs;
import com.pulumi.azure.billing.inputs.AccountCostManagementExportState;
import com.pulumi.azure.billing.outputs.AccountCostManagementExportExportDataOptions;
import com.pulumi.azure.billing.outputs.AccountCostManagementExportExportDataStorageLocation;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Cost Management Export for a Billing Account.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.billing.AccountCostManagementExport;
 * import com.pulumi.azure.billing.AccountCostManagementExportArgs;
 * import com.pulumi.azure.billing.inputs.AccountCostManagementExportExportDataStorageLocationArgs;
 * import com.pulumi.azure.billing.inputs.AccountCostManagementExportExportDataOptionsArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .build());
 * 
 *         var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
 *             .name("examplecontainer")
 *             .storageAccountName(exampleAccount.name())
 *             .build());
 * 
 *         var exampleAccountCostManagementExport = new AccountCostManagementExport("exampleAccountCostManagementExport", AccountCostManagementExportArgs.builder()
 *             .name("example")
 *             .billingAccountId("example")
 *             .recurrenceType("Monthly")
 *             .recurrencePeriodStartDate("2020-08-18T00:00:00Z")
 *             .recurrencePeriodEndDate("2020-09-18T00:00:00Z")
 *             .exportDataStorageLocation(AccountCostManagementExportExportDataStorageLocationArgs.builder()
 *                 .containerId(exampleContainer.resourceManagerId())
 *                 .rootFolderPath("/root/updated")
 *                 .build())
 *             .exportDataOptions(AccountCostManagementExportExportDataOptionsArgs.builder()
 *                 .type("Usage")
 *                 .timeFrame("WeekToDate")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Billing Account Cost Management Exports can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:billing/accountCostManagementExport:AccountCostManagementExport example /providers/Microsoft.Billing/billingAccounts/12345678/providers/Microsoft.CostManagement/exports/export1 * ``` * */ @ResourceType(type="azure:billing/accountCostManagementExport:AccountCostManagementExport") public class AccountCostManagementExport extends com.pulumi.resources.CustomResource { /** * Is the cost management export active? Default is `true`. * */ @Export(name="active", refs={Boolean.class}, tree="[0]") private Output active; /** * @return Is the cost management export active? Default is `true`. * */ public Output> active() { return Codegen.optional(this.active); } /** * The id of the billing account on which to create an export. Changing this forces a new resource to be created. * */ @Export(name="billingAccountId", refs={String.class}, tree="[0]") private Output billingAccountId; /** * @return The id of the billing account on which to create an export. Changing this forces a new resource to be created. * */ public Output billingAccountId() { return this.billingAccountId; } /** * A `export_data_options` block as defined below. * */ @Export(name="exportDataOptions", refs={AccountCostManagementExportExportDataOptions.class}, tree="[0]") private Output exportDataOptions; /** * @return A `export_data_options` block as defined below. * */ public Output exportDataOptions() { return this.exportDataOptions; } /** * A `export_data_storage_location` block as defined below. * */ @Export(name="exportDataStorageLocation", refs={AccountCostManagementExportExportDataStorageLocation.class}, tree="[0]") private Output exportDataStorageLocation; /** * @return A `export_data_storage_location` block as defined below. * */ public Output exportDataStorageLocation() { return this.exportDataStorageLocation; } /** * Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Specifies the name of the Cost Management Export. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * The date the export will stop capturing information. * */ @Export(name="recurrencePeriodEndDate", refs={String.class}, tree="[0]") private Output recurrencePeriodEndDate; /** * @return The date the export will stop capturing information. * */ public Output recurrencePeriodEndDate() { return this.recurrencePeriodEndDate; } /** * The date the export will start capturing information. * */ @Export(name="recurrencePeriodStartDate", refs={String.class}, tree="[0]") private Output recurrencePeriodStartDate; /** * @return The date the export will start capturing information. * */ public Output recurrencePeriodStartDate() { return this.recurrencePeriodStartDate; } /** * How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. * */ @Export(name="recurrenceType", refs={String.class}, tree="[0]") private Output recurrenceType; /** * @return How often the requested information will be exported. Valid values include `Annually`, `Daily`, `Monthly`, `Weekly`. * */ public Output recurrenceType() { return this.recurrenceType; } /** * * @param name The _unique_ name of the resulting resource. */ public AccountCostManagementExport(java.lang.String name) { this(name, AccountCostManagementExportArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public AccountCostManagementExport(java.lang.String name, AccountCostManagementExportArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public AccountCostManagementExport(java.lang.String name, AccountCostManagementExportArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:billing/accountCostManagementExport:AccountCostManagementExport", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private AccountCostManagementExport(java.lang.String name, Output id, @Nullable AccountCostManagementExportState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:billing/accountCostManagementExport:AccountCostManagementExport", name, state, makeResourceOptions(options, id), false); } private static AccountCostManagementExportArgs makeArgs(AccountCostManagementExportArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? AccountCostManagementExportArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static AccountCostManagementExport get(java.lang.String name, Output id, @Nullable AccountCostManagementExportState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new AccountCostManagementExport(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy