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

Large diffs are not rendered by default.

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

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_cost_ai_preferred_tags".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.get_cost_ai_preferred_tags()
8 changes: 8 additions & 0 deletions examples/v2/cloud-cost-management/GetCostSetting.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get cost setting returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_cost_setting".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.get_cost_setting("setting_type")
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List active tag pipeline keys returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_cost_tag_pipeline_active_keys".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.list_cost_tag_pipeline_active_keys()
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List custom allocation rule statuses returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_custom_allocation_rules_status".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.list_custom_allocation_rules_status()
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List tag pipeline ruleset statuses returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_tag_pipelines_rulesets_status".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.list_tag_pipelines_rulesets_status()
3 changes: 3 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2182,6 +2182,9 @@
"cloud_account_id" => "Integer",
"body" => "GCPUsageCostConfigPatchRequest",
},
"v2.GetCostSetting" => {
"setting_type" => "String",
},
"v2.CreateTagPipelinesRuleset" => {
"body" => "CreateRulesetRequest",
},
Expand Down
52 changes: 52 additions & 0 deletions features/v2/cloud_cost_management.feature
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,44 @@ 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 setting returns "Bad Request" response
Given operation "GetCostSetting" enabled
And new "GetCostSetting" request
And request contains "setting_type" 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 setting returns "Not Found" response
Given operation "GetCostSetting" enabled
And new "GetCostSetting" request
And request contains "setting_type" 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 setting returns "OK" response
Given operation "GetCostSetting" enabled
And new "GetCostSetting" request
And request contains "setting_type" 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
And request contains "rule_id" parameter with value 683
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get preferred cost allocation tags returns "OK" response
Given operation "GetCostAIPreferredTags" enabled
And new "GetCostAIPreferredTags" request
When the request is sent
Then the response status is 200 OK

@replay-only @team:DataDog/cloud-cost-management
Scenario: List Cloud Cost Management AWS CUR configs returns "OK" response
Given new "ListCostAWSCURConfigs" request
Expand Down Expand Up @@ -345,19 +376,40 @@ 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 active tag pipeline keys returns "OK" response
Given operation "ListCostTagPipelineActiveKeys" enabled
And new "ListCostTagPipelineActiveKeys" request
When the request is sent
Then the response status is 200 OK

@team:DataDog/cloud-cost-management
Scenario: List budgets returns "OK" response
Given new "ListBudgets" 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 operation "ListCustomAllocationRulesStatus" enabled
And new "ListCustomAllocationRulesStatus" request
When the request is sent
Then the response status is 200 OK

@replay-only @team:DataDog/cloud-cost-management
Scenario: List custom allocation rules returns "OK" response
Given new "ListCustomAllocationRules" request
When the request is sent
Then the response status is 200 OK
And the response "data[0].attributes.rule_name" is equal to "example-arbitrary-cost-rule"

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

@replay-only @team:DataDog/cloud-cost-management
Scenario: List tag pipeline rulesets returns "OK" response
Given new "ListTagPipelinesRulesets" 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"
}
},
"GetCostAIPreferredTags": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"ListCostTagPipelineActiveKeys": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"ListCustomAllocationRules": {
"tag": "Cloud Cost Management",
"undo": {
Expand All @@ -1283,6 +1295,12 @@
"type": "idempotent"
}
},
"ListCustomAllocationRulesStatus": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"DeleteCustomAllocationRule": {
"tag": "Cloud Cost Management",
"undo": {
Expand Down Expand Up @@ -1464,6 +1482,12 @@
"type": "safe"
}
},
"GetCostSetting": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"GetActiveBillingDimensions": {
"tag": "Usage Metering",
"undo": {
Expand Down Expand Up @@ -6697,6 +6721,12 @@
"type": "idempotent"
}
},
"ListTagPipelinesRulesetsStatus": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"ValidateQuery": {
"tag": "Cloud Cost Management",
"undo": {
Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ def initialize
"v2.upsert_sync_config": false,
"v2.get_code_coverage_branch_summary": false,
"v2.get_code_coverage_commit_summary": false,
"v2.get_cost_ai_preferred_tags": false,
"v2.get_cost_setting": false,
"v2.list_cost_tag_pipeline_active_keys": false,
"v2.list_custom_allocation_rules_status": false,
"v2.list_tag_pipelines_rulesets_status": false,
"v2.create_dashboard_secure_embed": false,
"v2.delete_dashboard_secure_embed": false,
"v2.get_dashboard_secure_embed": false,
Expand Down
20 changes: 20 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1967,12 +1967,24 @@ 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_ai_preferred_tags_attributes" => "CostAIPreferredTagsAttributes",
"v2.cost_ai_preferred_tags_data" => "CostAIPreferredTagsData",
"v2.cost_ai_preferred_tags_response" => "CostAIPreferredTagsResponse",
"v2.cost_ai_preferred_tags_type" => "CostAIPreferredTagsType",
"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_setting_data" => "CostSettingData",
"v2.cost_setting_data_attributes" => "CostSettingDataAttributes",
"v2.cost_setting_response" => "CostSettingResponse",
"v2.cost_setting_type" => "CostSettingType",
"v2.cost_tag_pipeline_active_key_attributes" => "CostTagPipelineActiveKeyAttributes",
"v2.cost_tag_pipeline_active_key_data" => "CostTagPipelineActiveKeyData",
"v2.cost_tag_pipeline_active_key_response" => "CostTagPipelineActiveKeyResponse",
"v2.cost_tag_pipeline_active_key_type" => "CostTagPipelineActiveKeyType",
"v2.coverage_summary_attributes" => "CoverageSummaryAttributes",
"v2.coverage_summary_codeowner_stats" => "CoverageSummaryCodeownerStats",
"v2.coverage_summary_data" => "CoverageSummaryData",
Expand Down Expand Up @@ -2145,6 +2157,10 @@ def overrides
"v2.csm_serverless_coverage_analysis_attributes" => "CsmServerlessCoverageAnalysisAttributes",
"v2.csm_serverless_coverage_analysis_data" => "CsmServerlessCoverageAnalysisData",
"v2.csm_serverless_coverage_analysis_response" => "CsmServerlessCoverageAnalysisResponse",
"v2.custom_allocation_rule_status_attributes" => "CustomAllocationRuleStatusAttributes",
"v2.custom_allocation_rule_status_data" => "CustomAllocationRuleStatusData",
"v2.custom_allocation_rule_status_response" => "CustomAllocationRuleStatusResponse",
"v2.custom_allocation_rule_status_type" => "CustomAllocationRuleStatusType",
"v2.custom_attribute_config" => "CustomAttributeConfig",
"v2.custom_attribute_config_attributes_create" => "CustomAttributeConfigAttributesCreate",
"v2.custom_attribute_config_create" => "CustomAttributeConfigCreate",
Expand Down Expand Up @@ -5873,6 +5889,10 @@ def overrides
"v2.table_row_resource_data_attributes" => "TableRowResourceDataAttributes",
"v2.table_row_resource_data_type" => "TableRowResourceDataType",
"v2.table_row_resource_identifier" => "TableRowResourceIdentifier",
"v2.tag_pipelines_ruleset_status_attributes" => "TagPipelinesRulesetStatusAttributes",
"v2.tag_pipelines_ruleset_status_data" => "TagPipelinesRulesetStatusData",
"v2.tag_pipelines_ruleset_status_response" => "TagPipelinesRulesetStatusResponse",
"v2.tag_pipelines_ruleset_status_type" => "TagPipelinesRulesetStatusType",
"v2.targeting_rule" => "TargetingRule",
"v2.targeting_rule_request" => "TargetingRuleRequest",
"v2.team" => "Team",
Expand Down
Loading
Loading