Skip to content
Merged
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
552 changes: 539 additions & 13 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions examples/v2/metrics/CreateHistoricalMetricsConfiguration.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Enable historical metrics ingestion returns "OK" response

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

body = DatadogAPIClient::V2::HistoricalMetricsConfigurationCreateRequest.new({
data: DatadogAPIClient::V2::HistoricalMetricsConfigurationCreateData.new({
id: "dd.test.metric",
type: DatadogAPIClient::V2::HistoricalMetricsConfigurationType::HISTORICAL_METRICS_CONFIGURATIONS,
}),
})
p api_instance.create_historical_metrics_configuration(body)
8 changes: 8 additions & 0 deletions examples/v2/metrics/DeleteHistoricalMetricsConfiguration.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Delete a historical metrics configuration returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_historical_metrics_configuration".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new
api_instance.delete_historical_metrics_configuration("metric_name")
8 changes: 8 additions & 0 deletions examples/v2/metrics/GetHistoricalMetricsConfiguration.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get a historical metrics configuration returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_historical_metrics_configuration".to_sym] = true
end
api_instance = DatadogAPIClient::V2::MetricsAPI.new
p api_instance.get_historical_metrics_configuration("metric_name")
17 changes: 17 additions & 0 deletions examples/v2/rum-config/CreateRumConfig.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Create the RUM configuration returns "Created" response

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

body = DatadogAPIClient::V2::RumConfigCreateRequest.new({
data: DatadogAPIClient::V2::RumConfigCreateData.new({
attributes: DatadogAPIClient::V2::RumConfigCreateAttributes.new({
enforced_application_tags: true,
}),
type: DatadogAPIClient::V2::RumConfigType::RUM_CONFIG,
}),
})
p api_instance.create_rum_config(body)
8 changes: 8 additions & 0 deletions examples/v2/rum-config/GetRumConfig.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get the RUM configuration returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_rum_config".to_sym] = true
end
api_instance = DatadogAPIClient::V2::RUMConfigAPI.new
p api_instance.get_rum_config()
17 changes: 17 additions & 0 deletions examples/v2/rum-config/UpdateRumConfig.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Update the RUM configuration returns "OK" response

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

body = DatadogAPIClient::V2::RumConfigUpdateRequest.new({
data: DatadogAPIClient::V2::RumConfigUpdateData.new({
attributes: DatadogAPIClient::V2::RumConfigUpdateAttributes.new({
enforced_application_tags: true,
}),
type: DatadogAPIClient::V2::RumConfigType::RUM_CONFIG,
}),
})
p api_instance.update_rum_config(body)
15 changes: 15 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4239,6 +4239,15 @@
"v2.CreateBulkTagsMetricsConfiguration" => {
"body" => "MetricBulkTagConfigCreateRequest",
},
"v2.CreateHistoricalMetricsConfiguration" => {
"body" => "HistoricalMetricsConfigurationCreateRequest",
},
"v2.DeleteHistoricalMetricsConfiguration" => {
"metric_name" => "String",
},
"v2.GetHistoricalMetricsConfiguration" => {
"metric_name" => "String",
},
"v2.ListTagIndexingRules" => {
"page_limit" => "Integer",
"page_offset" => "Integer",
Expand Down Expand Up @@ -5242,6 +5251,12 @@
"rf_id" => "String",
"body" => "RumRetentionFilterUpdateRequest",
},
"v2.UpdateRumConfig" => {
"body" => "RumConfigUpdateRequest",
},
"v2.CreateRumConfig" => {
"body" => "RumConfigCreateRequest",
},
"v2.CreateRumMetric" => {
"body" => "RumMetricCreateRequest",
},
Expand Down
90 changes: 90 additions & 0 deletions features/v2/metrics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,24 @@ Feature: Metrics
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/metrics-experience
Scenario: Delete a historical metrics configuration returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "DeleteHistoricalMetricsConfiguration" enabled
And new "DeleteHistoricalMetricsConfiguration" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/metrics-experience
Scenario: Delete a historical metrics configuration returns "No Content" response
Given a valid "appKeyAuth" key in the system
And operation "DeleteHistoricalMetricsConfiguration" enabled
And new "DeleteHistoricalMetricsConfiguration" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content

