1. Packages
  2. Azure Native
  3. API Docs
  4. costmanagement
  5. MarkupRule
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi

azure-native.costmanagement.MarkupRule

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi

    Markup rule Azure REST 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",
        });
    
    });
    
    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
    	})
    }
    
    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 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")
    
    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",
    });
    
    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
    

    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 string
    The unique name of the resource.
    args MarkupRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args MarkupRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MarkupRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    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"),
    })
    
    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());
    
    markup_rule_resource = azure_native.costmanagement.MarkupRule("markupRuleResource",
        billing_account_id="string",
        billing_profile_id="string",
        customer_details={
            "billingAccountId": "string",
            "billingProfileId": "string",
        },
        percentage=0,
        start_date="string",
        description="string",
        e_tag="string",
        end_date="string",
        name="string")
    
    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",
    });
    
    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
    

    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

    The MarkupRule resource accepts the following input properties:

    BillingAccountId string
    BillingAccount ID
    BillingProfileId string
    BillingProfile ID
    CustomerDetails Pulumi.AzureNative.CostManagement.Inputs.CustomerMetadata
    Customer information for the markup rule.
    Percentage double
    The markup percentage of the rule.
    StartDate 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 string
    Markup rule name.
    BillingAccountId string
    BillingAccount ID
    BillingProfileId string
    BillingProfile ID
    CustomerDetails CustomerMetadataArgs
    Customer information for the markup rule.
    Percentage float64
    The markup percentage of the rule.
    StartDate 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 string
    Markup rule name.
    billingAccountId String
    BillingAccount ID
    billingProfileId String
    BillingProfile ID
    customerDetails CustomerMetadata
    Customer information for the markup rule.
    percentage Double
    The markup percentage of the rule.
    startDate 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 String
    Markup rule name.
    billingAccountId string
    BillingAccount ID
    billingProfileId string
    BillingProfile ID
    customerDetails CustomerMetadata
    Customer information for the markup rule.
    percentage number
    The markup percentage of the rule.
    startDate 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 string
    Markup rule name.
    billing_account_id str
    BillingAccount ID
    billing_profile_id str
    BillingProfile ID
    customer_details CustomerMetadataArgs
    Customer information for the markup rule.
    percentage float
    The markup percentage of the rule.
    start_date 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 str
    Markup rule name.
    billingAccountId String
    BillingAccount ID
    billingProfileId String
    BillingProfile ID
    customerDetails Property Map
    Customer information for the markup rule.
    percentage Number
    The markup percentage of the rule.
    startDate 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 String
    Markup rule name.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    Resource type.
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    Resource type.
    id string
    The provider-assigned unique ID for this managed resource.
    type string
    Resource type.
    id str
    The provider-assigned unique ID for this managed resource.
    type str
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    Resource type.

    Supporting Types

    CustomerMetadata, CustomerMetadataArgs

    BillingAccountId string
    Customer billing account id
    BillingProfileId string
    Customer billing profile id
    BillingAccountId string
    Customer billing account id
    BillingProfileId string
    Customer billing profile id
    billingAccountId String
    Customer billing account id
    billingProfileId String
    Customer billing profile id
    billingAccountId string
    Customer billing account id
    billingProfileId string
    Customer billing profile id
    billing_account_id str
    Customer billing account id
    billing_profile_id str
    Customer billing profile id
    billingAccountId String
    Customer billing account id
    billingProfileId String
    Customer billing profile id

    CustomerMetadataResponse, CustomerMetadataResponseArgs

    BillingAccountId string
    Customer billing account id
    BillingProfileId string
    Customer billing profile id
    BillingAccountId string
    Customer billing account id
    BillingProfileId string
    Customer billing profile id
    billingAccountId String
    Customer billing account id
    billingProfileId String
    Customer billing profile id
    billingAccountId string
    Customer billing account id
    billingProfileId string
    Customer billing profile id
    billing_account_id str
    Customer billing account id
    billing_profile_id str
    Customer billing profile id
    billingAccountId String
    Customer billing account id
    billingProfileId 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} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi