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
856 changes: 855 additions & 1 deletion .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions examples/v2/cloud-cost-management/GetCostAnomaly.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get cost anomaly returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_cost_anomaly".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.get_cost_anomaly("anomaly_id")
5 changes: 5 additions & 0 deletions examples/v2/cloud-cost-management/GetCostTagKey.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a Cloud Cost Management tag key returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.get_cost_tag_key("tag_key")
8 changes: 8 additions & 0 deletions examples/v2/cloud-cost-management/ListCostAnomalies.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List cost anomalies returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_cost_anomalies".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.list_cost_anomalies()
5 changes: 5 additions & 0 deletions examples/v2/cloud-cost-management/ListCostTagKeys.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List Cloud Cost Management tag keys returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.list_cost_tag_keys()
5 changes: 5 additions & 0 deletions examples/v2/cloud-cost-management/ListCostTags.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List Cloud Cost Management tags returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.list_cost_tags()
33 changes: 33 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2101,6 +2101,22 @@
"page_size" => "Integer",
"page_cursor" => "String",
},
"v2.ListCostAnomalies" => {
"start" => "Integer",
"_end" => "Integer",
"filter" => "String",
"min_anomalous_threshold" => "String",
"min_cost_threshold" => "String",
"dismissal_cause" => "String",
"order_by" => "String",
"order" => "String",
"limit" => "Integer",
"offset" => "Integer",
"provider_ids" => "Array<String>",
},
"v2.GetCostAnomaly" => {
"anomaly_id" => "String",
},
"v2.CreateCustomAllocationRule" => {
"body" => "ArbitraryCostUpsertRequest",
},
Expand Down Expand Up @@ -2188,6 +2204,22 @@
"v2.ListCostTagDescriptions" => {
"filter_cloud" => "String",
},
"v2.ListCostTagKeys" => {
"filter_metric" => "String",
"filter_tags" => "Array<String>",
},
"v2.GetCostTagKey" => {
"tag_key" => "String",
"filter_metric" => "String",
"page_size" => "Integer",
},
"v2.ListCostTags" => {
"filter_metric" => "String",
"filter_match" => "String",
"filter_tags" => "Array<String>",
"filter_tag_keys" => "Array<String>",
"page_size" => "Integer",
},
"v2.CreateTagPipelinesRuleset" => {
"body" => "CreateRulesetRequest",
},
Expand Down Expand Up @@ -3215,6 +3247,7 @@
},
"v2.ListVolumesByMetricName" => {
"metric_name" => "String",
"window_seconds" => "Integer",
},
"v2.QueryScalarData" => {
"body" => "ScalarFormulaQueryRequest",
Expand Down
83 changes: 83 additions & 0 deletions features/v2/cloud_cost_management.feature
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,27 @@ Feature: Cloud Cost Management
And the response "data.type" is equal to "gcp_uc_config"
And the response "data.attributes.account_id" is equal to "123456_ABCDEF_123ABC"

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get a Cloud Cost Management tag key returns "Bad Request" response
Given new "GetCostTagKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get a Cloud Cost Management tag key returns "Not Found" response
Given new "GetCostTagKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get a Cloud Cost Management tag key returns "OK" response
Given new "GetCostTagKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@team:DataDog/cloud-cost-management
Scenario: Get a budget returns "Not Found" response
Given new "GetBudget" request
Expand Down Expand Up @@ -292,6 +313,30 @@ Feature: Cloud Cost Management
And the response "data.attributes.configs[0].dataset_type" is equal to "amortized"
And the response "data.attributes.configs[1].dataset_type" is equal to "actual"

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get cost anomaly returns "Bad Request" response
Given operation "GetCostAnomaly" enabled
And new "GetCostAnomaly" request
And request contains "anomaly_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get cost anomaly returns "Not Found" response
Given operation "GetCostAnomaly" enabled
And new "GetCostAnomaly" request
And request contains "anomaly_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get cost anomaly returns "OK" response
Given operation "GetCostAnomaly" enabled
And new "GetCostAnomaly" request
And request contains "anomaly_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@replay-only @team:DataDog/cloud-cost-management
Scenario: Get custom allocation rule returns "OK" response
Given new "GetCustomAllocationRule" request
Expand Down Expand Up @@ -325,6 +370,30 @@ Feature: Cloud Cost Management
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-cost-management
Scenario: List Cloud Cost Management tag keys returns "Bad Request" response
Given new "ListCostTagKeys" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: List Cloud Cost Management tag keys returns "OK" response
Given new "ListCostTagKeys" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-cost-management
Scenario: List Cloud Cost Management tags returns "Bad Request" response
Given new "ListCostTags" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: List Cloud Cost Management tags returns "OK" response
Given new "ListCostTags" request
When the request is sent
Then the response status is 200 OK

@replay-only @team:DataDog/cloud-cost-management
Scenario: List Custom Costs Files returns "OK" response
Given new "ListCustomCostsFiles" request
Expand Down Expand Up @@ -357,6 +426,20 @@ Feature: Cloud Cost Management
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-cost-management
Scenario: List cost anomalies returns "Bad Request" response
Given operation "ListCostAnomalies" enabled
And new "ListCostAnomalies" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: List cost anomalies returns "OK" response
Given operation "ListCostAnomalies" enabled
And new "ListCostAnomalies" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-cost-management
Scenario: List custom allocation rule statuses returns "OK" response
Given new "ListCustomAllocationRulesStatus" request
Expand Down
30 changes: 30 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,18 @@
"type": "safe"
}
},
"ListCostAnomalies": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"GetCostAnomaly": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"ListCustomAllocationRules": {
"tag": "Cloud Cost Management",
"undo": {
Expand Down Expand Up @@ -1476,6 +1488,24 @@
"type": "safe"
}
},
"ListCostTagKeys": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"GetCostTagKey": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"ListCostTags": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"GetActiveBillingDimensions": {
"tag": "Usage Metering",
"undo": {
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ def initialize
"v2.search_security_monitoring_histsignals": false,
"v2.get_code_coverage_branch_summary": false,
"v2.get_code_coverage_commit_summary": false,
"v2.get_cost_anomaly": false,
"v2.list_cost_anomalies": false,
"v2.create_dashboard_secure_embed": false,
"v2.delete_dashboard_secure_embed": false,
"v2.get_dashboard_secure_embed": false,
Expand Down
19 changes: 19 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1982,17 +1982,35 @@ def overrides
"v2.convert_job_results_to_signals_data_type" => "ConvertJobResultsToSignalsDataType",
"v2.convert_job_results_to_signals_request" => "ConvertJobResultsToSignalsRequest",
"v2.cost_aggregation_type" => "CostAggregationType",
"v2.cost_anomalies_response" => "CostAnomaliesResponse",
"v2.cost_anomalies_response_data" => "CostAnomaliesResponseData",
"v2.cost_anomalies_response_data_attributes" => "CostAnomaliesResponseDataAttributes",
"v2.cost_anomalies_response_data_type" => "CostAnomaliesResponseDataType",
"v2.cost_anomaly" => "CostAnomaly",
"v2.cost_anomaly_dismissal" => "CostAnomalyDismissal",
"v2.cost_anomaly_response" => "CostAnomalyResponse",
"v2.cost_anomaly_response_data" => "CostAnomalyResponseData",
"v2.cost_attribution_aggregates_body" => "CostAttributionAggregatesBody",
"v2.cost_attribution_type" => "CostAttributionType",
"v2.cost_by_org" => "CostByOrg",
"v2.cost_by_org_attributes" => "CostByOrgAttributes",
"v2.cost_by_org_response" => "CostByOrgResponse",
"v2.cost_by_org_type" => "CostByOrgType",
"v2.cost_tag" => "CostTag",
"v2.cost_tag_attributes" => "CostTagAttributes",
"v2.cost_tag_description" => "CostTagDescription",
"v2.cost_tag_description_attributes" => "CostTagDescriptionAttributes",
"v2.cost_tag_description_source" => "CostTagDescriptionSource",
"v2.cost_tag_descriptions_response" => "CostTagDescriptionsResponse",
"v2.cost_tag_description_type" => "CostTagDescriptionType",
"v2.cost_tag_key" => "CostTagKey",
"v2.cost_tag_key_attributes" => "CostTagKeyAttributes",
"v2.cost_tag_key_details" => "CostTagKeyDetails",
"v2.cost_tag_key_response" => "CostTagKeyResponse",
"v2.cost_tag_keys_response" => "CostTagKeysResponse",
"v2.cost_tag_key_type" => "CostTagKeyType",
"v2.cost_tags_response" => "CostTagsResponse",
"v2.cost_tag_type" => "CostTagType",
"v2.coverage_summary_attributes" => "CoverageSummaryAttributes",
"v2.coverage_summary_codeowner_stats" => "CoverageSummaryCodeownerStats",
"v2.coverage_summary_data" => "CoverageSummaryData",
Expand Down Expand Up @@ -3331,6 +3349,7 @@ def overrides
"v2.issue_language" => "IssueLanguage",
"v2.issue_platform" => "IssuePlatform",
"v2.issue_reference" => "IssueReference",
"v2.issue_regression" => "IssueRegression",
"v2.issue_relationships" => "IssueRelationships",
"v2.issue_response" => "IssueResponse",
"v2.issues_search_request" => "IssuesSearchRequest",
Expand Down
Loading
Loading