Attributes for creating or updating a usage quota by scope. Each item must provide usage_limit, pending_usage_limit, or both. Providing only pending_usage_limit updates an existing organization-wide quota, never creates one, requires enforced to be omitted, and fails if the quota does not exist.

Hierarchy

  • UsageQuotaCreateAttributes

Constructors

Properties

additionalProperties?: {
    [key: string]: any;
}

A container for additional, undeclared properties. This is a holder for any undeclared properties as specified with the 'additionalProperties' keyword in the OAS document.

Type declaration

  • [key: string]: any
enforced?: boolean

Whether to actively block usage above usage_limit instead of only tracking or alerting on it. Required when usage_limit is provided and must be omitted when only pending_usage_limit is provided.

pendingUsageLimit?: number

The non-negative, whole-number limit to schedule for the organization-wide quota in the usage units defined by the quota namespace. It is not checked against current usage. Each write schedules the value for 00:00 UTC on the first day of the next calendar month and replaces any previously scheduled change; the server computes pending_effective_from. Omit this field to leave any scheduled change unchanged, including when raising usage_limit. Cancel a scheduled change only by deleting the quota's /pending sub-resource.

scope?: {
    [key: string]: string;
}

A namespace-specific key and value identifying what the quota applies to within an organization. See the endpoint description for the supported scope keys, values, and validation rules.

Type declaration

  • [key: string]: string
usageLimit?: number

The non-negative, whole-number quota limit to set in the usage units defined by the quota namespace. For an organization-wide quota (scope omitted), the limit must be greater than usage already recorded in the current period. When this field is provided, enforced is required.

Generated using TypeDoc