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.73.0 published on Wednesday, Nov 20, 2024 by Pulumi
azure-native.costmanagement.getCostAllocationRule
Explore with Pulumi AI
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.73.0 published on Wednesday, Nov 20, 2024 by Pulumi
Get a cost allocation rule by rule name and billing account or enterprise enrollment. Azure REST API version: 2020-03-01-preview.
Other available API versions: 2023-08-01, 2023-09-01, 2023-11-01, 2024-08-01.
Using getCostAllocationRule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCostAllocationRule(args: GetCostAllocationRuleArgs, opts?: InvokeOptions): Promise<GetCostAllocationRuleResult>
function getCostAllocationRuleOutput(args: GetCostAllocationRuleOutputArgs, opts?: InvokeOptions): Output<GetCostAllocationRuleResult>
def get_cost_allocation_rule(billing_account_id: Optional[str] = None,
rule_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCostAllocationRuleResult
def get_cost_allocation_rule_output(billing_account_id: Optional[pulumi.Input[str]] = None,
rule_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCostAllocationRuleResult]
func LookupCostAllocationRule(ctx *Context, args *LookupCostAllocationRuleArgs, opts ...InvokeOption) (*LookupCostAllocationRuleResult, error)
func LookupCostAllocationRuleOutput(ctx *Context, args *LookupCostAllocationRuleOutputArgs, opts ...InvokeOption) LookupCostAllocationRuleResultOutput
> Note: This function is named LookupCostAllocationRule
in the Go SDK.
public static class GetCostAllocationRule
{
public static Task<GetCostAllocationRuleResult> InvokeAsync(GetCostAllocationRuleArgs args, InvokeOptions? opts = null)
public static Output<GetCostAllocationRuleResult> Invoke(GetCostAllocationRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCostAllocationRuleResult> getCostAllocationRule(GetCostAllocationRuleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure-native:costmanagement:getCostAllocationRule
arguments:
# arguments dictionary
The following arguments are supported:
- Billing
Account stringId - BillingAccount ID
- Rule
Name 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 stringId - BillingAccount ID
- Rule
Name 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 StringId - BillingAccount ID
- rule
Name 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 stringId - BillingAccount ID
- rule
Name 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_ strid - BillingAccount ID
- 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.
- billing
Account StringId - BillingAccount ID
- rule
Name String - Cost allocation rule name. The name cannot include spaces or any non alphanumeric characters other than '_' and '-'. The max length is 260 characters.
getCostAllocationRule Result
The following output properties are available:
- Id string
- Azure Resource Manager Id for the rule. This is a read ony value.
- Name string
- Name of the rule. This is a read only value.
- Properties
Pulumi.
Azure Native. Cost Management. Outputs. Cost Allocation Rule Properties Response - Cost allocation rule properties
- Type string
- Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
- Id string
- Azure Resource Manager Id for the rule. This is a read ony value.
- Name string
- Name of the rule. This is a read only value.
- Properties
Cost
Allocation Rule Properties Response - Cost allocation rule properties
- Type string
- Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
- id String
- Azure Resource Manager Id for the rule. This is a read ony value.
- name String
- Name of the rule. This is a read only value.
- properties
Cost
Allocation Rule Properties Response - Cost allocation rule properties
- type String
- Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
- id string
- Azure Resource Manager Id for the rule. This is a read ony value.
- name string
- Name of the rule. This is a read only value.
- properties
Cost
Allocation Rule Properties Response - Cost allocation rule properties
- type string
- Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
- id str
- Azure Resource Manager Id for the rule. This is a read ony value.
- name str
- Name of the rule. This is a read only value.
- properties
Cost
Allocation Rule Properties Response - Cost allocation rule properties
- type str
- Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
- id String
- Azure Resource Manager Id for the rule. This is a read ony value.
- name String
- Name of the rule. This is a read only value.
- properties Property Map
- Cost allocation rule properties
- type String
- Resource type of the rule. This is a read only value of Microsoft.CostManagement/CostAllocationRule.
Supporting Types
CostAllocationProportionResponse
- 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.
CostAllocationRuleDetailsResponse
- Source
Resources List<Pulumi.Azure Native. Cost Management. Inputs. Source Cost Allocation Resource Response> - Source resources for cost allocation. At this time, this list can contain no more than one element.
- Target
Resources List<Pulumi.Azure Native. Cost Management. Inputs. Target Cost Allocation Resource Response> - Target resources for cost allocation. At this time, this list can contain no more than one element.
- Source
Resources []SourceCost Allocation Resource Response - Source resources for cost allocation. At this time, this list can contain no more than one element.
- Target
Resources []TargetCost Allocation Resource Response - Target resources for cost allocation. At this time, this list can contain no more than one element.
- source
Resources List<SourceCost Allocation Resource Response> - Source resources for cost allocation. At this time, this list can contain no more than one element.
- target
Resources List<TargetCost Allocation Resource Response> - Target resources for cost allocation. At this time, this list can contain no more than one element.
- source
Resources SourceCost Allocation Resource Response[] - Source resources for cost allocation. At this time, this list can contain no more than one element.
- target
Resources TargetCost Allocation Resource Response[] - Target resources for cost allocation. At this time, this list can contain no more than one element.
- source_
resources Sequence[SourceCost Allocation Resource Response] - Source resources for cost allocation. At this time, this list can contain no more than one element.
- target_
resources Sequence[TargetCost Allocation Resource Response] - Target resources for cost allocation. At this time, this list can contain no more than one element.
- source
Resources List<Property Map> - Source resources for cost allocation. At this time, this list can contain no more than one element.
- target
Resources List<Property Map> - Target resources for cost allocation. At this time, this list can contain no more than one element.
CostAllocationRulePropertiesResponse
- Created
Date string - Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
- Details
Pulumi.
Azure Native. Cost Management. Inputs. Cost Allocation Rule Details Response - Resource information for the cost allocation rule
- Status string
- Status of the rule
- Updated
Date string - Time at which the rule was last updated.
- Description string
- Description of a cost allocation rule.
- Created
Date string - Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
- Details
Cost
Allocation Rule Details Response - Resource information for the cost allocation rule
- Status string
- Status of the rule
- Updated
Date string - Time at which the rule was last updated.
- Description string
- Description of a cost allocation rule.
- created
Date String - Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
- details
Cost
Allocation Rule Details Response - Resource information for the cost allocation rule
- status String
- Status of the rule
- updated
Date String - Time at which the rule was last updated.
- description String
- Description of a cost allocation rule.
- created
Date string - Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.
- details
Cost
Allocation Rule Details Response - Resource information for the cost allocation rule
- status string
- Status of the rule
- updated
Date 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
Cost
Allocation Rule Details Response - 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.
- created
Date 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
- updated
Date String - Time at which the rule was last updated.
- description String
- Description of a cost allocation rule.
SourceCostAllocationResourceResponse
- 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
- Resource
Type 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
- Resource
Type 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
- resource
Type 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
- resource
Type 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
- resource
Type 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.
TargetCostAllocationResourceResponse
- 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
- Policy
Type string - Method of cost allocation for the rule
- Resource
Type string - Type of resources contained in this cost allocation rule
- Values
List<Pulumi.
Azure Native. Cost Management. Inputs. Cost Allocation Proportion Response> - 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
- Policy
Type string - Method of cost allocation for the rule
- Resource
Type string - Type of resources contained in this cost allocation rule
- Values
[]Cost
Allocation Proportion Response - 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
- policy
Type String - Method of cost allocation for the rule
- resource
Type String - Type of resources contained in this cost allocation rule
- values
List<Cost
Allocation Proportion Response> - 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
- policy
Type string - Method of cost allocation for the rule
- resource
Type string - Type of resources contained in this cost allocation rule
- values
Cost
Allocation Proportion Response[] - 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[Cost
Allocation Proportion Response] - 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
- policy
Type String - Method of cost allocation for the rule
- resource
Type 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.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.73.0 published on Wednesday, Nov 20, 2024 by Pulumi