Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down
3 changes: 3 additions & 0 deletions examples/v2/metrics/CreateTagIndexingRule.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Create a tag indexing rule returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_tag_indexing_rule".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new

body = DatadogAPIClient::V2::TagIndexingRuleCreateRequest.new({
Expand Down
3 changes: 3 additions & 0 deletions examples/v2/metrics/CreateTagIndexingRuleExemption.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Create a tag indexing rule exemption returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_tag_indexing_rule_exemption".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new

body = DatadogAPIClient::V2::TagIndexingRuleExemptionCreateRequest.new({
Expand Down
3 changes: 3 additions & 0 deletions examples/v2/metrics/DeleteTagIndexingRule.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Delete a tag indexing rule returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_tag_indexing_rule".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new

# there is a valid "tag_indexing_rule" in the system
Expand Down
3 changes: 3 additions & 0 deletions examples/v2/metrics/DeleteTagIndexingRuleExemption.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Delete a tag indexing rule exemption returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_tag_indexing_rule_exemption".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new
api_instance.delete_tag_indexing_rule_exemption("metric_name")
3 changes: 3 additions & 0 deletions examples/v2/metrics/GetTagIndexingRule.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Get a tag indexing rule returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_tag_indexing_rule".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new

# there is a valid "tag_indexing_rule" in the system
Expand Down
3 changes: 3 additions & 0 deletions examples/v2/metrics/GetTagIndexingRuleExemption.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Get a tag indexing rule exemption returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_tag_indexing_rule_exemption".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new
p api_instance.get_tag_indexing_rule_exemption("metric_name")
3 changes: 3 additions & 0 deletions examples/v2/metrics/ListTagIndexingRules.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# List tag indexing rules returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_tag_indexing_rules".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new
p api_instance.list_tag_indexing_rules()
3 changes: 3 additions & 0 deletions examples/v2/metrics/ListTagIndexingRulesForMetric.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# List tag indexing rules for a metric returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_tag_indexing_rules_for_metric".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new
p api_instance.list_tag_indexing_rules_for_metric("ExampleMetric")
3 changes: 3 additions & 0 deletions examples/v2/metrics/ReorderTagIndexingRules.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Reorder tag indexing rules returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.reorder_tag_indexing_rules".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new

# there is a valid "tag_indexing_rule" in the system
Expand Down
3 changes: 3 additions & 0 deletions examples/v2/metrics/UpdateTagIndexingRule.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Update a tag indexing rule returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.update_tag_indexing_rule".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new

# there is a valid "tag_indexing_rule" in the system
Expand Down
25 changes: 25 additions & 0 deletions features/v2/metrics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}
Expand All @@ -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"}}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -384,13 +400,15 @@ 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

@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
Expand Down Expand Up @@ -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
Expand All @@ -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"}}
Expand All @@ -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
Expand Down Expand Up @@ -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"}}
Expand All @@ -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"}}
Expand All @@ -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"}}
Expand All @@ -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"
Expand Down
Loading
Loading