Skip to content

AgentPrismQuotaOptions

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Defines options for the quota subsystem.

public sealed class AgentPrismQuotaOptions

objectAgentPrismQuotaOptions

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Read from the AgentPrism:Quotas configuration section.

public AgentPrismQuotaOptions()

Gets the configuration section name.

public const string SectionName = "AgentPrism:Quotas"

string

Gets or sets whether to allow a run when quota enforcement fails.

public bool AllowOnStoreFailure { get; set; }

bool

Defaults to true so a temporary database outage does not stop the service. A strict deployment can set this to false and choose “do not run when quota cannot be verified”.

Gets or sets whether quota enforcement is enabled. When disabled, rules can be stored but no run is rejected and no counter increments.

public bool Enabled { get; set; }

bool

Defaulting to true is safe: nothing is rejected while no rule exists. The “no default quota” rule comes from an empty rule set, not from disabling the subsystem.

Gets percentages that publish a quota.threshold event when the quota counter reaches them.

public IList<int> ThresholdPercents { get; }

IList<int>

Each threshold is published once per period. Otherwise, every run above the threshold would produce a new event as the counter increments.

Gets or sets the time zone used to calculate period boundaries. Windows and IANA names are accepted.

public string TimeZone { get; set; }

string

An administrator who says “daily quota” means their business day. The consumer is therefore expected to change the default UTC time zone.

Returns the resolved time zone, falling back to UTC when its name is unknown.

public TimeZoneInfo ResolveTimeZone()

TimeZoneInfo

The time zone.

An unrecognized name does not throw because quota enforcement must not stop all traffic for a bad name. AgentPrismQuotaOptionsValidator validates it during startup and reports the error there.