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

com.pulumi.azurenative.costmanagement.MarkupRule Maven / Gradle / Ivy

There is a newer version: 2.82.0
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.azurenative.costmanagement;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.costmanagement.MarkupRuleArgs;
import com.pulumi.azurenative.costmanagement.outputs.CustomerMetadataResponse;
import com.pulumi.core.Alias;
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.Double;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Markup rule
 * Azure REST API version: 2022-10-05-preview.
 * 
 * ## Example Usage
 * ### CreateOrUpdatePrivateMarkupRules
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.costmanagement.MarkupRule;
 * import com.pulumi.azurenative.costmanagement.MarkupRuleArgs;
 * import com.pulumi.azurenative.costmanagement.inputs.CustomerMetadataArgs;
 * 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 markupRule = new MarkupRule("markupRule", MarkupRuleArgs.builder()
 *             .billingAccountId("2af90bea-080c-438c-8977-17cddd5f115a:ef5ce3cf-f5af-4fcb-a5ed-c376e1d6d2b6")
 *             .billingProfileId("cbf78278-f4b8-43d9-8f13-47112da1c63e")
 *             .customerDetails(CustomerMetadataArgs.builder()
 *                 .billingAccountId("cff9aa6d-941c-43f2-b6cb-1d2bb34a02b4:780237f3-1aa6-4159-943b-498e0d647dd9")
 *                 .billingProfileId("08eeecee-efb2-40d5-817c-0a254d2e042c")
 *                 .build())
 *             .description("Markup rule for year 2022")
 *             .endDate("2022-12-31T00:00:00Z")
 *             .name("markup-2022")
 *             .percentage(5)
 *             .startDate("2022-01-01T00:00:00Z")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:costmanagement:MarkupRule markup-2022 /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/markupRules/{name} * ``` * */ @ResourceType(type="azure-native:costmanagement:MarkupRule") public class MarkupRule extends com.pulumi.resources.CustomResource { /** * Customer information for the markup rule. * */ @Export(name="customerDetails", refs={CustomerMetadataResponse.class}, tree="[0]") private Output customerDetails; /** * @return Customer information for the markup rule. * */ public Output customerDetails() { return this.customerDetails; } /** * The description of the markup rule. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description of the markup rule. * */ public Output> description() { return Codegen.optional(this.description); } /** * 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. * */ @Export(name="eTag", refs={String.class}, tree="[0]") private Output eTag; /** * @return 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. * */ public Output> eTag() { return Codegen.optional(this.eTag); } /** * Ending date of the markup rule. * */ @Export(name="endDate", refs={String.class}, tree="[0]") private Output endDate; /** * @return Ending date of the markup rule. * */ public Output> endDate() { return Codegen.optional(this.endDate); } /** * Resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name. * */ public Output name() { return this.name; } /** * The markup percentage of the rule. * */ @Export(name="percentage", refs={Double.class}, tree="[0]") private Output percentage; /** * @return The markup percentage of the rule. * */ public Output percentage() { return this.percentage; } /** * Starting date of the markup rule. * */ @Export(name="startDate", refs={String.class}, tree="[0]") private Output startDate; /** * @return Starting date of the markup rule. * */ public Output startDate() { return this.startDate; } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public MarkupRule(java.lang.String name) { this(name, MarkupRuleArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public MarkupRule(java.lang.String name, MarkupRuleArgs 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 MarkupRule(java.lang.String name, MarkupRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:costmanagement:MarkupRule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private MarkupRule(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:costmanagement:MarkupRule", name, null, makeResourceOptions(options, id), false); } private static MarkupRuleArgs makeArgs(MarkupRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? MarkupRuleArgs.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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:costmanagement/v20221005preview:MarkupRule").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static MarkupRule get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new MarkupRule(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy