From c9ba61ab23b471b80a038fedd16a9f29cc81e8f5 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 16 Jun 2026 20:52:31 +0000 Subject: [PATCH] Regenerate client from commit 5839129 of spec repo --- .generator/schemas/v2/openapi.yaml | 30 +++++++++++ features/v2/metrics.feature | 25 ++++++++++ services/metrics/src/v2/MetricsApi.ts | 72 +++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 607e2e287b54..d9e8ee25dd7d 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/features/v2/metrics.feature b/features/v2/metrics.feature index 0d0dac2e9d09..24b766d5d565 100644 --- a/features/v2/metrics.feature +++ b/features/v2/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" diff --git a/services/metrics/src/v2/MetricsApi.ts b/services/metrics/src/v2/MetricsApi.ts index 16b8dbae602d..206ceecd9e46 100644 --- a/services/metrics/src/v2/MetricsApi.ts +++ b/services/metrics/src/v2/MetricsApi.ts @@ -179,6 +179,12 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + if (!_config.unstableOperations["MetricsApi.v2.createTagIndexingRule"]) { + throw new Error( + "Unstable operation 'createTagIndexingRule' is disabled. Enable it by setting `configuration.unstableOperations['MetricsApi.v2.createTagIndexingRule'] = true`", + ); + } + // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new RequiredError("body", "createTagIndexingRule"); @@ -231,6 +237,16 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + if ( + !_config.unstableOperations[ + "MetricsApi.v2.createTagIndexingRuleExemption" + ] + ) { + throw new Error( + "Unstable operation 'createTagIndexingRuleExemption' is disabled. Enable it by setting `configuration.unstableOperations['MetricsApi.v2.createTagIndexingRuleExemption'] = true`", + ); + } + // verify required parameter 'metricName' is not null or undefined if (metricName === null || metricName === undefined) { throw new RequiredError("metricName", "createTagIndexingRuleExemption"); @@ -385,6 +401,12 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + if (!_config.unstableOperations["MetricsApi.v2.deleteTagIndexingRule"]) { + throw new Error( + "Unstable operation 'deleteTagIndexingRule' is disabled. Enable it by setting `configuration.unstableOperations['MetricsApi.v2.deleteTagIndexingRule'] = true`", + ); + } + // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError("id", "deleteTagIndexingRule"); @@ -430,6 +452,16 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + if ( + !_config.unstableOperations[ + "MetricsApi.v2.deleteTagIndexingRuleExemption" + ] + ) { + throw new Error( + "Unstable operation 'deleteTagIndexingRuleExemption' is disabled. Enable it by setting `configuration.unstableOperations['MetricsApi.v2.deleteTagIndexingRuleExemption'] = true`", + ); + } + // verify required parameter 'metricName' is not null or undefined if (metricName === null || metricName === undefined) { throw new RequiredError("metricName", "deleteTagIndexingRuleExemption"); @@ -607,6 +639,12 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + if (!_config.unstableOperations["MetricsApi.v2.getTagIndexingRule"]) { + throw new Error( + "Unstable operation 'getTagIndexingRule' is disabled. Enable it by setting `configuration.unstableOperations['MetricsApi.v2.getTagIndexingRule'] = true`", + ); + } + // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError("id", "getTagIndexingRule"); @@ -652,6 +690,14 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + if ( + !_config.unstableOperations["MetricsApi.v2.getTagIndexingRuleExemption"] + ) { + throw new Error( + "Unstable operation 'getTagIndexingRuleExemption' is disabled. Enable it by setting `configuration.unstableOperations['MetricsApi.v2.getTagIndexingRuleExemption'] = true`", + ); + } + // verify required parameter 'metricName' is not null or undefined if (metricName === null || metricName === undefined) { throw new RequiredError("metricName", "getTagIndexingRuleExemption"); @@ -976,6 +1022,12 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + if (!_config.unstableOperations["MetricsApi.v2.listTagIndexingRules"]) { + throw new Error( + "Unstable operation 'listTagIndexingRules' is disabled. Enable it by setting `configuration.unstableOperations['MetricsApi.v2.listTagIndexingRules'] = true`", + ); + } + // Path Params const localVarPath = "/api/v2/metrics/tag-indexing-rules"; @@ -1036,6 +1088,14 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + if ( + !_config.unstableOperations["MetricsApi.v2.listTagIndexingRulesForMetric"] + ) { + throw new Error( + "Unstable operation 'listTagIndexingRulesForMetric' is disabled. Enable it by setting `configuration.unstableOperations['MetricsApi.v2.listTagIndexingRulesForMetric'] = true`", + ); + } + // verify required parameter 'metricName' is not null or undefined if (metricName === null || metricName === undefined) { throw new RequiredError("metricName", "listTagIndexingRulesForMetric"); @@ -1333,6 +1393,12 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + if (!_config.unstableOperations["MetricsApi.v2.reorderTagIndexingRules"]) { + throw new Error( + "Unstable operation 'reorderTagIndexingRules' is disabled. Enable it by setting `configuration.unstableOperations['MetricsApi.v2.reorderTagIndexingRules'] = true`", + ); + } + // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new RequiredError("body", "reorderTagIndexingRules"); @@ -1500,6 +1566,12 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; + if (!_config.unstableOperations["MetricsApi.v2.updateTagIndexingRule"]) { + throw new Error( + "Unstable operation 'updateTagIndexingRule' is disabled. Enable it by setting `configuration.unstableOperations['MetricsApi.v2.updateTagIndexingRule'] = true`", + ); + } + // verify required parameter 'id' is not null or undefined if (id === null || id === undefined) { throw new RequiredError("id", "updateTagIndexingRule");