Lists usage quotas for the caller’s organization in a quota namespace. You can optionally include descendant organizations in the same datacenter as the caller. Requires the user_access_manage, billing_edit, and org_management permissions.
This endpoint requires
all
of the following permissions:
user_access_manage
billing_edit
org_management
OAuth apps require the user_access_manage, billing_edit, org_management authorization scope to access this endpoint.
引数
パスパラメーター
名前
種類
説明
quota_namespace [required]
string
The product-specific namespace whose usage quotas are being managed.
クエリ文字列
名前
種類
説明
include_descendants
boolean
Whether to include quotas configured on descendant organizations in the caller’s organization hierarchy. Only descendants in the same datacenter are supported.
page[cursor]
string
An opaque cursor from a previous response’s meta.page.next_cursor used to retrieve the next page.
Response containing a paginated list of usage quotas.
Expand All
フィールド
種類
説明
data [required]
[object]
A list of usage quota resources.
attributes [required]
object
Attributes of a usage quota.
enforced [required]
boolean
Whether usage above the limit is actively blocked instead of only tracked or alerted on.
org_public_id [required]
string
The public ID of the organization that owns the quota.
scope
object
A namespace-specific key and value identifying what the quota applies to within an organization. The object contains exactly one entry. A value of "*" identifies the default quota applied to entities without a specific quota. This field is omitted for an organization-wide quota.
<any-key>
string
usage_limit [required]
double
The quota limit in the usage units defined by the quota namespace. May be fractional for quotas configured before public writes required whole units.
id [required]
string
An opaque usage quota identifier. Clients must pass this value back verbatim in update and delete requests and must not infer any structure from it.
type [required]
enum
The JSON:API resource type for a usage quota.
Allowed enum values: quotas
meta [required]
object
Pagination metadata for a usage quota list response.
page [required]
object
Cursor pagination fields for a usage quota list response.
next_cursor
string
An opaque cursor for retrieving the next page. Omitted when there are no more results.
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* List usage quotas returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.listQuotas"]=true;constapiInstance=newv2.UsageMeteringApi(configuration);constparams: v2.UsageMeteringApiListQuotasRequest={quotaNamespace:"ai_credits",};apiInstance.listQuotas(params).then((data: v2.UsageQuotasListResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));