Markup Rule
Markup rule Uses Azure REST API version 2022-10-05-preview. In version 2.x of the Azure Native provider, it used API version 2022-10-05-preview.
Example Usage
CreateOrUpdatePrivateMarkupRules
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var markupRule = new AzureNative.CostManagement.MarkupRule("markupRule", new()
{
BillingAccountId = "2af90bea-080c-438c-8977-17cddd5f115a:ef5ce3cf-f5af-4fcb-a5ed-c376e1d6d2b6",
BillingProfileId = "cbf78278-f4b8-43d9-8f13-47112da1c63e",
CustomerDetails = new AzureNative.CostManagement.Inputs.CustomerMetadataArgs
{
BillingAccountId = "cff9aa6d-941c-43f2-b6cb-1d2bb34a02b4:780237f3-1aa6-4159-943b-498e0d647dd9",
BillingProfileId = "08eeecee-efb2-40d5-817c-0a254d2e042c",
},
Description = "Markup rule for year 2022",
EndDate = "2022-12-31T00:00:00Z",
Name = "markup-2022",
Percentage = 5,
StartDate = "2022-01-01T00:00:00Z",
});
});
Content copied to clipboard
package main
import (
costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := costmanagement.NewMarkupRule(ctx, "markupRule", &costmanagement.MarkupRuleArgs{
BillingAccountId: pulumi.String("2af90bea-080c-438c-8977-17cddd5f115a:ef5ce3cf-f5af-4fcb-a5ed-c376e1d6d2b6"),
BillingProfileId: pulumi.String("cbf78278-f4b8-43d9-8f13-47112da1c63e"),
CustomerDetails: &costmanagement.CustomerMetadataArgs{
BillingAccountId: pulumi.String("cff9aa6d-941c-43f2-b6cb-1d2bb34a02b4:780237f3-1aa6-4159-943b-498e0d647dd9"),
BillingProfileId: pulumi.String("08eeecee-efb2-40d5-817c-0a254d2e042c"),
},
Description: pulumi.String("Markup rule for year 2022"),
EndDate: pulumi.String("2022-12-31T00:00:00Z"),
Name: pulumi.String("markup-2022"),
Percentage: pulumi.Float64(5),
StartDate: pulumi.String("2022-01-01T00:00:00Z"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:costmanagement:MarkupRule markup-2022 /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/markupRules/{name}
Content copied to clipboard
Properties
Link copied to clipboard
The Azure API version of the resource.
Link copied to clipboard
Customer information for the markup rule.
Link copied to clipboard
The description of the markup rule.
Link copied to clipboard
The markup percentage of the rule.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard