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
1,050 changes: 1,050 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions examples/v2/metrics/CreateTagIndexingRule.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Create a tag indexing rule returns "Created" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::MetricsAPI.new

body = DatadogAPIClient::V2::TagIndexingRuleCreateRequest.new({
data: DatadogAPIClient::V2::TagIndexingRuleCreateData.new({
attributes: DatadogAPIClient::V2::TagIndexingRuleCreateAttributes.new({
exclude_tags_mode: false,
ignored_metric_name_matches: [],
metric_name_matches: [
"dd.test.*",
],
name: "my-indexing-rule",
options: DatadogAPIClient::V2::TagIndexingRuleOptions.new({
data: DatadogAPIClient::V2::TagIndexingRuleOptionsData.new({
dynamic_tags: DatadogAPIClient::V2::TagIndexingRuleDynamicTags.new({
queried_tags_window_seconds: 3600,
related_asset_tags: false,
}),
manage_preexisting_metrics: true,
metric_match: DatadogAPIClient::V2::TagIndexingRuleMetricMatch.new({
queried_window_seconds: 3600,
}),
override_previous_rules: false,
}),
version: 1,
}),
tags: [
"env",
"service",
],
}),
type: DatadogAPIClient::V2::TagIndexingRuleType::TAG_INDEXING_RULES,
}),
})
p api_instance.create_tag_indexing_rule(body)
14 changes: 14 additions & 0 deletions examples/v2/metrics/CreateTagIndexingRuleExemption.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Create a tag indexing rule exemption returns "Created" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::MetricsAPI.new

body = DatadogAPIClient::V2::TagIndexingRuleExemptionCreateRequest.new({
data: DatadogAPIClient::V2::TagIndexingRuleExemptionCreateData.new({
attributes: DatadogAPIClient::V2::TagIndexingRuleExemptionCreateAttributes.new({
reason: "This metric has a pre-existing tag configuration.",
}),
type: DatadogAPIClient::V2::TagIndexingRuleExemptionType::TAG_INDEXING_RULE_EXEMPTIONS,
}),
})
p api_instance.create_tag_indexing_rule_exemption("metric_name", body)
5 changes: 5 additions & 0 deletions examples/v2/metrics/DeleteTagIndexingRule.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a tag indexing rule returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::MetricsAPI.new
api_instance.delete_tag_indexing_rule("id")
5 changes: 5 additions & 0 deletions examples/v2/metrics/DeleteTagIndexingRuleExemption.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a tag indexing rule exemption returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::MetricsAPI.new
api_instance.delete_tag_indexing_rule_exemption("metric_name")
5 changes: 5 additions & 0 deletions examples/v2/metrics/GetTagIndexingRule.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a tag indexing rule returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::MetricsAPI.new
p api_instance.get_tag_indexing_rule("id")
5 changes: 5 additions & 0 deletions examples/v2/metrics/GetTagIndexingRuleExemption.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a tag indexing rule exemption returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::MetricsAPI.new
p api_instance.get_tag_indexing_rule_exemption("metric_name")
5 changes: 5 additions & 0 deletions examples/v2/metrics/ListTagIndexingRules.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List tag indexing rules returns "OK" response

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

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::MetricsAPI.new
p api_instance.list_tag_indexing_rules_for_metric("metric_name")
17 changes: 17 additions & 0 deletions examples/v2/metrics/ReorderTagIndexingRules.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Reorder tag indexing rules returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::MetricsAPI.new

body = DatadogAPIClient::V2::TagIndexingRuleOrderRequest.new({
data: DatadogAPIClient::V2::TagIndexingRuleOrderData.new({
attributes: DatadogAPIClient::V2::TagIndexingRuleOrderAttributes.new({
rule_ids: [
"00000000-0000-0000-0000-000000000001",
"00000000-0000-0000-0000-000000000002",
],
}),
type: DatadogAPIClient::V2::TagIndexingRuleType::TAG_INDEXING_RULES,
}),
})
api_instance.reorder_tag_indexing_rules(body)
37 changes: 37 additions & 0 deletions examples/v2/metrics/UpdateTagIndexingRule.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Update a tag indexing rule returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::MetricsAPI.new

