Skip to content

Commit bded6d6

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e7d3680 of spec repo
1 parent 92b3f2c commit bded6d6

28 files changed

Lines changed: 2018 additions & 89 deletions

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 321 additions & 51 deletions
Large diffs are not rendered by default.

‎examples/v2/tag-rules/CreateTagRule.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ public static void main(String[] args) {
3030
.negated(false)
3131
.required(true)
3232
.ruleType(TagRuleCreateType.SURFACING)
33-
.scope("env")
33+
.scope("env:prod")
3434
.source(TagRuleSource.LOGS)
3535
.tagKey("service")
3636
.tagValuePatterns(Arrays.asList("api", "web")))
37-
.type(TagRuleResourceType.TAG_RULE));
37+
.type(TagRuleResourceType.TAG_POLICY));
3838

3939
try {
4040
TagRuleResponse result = apiInstance.createTagRule(body);

‎examples/v2/tag-rules/UpdateTagRule.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static void main(String[] args) {
2323
new TagRuleUpdateData()
2424
.attributes(new TagRuleUpdateAttributes().ruleType(TagRuleType.SURFACING))
2525
.id("123")
26-
.type(TagRuleResourceType.TAG_RULE));
26+
.type(TagRuleResourceType.TAG_POLICY));
2727

2828
try {
2929
TagRuleResponse result = apiInstance.updateTagRule("123", body);
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Get monthly usage by resource returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.UsageMeteringApi;
6+
import com.datadog.api.client.v2.api.UsageMeteringApi.GetUsageMonthlyResourcesOptionalParameters;
7+
import com.datadog.api.client.v2.model.MonthlyResourcesResponse;
8+
import com.datadog.api.client.v2.model.MonthlyResourcesView;
9+
10+
public class Example {
11+
public static void main(String[] args) {
12+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
13+
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
14+
UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient);
15+
16+
try {
17+
MonthlyResourcesResponse result =
18+
apiInstance.getUsageMonthlyResources(
19+
"infra_host",
20+
"2026-04",
21+
MonthlyResourcesView.ALL,
22+
new GetUsageMonthlyResourcesOptionalParameters().pageLimit(1L));
23+
System.out.println(result);
24+
} catch (ApiException e) {
25+
System.err.println("Exception when calling UsageMeteringApi#getUsageMonthlyResources");
26+
System.err.println("Status code: " + e.getCode());
27+
System.err.println("Reason: " + e.getResponseBody());
28+
System.err.println("Response headers: " + e.getResponseHeaders());
29+
e.printStackTrace();
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Get monthly usage by resource supports non-host resources
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.UsageMeteringApi;
6+
import com.datadog.api.client.v2.api.UsageMeteringApi.GetUsageMonthlyResourcesOptionalParameters;
7+
import com.datadog.api.client.v2.model.MonthlyResourcesResponse;
8+
import com.datadog.api.client.v2.model.MonthlyResourcesView;
9+
10+
public class Example {
11+
public static void main(String[] args) {
12+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
13+
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
14+
UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient);
15+
16+
try {
17+
MonthlyResourcesResponse result =
18+
apiInstance.getUsageMonthlyResources(
19+
"indexed_points",
20+
"2026-04",
21+
MonthlyResourcesView.ALL,
22+
new GetUsageMonthlyResourcesOptionalParameters().pageLimit(1L));
23+
System.out.println(result);
24+
} catch (ApiException e) {
25+
System.err.println("Exception when calling UsageMeteringApi#getUsageMonthlyResources");
26+
System.err.println("Status code: " + e.getCode());
27+
System.err.println("Reason: " + e.getResponseBody());
28+
System.err.println("Response headers: " + e.getResponseHeaders());
29+
e.printStackTrace();
30+
}
31+
}
32+
}

‎src/main/java/com/datadog/api/client/v2/api/TagRulesApi.java‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ public CompletableFuture<Void> deleteTagRuleAsync(
282282
/**
283283
* Delete a tag rule. By default the rule is soft-deleted so it can be recovered later and so that
284284
* historical score data remains queryable. Pass <code>hard_delete=true</code> to remove the rule
285-
* permanently.
285+
* permanently. Deleting a <code>blocking</code> rule additionally requires the <code>
286+
* telemetry_rules_activate</code> permission.
286287
*
287288
* @param ruleId The unique identifier of the tag rule to delete. (required)
288289
* @param parameters Optional parameters for the request.
@@ -438,7 +439,9 @@ public GetTagRuleOptionalParameters include(TagRuleInclude include) {
438439
* Set tsStart.
439440
*
440441
* @param tsStart Start of the time window used for compliance score computation, as a Unix
441-
* timestamp in milliseconds. (optional)
442+
* timestamp in milliseconds. Defaults to approximately 4 hours before the current time for
443+
* metrics, or 24 hours before the current time for other sources. The API clamps earlier
444+
* values to this default, regardless of <code>ts_end</code>. (optional)
442445
* @return GetTagRuleOptionalParameters
443446
*/
444447
public GetTagRuleOptionalParameters tsStart(Long tsStart) {
@@ -675,7 +678,9 @@ public static class GetTagRuleScoreOptionalParameters {
675678
* Set tsStart.
676679
*
677680
* @param tsStart Start of the time window used for compliance score computation, as a Unix
678-
* timestamp in milliseconds. (optional)
681+
* timestamp in milliseconds. Defaults to approximately 4 hours before the current time for
682+
* metrics, or 24 hours before the current time for other sources. The API clamps earlier
683+
* values to this default, regardless of <code>ts_end</code>. (optional)
679684
* @return GetTagRuleScoreOptionalParameters
680685
*/
681686
public GetTagRuleScoreOptionalParameters tsStart(Long tsStart) {
@@ -962,8 +967,9 @@ public ListTagRulesOptionalParameters filterSource(TagRuleSource filterSource) {
962967
* Set tsStart.
963968
*
964969
* @param tsStart Start of the time window used for compliance score computation, as a Unix
965-
* timestamp in milliseconds. Defaults to a recent window appropriate for the source.
966-
* (optional)
970+
* timestamp in milliseconds. Defaults to approximately 4 hours before the current time for
971+
* metrics, or 24 hours before the current time for other sources. The API clamps earlier
972+
* values to this default, regardless of <code>ts_end</code>. (optional)
967973
* @return ListTagRulesOptionalParameters
968974
*/
969975
public ListTagRulesOptionalParameters tsStart(Long tsStart) {
@@ -1214,7 +1220,10 @@ public CompletableFuture<TagRuleResponse> updateTagRuleAsync(
12141220
/**
12151221
* Update one or more attributes of an existing tag rule. Only the fields supplied in the request
12161222
* body are modified; omitted fields retain their current values. The rule's <code>source</code>
1217-
* cannot be changed after creation.
1223+
* cannot be changed after creation. Promoting a rule from <code>surfacing</code> to <code>
1224+
* blocking</code> additionally requires the <code>telemetry_rules_activate</code> permission, and
1225+
* your organization must have access to blocking rules. You can't promote RUM rules to <code>
1226+
* blocking</code>.
12181227
*
12191228
* @param ruleId The unique identifier of the tag rule to update. (required)
12201229
* @param body (required)

0 commit comments

Comments
 (0)