CostControlRule(String, CostControlDimension, CostControlUnit, Double) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of CostControlRule.
public CostControlRule(string name, Azure.ResourceManager.CognitiveServices.Models.CostControlDimension counterKey, Azure.ResourceManager.CognitiveServices.Models.CostControlUnit unit, double amount);
new Azure.ResourceManager.CognitiveServices.Models.CostControlRule : string * Azure.ResourceManager.CognitiveServices.Models.CostControlDimension * Azure.ResourceManager.CognitiveServices.Models.CostControlUnit * double -> Azure.ResourceManager.CognitiveServices.Models.CostControlRule
Public Sub New (name As String, counterKey As CostControlDimension, unit As CostControlUnit, amount As Double)
Parameters
- name
- String
The stable rule identifier, unique within the cost control without regard to case.
- counterKey
- CostControlDimension
Gets or sets the single built-in dimension used to partition consumption. Custom dimensions are retained only for legacy reads and metadata-only updates. Legacy singleton arrays are accepted on read; serialization always emits an object. To track another field, create another rule.
- unit
- CostControlUnit
The unit used for the cost control amount and absolute thresholds.
- amount
- Double
The maximum consumption allowed by this rule, expressed in the selected unit.
Exceptions
name or counterKey is null.