diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 607e2e287b..d9e8ee25dd 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.py b/examples/v2/metrics/CreateTagIndexingRule.py index 1295c06d61..b84fcece1c 100644 --- a/examples/v2/metrics/CreateTagIndexingRule.py +++ b/examples/v2/metrics/CreateTagIndexingRule.py @@ -46,6 +46,7 @@ ) configuration = Configuration() +configuration.unstable_operations["create_tag_indexing_rule"] = True with ApiClient(configuration) as api_client: api_instance = MetricsApi(api_client) response = api_instance.create_tag_indexing_rule(body=body) diff --git a/examples/v2/metrics/CreateTagIndexingRuleExemption.py b/examples/v2/metrics/CreateTagIndexingRuleExemption.py index ccaec3cab8..b42ec37a5b 100644 --- a/examples/v2/metrics/CreateTagIndexingRuleExemption.py +++ b/examples/v2/metrics/CreateTagIndexingRuleExemption.py @@ -21,6 +21,7 @@ ) configuration = Configuration() +configuration.unstable_operations["create_tag_indexing_rule_exemption"] = True with ApiClient(configuration) as api_client: api_instance = MetricsApi(api_client) response = api_instance.create_tag_indexing_rule_exemption(metric_name="metric_name", body=body) diff --git a/examples/v2/metrics/DeleteTagIndexingRule.py b/examples/v2/metrics/DeleteTagIndexingRule.py index c35ce08945..fec2431285 100644 --- a/examples/v2/metrics/DeleteTagIndexingRule.py +++ b/examples/v2/metrics/DeleteTagIndexingRule.py @@ -10,6 +10,7 @@ TAG_INDEXING_RULE_DATA_ID = environ["TAG_INDEXING_RULE_DATA_ID"] configuration = Configuration() +configuration.unstable_operations["delete_tag_indexing_rule"] = True with ApiClient(configuration) as api_client: api_instance = MetricsApi(api_client) api_instance.delete_tag_indexing_rule( diff --git a/examples/v2/metrics/DeleteTagIndexingRuleExemption.py b/examples/v2/metrics/DeleteTagIndexingRuleExemption.py index f5f0c04df3..6c7692ffbb 100644 --- a/examples/v2/metrics/DeleteTagIndexingRuleExemption.py +++ b/examples/v2/metrics/DeleteTagIndexingRuleExemption.py @@ -6,6 +6,7 @@ from datadog_api_client.v2.api.metrics_api import MetricsApi configuration = Configuration() +configuration.unstable_operations["delete_tag_indexing_rule_exemption"] = True with ApiClient(configuration) as api_client: api_instance = MetricsApi(api_client) api_instance.delete_tag_indexing_rule_exemption( diff --git a/examples/v2/metrics/GetTagIndexingRule.py b/examples/v2/metrics/GetTagIndexingRule.py index 10f8fe2929..91ed8a06ee 100644 --- a/examples/v2/metrics/GetTagIndexingRule.py +++ b/examples/v2/metrics/GetTagIndexingRule.py @@ -10,6 +10,7 @@ TAG_INDEXING_RULE_DATA_ID = environ["TAG_INDEXING_RULE_DATA_ID"] configuration = Configuration() +configuration.unstable_operations["get_tag_indexing_rule"] = True with ApiClient(configuration) as api_client: api_instance = MetricsApi(api_client) response = api_instance.get_tag_indexing_rule( diff --git a/examples/v2/metrics/GetTagIndexingRuleExemption.py b/examples/v2/metrics/GetTagIndexingRuleExemption.py index 00186e4258..80440f6327 100644 --- a/examples/v2/metrics/GetTagIndexingRuleExemption.py +++ b/examples/v2/metrics/GetTagIndexingRuleExemption.py @@ -6,6 +6,7 @@ from datadog_api_client.v2.api.metrics_api import MetricsApi configuration = Configuration() +configuration.unstable_operations["get_tag_indexing_rule_exemption"] = True with ApiClient(configuration) as api_client: api_instance = MetricsApi(api_client) response = api_instance.get_tag_indexing_rule_exemption( diff --git a/examples/v2/metrics/ListTagIndexingRules.py b/examples/v2/metrics/ListTagIndexingRules.py index 31f63dbd77..22d628ded8 100644 --- a/examples/v2/metrics/ListTagIndexingRules.py +++ b/examples/v2/metrics/ListTagIndexingRules.py @@ -6,6 +6,7 @@ from datadog_api_client.v2.api.metrics_api import MetricsApi configuration = Configuration() +configuration.unstable_operations["list_tag_indexing_rules"] = True with ApiClient(configuration) as api_client: api_instance = MetricsApi(api_client) response = api_instance.list_tag_indexing_rules() diff --git a/examples/v2/metrics/ListTagIndexingRulesForMetric.py b/examples/v2/metrics/ListTagIndexingRulesForMetric.py index 462b8b6580..a9a56fcbcb 100644 --- a/examples/v2/metrics/ListTagIndexingRulesForMetric.py +++ b/examples/v2/metrics/ListTagIndexingRulesForMetric.py @@ -6,6 +6,7 @@ from datadog_api_client.v2.api.metrics_api import MetricsApi configuration = Configuration() +configuration.unstable_operations["list_tag_indexing_rules_for_metric"] = True with ApiClient(configuration) as api_client: api_instance = MetricsApi(api_client) response = api_instance.list_tag_indexing_rules_for_metric( diff --git a/examples/v2/metrics/ReorderTagIndexingRules.py b/examples/v2/metrics/ReorderTagIndexingRules.py index b7f5738d71..27900a8ce7 100644 --- a/examples/v2/metrics/ReorderTagIndexingRules.py +++ b/examples/v2/metrics/ReorderTagIndexingRules.py @@ -25,6 +25,7 @@ ) configuration = Configuration() +configuration.unstable_operations["reorder_tag_indexing_rules"] = True with ApiClient(configuration) as api_client: api_instance = MetricsApi(api_client) api_instance.reorder_tag_indexing_rules(body=body) diff --git a/examples/v2/metrics/UpdateTagIndexingRule.py b/examples/v2/metrics/UpdateTagIndexingRule.py index 8377df7b24..6d905fd0a8 100644 --- a/examples/v2/metrics/UpdateTagIndexingRule.py +++ b/examples/v2/metrics/UpdateTagIndexingRule.py @@ -50,6 +50,7 @@ ) configuration = Configuration() +configuration.unstable_operations["update_tag_indexing_rule"] = True with ApiClient(configuration) as api_client: api_instance = MetricsApi(api_client) response = api_instance.update_tag_indexing_rule(id=TAG_INDEXING_RULE_DATA_ID, body=body) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 5b19af83d6..7130503474 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -606,6 +606,16 @@ def __init__( "v2.remove_role_from_restriction_query": False, "v2.replace_restriction_query": False, "v2.update_restriction_query": False, + "v2.create_tag_indexing_rule": False, + "v2.create_tag_indexing_rule_exemption": False, + "v2.delete_tag_indexing_rule": False, + "v2.delete_tag_indexing_rule_exemption": False, + "v2.get_tag_indexing_rule": False, + "v2.get_tag_indexing_rule_exemption": False, + "v2.list_tag_indexing_rules": False, + "v2.list_tag_indexing_rules_for_metric": False, + "v2.reorder_tag_indexing_rules": False, + "v2.update_tag_indexing_rule": False, "v2.delete_model_lab_run": False, "v2.get_model_lab_artifact_content": False, "v2.get_model_lab_project": False, diff --git a/tests/v2/features/metrics.feature b/tests/v2/features/metrics.feature index 0d0dac2e9d..24b766d5d5 100644 --- a/tests/v2/features/metrics.feature +++ b/tests/v2/features/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"