Class: DatadogAPIClient::V2::UsageQuotaCreateAttributes

Inherits:
Object
  • Object
show all
Includes:
BaseGenericModel
Defined in:
lib/datadog_api_client/v2/models/usage_quota_create_attributes.rb

Overview

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.

Instance Attribute Summary collapse

Method Summary

Methods included from BaseGenericModel

included

Instance Attribute Details

#additional_properties ⇒ Object

Returns the value of attribute additional_properties.



36
37
38
# File 'lib/datadog_api_client/v2/models/usage_quota_create_attributes.rb', line 36

def additional_properties
  @additional_properties
end

#enforced ⇒ Object

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.



25
26
27
# File 'lib/datadog_api_client/v2/models/usage_quota_create_attributes.rb', line 25

def enforced
  @enforced
end

#pending_usage_limit ⇒ Object

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.



28
29
30
# File 'lib/datadog_api_client/v2/models/usage_quota_create_attributes.rb', line 28

def pending_usage_limit
  @pending_usage_limit
end

#scope ⇒ Object

A namespace-specific key and value identifying what the quota applies to within an organization. The object must contain exactly one entry. Use "*" as the value for the default quota applied to entities without a specific quota, or omit the scope for an organization-wide quota. A specific value must identify an existing user handle in the caller's organization when include_descendants is false. When include_descendants is true, the handle must exist in the caller's organization or in at least one targeted descendant organization; the quota is then applied only to the organizations where that handle exists, and the request fails only if the handle exists in none of them.



31
32
33
# File 'lib/datadog_api_client/v2/models/usage_quota_create_attributes.rb', line 31

def scope
  @scope
end

#usage_limit ⇒ Object

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.



34
35
36
# File 'lib/datadog_api_client/v2/models/usage_quota_create_attributes.rb', line 34

def usage_limit
  @usage_limit
end