azure-native.costmanagement.MarkupRule
Explore with Pulumi AI
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={
"billing_account_id": "string",
"billing_profile_id": "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
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:
- Billing
Account stringId - BillingAccount ID
- Billing
Profile stringId - BillingProfile ID
- Customer
Details Pulumi.Azure Native. Cost Management. Inputs. Customer Metadata - Customer information for the markup rule.
- Percentage double
- The markup percentage of the rule.
- Start
Date 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.
- End
Date string - Ending date of the markup rule.
- Name string
- Markup rule name.
- Billing
Account stringId - BillingAccount ID
- Billing
Profile stringId - BillingProfile ID
- Customer
Details CustomerMetadata Args - Customer information for the markup rule.
- Percentage float64
- The markup percentage of the rule.
- Start
Date 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.
- End
Date string - Ending date of the markup rule.
- Name string
- Markup rule name.
- billing
Account StringId - BillingAccount ID
- billing
Profile StringId - BillingProfile ID
- customer
Details CustomerMetadata - Customer information for the markup rule.
- percentage Double
- The markup percentage of the rule.
- start
Date String - Starting date of the markup rule.
- description String
- The description of the markup rule.
- e
Tag 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.
- end
Date String - Ending date of the markup rule.
- name String
- Markup rule name.
- billing
Account stringId - BillingAccount ID
- billing
Profile stringId - BillingProfile ID
- customer
Details CustomerMetadata - Customer information for the markup rule.
- percentage number
- The markup percentage of the rule.
- start
Date string - Starting date of the markup rule.
- description string
- The description of the markup rule.
- e
Tag 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.
- end
Date string - Ending date of the markup rule.
- name string
- Markup rule name.
- billing_
account_ strid - BillingAccount ID
- billing_
profile_ strid - BillingProfile ID
- customer_
details CustomerMetadata Args - 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.
- billing
Account StringId - BillingAccount ID
- billing
Profile StringId - BillingProfile ID
- customer
Details Property Map - Customer information for the markup rule.
- percentage Number
- The markup percentage of the rule.
- start
Date String - Starting date of the markup rule.
- description String
- The description of the markup rule.
- e
Tag 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.
- end
Date 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:
Supporting Types
CustomerMetadata, CustomerMetadataArgs
- Billing
Account stringId - Customer billing account id
- Billing
Profile stringId - Customer billing profile id
- Billing
Account stringId - Customer billing account id
- Billing
Profile stringId - Customer billing profile id
- billing
Account StringId - Customer billing account id
- billing
Profile StringId - Customer billing profile id
- billing
Account stringId - Customer billing account id
- billing
Profile stringId - Customer billing profile id
- billing_
account_ strid - Customer billing account id
- billing_
profile_ strid - Customer billing profile id
- billing
Account StringId - Customer billing account id
- billing
Profile StringId - Customer billing profile id
CustomerMetadataResponse, CustomerMetadataResponseArgs
- Billing
Account stringId - Customer billing account id
- Billing
Profile stringId - Customer billing profile id
- Billing
Account stringId - Customer billing account id
- Billing
Profile stringId - Customer billing profile id
- billing
Account StringId - Customer billing account id
- billing
Profile StringId - Customer billing profile id
- billing
Account stringId - Customer billing account id
- billing
Profile stringId - Customer billing profile id
- billing_
account_ strid - Customer billing account id
- billing_
profile_ strid - Customer billing profile id
- billing
Account StringId - Customer billing account id
- billing
Profile StringId - 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