@replay-only @skip-validation @team:DataDog/metrics-experience
Scenario: Delete a tag configuration returns "No Content" response
Given there is a valid "metric" in the system
Expand Down Expand Up @@ -221,6 +239,78 @@ Feature: Metrics
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/metrics-experience
Scenario: Enable historical metrics ingestion returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "CreateHistoricalMetricsConfiguration" enabled
And new "CreateHistoricalMetricsConfiguration" request
And body with value {"data": {"id": "dd.test.metric", "type": "historical_metrics_configurations"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/metrics-experience
Scenario: Enable historical metrics ingestion returns "Created" response
Given a valid "appKeyAuth" key in the system
And operation "CreateHistoricalMetricsConfiguration" enabled
And new "CreateHistoricalMetricsConfiguration" request
And body with value {"data": {"id": "dd.test.metric", "type": "historical_metrics_configurations"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/metrics-experience
Scenario: Enable historical metrics ingestion returns "Not Found" response
Given a valid "appKeyAuth" key in the system
And operation "CreateHistoricalMetricsConfiguration" enabled
And new "CreateHistoricalMetricsConfiguration" request
And body with value {"data": {"id": "dd.test.metric", "type": "historical_metrics_configurations"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/metrics-experience
Scenario: Enable historical metrics ingestion returns "OK" response
Given a valid "appKeyAuth" key in the system
And operation "CreateHistoricalMetricsConfiguration" enabled
And new "CreateHistoricalMetricsConfiguration" request
And body with value {"data": {"id": "dd.test.metric", "type": "historical_metrics_configurations"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/metrics-experience
Scenario: Enable historical metrics ingestion returns "Unprocessable Entity" response
Given a valid "appKeyAuth" key in the system
And operation "CreateHistoricalMetricsConfiguration" enabled
And new "CreateHistoricalMetricsConfiguration" request
And body with value {"data": {"id": "dd.test.metric", "type": "historical_metrics_configurations"}}
When the request is sent
Then the response status is 422 Unprocessable Entity

@generated @skip @team:DataDog/metrics-experience
Scenario: Get a historical metrics configuration returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "GetHistoricalMetricsConfiguration" enabled
And new "GetHistoricalMetricsConfiguration" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/metrics-experience
Scenario: Get a historical metrics configuration returns "Not Found" response
Given a valid "appKeyAuth" key in the system
And operation "GetHistoricalMetricsConfiguration" enabled
And new "GetHistoricalMetricsConfiguration" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/metrics-experience
Scenario: Get a historical metrics configuration returns "OK" response
Given a valid "appKeyAuth" key in the system
And operation "GetHistoricalMetricsConfiguration" enabled
And new "GetHistoricalMetricsConfiguration" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/metrics-experience
Scenario: Get a list of metrics returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
Expand Down
49 changes: 49 additions & 0 deletions features/v2/rum_config.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@endpoint(rum-config) @endpoint(rum-config-v2)
Feature: RUM Config
Manage the [Real User Monitoring
(RUM)](https://docs.datadoghq.com/real_user_monitoring/) configuration for
your organization.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "RUMConfig" API

@generated @skip @team:DataDog/rum-backend
Scenario: Create the RUM configuration returns "Bad Request" response
Given operation "CreateRumConfig" enabled
And new "CreateRumConfig" request
And body with value {"data": {"attributes": {"enforced_application_tags": true}, "type": "rum_config"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/rum-backend
Scenario: Create the RUM configuration returns "Created" response
Given operation "CreateRumConfig" enabled
And new "CreateRumConfig" request
And body with value {"data": {"attributes": {"enforced_application_tags": true}, "type": "rum_config"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/rum-backend
Scenario: Get the RUM configuration returns "OK" response
Given operation "GetRumConfig" enabled
And new "GetRumConfig" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/rum-backend
Scenario: Update the RUM configuration returns "Bad Request" response
Given operation "UpdateRumConfig" enabled
And new "UpdateRumConfig" request
And body with value {"data": {"attributes": {"enforced_application_tags": true}, "type": "rum_config"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/rum-backend
Scenario: Update the RUM configuration returns "OK" response
Given operation "UpdateRumConfig" enabled
And new "UpdateRumConfig" request
And body with value {"data": {"attributes": {"enforced_application_tags": true}, "type": "rum_config"}}
When the request is sent
Then the response status is 200 OK
43 changes: 43 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5154,6 +5154,31 @@
"type": "unsafe"
}
},
"CreateHistoricalMetricsConfiguration": {
"tag": "Metrics",
"undo": {
"operationId": "DeleteHistoricalMetricsConfiguration",
"parameters": [
{
"name": "metric_name",
"source": "data.id"
}
],
"type": "unsafe"
}
},
"DeleteHistoricalMetricsConfiguration": {
"tag": "Metrics",
"undo": {
"type": "idempotent"
}
},
"GetHistoricalMetricsConfiguration": {
"tag": "Metrics",
"undo": {
"type": "safe"
}
},
"ListTagIndexingRules": {
"tag": "Metrics",
"undo": {
Expand Down Expand Up @@ -6899,6 +6924,24 @@
"type": "idempotent"
}
},
"GetRumConfig": {
"tag": "RUM Config",
"undo": {
"type": "safe"
}
},
"UpdateRumConfig": {
"tag": "RUM Config",
"undo": {
"type": "idempotent"
}
},
"CreateRumConfig": {
"tag": "RUM Config",
"undo": {
"type": "idempotent"
}
},
"ListRumMetrics": {
"tag": "Rum Metrics",
"undo": {
Expand Down
8 changes: 6 additions & 2 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,6 @@ def initialize
"v2.get_all_datasets": false,
"v2.get_dataset": false,
"v2.update_dataset": false,
"v2.execute_ddsql_tabular_query": false,
"v2.fetch_ddsql_tabular_query": false,
"v2.cancel_data_deletion_request": false,
"v2.create_data_deletion_request": false,
"v2.get_data_deletion_requests": false,
Expand Down Expand Up @@ -554,10 +552,13 @@ def initialize
"v2.remove_role_from_restriction_query": false,
"v2.replace_restriction_query": false,
"v2.update_restriction_query": false,
"v2.create_historical_metrics_configuration": false,
"v2.create_tag_indexing_rule": false,
"v2.create_tag_indexing_rule_exemption": false,
"v2.delete_historical_metrics_configuration": false,
"v2.delete_tag_indexing_rule": false,
"v2.delete_tag_indexing_rule_exemption": false,
"v2.get_historical_metrics_configuration": false,
"v2.get_tag_indexing_rule": false,
"v2.get_tag_indexing_rule_exemption": false,
"v2.list_tag_indexing_rules": false,
Expand Down Expand Up @@ -638,6 +639,9 @@ def initialize
"v2.get_sourcemaps": false,
"v2.list_sourcemaps": false,
"v2.restore_sourcemaps": false,
"v2.create_rum_config": false,
"v2.get_rum_config": false,
"v2.update_rum_config": false,
"v2.delete_rum_rate_limit_config": false,
"v2.get_rum_rate_limit_config": false,
"v2.update_rum_rate_limit_config": false,
Expand Down
17 changes: 17 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3720,6 +3720,12 @@ def overrides
"v2.historical_job_response" => "HistoricalJobResponse",
"v2.historical_job_response_attributes" => "HistoricalJobResponseAttributes",
"v2.historical_job_response_data" => "HistoricalJobResponseData",
"v2.historical_metrics_configuration_attributes" => "HistoricalMetricsConfigurationAttributes",
"v2.historical_metrics_configuration_create_data" => "HistoricalMetricsConfigurationCreateData",
"v2.historical_metrics_configuration_create_request" => "HistoricalMetricsConfigurationCreateRequest",
"v2.historical_metrics_configuration_data" => "HistoricalMetricsConfigurationData",
"v2.historical_metrics_configuration_response" => "HistoricalMetricsConfigurationResponse",
"v2.historical_metrics_configuration_type" => "HistoricalMetricsConfigurationType",
"v2.hourly_usage" => "HourlyUsage",
"v2.hourly_usage_attributes" => "HourlyUsageAttributes",
"v2.hourly_usage_measurement" => "HourlyUsageMeasurement",
Expand Down Expand Up @@ -6230,6 +6236,16 @@ def overrides
"v2.rum_bucket_response" => "RUMBucketResponse",
"v2.rum_compute" => "RUMCompute",
"v2.rum_compute_type" => "RUMComputeType",
"v2.rum_config_attributes" => "RumConfigAttributes",
"v2.rum_config_create_attributes" => "RumConfigCreateAttributes",
"v2.rum_config_create_data" => "RumConfigCreateData",
"v2.rum_config_create_request" => "RumConfigCreateRequest",
"v2.rum_config_data" => "RumConfigData",
"v2.rum_config_response" => "RumConfigResponse",
"v2.rum_config_type" => "RumConfigType",
"v2.rum_config_update_attributes" => "RumConfigUpdateAttributes",
"v2.rum_config_update_data" => "RumConfigUpdateData",
"v2.rum_config_update_request" => "RumConfigUpdateRequest",
"v2.rum_cross_product_sampling" => "RumCrossProductSampling",
"v2.rum_cross_product_sampling_create" => "RumCrossProductSamplingCreate",
"v2.rum_cross_product_sampling_update" => "RumCrossProductSamplingUpdate",
Expand Down Expand Up @@ -8307,6 +8323,7 @@ def overrides
"v2.roles_api" => "RolesAPI",
"v2.rum_api" => "RUMAPI",
"v2.rum_audience_management_api" => "RumAudienceManagementAPI",
"v2.rum_config_api" => "RUMConfigAPI",
"v2.rum_insights_api" => "RUMInsightsAPI",
"v2.rum_metrics_api" => "RumMetricsAPI",
"v2.rum_rate_limit_api" => "RumRateLimitAPI",
Expand Down
Loading
Loading