1. Packages
  2. Azure Native
  3. API Docs
  4. costmanagement
  5. CostAllocationRule
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.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.costmanagement.CostAllocationRule

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.47.1 published on Monday, Jun 24, 2024 by Pulumi

    The cost allocation rule model definition Azure REST API version: 2020-03-01-preview. Prior API version in Azure Native 1.x: 2020-03-01-preview.

    Other available API versions: 2023-08-01, 2023-09-01, 2023-11-01.

    Example Usage

    CostAllocationRulesCreateResourceGroup

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var costAllocationRule = new AzureNative.CostManagement.CostAllocationRule("costAllocationRule", new()
        {
            BillingAccountId = "100",
            Properties = new AzureNative.CostManagement.Inputs.CostAllocationRulePropertiesArgs
            {
                Description = "This is a testRule",
                Details = new AzureNative.CostManagement.Inputs.CostAllocationRuleDetailsArgs
                {
                    SourceResources = new[]
                    {
                        new AzureNative.CostManagement.Inputs.SourceCostAllocationResourceArgs
                        {
                            Name = "ResourceGroupName",
                            ResourceType = AzureNative.CostManagement.CostAllocationResourceType.Dimension,
                            Values = new[]
                            {
                                "sampleRG",
                                "secondRG",
                            },
                        },
                    },
                    TargetResources = new[]
                    {
                        new AzureNative.CostManagement.Inputs.TargetCostAllocationResourceArgs
                        {
                            Name = "ResourceGroupName",
                            PolicyType = AzureNative.CostManagement.CostAllocationPolicyType.FixedProportion,
                            ResourceType = AzureNative.CostManagement.CostAllocationResourceType.Dimension,
                            Values = new[]
                            {
                                new AzureNative.CostManagement.Inputs.CostAllocationProportionArgs
                                {
                                    Name = "destinationRG",
                                    Percentage = 45,
                                },
                                new AzureNative.CostManagement.Inputs.CostAllocationProportionArgs
                                {
                                    Name = "destinationRG2",
                                    Percentage = 54,
                                },
                            },
                        },
                    },
                },
                Status = AzureNative.CostManagement.RuleStatus.Active,
            },
            RuleName = "testRule",
        });
    
    });
    
    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.NewCostAllocationRule(ctx, "costAllocationRule", &costmanagement.CostAllocationRuleArgs{
    			BillingAccountId: pulumi.String("100"),
    			Properties: &costmanagement.CostAllocationRulePropertiesArgs{
    				Description: pulumi.String("This is a testRule"),
    				Details: &costmanagement.CostAllocationRuleDetailsArgs{
    					SourceResources: costmanagement.SourceCostAllocationResourceArray{
    						&costmanagement.SourceCostAllocationResourceArgs{
    							Name:         pulumi.String("ResourceGroupName"),
    							ResourceType: pulumi.String(costmanagement.CostAllocationResourceTypeDimension),
    							Values: pulumi.StringArray{
    								pulumi.String("sampleRG"),
    								pulumi.String("secondRG"),
    							},
    						},
    					},
    					TargetResources: costmanagement.TargetCostAllocationResourceArray{
    						&costmanagement.TargetCostAllocationResourceArgs{
    							Name:         pulumi.String("ResourceGroupName"),
    							PolicyType:   pulumi.String(costmanagement.CostAllocationPolicyTypeFixedProportion),
    							ResourceType: pulumi.String(costmanagement.CostAllocationResourceTypeDimension),
    							Values: costmanagement.CostAllocationProportionArray{
    								&costmanagement.CostAllocationProportionArgs{
    									Name:       pulumi.String("destinationRG"),
    									Percentage: pulumi.Float64(45),
    								},
    								&costmanagement.CostAllocationProportionArgs{
    									Name:       pulumi.String("destinationRG2"),
    									Percentage: pulumi.Float64(54),
    								},
    							},
    						},
    					},
    				},
    				Status: pulumi.String(costmanagement.RuleStatusActive),
    			},
    			RuleName: pulumi.String("testRule"),
    		})
    		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.CostAllocationRule;
    import com.pulumi.azurenative.costmanagement.CostAllocationRuleArgs;
    import com.pulumi.azurenative.costmanagement.inputs.CostAllocationRulePropertiesArgs;
    import com.pulumi.azurenative.costmanagement.inputs.CostAllocationRuleDetailsArgs;
    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 costAllocationRule = new CostAllocationRule("costAllocationRule", CostAllocationRuleArgs.builder()
                .billingAccountId("100")
                .properties(CostAllocationRulePropertiesArgs.builder()
                    .description("This is a testRule")
                    .details(CostAllocationRuleDetailsArgs.builder()
                        .sourceResources(SourceCostAllocationResourceArgs.builder()
                            .name("ResourceGroupName")
                            .resourceType("Dimension")
                            .values(                        
                                "sampleRG",
                                "secondRG")
                            .build())
                        .targetResources(TargetCostAllocationResourceArgs.builder()
                            .name("ResourceGroupName")
                            .policyType("FixedProportion")
                            .resourceType("Dimension")
                            .values(                        
                                CostAllocationProportionArgs.builder()
                                    .name("destinationRG")
                                    .percentage(45)
                                    .build(),
                                CostAllocationProportionArgs.builder()
                                    .name("destinationRG2")
                                    .percentage(54)
                                    .build())
                            .build())
                        .build())
                    .status("Active")
                    .build())
                .ruleName("testRule")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    cost_allocation_rule = azure_native.costmanagement.CostAllocationRule("costAllocationRule",
        billing_account_id="100",
        properties=azure_native.costmanagement.CostAllocationRulePropertiesArgs(
            description="This is a testRule",
            details=azure_native.costmanagement.CostAllocationRuleDetailsArgs(
                source_resources=[azure_native.costmanagement.SourceCostAllocationResourceArgs(
                    name="ResourceGroupName",
                    resource_type=azure_native.costmanagement.CostAllocationResourceType.DIMENSION,
                    values=[
                        "sampleRG",
                        "secondRG",
                    ],
                )],
                target_resources=[azure_native.costmanagement.TargetCostAllocationResourceArgs(
                    name="ResourceGroupName",
                    policy_type=azure_native.costmanagement.CostAllocationPolicyType.FIXED_PROPORTION,
                    resource_type=azure_native.costmanagement.CostAllocationResourceType.DIMENSION,
                    values=[
                        azure_native.costmanagement.CostAllocationProportionArgs(
                            name="destinationRG",
                            percentage=45,
                        ),
                        azure_native.costmanagement.CostAllocationProportionArgs(
                            name="destinationRG2",
                            percentage=54,
                        ),
                    ],
                )],
            ),
            status=azure_native.costmanagement.RuleStatus.ACTIVE,
        ),
        rule_name="testRule")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const costAllocationRule = new azure_native.costmanagement.CostAllocationRule("costAllocationRule", {
        billingAccountId: "100",
        properties: {
            description: "This is a testRule",
            details: {
                sourceResources: [{
                    name: "ResourceGroupName",
                    resourceType: azure_native.costmanagement.CostAllocationResourceType.Dimension,
                    values: [
                        "sampleRG",
                        "secondRG",
                    ],
                }],
                targetResources: [{
                    name: "ResourceGroupName",
                    policyType: azure_native.costmanagement.CostAllocationPolicyType.FixedProportion,
                    resourceType: azure_native.costmanagement.CostAllocationResourceType.Dimension,
                    values: [
                        {
                            name: "destinationRG",
                            percentage: 45,
                        },
                        {
                            name: "destinationRG2",
                            percentage: 54,
                        },
                    ],
                }],
            },
            status: azure_native.costmanagement.RuleStatus.Active,
        },
        ruleName: "testRule",
    });
    
    resources:
      costAllocationRule:
        type: azure-native:costmanagement:CostAllocationRule
        properties:
          billingAccountId: '100'
          properties:
            description: This is a testRule
            details:
              sourceResources:
                - name: ResourceGroupName
                  resourceType: Dimension
                  values:
                    - sampleRG
                    - secondRG
              targetResources:
                - name: ResourceGroupName
                  policyType: FixedProportion
                  resourceType: Dimension
                  values:
                    - name: destinationRG
                      percentage: 45
                    - name: destinationRG2
                      percentage: 54
            status: Active
          ruleName: testRule
    

    CostAllocationRulesCreateTag

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var costAllocationRule = new AzureNative.CostManagement.CostAllocationRule("costAllocationRule", new()
        {
            BillingAccountId = "100",
            Properties = new AzureNative.CostManagement.Inputs.CostAllocationRulePropertiesArgs
            {
                Description = "This is a testRule",
                Details = new AzureNative.CostManagement.Inputs.CostAllocationRuleDetailsArgs
                {
                    SourceResources = new[]
                    {
                        new AzureNative.CostManagement.Inputs.SourceCostAllocationResourceArgs
                        {
                            Name = "category",
                            ResourceType = AzureNative.CostManagement.CostAllocationResourceType.Tag,
                            Values = new[]
                            {
                                "devops",
                            },
                        },
                    },
                    TargetResources = new[]
                    {
                        new AzureNative.CostManagement.Inputs.TargetCostAllocationResourceArgs
                        {
                            Name = "ResourceGroupName",
                            PolicyType = AzureNative.CostManagement.CostAllocationPolicyType.FixedProportion,
                            ResourceType = AzureNative.CostManagement.CostAllocationResourceType.Dimension,
                            Values = new[]
                            {
                                new AzureNative.CostManagement.Inputs.CostAllocationProportionArgs
                                {
                                    Name = "destinationRG",
                                    Percentage = 33.33,
                                },
                                new AzureNative.CostManagement.Inputs.CostAllocationProportionArgs
                                {
                                    Name = "destinationRG2",
                                    Percentage = 33.33,
                                },
                                new AzureNative.CostManagement.Inputs.CostAllocationProportionArgs
                                {
                                    Name = "destinationRG3",
                                    Percentage = 33.34,
                                },
                            },
                        },
                    },
                },
                Status = AzureNative.CostManagement.RuleStatus.Active,
            },
            RuleName = "testRule",
        });
    
    });
    
    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.NewCostAllocationRule(ctx, "costAllocationRule", &costmanagement.CostAllocationRuleArgs{
    			BillingAccountId: pulumi.String("100"),
    			Properties: &costmanagement.CostAllocationRulePropertiesArgs{
    				Description: pulumi.String("This is a testRule"),
    				Details: &costmanagement.CostAllocationRuleDetailsArgs{
    					SourceResources: costmanagement.SourceCostAllocationResourceArray{
    						&costmanagement.SourceCostAllocationResourceArgs{
    							Name:         pulumi.String("category"),
    							ResourceType: pulumi.String(costmanagement.CostAllocationResourceTypeTag),
    							Values: pulumi.StringArray{
    								pulumi.String("devops"),
    							},
    						},
    					},
    					TargetResources: costmanagement.TargetCostAllocationResourceArray{
    						&costmanagement.TargetCostAllocationResourceArgs{
    							Name:         pulumi.String("ResourceGroupName"),
    							PolicyType:   pulumi.String(costmanagement.CostAllocationPolicyTypeFixedProportion),
    							ResourceType: pulumi.String(costmanagement.CostAllocationResourceTypeDimension),
    							Values: costmanagement.CostAllocationProportionArray{
    								&costmanagement.CostAllocationProportionArgs{
    									Name:       pulumi.String("destinationRG"),
    									Percentage: pulumi.Float64(33.33),
    								},
    								&costmanagement.CostAllocationProportionArgs{
    									Name:       pulumi.String("destinationRG2"),
    									Percentage: pulumi.Float64(33.33),
    								},
    								&costmanagement.CostAllocationProportionArgs{
    									Name:       pulumi.String("destinationRG3"),
    									Percentage: pulumi.Float64(33.34),
    								},
    							},
    						},
    					},
    				},
    				Status: pulumi.String(costmanagement.RuleStatusActive),
    			},
    			RuleName: pulumi.String("testRule"),
    		})
    		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.CostAllocationRule;
    import com.pulumi.azurenative.costmanagement.CostAllocationRuleArgs;
    import com.pulumi.azurenative.costmanagement.inputs.CostAllocationRulePropertiesArgs;
    import com.pulumi.azurenative.costmanagement.inputs.CostAllocationRuleDetailsArgs;
    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 costAllocationRule = new CostAllocationRule("costAllocationRule", CostAllocationRuleArgs.builder()
                .billingAccountId("100")
                .properties(CostAllocationRulePropertiesArgs.builder()
                    .description("This is a testRule")
                    .details(CostAllocationRuleDetailsArgs.builder()
                        .sourceResources(SourceCostAllocationResourceArgs.builder()
                            .name("category")
                            .resourceType("Tag")
                            .values("devops")
                            .build())
                        .targetResources(TargetCostAllocationResourceArgs.builder()
                            .name("ResourceGroupName")
                            .policyType("FixedProportion")
                            .resourceType("Dimension")
                            .values(                        
                                CostAllocationProportionArgs.builder()
                                    .name("destinationRG")
                                    .percentage(33.33)
                                    .build(),
                                CostAllocationProportionArgs.builder()
                                    .name("destinationRG2")
                                    .percentage(33.33)
                                    .build(),
                                CostAllocationProportionArgs.builder()
                                    .name("destinationRG3")
                                    .percentage(33.34)
                                    .build())
                            .build())
                        .build())
                    .status("Active")
                    .build())
                .ruleName("testRule")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    cost_allocation_rule = azure_native.costmanagement.CostAllocationRule("costAllocationRule",
        billing_account_id="100",
        properties=azure_native.costmanagement.CostAllocationRulePropertiesArgs(
            description="This is a testRule",
            details=azure_native.costmanagement.CostAllocationRuleDetailsArgs(
                source_resources=[azure_native.costmanagement.SourceCostAllocationResourceArgs(
                    name="category",
                    resource_type=azure_native.costmanagement.CostAllocationResourceType.TAG,
                    values=["devops"],
                )],
                target_resources=[azure_native.costmanagement.TargetCostAllocationResourceArgs(
                    name="ResourceGroupName",
                    policy_type=azure_native.costmanagement.CostAllocationPolicyType.FIXED_PROPORTION,
                    resource_type=azure_native.costmanagement.CostAllocationResourceType.DIMENSION,
                    values=[
                        azure_native.costmanagement.CostAllocationProportionArgs(
                            name="destinationRG",
                            percentage=33.33,
                        ),
                        azure_native.costmanagement.CostAllocationProportionArgs(
                            name="destinationRG2",
                            percentage=33.33,
                        ),
                        azure_native.costmanagement.CostAllocationProportionArgs(
                            name="destinationRG3",
                            percentage=33.34,
                        ),
                    ],
                )],
            ),
            status=azure_native.costmanagement.RuleStatus.ACTIVE,
        ),
        rule_name="testRule")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const costAllocationRule = new azure_native.costmanagement.CostAllocationRule("costAllocationRule", {
        billingAccountId: "100",
        properties: {
            description: "This is a testRule",
            details: {
                sourceResources: [{
                    name: "category",
                    resourceType: azure_native.costmanagement.CostAllocationResourceType.Tag,
                    values: ["devops"],
                }],
                targetResources: [{
                    name: "ResourceGroupName",
                    policyType: azure_native.costmanagement.CostAllocationPolicyType.FixedProportion,
                    resourceType: azure_native.costmanagement.CostAllocationResourceType.Dimension,
                    values: [
                        {
                            name: "destinationRG",
                            percentage: 33.33,
                        },
                        {
                            name: "destinationRG2",
                            percentage: 33.33,
                        },
                        {
                            name: "destinationRG3",
                            percentage: 33.34,
                        },
                    ],
                }],
            },
            status: azure_native.costmanagement.RuleStatus.Active,
        },
        ruleName: "testRule",
    });
    
    resources:
      costAllocationRule:
        type: azure-native:costmanagement:CostAllocationRule
        properties:
          billingAccountId: '100'
          properties:
            description: This is a testRule
            details:
              sourceResources:
                - name: category
                  resourceType: Tag
                  values:
                    - devops
              targetResources:
                - name: ResourceGroupName
                  policyType: FixedProportion
                  resourceType: Dimension
                  values:
                    - name: destinationRG
                      percentage: 33.33
                    - name: destinationRG2
                      percentage: 33.33
                    - name: destinationRG3
                      percentage: 33.34
            status: Active
          ruleName: testRule
    

    Create CostAllocationRule Resource

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

    Constructor syntax

    new CostAllocationRule(name: string, args: CostAllocationRuleArgs, opts?: CustomResourceOptions);
    @overload
    def CostAllocationRule(resource_name: str,
                           args: CostAllocationRuleArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def CostAllocationRule(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           billing_account_id: Optional[str] = None,
                           properties: Optional[CostAllocationRulePropertiesArgs] = None,
                           rule_name: Optional[str] = None)
    func NewCostAllocationRule(ctx *Context, name string, args CostAllocationRuleArgs, opts ...ResourceOption) (*CostAllocationRule, error)
    public CostAllocationRule(string name, CostAllocationRuleArgs args, CustomResourceOptions? opts = null)
    public CostAllocationRule(String name, CostAllocationRuleArgs args)
    public CostAllocationRule(String name, CostAllocationRuleArgs args, CustomResourceOptions options)
    
    type: azure-native:costmanagement:CostAllocationRule
    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 CostAllocationRuleArgs
    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 CostAllocationRuleArgs
    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 CostAllocationRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CostAllocationRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CostAllocationRuleArgs
    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 costAllocationRuleResource = new AzureNative.CostManagement.CostAllocationRule("costAllocationRuleResource", new()
    {
        BillingAccountId = "string",
        Properties = new AzureNative.CostManagement.Inputs.CostAllocationRulePropertiesArgs
        {
            Details = new AzureNative.CostManagement.Inputs.CostAllocationRuleDetailsArgs
            {
                SourceResources = new[]
                {
                    new AzureNative.CostManagement.Inputs.SourceCostAllocationResourceArgs
                    {
                        Name = "string",
                        ResourceType = "string",
                        Values = new[]
                        {
                            "string",
                        },
                    },
                },
                TargetResources = new[]
                {
                    new AzureNative.CostManagement.Inputs.TargetCostAllocationResourceArgs
                    {
                        Name = "string",
                        PolicyType = "string",
                        ResourceType = "string",
                        Values = new[]
                        {
                            new AzureNative.CostManagement.Inputs.CostAllocationProportionArgs
                            {
                                Name = "string",
                                Percentage = 0,
                            },
                        },
                    },
                },
            },
            Status = "string",
            Description = "string",
        },
        RuleName = "string",
    });
    
    example, err := costmanagement.NewCostAllocationRule(ctx, "costAllocationRuleResource", &costmanagement.CostAllocationRuleArgs{
    BillingAccountId: pulumi.String("string"),
    Properties: &costmanagement.CostAllocationRulePropertiesArgs{
    Details: &costmanagement.CostAllocationRuleDetailsArgs{
    SourceResources: costmanagement.SourceCostAllocationResourceArray{
    &costmanagement.SourceCostAllocationResourceArgs{
    Name: pulumi.String("string"),
    ResourceType: pulumi.String("string"),
    Values: pulumi.StringArray{
    pulumi.String("string"),
    },
    },
    },
    TargetResources: costmanagement.TargetCostAllocationResourceArray{
    &costmanagement.TargetCostAllocationResourceArgs{
    Name: pulumi.String("string"),
    PolicyType: pulumi.String("string"),
    ResourceType: pulumi.String("string"),
    Values: costmanagement.CostAllocationProportionArray{
    &costmanagement.CostAllocationProportionArgs{
    Name: pulumi.String("string"),
    Percentage: pulumi.Float64(0),
    },
    },
    },
    },
    },
    Status: pulumi.String("string"),
    Description: pulumi.String("string"),
    },
    RuleName: pulumi.String("string"),
    })
    
    var costAllocationRuleResource = new CostAllocationRule("costAllocationRuleResource", CostAllocationRuleArgs.builder()
        .billingAccountId("string")
        .properties(CostAllocationRulePropertiesArgs.builder()
            .details(CostAllocationRuleDetailsArgs.builder()
                .sourceResources(SourceCostAllocationResourceArgs.builder()
                    .name("string")
                    .resourceType("string")
                    .values("string")
                    .build())
                .targetResources(TargetCostAllocationResourceArgs.builder()
                    .name("string")
                    .policyType("string")
                    .resourceType("string")
                    .values(CostAllocationProportionArgs.builder()
                        .name("string")
                        .percentage(0)
                        .build())
                    .build())
                .build())
            .status("string")
            .description("string")
            .build())
        .ruleName("string")
        .build());
    
    cost_allocation_rule_resource = azure_native.costmanagement.CostAllocationRule("costAllocationRuleResource",
        billing_account_id="string",
        properties=azure_native.costmanagement.CostAllocationRulePropertiesArgs(
            details=azure_native.costmanagement.CostAllocationRuleDetailsArgs(
                source_resources=[azure_native.costmanagement.SourceCostAllocationResourceArgs(
                    name="string",
                    resource_type="string",
                    values=["string"],
                )],
                target_resources=[azure_native.costmanagement.TargetCostAllocationResourceArgs(
                    name="string",
                    policy_type="string",
                    resource_type="string",
                    values=[azure_native.costmanagement.CostAllocationProportionArgs(
                        name="string",
                        percentage=0,
                    )],
                )],
            ),
            status="string",
            description="string",
        ),
        rule_name="string")
    
    const costAllocationRuleResource = new azure_native.costmanagement.CostAllocationRule("costAllocationRuleResource", {
        billingAccountId: "string",
        properties: {
            details: {
                sourceResources: [{
                    name: "string",
                    resourceType: "string",
                    values: ["string"],
                }],
                targetResources: [{
                    name: "string",
                    policyType: "string",
                    resourceType: "string",
                    values: [{
                        name: "string",
                        percentage: 0,
                    }],
                }],
            },
            status: "string",
            description: "string",
        },
        ruleName: "string",
    });
    
    type: azure-native:costmanagement:CostAllocationRule
    properties:
        billingAccountId: string
        properties:
            description: string
            details:
                sourceResources:
                    - name: string
                      resourceType: string
                      values:
                        - string
                targetResources:
                    - name: string
                      policyType: string
                      resourceType: string
                      values:
                        - name: string
                          percentage: 0
            status: string
        ruleName: string
    

    CostAllocationRule 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 CostAllocationRule resource accepts the following input properties:

    BillingAccountId string
    BillingAccount ID
    Properties Pulumi.AzureNative.CostManagement.Inputs.CostAllocationRuleProperties
    Cost allocation rule properties
    RuleName string
    Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
    BillingAccountId string
    BillingAccount ID
    Properties CostAllocationRulePropertiesArgs
    Cost allocation rule properties
    RuleName string
    Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
    billingAccountId String
    BillingAccount ID
    properties CostAllocationRuleProperties
    Cost allocation rule properties
    ruleName String
    Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
    billingAccountId string
    BillingAccount ID
    properties CostAllocationRuleProperties
    Cost allocation rule properties
    ruleName string
    Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
    billing_account_id str
    BillingAccount ID
    properties CostAllocationRulePropertiesArgs
    Cost allocation rule properties
    rule_name str
    Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
    billingAccountId String
    BillingAccount ID
    properties Property Map
    Cost allocation rule properties
    ruleName String
    Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the rule. This is a read only value.
    Type string
    Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the rule. This is a read only value.
    Type string
    Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the rule. This is a read only value.
    type String
    Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the rule. This is a read only value.
    type string
    Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the rule. This is a read only value.
    type str
    Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the rule. This is a read only value.
    type String
    Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.

    Supporting Types

    CostAllocationPolicyType, CostAllocationPolicyTypeArgs

    FixedProportion
    FixedProportion
    CostAllocationPolicyTypeFixedProportion
    FixedProportion
    FixedProportion
    FixedProportion
    FixedProportion
    FixedProportion
    FIXED_PROPORTION
    FixedProportion
    "FixedProportion"
    FixedProportion

    CostAllocationProportion, CostAllocationProportionArgs

    Name string
    Target resource for cost allocation
    Percentage double
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.
    Name string
    Target resource for cost allocation
    Percentage float64
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.
    name String
    Target resource for cost allocation
    percentage Double
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.
    name string
    Target resource for cost allocation
    percentage number
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.
    name str
    Target resource for cost allocation
    percentage float
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.
    name String
    Target resource for cost allocation
    percentage Number
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.

    CostAllocationProportionResponse, CostAllocationProportionResponseArgs

    Name string
    Target resource for cost allocation
    Percentage double
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.
    Name string
    Target resource for cost allocation
    Percentage float64
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.
    name String
    Target resource for cost allocation
    percentage Double
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.
    name string
    Target resource for cost allocation
    percentage number
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.
    name str
    Target resource for cost allocation
    percentage float
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.
    name String
    Target resource for cost allocation
    percentage Number
    Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00.

    CostAllocationResourceType, CostAllocationResourceTypeArgs

    Dimension
    DimensionIndicates an Azure dimension such as a subscription id or resource group name is being used for allocation.
    Tag
    TagAllocates cost based on Azure Tag key value pairs.
    CostAllocationResourceTypeDimension
    DimensionIndicates an Azure dimension such as a subscription id or resource group name is being used for allocation.
    CostAllocationResourceTypeTag
    TagAllocates cost based on Azure Tag key value pairs.
    Dimension
    DimensionIndicates an Azure dimension such as a subscription id or resource group name is being used for allocation.
    Tag
    TagAllocates cost based on Azure Tag key value pairs.
    Dimension
    DimensionIndicates an Azure dimension such as a subscription id or resource group name is being used for allocation.
    Tag
    TagAllocates cost based on Azure Tag key value pairs.
    DIMENSION
    DimensionIndicates an Azure dimension such as a subscription id or resource group name is being used for allocation.
    TAG
    TagAllocates cost based on Azure Tag key value pairs.
    "Dimension"
    DimensionIndicates an Azure dimension such as a subscription id or resource group name is being used for allocation.
    "Tag"
    TagAllocates cost based on Azure Tag key value pairs.

    CostAllocationRuleDetails, CostAllocationRuleDetailsArgs

    SourceResources List<Pulumi.AzureNative.CostManagement.Inputs.SourceCostAllocationResource>
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    TargetResources List<Pulumi.AzureNative.CostManagement.Inputs.TargetCostAllocationResource>
    Target resources for cost allocation. At this time, this list can contain no more than one element.
    SourceResources []SourceCostAllocationResource
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    TargetResources []TargetCostAllocationResource
    Target resources for cost allocation. At this time, this list can contain no more than one element.
    sourceResources List<SourceCostAllocationResource>
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    targetResources List<TargetCostAllocationResource>
    Target resources for cost allocation. At this time, this list can contain no more than one element.
    sourceResources SourceCostAllocationResource[]
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    targetResources TargetCostAllocationResource[]
    Target resources for cost allocation. At this time, this list can contain no more than one element.
    source_resources Sequence[SourceCostAllocationResource]
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    target_resources Sequence[TargetCostAllocationResource]
    Target resources for cost allocation. At this time, this list can contain no more than one element.
    sourceResources List<Property Map>
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    targetResources List<Property Map>
    Target resources for cost allocation. At this time, this list can contain no more than one element.

    CostAllocationRuleDetailsResponse, CostAllocationRuleDetailsResponseArgs

    SourceResources List<Pulumi.AzureNative.CostManagement.Inputs.SourceCostAllocationResourceResponse>
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    TargetResources List<Pulumi.AzureNative.CostManagement.Inputs.TargetCostAllocationResourceResponse>
    Target resources for cost allocation. At this time, this list can contain no more than one element.
    SourceResources []SourceCostAllocationResourceResponse
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    TargetResources []TargetCostAllocationResourceResponse
    Target resources for cost allocation. At this time, this list can contain no more than one element.
    sourceResources List<SourceCostAllocationResourceResponse>
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    targetResources List<TargetCostAllocationResourceResponse>
    Target resources for cost allocation. At this time, this list can contain no more than one element.
    sourceResources SourceCostAllocationResourceResponse[]
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    targetResources TargetCostAllocationResourceResponse[]
    Target resources for cost allocation. At this time, this list can contain no more than one element.
    source_resources Sequence[SourceCostAllocationResourceResponse]
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    target_resources Sequence[TargetCostAllocationResourceResponse]
    Target resources for cost allocation. At this time, this list can contain no more than one element.
    sourceResources List<Property Map>
    Source resources for cost allocation. At this time, this list can contain no more than one element.
    targetResources List<Property Map>
    Target resources for cost allocation. At this time, this list can contain no more than one element.

    CostAllocationRuleProperties, CostAllocationRulePropertiesArgs

    Details Pulumi.AzureNative.CostManagement.Inputs.CostAllocationRuleDetails
    Resource information for the cost allocation rule
    Status string | Pulumi.AzureNative.CostManagement.RuleStatus
    Status of the rule
    Description string
    Description of a cost allocation rule.
    Details CostAllocationRuleDetails
    Resource information for the cost allocation rule
    Status string | RuleStatus
    Status of the rule
    Description string
    Description of a cost allocation rule.
    details CostAllocationRuleDetails
    Resource information for the cost allocation rule
    status String | RuleStatus
    Status of the rule
    description String
    Description of a cost allocation rule.
    details CostAllocationRuleDetails
    Resource information for the cost allocation rule
    status string | RuleStatus
    Status of the rule
    description string
    Description of a cost allocation rule.
    details CostAllocationRuleDetails
    Resource information for the cost allocation rule
    status str | RuleStatus
    Status of the rule
    description str
    Description of a cost allocation rule.
    details Property Map
    Resource information for the cost allocation rule
    status String | "NotActive" | "Active" | "Processing"
    Status of the rule
    description String
    Description of a cost allocation rule.

    CostAllocationRulePropertiesResponse, CostAllocationRulePropertiesResponseArgs

    CreatedDate string
    Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
    Details Pulumi.AzureNative.CostManagement.Inputs.CostAllocationRuleDetailsResponse
    Resource information for the cost allocation rule
    Status string
    Status of the rule
    UpdatedDate string
    Time at which the rule was last updated.
    Description string
    Description of a cost allocation rule.
    CreatedDate string
    Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
    Details CostAllocationRuleDetailsResponse
    Resource information for the cost allocation rule
    Status string
    Status of the rule
    UpdatedDate string
    Time at which the rule was last updated.
    Description string
    Description of a cost allocation rule.
    createdDate String
    Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
    details CostAllocationRuleDetailsResponse
    Resource information for the cost allocation rule
    status String
    Status of the rule
    updatedDate String
    Time at which the rule was last updated.
    description String
    Description of a cost allocation rule.
    createdDate string
    Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
    details CostAllocationRuleDetailsResponse
    Resource information for the cost allocation rule
    status string
    Status of the rule
    updatedDate string
    Time at which the rule was last updated.
    description string
    Description of a cost allocation rule.
    created_date str
    Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
    details CostAllocationRuleDetailsResponse
    Resource information for the cost allocation rule
    status str
    Status of the rule
    updated_date str
    Time at which the rule was last updated.
    description str
    Description of a cost allocation rule.
    createdDate String
    Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
    details Property Map
    Resource information for the cost allocation rule
    status String
    Status of the rule
    updatedDate String
    Time at which the rule was last updated.
    description String
    Description of a cost allocation rule.

    RuleStatus, RuleStatusArgs

    NotActive
    NotActiveRule is saved but not used to allocate costs.
    Active
    ActiveRule is saved and impacting cost allocation.
    Processing
    ProcessingRule is saved and cost allocation is being updated. Readonly value that cannot be submitted in a put request.
    RuleStatusNotActive
    NotActiveRule is saved but not used to allocate costs.
    RuleStatusActive
    ActiveRule is saved and impacting cost allocation.
    RuleStatusProcessing
    ProcessingRule is saved and cost allocation is being updated. Readonly value that cannot be submitted in a put request.
    NotActive
    NotActiveRule is saved but not used to allocate costs.
    Active
    ActiveRule is saved and impacting cost allocation.
    Processing
    ProcessingRule is saved and cost allocation is being updated. Readonly value that cannot be submitted in a put request.
    NotActive
    NotActiveRule is saved but not used to allocate costs.
    Active
    ActiveRule is saved and impacting cost allocation.
    Processing
    ProcessingRule is saved and cost allocation is being updated. Readonly value that cannot be submitted in a put request.
    NOT_ACTIVE
    NotActiveRule is saved but not used to allocate costs.
    ACTIVE
    ActiveRule is saved and impacting cost allocation.
    PROCESSING
    ProcessingRule is saved and cost allocation is being updated. Readonly value that cannot be submitted in a put request.
    "NotActive"
    NotActiveRule is saved but not used to allocate costs.
    "Active"
    ActiveRule is saved and impacting cost allocation.
    "Processing"
    ProcessingRule is saved and cost allocation is being updated. Readonly value that cannot be submitted in a put request.

    SourceCostAllocationResource, SourceCostAllocationResourceArgs

    Name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    ResourceType string | Pulumi.AzureNative.CostManagement.CostAllocationResourceType
    Type of resources contained in this cost allocation rule
    Values List<string>
    Source Resources for cost allocation. This list cannot contain more than 25 values.
    Name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    ResourceType string | CostAllocationResourceType
    Type of resources contained in this cost allocation rule
    Values []string
    Source Resources for cost allocation. This list cannot contain more than 25 values.
    name String
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    resourceType String | CostAllocationResourceType
    Type of resources contained in this cost allocation rule
    values List<String>
    Source Resources for cost allocation. This list cannot contain more than 25 values.
    name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    resourceType string | CostAllocationResourceType
    Type of resources contained in this cost allocation rule
    values string[]
    Source Resources for cost allocation. This list cannot contain more than 25 values.
    name str
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    resource_type str | CostAllocationResourceType
    Type of resources contained in this cost allocation rule
    values Sequence[str]
    Source Resources for cost allocation. This list cannot contain more than 25 values.
    name String
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    resourceType String | "Dimension" | "Tag"
    Type of resources contained in this cost allocation rule
    values List<String>
    Source Resources for cost allocation. This list cannot contain more than 25 values.

    SourceCostAllocationResourceResponse, SourceCostAllocationResourceResponseArgs

    Name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    ResourceType string
    Type of resources contained in this cost allocation rule
    Values List<string>
    Source Resources for cost allocation. This list cannot contain more than 25 values.
    Name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    ResourceType string
    Type of resources contained in this cost allocation rule
    Values []string
    Source Resources for cost allocation. This list cannot contain more than 25 values.
    name String
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    resourceType String
    Type of resources contained in this cost allocation rule
    values List<String>
    Source Resources for cost allocation. This list cannot contain more than 25 values.
    name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    resourceType string
    Type of resources contained in this cost allocation rule
    values string[]
    Source Resources for cost allocation. This list cannot contain more than 25 values.
    name str
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    resource_type str
    Type of resources contained in this cost allocation rule
    values Sequence[str]
    Source Resources for cost allocation. This list cannot contain more than 25 values.
    name String
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    resourceType String
    Type of resources contained in this cost allocation rule
    values List<String>
    Source Resources for cost allocation. This list cannot contain more than 25 values.

    TargetCostAllocationResource, TargetCostAllocationResourceArgs

    Name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    PolicyType string | Pulumi.AzureNative.CostManagement.CostAllocationPolicyType
    Method of cost allocation for the rule
    ResourceType string | Pulumi.AzureNative.CostManagement.CostAllocationResourceType
    Type of resources contained in this cost allocation rule
    Values List<Pulumi.AzureNative.CostManagement.Inputs.CostAllocationProportion>
    Target resources for cost allocation. This list cannot contain more than 25 values.
    Name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    PolicyType string | CostAllocationPolicyType
    Method of cost allocation for the rule
    ResourceType string | CostAllocationResourceType
    Type of resources contained in this cost allocation rule
    Values []CostAllocationProportion
    Target resources for cost allocation. This list cannot contain more than 25 values.
    name String
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    policyType String | CostAllocationPolicyType
    Method of cost allocation for the rule
    resourceType String | CostAllocationResourceType
    Type of resources contained in this cost allocation rule
    values List<CostAllocationProportion>
    Target resources for cost allocation. This list cannot contain more than 25 values.
    name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    policyType string | CostAllocationPolicyType
    Method of cost allocation for the rule
    resourceType string | CostAllocationResourceType
    Type of resources contained in this cost allocation rule
    values CostAllocationProportion[]
    Target resources for cost allocation. This list cannot contain more than 25 values.
    name str
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    policy_type str | CostAllocationPolicyType
    Method of cost allocation for the rule
    resource_type str | CostAllocationResourceType
    Type of resources contained in this cost allocation rule
    values Sequence[CostAllocationProportion]
    Target resources for cost allocation. This list cannot contain more than 25 values.
    name String
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    policyType String | "FixedProportion"
    Method of cost allocation for the rule
    resourceType String | "Dimension" | "Tag"
    Type of resources contained in this cost allocation rule
    values List<Property Map>
    Target resources for cost allocation. This list cannot contain more than 25 values.

    TargetCostAllocationResourceResponse, TargetCostAllocationResourceResponseArgs

    Name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    PolicyType string
    Method of cost allocation for the rule
    ResourceType string
    Type of resources contained in this cost allocation rule
    Values List<Pulumi.AzureNative.CostManagement.Inputs.CostAllocationProportionResponse>
    Target resources for cost allocation. This list cannot contain more than 25 values.
    Name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    PolicyType string
    Method of cost allocation for the rule
    ResourceType string
    Type of resources contained in this cost allocation rule
    Values []CostAllocationProportionResponse
    Target resources for cost allocation. This list cannot contain more than 25 values.
    name String
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    policyType String
    Method of cost allocation for the rule
    resourceType String
    Type of resources contained in this cost allocation rule
    values List<CostAllocationProportionResponse>
    Target resources for cost allocation. This list cannot contain more than 25 values.
    name string
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    policyType string
    Method of cost allocation for the rule
    resourceType string
    Type of resources contained in this cost allocation rule
    values CostAllocationProportionResponse[]
    Target resources for cost allocation. This list cannot contain more than 25 values.
    name str
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    policy_type str
    Method of cost allocation for the rule
    resource_type str
    Type of resources contained in this cost allocation rule
    values Sequence[CostAllocationProportionResponse]
    Target resources for cost allocation. This list cannot contain more than 25 values.
    name String
    If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag
    policyType String
    Method of cost allocation for the rule
    resourceType String
    Type of resources contained in this cost allocation rule
    values List<Property Map>
    Target resources for cost allocation. This list cannot contain more than 25 values.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:costmanagement:CostAllocationRule testRule /providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/costAllocationRules/{ruleName} 
    

    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.47.1 published on Monday, Jun 24, 2024 by Pulumi