CostControlRule Class
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.
A cost limit and the population to which it applies.
public class CostControlRule : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.CognitiveServices.Models.CostControlRule>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.CognitiveServices.Models.CostControlRule>
type CostControlRule = class
interface IJsonModel<CostControlRule>
interface IPersistableModel<CostControlRule>
Public Class CostControlRule
Implements IJsonModel(Of CostControlRule), IPersistableModel(Of CostControlRule)
- Inheritance
-
CostControlRule
- Implements
Constructors
| Name | Description |
|---|---|
| CostControlRule(String, CostControlDimension, CostControlUnit, Double) |
Initializes a new instance of CostControlRule. |
Properties
| Name | Description |
|---|---|
| Amount |
The maximum consumption allowed by this rule, expressed in the selected unit. |
| CounterKey |
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. |
| Match |
Gets or sets optional match arrays keyed by |
| Name |
The stable rule identifier, unique within the cost control without regard to case. |
| Period |
Gets or sets the calendar-aligned UTC renewal period. Authored rules support Day, Week, or Month. This field is required for recurring rules and must be omitted for non-recurring rules. Legacy stored minute, hour, and year periods are preserved when reading definitions. |
| Recurring |
Whether the cost control renews. The default is true. |
| Thresholds |
Gets or sets optional thresholds. Omitted or empty thresholds track usage without explicit actions. Authored thresholds must explicitly specify Alert or Block; Audit is retained for legacy reads. |
| Unit |
The unit used for the cost control amount and absolute thresholds. |