1. Packages
  2. Azure Native
  3. API Docs
  4. costmanagement
  5. MarkupRule
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.costmanagement.MarkupRule

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

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",
    });

});
Copy
package main

import (
	costmanagement "github.com/pulumi/pulumi-azure-native-sdk/costmanagement/v3"
	"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
	})
}
Copy
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.0)
            .startDate("2022-01-01T00:00:00Z")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const markupRule = new azure_native.costmanagement.MarkupRule("markupRule", {
    billingAccountId: "2af90bea-080c-438c-8977-17cddd5f115a:ef5ce3cf-f5af-4fcb-a5ed-c376e1d6d2b6",
    billingProfileId: "cbf78278-f4b8-43d9-8f13-47112da1c63e",
    customerDetails: {
        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",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

markup_rule = azure_native.costmanagement.MarkupRule("markupRule",
    billing_account_id="2af90bea-080c-438c-8977-17cddd5f115a:ef5ce3cf-f5af-4fcb-a5ed-c376e1d6d2b6",
    billing_profile_id="cbf78278-f4b8-43d9-8f13-47112da1c63e",
    customer_details={
        "billing_account_id": "cff9aa6d-941c-43f2-b6cb-1d2bb34a02b4:780237f3-1aa6-4159-943b-498e0d647dd9",
        "billing_profile_id": "08eeecee-efb2-40d5-817c-0a254d2e042c",
    },
    description="Markup rule for year 2022",
    end_date="2022-12-31T00:00:00Z",
    name="markup-2022",
    percentage=5,
    start_date="2022-01-01T00:00:00Z")
Copy
resources:
  markupRule:
    type: azure-native:costmanagement:MarkupRule
    properties:
      billingAccountId: 2af90bea-080c-438c-8977-17cddd5f115a:ef5ce3cf-f5af-4fcb-a5ed-c376e1d6d2b6
      billingProfileId: cbf78278-f4b8-43d9-8f13-47112da1c63e
      customerDetails:
        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
Copy

Create MarkupRule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new MarkupRule(name: string, args: MarkupRuleArgs, opts?: CustomResourceOptions);
@overload
def MarkupRule(resource_name: str,
               args: MarkupRuleArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def MarkupRule(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               billing_account_id: Optional[str] = None,
               billing_profile_id: Optional[str] = None,
               customer_details: Optional[CustomerMetadataArgs] = None,
               percentage: Optional[float] = None,
               start_date: Optional[str] = None,
               description: Optional[str] = None,
               e_tag: Optional[str] = None,
               end_date: Optional[str] = None,
               name: Optional[str] = None)
func NewMarkupRule(ctx *Context, name string, args MarkupRuleArgs, opts ...ResourceOption) (*MarkupRule, error)
public MarkupRule(string name, MarkupRuleArgs args, CustomResourceOptions? opts = null)
public MarkupRule(String name, MarkupRuleArgs args)
public MarkupRule(String name, MarkupRuleArgs args, CustomResourceOptions options)
type: azure-native:costmanagement:MarkupRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MarkupRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. MarkupRuleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. MarkupRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MarkupRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MarkupRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var markupRuleResource = new AzureNative.CostManagement.MarkupRule("markupRuleResource", new()
{
    BillingAccountId = "string",
    BillingProfileId = "string",
    CustomerDetails = new AzureNative.CostManagement.Inputs.CustomerMetadataArgs
    {
        BillingAccountId = "string",
        BillingProfileId = "string",
    },
    Percentage = 0,
    StartDate = "string",
    Description = "string",
    ETag = "string",
    EndDate = "string",
    Name = "string",
});
Copy
example, err := costmanagement.NewMarkupRule(ctx, "markupRuleResource", &costmanagement.MarkupRuleArgs{
	BillingAccountId: pulumi.String("string"),
	BillingProfileId: pulumi.String("string"),
	CustomerDetails: &costmanagement.CustomerMetadataArgs{
		BillingAccountId: pulumi.String("string"),
		BillingProfileId: pulumi.String("string"),
	},
	Percentage:  pulumi.Float64(0),
	StartDate:   pulumi.String("string"),
	Description: pulumi.String("string"),
	ETag:        pulumi.String("string"),
	EndDate:     pulumi.String("string"),
	Name:        pulumi.String("string"),
})
Copy
var markupRuleResource = new MarkupRule("markupRuleResource", MarkupRuleArgs.builder()
    .billingAccountId("string")
    .billingProfileId("string")
    .customerDetails(CustomerMetadataArgs.builder()
        .billingAccountId("string")
        .billingProfileId("string")
        .build())
    .percentage(0)
    .startDate("string")
    .description("string")
    .eTag("string")
    .endDate("string")
    .name("string")
    .build());
Copy
markup_rule_resource = azure_native.costmanagement.MarkupRule("markupRuleResource",
    billing_account_id="string",
    billing_profile_id="string",
    customer_details={
        "billing_account_id": "string",
        "billing_profile_id": "string",
    },
    percentage=0,
    start_date="string",
    description="string",
    e_tag="string",
    end_date="string",
    name="string")
Copy
const markupRuleResource = new azure_native.costmanagement.MarkupRule("markupRuleResource", {
    billingAccountId: "string",
    billingProfileId: "string",
    customerDetails: {
        billingAccountId: "string",
        billingProfileId: "string",
    },
    percentage: 0,
    startDate: "string",
    description: "string",
    eTag: "string",
    endDate: "string",
    name: "string",
});
Copy
type: azure-native:costmanagement:MarkupRule
properties:
    billingAccountId: string
    billingProfileId: string
    customerDetails:
        billingAccountId: string
        billingProfileId: string
    description: string
    eTag: string
    endDate: string
    name: string
    percentage: 0
    startDate: string
Copy

MarkupRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The MarkupRule resource accepts the following input properties:

BillingAccountId
This property is required.
Changes to this property will trigger replacement.
string
BillingAccount ID
BillingProfileId
This property is required.
Changes to this property will trigger replacement.
string
BillingProfile ID
CustomerDetails This property is required. Pulumi.AzureNative.CostManagement.Inputs.CustomerMetadata
Customer information for the markup rule.
Percentage This property is required. double
The markup percentage of the rule.
StartDate This property is required. string
Starting date of the markup rule.
Description string
The description of the markup rule.
ETag string
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.
EndDate string
Ending date of the markup rule.
Name Changes to this property will trigger replacement. string
Markup rule name.
BillingAccountId
This property is required.
Changes to this property will trigger replacement.
string
BillingAccount ID
BillingProfileId
This property is required.
Changes to this property will trigger replacement.
string
BillingProfile ID
CustomerDetails This property is required. CustomerMetadataArgs
Customer information for the markup rule.
Percentage This property is required. float64
The markup percentage of the rule.
StartDate This property is required. string
Starting date of the markup rule.
Description string
The description of the markup rule.
ETag string
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.
EndDate string
Ending date of the markup rule.
Name Changes to this property will trigger replacement. string
Markup rule name.
billingAccountId
This property is required.
Changes to this property will trigger replacement.
String
BillingAccount ID
billingProfileId
This property is required.
Changes to this property will trigger replacement.
String
BillingProfile ID
customerDetails This property is required. CustomerMetadata
Customer information for the markup rule.
percentage This property is required. Double
The markup percentage of the rule.
startDate This property is required. String
Starting date of the markup rule.
description String
The description of the markup rule.
eTag String
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.
endDate String
Ending date of the markup rule.
name Changes to this property will trigger replacement. String
Markup rule name.
billingAccountId
This property is required.
Changes to this property will trigger replacement.
string
BillingAccount ID
billingProfileId
This property is required.
Changes to this property will trigger replacement.
string
BillingProfile ID
customerDetails This property is required. CustomerMetadata
Customer information for the markup rule.
percentage This property is required. number
The markup percentage of the rule.
startDate This property is required. string
Starting date of the markup rule.
description string
The description of the markup rule.
eTag string
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.
endDate string
Ending date of the markup rule.
name Changes to this property will trigger replacement. string
Markup rule name.
billing_account_id
This property is required.
Changes to this property will trigger replacement.
str
BillingAccount ID
billing_profile_id
This property is required.
Changes to this property will trigger replacement.
str
BillingProfile ID
customer_details This property is required. CustomerMetadataArgs
Customer information for the markup rule.
percentage This property is required. float
The markup percentage of the rule.
start_date This property is required. str
Starting date of the markup rule.
description str
The description of the markup rule.
e_tag str
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.
end_date str
Ending date of the markup rule.
name Changes to this property will trigger replacement. str
Markup rule name.
billingAccountId
This property is required.
Changes to this property will trigger replacement.
String
BillingAccount ID
billingProfileId
This property is required.
Changes to this property will trigger replacement.
String
BillingProfile ID
customerDetails This property is required. Property Map
Customer information for the markup rule.
percentage This property is required. Number
The markup percentage of the rule.
startDate This property is required. String
Starting date of the markup rule.
description String
The description of the markup rule.
eTag String
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.
endDate String
Ending date of the markup rule.
name Changes to this property will trigger replacement. String
Markup rule name.

Outputs

All input properties are implicitly available as output properties. Additionally, the MarkupRule resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Type string
Resource type.
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Type string
Resource type.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
type String
Resource type.
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
type string
Resource type.
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
type str
Resource type.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
type String
Resource type.

Supporting Types

CustomerMetadata
, CustomerMetadataArgs

BillingAccountId This property is required. string
Customer billing account id
BillingProfileId This property is required. string
Customer billing profile id
BillingAccountId This property is required. string
Customer billing account id
BillingProfileId This property is required. string
Customer billing profile id
billingAccountId This property is required. String
Customer billing account id
billingProfileId This property is required. String
Customer billing profile id
billingAccountId This property is required. string
Customer billing account id
billingProfileId This property is required. string
Customer billing profile id
billing_account_id This property is required. str
Customer billing account id
billing_profile_id This property is required. str
Customer billing profile id
billingAccountId This property is required. String
Customer billing account id
billingProfileId This property is required. String
Customer billing profile id

CustomerMetadataResponse
, CustomerMetadataResponseArgs

BillingAccountId This property is required. string
Customer billing account id
BillingProfileId This property is required. string
Customer billing profile id
BillingAccountId This property is required. string
Customer billing account id
BillingProfileId This property is required. string
Customer billing profile id
billingAccountId This property is required. String
Customer billing account id
billingProfileId This property is required. String
Customer billing profile id
billingAccountId This property is required. string
Customer billing account id
billingProfileId This property is required. string
Customer billing profile id
billing_account_id This property is required. str
Customer billing account id
billing_profile_id This property is required. str
Customer billing profile id
billingAccountId This property is required. String
Customer billing account id
billingProfileId This property is required. String
Customer billing profile id

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} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi