Language

CostControlAction Class

Definition

Blocks requests when consumption reaches the explicitly configured threshold. No implicit blocking action is created.

public class CostControlAction : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.CognitiveServices.Models.CostControlAction>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.CognitiveServices.Models.CostControlAction>
type CostControlAction = class
    interface IJsonModel<CostControlAction>
    interface IPersistableModel<CostControlAction>
Public Class CostControlAction
Implements IJsonModel(Of CostControlAction), IPersistableModel(Of CostControlAction)
Inheritance
CostControlAction
Implements

Constructors

Name Description
CostControlAction(CostControlThresholdType, Double)

Initializes a new instance of CostControlAction.

Properties

Name Description
Operator

The threshold comparison. Only GreaterThanOrEqualTo is supported.

Threshold

The positive threshold. Percentages cannot exceed 100; absolute thresholds cannot exceed amount and must be whole numbers for Tokens budgets.

ThresholdType

Whether threshold is a percentage of amount or an absolute value in the budget's unit.

Type

The enforcement action. Only Block is supported.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<CostControlAction>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<CostControlAction>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IPersistableModel<CostControlAction>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<CostControlAction>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<CostControlAction>.Write(ModelReaderWriterOptions)

Applies to