From 6b400bcd867aeb32212c10c252d4ee8e334220c7 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 16 Jun 2026 20:55:05 +0000 Subject: [PATCH] Regenerate client from commit 5839129 of spec repo --- .generator/schemas/v2/openapi.yaml | 30 +++ .../v2/metrics/CreateTagIndexingRule.java | 1 + .../CreateTagIndexingRuleExemption.java | 1 + .../v2/metrics/DeleteTagIndexingRule.java | 1 + .../DeleteTagIndexingRuleExemption.java | 1 + examples/v2/metrics/GetTagIndexingRule.java | 1 + .../metrics/GetTagIndexingRuleExemption.java | 1 + examples/v2/metrics/ListTagIndexingRules.java | 1 + .../ListTagIndexingRulesForMetric.java | 1 + .../v2/metrics/ReorderTagIndexingRules.java | 1 + .../v2/metrics/UpdateTagIndexingRule.java | 1 + .../com/datadog/api/client/ApiClient.java | 10 + .../datadog/api/client/v2/api/MetricsApi.java | 172 ++++++++++++++++++ .../datadog/api/client/v2/api/metrics.feature | 25 +++ 14 files changed, 247 insertions(+) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 607e2e287b5..d9e8ee25dd7 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -148700,6 +148700,9 @@ paths: operator: OR permissions: - metrics_read + x-unstable: |- + **Note**: The Tag Indexing Rules feature is currently in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: description: |- Create a tag indexing rule for the org. `rule_order` is assigned server-side as max+1 @@ -148778,6 +148781,9 @@ paths: operator: OR permissions: - metric_tags_write + x-unstable: |- + **Note**: The Tag Indexing Rules feature is currently in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/metrics/tag-indexing-rules/order: post: description: |- @@ -148840,6 +148846,9 @@ paths: operator: OR permissions: - metric_tags_write + x-unstable: |- + **Note**: The Tag Indexing Rules feature is currently in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/metrics/tag-indexing-rules/{id}: delete: description: |- @@ -148882,6 +148891,9 @@ paths: operator: OR permissions: - metric_tags_write + x-unstable: |- + **Note**: The Tag Indexing Rules feature is currently in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). get: description: Get a single tag indexing rule by its UUID. operationId: GetTagIndexingRule @@ -148946,6 +148958,9 @@ paths: operator: OR permissions: - metrics_read + x-unstable: |- + **Note**: The Tag Indexing Rules feature is currently in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). put: description: |- Partially update a tag indexing rule. Fields omitted from the request body are left unchanged. @@ -149037,6 +149052,9 @@ paths: operator: OR permissions: - metric_tags_write + x-unstable: |- + **Note**: The Tag Indexing Rules feature is currently in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/metrics/{metric_name}/active-configurations: get: description: |- @@ -149466,6 +149484,9 @@ paths: operator: OR permissions: - metric_tags_write + x-unstable: |- + **Note**: The Tag Indexing Rules feature is currently in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). get: description: |- Returns why a metric is excluded from tag indexing rules. @@ -149529,6 +149550,9 @@ paths: operator: OR permissions: - metrics_read + x-unstable: |- + **Note**: The Tag Indexing Rules feature is currently in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: description: |- Exempt a metric from all tag indexing rules. The response includes the created @@ -149598,6 +149622,9 @@ paths: operator: OR permissions: - metric_tags_write + x-unstable: |- + **Note**: The Tag Indexing Rules feature is currently in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/metrics/{metric_name}/tag-indexing-rules: get: description: |- @@ -149649,6 +149676,9 @@ paths: operator: OR permissions: - metrics_read + x-unstable: |- + **Note**: The Tag Indexing Rules feature is currently in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/metrics/{metric_name}/tags: delete: description: |- diff --git a/examples/v2/metrics/CreateTagIndexingRule.java b/examples/v2/metrics/CreateTagIndexingRule.java index ea78a005f60..fb5ee454bc4 100644 --- a/examples/v2/metrics/CreateTagIndexingRule.java +++ b/examples/v2/metrics/CreateTagIndexingRule.java @@ -18,6 +18,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createTagIndexingRule", true); MetricsApi apiInstance = new MetricsApi(defaultClient); TagIndexingRuleCreateRequest body = diff --git a/examples/v2/metrics/CreateTagIndexingRuleExemption.java b/examples/v2/metrics/CreateTagIndexingRuleExemption.java index 061312b37d7..a25b6c75272 100644 --- a/examples/v2/metrics/CreateTagIndexingRuleExemption.java +++ b/examples/v2/metrics/CreateTagIndexingRuleExemption.java @@ -12,6 +12,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createTagIndexingRuleExemption", true); MetricsApi apiInstance = new MetricsApi(defaultClient); TagIndexingRuleExemptionCreateRequest body = diff --git a/examples/v2/metrics/DeleteTagIndexingRule.java b/examples/v2/metrics/DeleteTagIndexingRule.java index be70d463e73..c8a5e5f8915 100644 --- a/examples/v2/metrics/DeleteTagIndexingRule.java +++ b/examples/v2/metrics/DeleteTagIndexingRule.java @@ -7,6 +7,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteTagIndexingRule", true); MetricsApi apiInstance = new MetricsApi(defaultClient); // there is a valid "tag_indexing_rule" in the system diff --git a/examples/v2/metrics/DeleteTagIndexingRuleExemption.java b/examples/v2/metrics/DeleteTagIndexingRuleExemption.java index 280095d680d..27159f6d9ae 100644 --- a/examples/v2/metrics/DeleteTagIndexingRuleExemption.java +++ b/examples/v2/metrics/DeleteTagIndexingRuleExemption.java @@ -7,6 +7,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteTagIndexingRuleExemption", true); MetricsApi apiInstance = new MetricsApi(defaultClient); try { diff --git a/examples/v2/metrics/GetTagIndexingRule.java b/examples/v2/metrics/GetTagIndexingRule.java index c6b56820744..de2eb368b1b 100644 --- a/examples/v2/metrics/GetTagIndexingRule.java +++ b/examples/v2/metrics/GetTagIndexingRule.java @@ -8,6 +8,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getTagIndexingRule", true); MetricsApi apiInstance = new MetricsApi(defaultClient); // there is a valid "tag_indexing_rule" in the system diff --git a/examples/v2/metrics/GetTagIndexingRuleExemption.java b/examples/v2/metrics/GetTagIndexingRuleExemption.java index 5b5da0607a2..249bf7e491d 100644 --- a/examples/v2/metrics/GetTagIndexingRuleExemption.java +++ b/examples/v2/metrics/GetTagIndexingRuleExemption.java @@ -8,6 +8,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getTagIndexingRuleExemption", true); MetricsApi apiInstance = new MetricsApi(defaultClient); try { diff --git a/examples/v2/metrics/ListTagIndexingRules.java b/examples/v2/metrics/ListTagIndexingRules.java index f94eac60d3c..247b273a95a 100644 --- a/examples/v2/metrics/ListTagIndexingRules.java +++ b/examples/v2/metrics/ListTagIndexingRules.java @@ -8,6 +8,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listTagIndexingRules", true); MetricsApi apiInstance = new MetricsApi(defaultClient); try { diff --git a/examples/v2/metrics/ListTagIndexingRulesForMetric.java b/examples/v2/metrics/ListTagIndexingRulesForMetric.java index 28b71c0e312..3e8ada892ad 100644 --- a/examples/v2/metrics/ListTagIndexingRulesForMetric.java +++ b/examples/v2/metrics/ListTagIndexingRulesForMetric.java @@ -8,6 +8,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listTagIndexingRulesForMetric", true); MetricsApi apiInstance = new MetricsApi(defaultClient); try { diff --git a/examples/v2/metrics/ReorderTagIndexingRules.java b/examples/v2/metrics/ReorderTagIndexingRules.java index b8b54bc56e6..6c6e92ee14c 100644 --- a/examples/v2/metrics/ReorderTagIndexingRules.java +++ b/examples/v2/metrics/ReorderTagIndexingRules.java @@ -12,6 +12,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.reorderTagIndexingRules", true); MetricsApi apiInstance = new MetricsApi(defaultClient); // there is a valid "tag_indexing_rule" in the system diff --git a/examples/v2/metrics/UpdateTagIndexingRule.java b/examples/v2/metrics/UpdateTagIndexingRule.java index 45290d28583..47c6ad9d0e5 100644 --- a/examples/v2/metrics/UpdateTagIndexingRule.java +++ b/examples/v2/metrics/UpdateTagIndexingRule.java @@ -18,6 +18,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateTagIndexingRule", true); MetricsApi apiInstance = new MetricsApi(defaultClient); // there is a valid "tag_indexing_rule" in the system diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 2f1b54ed2b3..5cce41fa4dc 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1114,6 +1114,16 @@ public class ApiClient { put("v2.removeRoleFromRestrictionQuery", false); put("v2.replaceRestrictionQuery", false); put("v2.updateRestrictionQuery", false); + put("v2.createTagIndexingRule", false); + put("v2.createTagIndexingRuleExemption", false); + put("v2.deleteTagIndexingRule", false); + put("v2.deleteTagIndexingRuleExemption", false); + put("v2.getTagIndexingRule", false); + put("v2.getTagIndexingRuleExemption", false); + put("v2.listTagIndexingRules", false); + put("v2.listTagIndexingRulesForMetric", false); + put("v2.reorderTagIndexingRules", false); + put("v2.updateTagIndexingRule", false); put("v2.deleteModelLabRun", false); put("v2.getModelLabArtifactContent", false); put("v2.getModelLabProject", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java b/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java index 026b874d0f3..c4b73053aa8 100644 --- a/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/MetricsApi.java @@ -453,6 +453,13 @@ public CompletableFuture createTagIndexingRuleAsync( */ public ApiResponse createTagIndexingRuleWithHttpInfo( TagIndexingRuleCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createTagIndexingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -495,6 +502,16 @@ public ApiResponse createTagIndexingRuleWithHttpInfo( */ public CompletableFuture> createTagIndexingRuleWithHttpInfoAsync(TagIndexingRuleCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createTagIndexingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -590,6 +607,13 @@ public CompletableFuture createTagIndexingRule */ public ApiResponse createTagIndexingRuleExemptionWithHttpInfo( String metricName, TagIndexingRuleExemptionCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createTagIndexingRuleExemption"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'metricName' is set @@ -645,6 +669,17 @@ public ApiResponse createTagIndexingRuleExempt public CompletableFuture> createTagIndexingRuleExemptionWithHttpInfoAsync( String metricName, TagIndexingRuleExemptionCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createTagIndexingRuleExemption"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; // verify the required parameter 'metricName' is set @@ -1047,6 +1082,13 @@ public CompletableFuture deleteTagIndexingRuleAsync(String id) { * */ public ApiResponse deleteTagIndexingRuleWithHttpInfo(String id) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteTagIndexingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; // verify the required parameter 'id' is set @@ -1090,6 +1132,16 @@ public ApiResponse deleteTagIndexingRuleWithHttpInfo(String id) throws Api * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> deleteTagIndexingRuleWithHttpInfoAsync(String id) { + // Check if unstable operation is enabled + String operationId = "deleteTagIndexingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; // verify the required parameter 'id' is set @@ -1182,6 +1234,13 @@ public CompletableFuture deleteTagIndexingRuleExemptionAsync(String metric */ public ApiResponse deleteTagIndexingRuleExemptionWithHttpInfo(String metricName) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteTagIndexingRuleExemption"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; // verify the required parameter 'metricName' is set @@ -1229,6 +1288,16 @@ public ApiResponse deleteTagIndexingRuleExemptionWithHttpInfo(String metri */ public CompletableFuture> deleteTagIndexingRuleExemptionWithHttpInfoAsync( String metricName) { + // Check if unstable operation is enabled + String operationId = "deleteTagIndexingRuleExemption"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; // verify the required parameter 'metricName' is set @@ -1752,6 +1821,13 @@ public CompletableFuture getTagIndexingRuleAsync(String */ public ApiResponse getTagIndexingRuleWithHttpInfo(String id) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getTagIndexingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; // verify the required parameter 'id' is set @@ -1796,6 +1872,16 @@ public ApiResponse getTagIndexingRuleWithHttpInfo(Strin */ public CompletableFuture> getTagIndexingRuleWithHttpInfoAsync(String id) { + // Check if unstable operation is enabled + String operationId = "getTagIndexingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; // verify the required parameter 'id' is set @@ -1893,6 +1979,13 @@ public CompletableFuture getTagIndexingRuleExe */ public ApiResponse getTagIndexingRuleExemptionWithHttpInfo( String metricName) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getTagIndexingRuleExemption"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; // verify the required parameter 'metricName' is set @@ -1939,6 +2032,17 @@ public ApiResponse getTagIndexingRuleExemption */ public CompletableFuture> getTagIndexingRuleExemptionWithHttpInfoAsync(String metricName) { + // Check if unstable operation is enabled + String operationId = "getTagIndexingRuleExemption"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; // verify the required parameter 'metricName' is set @@ -3039,6 +3143,13 @@ public CompletableFuture listTagIndexingRulesAsync( */ public ApiResponse listTagIndexingRulesWithHttpInfo( ListTagIndexingRulesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listTagIndexingRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; Long pageLimit = parameters.pageLimit; Long pageOffset = parameters.pageOffset; @@ -3083,6 +3194,16 @@ public ApiResponse listTagIndexingRulesWithHttpInfo( */ public CompletableFuture> listTagIndexingRulesWithHttpInfoAsync(ListTagIndexingRulesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listTagIndexingRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; Long pageLimit = parameters.pageLimit; Long pageOffset = parameters.pageOffset; @@ -3175,6 +3296,13 @@ public CompletableFuture listTagIndexingRulesForMetric */ public ApiResponse listTagIndexingRulesForMetricWithHttpInfo( String metricName) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listTagIndexingRulesForMetric"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = null; // verify the required parameter 'metricName' is set @@ -3221,6 +3349,16 @@ public ApiResponse listTagIndexingRulesForMetricWithHt */ public CompletableFuture> listTagIndexingRulesForMetricWithHttpInfoAsync(String metricName) { + // Check if unstable operation is enabled + String operationId = "listTagIndexingRulesForMetric"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = null; // verify the required parameter 'metricName' is set @@ -4088,6 +4226,13 @@ public CompletableFuture reorderTagIndexingRulesAsync(TagIndexingRuleOrder */ public ApiResponse reorderTagIndexingRulesWithHttpInfo(TagIndexingRuleOrderRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "reorderTagIndexingRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -4130,6 +4275,16 @@ public ApiResponse reorderTagIndexingRulesWithHttpInfo(TagIndexingRuleOrde */ public CompletableFuture> reorderTagIndexingRulesWithHttpInfoAsync( TagIndexingRuleOrderRequest body) { + // Check if unstable operation is enabled + String operationId = "reorderTagIndexingRules"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -4607,6 +4762,13 @@ public CompletableFuture updateTagIndexingRuleAsync( */ public ApiResponse updateTagIndexingRuleWithHttpInfo( String id, TagIndexingRuleUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateTagIndexingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } Object localVarPostBody = body; // verify the required parameter 'id' is set @@ -4658,6 +4820,16 @@ public ApiResponse updateTagIndexingRuleWithHttpInfo( */ public CompletableFuture> updateTagIndexingRuleWithHttpInfoAsync(String id, TagIndexingRuleUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateTagIndexingRule"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } Object localVarPostBody = body; // verify the required parameter 'id' is set diff --git a/src/test/resources/com/datadog/api/client/v2/api/metrics.feature b/src/test/resources/com/datadog/api/client/v2/api/metrics.feature index 0d0dac2e9d0..24b766d5d56 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/metrics.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/metrics.feature @@ -71,6 +71,7 @@ Feature: Metrics @generated @skip @team:DataDog/metrics-experience Scenario: Create a tag indexing rule exemption returns "Bad Request" response Given a valid "appKeyAuth" key in the system + And operation "CreateTagIndexingRuleExemption" enabled And new "CreateTagIndexingRuleExemption" request And request contains "metric_name" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"reason": "This metric has a pre-existing tag configuration."}, "type": "tag_indexing_rule_exemptions"}} @@ -80,6 +81,7 @@ Feature: Metrics @generated @skip @team:DataDog/metrics-experience Scenario: Create a tag indexing rule exemption returns "Created" response Given a valid "appKeyAuth" key in the system + And operation "CreateTagIndexingRuleExemption" enabled And new "CreateTagIndexingRuleExemption" request And request contains "metric_name" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"reason": "This metric has a pre-existing tag configuration."}, "type": "tag_indexing_rule_exemptions"}} @@ -89,6 +91,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Create a tag indexing rule returns "Bad Request" response Given a valid "appKeyAuth" key in the system + And operation "CreateTagIndexingRule" enabled And new "CreateTagIndexingRule" request And body with value {"data": {"type": "tag_indexing_rules", "attributes": {"name": "test", "metric_name_matches": ["dd.test.*"], "options": {"version": 99, "data": {"override_previous_rules": false, "manage_preexisting_metrics": true}}}}} When the request is sent @@ -97,6 +100,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Create a tag indexing rule returns "Created" response Given a valid "appKeyAuth" key in the system + And operation "CreateTagIndexingRule" enabled And new "CreateTagIndexingRule" request And body with value {"data": {"attributes": {"exclude_tags_mode": false, "ignored_metric_name_matches": [], "metric_name_matches": ["dd.test.*"], "name": "my-indexing-rule", "options": {"data": {"dynamic_tags": {"queried_tags_window_seconds": 3600, "related_asset_tags": false}, "manage_preexisting_metrics": true, "metric_match": {"queried_window_seconds": 3600}, "override_previous_rules": false}, "version": 1}, "tags": ["env", "service"]}, "type": "tag_indexing_rules"}} When the request is sent @@ -123,6 +127,7 @@ Feature: Metrics @generated @skip @team:DataDog/metrics-experience Scenario: Delete a tag indexing rule exemption returns "Bad Request" response Given a valid "appKeyAuth" key in the system + And operation "DeleteTagIndexingRuleExemption" enabled And new "DeleteTagIndexingRuleExemption" request And request contains "metric_name" parameter from "REPLACE.ME" When the request is sent @@ -131,6 +136,7 @@ Feature: Metrics @generated @skip @team:DataDog/metrics-experience Scenario: Delete a tag indexing rule exemption returns "No Content" response Given a valid "appKeyAuth" key in the system + And operation "DeleteTagIndexingRuleExemption" enabled And new "DeleteTagIndexingRuleExemption" request And request contains "metric_name" parameter from "REPLACE.ME" When the request is sent @@ -139,6 +145,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Delete a tag indexing rule returns "Bad Request" response Given a valid "appKeyAuth" key in the system + And operation "DeleteTagIndexingRule" enabled And new "DeleteTagIndexingRule" request And request contains "id" parameter with value "not-a-valid-uuid" When the request is sent @@ -147,6 +154,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Delete a tag indexing rule returns "No Content" response Given a valid "appKeyAuth" key in the system + And operation "DeleteTagIndexingRule" enabled And there is a valid "tag_indexing_rule" in the system And new "DeleteTagIndexingRule" request And request contains "id" parameter from "tag_indexing_rule.data.id" @@ -222,6 +230,7 @@ Feature: Metrics @generated @skip @team:DataDog/metrics-experience Scenario: Get a tag indexing rule exemption returns "Bad Request" response Given a valid "appKeyAuth" key in the system + And operation "GetTagIndexingRuleExemption" enabled And new "GetTagIndexingRuleExemption" request And request contains "metric_name" parameter from "REPLACE.ME" When the request is sent @@ -230,6 +239,7 @@ Feature: Metrics @generated @skip @team:DataDog/metrics-experience Scenario: Get a tag indexing rule exemption returns "Not Found" response Given a valid "appKeyAuth" key in the system + And operation "GetTagIndexingRuleExemption" enabled And new "GetTagIndexingRuleExemption" request And request contains "metric_name" parameter from "REPLACE.ME" When the request is sent @@ -238,6 +248,7 @@ Feature: Metrics @generated @skip @team:DataDog/metrics-experience Scenario: Get a tag indexing rule exemption returns "OK" response Given a valid "appKeyAuth" key in the system + And operation "GetTagIndexingRuleExemption" enabled And new "GetTagIndexingRuleExemption" request And request contains "metric_name" parameter from "REPLACE.ME" When the request is sent @@ -246,6 +257,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Get a tag indexing rule returns "Bad Request" response Given a valid "appKeyAuth" key in the system + And operation "GetTagIndexingRule" enabled And new "GetTagIndexingRule" request And request contains "id" parameter with value "not-a-valid-uuid" When the request is sent @@ -254,6 +266,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Get a tag indexing rule returns "Not Found" response Given a valid "appKeyAuth" key in the system + And operation "GetTagIndexingRule" enabled And new "GetTagIndexingRule" request And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent @@ -262,6 +275,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Get a tag indexing rule returns "OK" response Given a valid "appKeyAuth" key in the system + And operation "GetTagIndexingRule" enabled And there is a valid "tag_indexing_rule" in the system And new "GetTagIndexingRule" request And request contains "id" parameter from "tag_indexing_rule.data.id" @@ -368,6 +382,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: List tag indexing rules for a metric returns "Bad Request" response Given a valid "appKeyAuth" key in the system + And operation "ListTagIndexingRulesForMetric" enabled And new "ListTagIndexingRulesForMetric" request And request contains "metric_name" parameter with value "1invalid" When the request is sent @@ -376,6 +391,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: List tag indexing rules for a metric returns "OK" response Given a valid "appKeyAuth" key in the system + And operation "ListTagIndexingRulesForMetric" enabled And new "ListTagIndexingRulesForMetric" request And request contains "metric_name" parameter with value "{{ unique_alnum }}" When the request is sent @@ -384,6 +400,7 @@ Feature: Metrics @generated @skip @team:DataDog/metrics-experience Scenario: List tag indexing rules returns "Bad Request" response Given a valid "appKeyAuth" key in the system + And operation "ListTagIndexingRules" enabled And new "ListTagIndexingRules" request When the request is sent Then the response status is 400 Bad Request @@ -391,6 +408,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: List tag indexing rules returns "OK" response Given a valid "appKeyAuth" key in the system + And operation "ListTagIndexingRules" enabled And new "ListTagIndexingRules" request When the request is sent Then the response status is 200 OK @@ -475,6 +493,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Reorder tag indexing rules returns "Bad Request" response Given a valid "appKeyAuth" key in the system + And operation "ReorderTagIndexingRules" enabled And new "ReorderTagIndexingRules" request And body with value {"data": {"attributes": {"rule_ids": []}, "type": "tag_indexing_rules"}} When the request is sent @@ -483,6 +502,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Reorder tag indexing rules returns "No Content" response Given a valid "appKeyAuth" key in the system + And operation "ReorderTagIndexingRules" enabled And there is a valid "tag_indexing_rule" in the system And new "ReorderTagIndexingRules" request And body with value {"data": {"attributes": {"rule_ids": ["{{ tag_indexing_rule.data.id }}"]}, "type": "tag_indexing_rules"}} @@ -492,6 +512,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Reorder tag indexing rules returns "Not Found" response Given a valid "appKeyAuth" key in the system + And operation "ReorderTagIndexingRules" enabled And new "ReorderTagIndexingRules" request And body with value {"data": {"attributes": {"rule_ids": ["00000000-0000-0000-0000-000000000001", "00000000-0000-0000-0000-000000000002"]}, "type": "tag_indexing_rules"}} When the request is sent @@ -961,6 +982,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Update a tag indexing rule returns "Bad Request" response Given a valid "appKeyAuth" key in the system + And operation "UpdateTagIndexingRule" enabled And new "UpdateTagIndexingRule" request And request contains "id" parameter with value "not-a-valid-uuid" And body with value {"data": {"attributes": {"ignored_metric_name_matches": [], "metric_name_matches": ["dd.test.*"], "name": "my-indexing-rule", "options": {"data": {"dynamic_tags": {"queried_tags_window_seconds": 3600, "related_asset_tags": false}, "manage_preexisting_metrics": true, "metric_match": {"queried_window_seconds": 3600}, "override_previous_rules": false}, "version": 1}, "rule_order": 2, "tags": ["env", "service"]}, "type": "tag_indexing_rules"}} @@ -970,6 +992,7 @@ Feature: Metrics @generated @skip @team:DataDog/metrics-experience Scenario: Update a tag indexing rule returns "Conflict" response Given a valid "appKeyAuth" key in the system + And operation "UpdateTagIndexingRule" enabled And new "UpdateTagIndexingRule" request And request contains "id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"ignored_metric_name_matches": [], "metric_name_matches": ["dd.test.*"], "name": "my-indexing-rule", "options": {"data": {"dynamic_tags": {"queried_tags_window_seconds": 3600, "related_asset_tags": false}, "manage_preexisting_metrics": true, "metric_match": {"queried_window_seconds": 3600}, "override_previous_rules": false}, "version": 1}, "rule_order": 2, "tags": ["env", "service"]}, "type": "tag_indexing_rules"}} @@ -979,6 +1002,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Update a tag indexing rule returns "Not Found" response Given a valid "appKeyAuth" key in the system + And operation "UpdateTagIndexingRule" enabled And new "UpdateTagIndexingRule" request And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" And body with value {"data": {"attributes": {"ignored_metric_name_matches": [], "metric_name_matches": ["dd.test.*"], "name": "my-indexing-rule", "options": {"data": {"dynamic_tags": {"queried_tags_window_seconds": 3600, "related_asset_tags": false}, "manage_preexisting_metrics": true, "metric_match": {"queried_window_seconds": 3600}, "override_previous_rules": false}, "version": 1}, "rule_order": 2, "tags": ["env", "service"]}, "type": "tag_indexing_rules"}} @@ -988,6 +1012,7 @@ Feature: Metrics @team:DataDog/metrics-experience Scenario: Update a tag indexing rule returns "OK" response Given a valid "appKeyAuth" key in the system + And operation "UpdateTagIndexingRule" enabled And there is a valid "tag_indexing_rule" in the system And new "UpdateTagIndexingRule" request And request contains "id" parameter from "tag_indexing_rule.data.id"