body = DatadogAPIClient::V2::TagIndexingRuleUpdateRequest.new({
data: DatadogAPIClient::V2::TagIndexingRuleUpdateData.new({
attributes: DatadogAPIClient::V2::TagIndexingRuleUpdateAttributes.new({
ignored_metric_name_matches: [],
metric_name_matches: [
"dd.test.*",
],
name: "my-indexing-rule",
options: DatadogAPIClient::V2::TagIndexingRuleOptions.new({
data: DatadogAPIClient::V2::TagIndexingRuleOptionsData.new({
dynamic_tags: DatadogAPIClient::V2::TagIndexingRuleDynamicTags.new({
queried_tags_window_seconds: 3600,
related_asset_tags: false,
}),
manage_preexisting_metrics: true,
metric_match: DatadogAPIClient::V2::TagIndexingRuleMetricMatch.new({
queried_window_seconds: 3600,
}),
override_previous_rules: false,
}),
version: 1,
}),
rule_order: 2,
tags: [
"env",
"service",
],
}),
type: DatadogAPIClient::V2::TagIndexingRuleType::TAG_INDEXING_RULES,
}),
})
p api_instance.update_tag_indexing_rule("id", body)
34 changes: 34 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3797,6 +3797,27 @@
"v2.CreateBulkTagsMetricsConfiguration" => {
"body" => "MetricBulkTagConfigCreateRequest",
},
"v2.ListTagIndexingRules" => {
"page_limit" => "Integer",
"page_offset" => "Integer",
"search" => "String",
},
"v2.CreateTagIndexingRule" => {
"body" => "TagIndexingRuleCreateRequest",
},
"v2.ReorderTagIndexingRules" => {
"body" => "TagIndexingRuleOrderRequest",
},
"v2.DeleteTagIndexingRule" => {
"id" => "String",
},
"v2.GetTagIndexingRule" => {
"id" => "String",
},
"v2.UpdateTagIndexingRule" => {
"id" => "String",
"body" => "TagIndexingRuleUpdateRequest",
},
"v2.ListActiveMetricConfigurations" => {
"metric_name" => "String",
"window_seconds" => "Integer",
Expand Down Expand Up @@ -3824,6 +3845,19 @@
"v2.GetMetricTagCardinalityDetails" => {
"metric_name" => "String",
},
"v2.DeleteTagIndexingRuleExemption" => {
"metric_name" => "String",
},
"v2.GetTagIndexingRuleExemption" => {
"metric_name" => "String",
},
"v2.CreateTagIndexingRuleExemption" => {
"metric_name" => "String",
"body" => "TagIndexingRuleExemptionCreateRequest",
},
"v2.ListTagIndexingRulesForMetric" => {
"metric_name" => "String",
},
"v2.DeleteTagConfiguration" => {
"metric_name" => "String",
},
Expand Down
28 changes: 28 additions & 0 deletions features/v2/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,34 @@
"tag": "Logs Restriction Queries",
"operationId": "CreateRestrictionQuery"
},
{
"parameters": [
{
"name": "body",
"value": "{\n \"data\": {\n \"type\": \"tag_indexing_rules\",\n \"attributes\": {\n \"name\": \"{{ unique_alnum }}\",\n \"metric_name_matches\": [\"dd.{{ unique_alnum }}.*\"],\n \"tags\": [\"env\", \"service\"]\n }\n }\n}"
}
],
"step": "there is a valid \"tag_indexing_rule\" in the system",
"key": "tag_indexing_rule",
"tag": "Metrics",
"operationId": "CreateTagIndexingRule"
},
{
"parameters": [
{
"name": "metric_name",
"value": "\"{{ unique_metric_name }}\""
},
{
"name": "body",
"value": "{\n \"data\": {\n \"type\": \"tag_indexing_rule_exemptions\",\n \"attributes\": {\n \"reason\": \"BDD test exemption\"\n }\n }\n}"
}
],
"step": "there is a valid \"tag_indexing_rule_exemption\" in the system",
"key": "tag_indexing_rule_exemption",
"tag": "Metrics",
"operationId": "CreateTagIndexingRuleExemption"
},
{
"parameters": [
{
Expand Down
Loading
Loading