You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ecb4ff8
Browse filesBrowse the repository at this point in the historyBrowse files
ci.datadog-api-spec
committed
Regenerate client from commit f2f1df9 of spec repo
Copy file name to clipboardExpand all lines: src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java
+203-8Lines changed: 203 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -166,8 +166,11 @@ public CompletableFuture<UsageQuotasBulkResponse> createQuotasAsync(
166
166
167
167
/**
168
168
* Creates or updates one or more usage quotas by scope. If a quota already exists for a supplied
169
-
* scope, it is updated; otherwise, a new quota is created. Requires the <code>billing_edit</code>
170
-
* permission.
169
+
* scope, it is updated. Otherwise, a quota is created only when <code>usage_limit</code> and
170
+
* <code>enforced</code> are provided. For the organization-wide quota, <code>pending_usage_limit
171
+
* </code> schedules a limit for the next usage period and can accompany an immediate limit or
172
+
* update an existing quota by itself. Scheduled changes follow <code>include_descendants</code>
173
+
* like the other fields. Requires the <code>billing_edit</code> permission.
171
174
*
172
175
* @param quotaNamespace The product-specific namespace whose usage quotas are being managed.
173
176
* (required)
@@ -180,7 +183,7 @@ public CompletableFuture<UsageQuotasBulkResponse> createQuotasAsync(
180
183
* <caption>Response details</caption>
181
184
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
182
185
* <tr><td> 200 </td><td> OK. The response includes each item's result; see each item's `error` attribute for any that failed to write. </td><td> - </td></tr>
183
-
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
186
+
* <tr><td> 400 </td><td> Bad Request. Returned if the request is malformed, including when an item sets `pending_usage_limit` on a scoped quota, provides `enforced` without `usage_limit`, or provides neither limit. A pending-only item for a quota that does not exist is reported in that item's `error`; when only the caller's organization is targeted, this failure returns `400`. </td><td> - </td></tr>
* Cancels the limit change scheduled to take effect at the start of the next usage period,
371
+
* leaving the usage quota and its current limit unchanged. Returns <code>404</code> when the
372
+
* quota does not exist, has no scheduled change, or its scheduled change has already taken
373
+
* effect; in every case the quota is left unchanged. The quota must belong to the caller's
374
+
* organization or one of its descendants, and its opaque identifier must belong to the requested
375
+
* quota namespace. Requires the <code>billing_edit</code> permission.
376
+
*
377
+
* @param quotaNamespace The product-specific namespace whose usage quotas are being managed.
378
+
* (required)
379
+
* @param id The opaque quota identifier returned by a previous list or create request. Clients
380
+
* must pass this value verbatim. (required)
381
+
* @return ApiResponse<Void>
382
+
* @throws ApiException if fails to make API call
383
+
* @http.response.details
384
+
* <table border="1">
385
+
* <caption>Response details</caption>
386
+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
387
+
* <tr><td> 204 </td><td> No Content </td><td> - </td></tr>
388
+
* <tr><td> 400 </td><td> Bad Request. Returned if the `id` is malformed or does not belong to the requested quota namespace. </td><td> - </td></tr>
CompletableFuture<ApiResponse<Void>> result = newCompletableFuture<>();
512
+
result.completeExceptionally(ex);
513
+
returnresult;
514
+
}
515
+
returnapiClient.invokeAPIAsync(
516
+
"DELETE",
517
+
builder,
518
+
localVarHeaderParams,
519
+
newString[] {},
520
+
localVarPostBody,
521
+
newHashMap<String, Object>(),
522
+
false,
523
+
null);
524
+
}
525
+
332
526
/**
333
527
* Delete a usage quota.
334
528
*
@@ -3980,10 +4174,11 @@ public CompletableFuture<UsageQuotaResponse> updateQuotaAsync(
3980
4174
}
3981
4175
3982
4176
/**
3983
-
* Updates the supplied fields on a usage quota and leaves omitted fields unchanged. The quota
3984
-
* must belong to the caller's organization or one of its descendants, and its opaque identifier
3985
-
* must belong to the requested quota namespace. Requires the <code>billing_edit</code>
3986
-
* permission.
4177
+
* Updates the supplied fields on a usage quota and leaves omitted fields unchanged. For an
4178
+
* organization-wide quota, <code>pending_usage_limit</code> schedules a limit for the next usage
4179
+
* period. The quota must belong to the caller's organization or one of its descendants, and its
4180
+
* opaque identifier must belong to the requested quota namespace. Requires the <code>billing_edit
4181
+
* </code> permission.
3987
4182
*
3988
4183
* @param quotaNamespace The product-specific namespace whose usage quotas are being managed.
3989
4184
* (required)
@@ -3998,7 +4193,7 @@ public CompletableFuture<UsageQuotaResponse> updateQuotaAsync(
3998
4193
* <caption>Response details</caption>
3999
4194
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
4000
4195
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
4001
-
* <tr><td> 400 </td><td> Bad Request. Returned if the request is malformed, or if the `id` in the request body does not match the `id` in the request path. </td><td> - </td></tr>
4196
+
* <tr><td> 400 </td><td> Bad Request. Returned if the request is malformed, if the `id` in the request body does not match the `id` in the request path, if none of `usage_limit`, `enforced`, or `pending_usage_limit` is provided, or if `pending_usage_limit` is set on a scoped quota. </td><td> - </td></tr>
0 commit comments