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
10 changes: 0 additions & 10 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48210,7 +48210,6 @@ components:
$ref: "#/components/schemas/IncidentUserDefinedRolePolicy"
required:
- name
- policy
type: object
IncidentUserDefinedRoleDataAttributesResponse:
description: Attributes of an incident user-defined role.
Expand Down Expand Up @@ -129641,9 +129640,6 @@ paths:
summary: Create or replace a budget's custom forecast
tags:
- Cloud Cost Management
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/cost/budget/validate:
post:
description: Validate a budget configuration without creating or modifying it
Expand Down Expand Up @@ -129837,9 +129833,6 @@ paths:
summary: Delete a budget's custom forecast
tags:
- Cloud Cost Management
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
get:
description: Get the custom forecast for a budget.
operationId: GetCustomForecast
Expand Down Expand Up @@ -129887,9 +129880,6 @@ paths:
summary: Get a budget's custom forecast
tags:
- Cloud Cost Management
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/cost/budgets:
get:
description: List budgets.
Expand Down
3 changes: 0 additions & 3 deletions examples/v2/cloud-cost-management/DeleteCustomForecast.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Delete a budget's custom forecast returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_custom_forecast".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
api_instance.delete_custom_forecast("budget_id")
3 changes: 0 additions & 3 deletions examples/v2/cloud-cost-management/GetCustomForecast.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Get a budget's custom forecast returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_custom_forecast".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.get_custom_forecast("budget_id")
3 changes: 0 additions & 3 deletions examples/v2/cloud-cost-management/UpsertCustomForecast.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Create or replace a budget's custom forecast returns "OK" response

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

body = DatadogAPIClient::V2::CustomForecastUpsertRequest.new({
Expand Down
27 changes: 9 additions & 18 deletions features/v2/cloud_cost_management.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,21 @@ Feature: Cloud Cost Management

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Create or replace a budget's custom forecast returns "Bad Request" response
Given operation "UpsertCustomForecast" enabled
And new "UpsertCustomForecast" request
Given new "UpsertCustomForecast" request
And body with value {"data": {"attributes": {"budget_uid": "00000000-0000-0000-0000-000000000001", "entries": [{"amount": 400, "month": 202501, "tag_filters": [{"tag_key": "service", "tag_value": "ec2"}]}]}, "id": "", "type": "custom_forecast"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Create or replace a budget's custom forecast returns "Not Found" response
Given operation "UpsertCustomForecast" enabled
And new "UpsertCustomForecast" request
Given new "UpsertCustomForecast" request
And body with value {"data": {"attributes": {"budget_uid": "00000000-0000-0000-0000-000000000001", "entries": [{"amount": 400, "month": 202501, "tag_filters": [{"tag_key": "service", "tag_value": "ec2"}]}]}, "id": "", "type": "custom_forecast"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Create or replace a budget's custom forecast returns "OK" response
Given operation "UpsertCustomForecast" enabled
And new "UpsertCustomForecast" request
Given new "UpsertCustomForecast" request
And body with value {"data": {"attributes": {"budget_uid": "00000000-0000-0000-0000-000000000001", "entries": [{"amount": 400, "month": 202501, "tag_filters": [{"tag_key": "service", "tag_value": "ec2"}]}]}, "id": "", "type": "custom_forecast"}}
When the request is sent
Then the response status is 200 OK
Expand Down Expand Up @@ -237,24 +234,21 @@ Feature: Cloud Cost Management

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Delete a budget's custom forecast returns "Bad Request" response
Given operation "DeleteCustomForecast" enabled
And new "DeleteCustomForecast" request
Given new "DeleteCustomForecast" request
And request contains "budget_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: Delete a budget's custom forecast returns "No Content" response
Given operation "DeleteCustomForecast" enabled
And new "DeleteCustomForecast" request
Given new "DeleteCustomForecast" request
And request contains "budget_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Delete a budget's custom forecast returns "Not Found" response
Given operation "DeleteCustomForecast" enabled
And new "DeleteCustomForecast" request
Given new "DeleteCustomForecast" request
And request contains "budget_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
Expand Down Expand Up @@ -377,24 +371,21 @@ Feature: Cloud Cost Management

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get a budget's custom forecast returns "Bad Request" response
Given operation "GetCustomForecast" enabled
And new "GetCustomForecast" request
Given new "GetCustomForecast" request
And request contains "budget_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 a budget's custom forecast returns "Not Found" response
Given operation "GetCustomForecast" enabled
And new "GetCustomForecast" request
Given new "GetCustomForecast" request
And request contains "budget_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 a budget's custom forecast returns "OK" response
Given operation "GetCustomForecast" enabled
And new "GetCustomForecast" request
Given new "GetCustomForecast" request
And request contains "budget_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
Expand Down
3 changes: 0 additions & 3 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ def initialize
"v2.get_code_coverage_branch_summary": false,
"v2.get_code_coverage_commit_summary": false,
"v2.get_rule_based_view": false,
"v2.delete_custom_forecast": false,
"v2.get_commitments_commitment_list": false,
"v2.get_commitments_coverage_scalar": false,
"v2.get_commitments_coverage_timeseries": false,
Expand All @@ -441,15 +440,13 @@ def initialize
"v2.get_commitments_utilization_timeseries": false,
"v2.get_cost_anomaly": false,
"v2.get_cost_tag_metadata_currency": false,
"v2.get_custom_forecast": false,
"v2.list_cost_anomalies": false,
"v2.list_cost_tag_key_sources": false,
"v2.list_cost_tag_metadata": false,
"v2.list_cost_tag_metadata_metrics": false,
"v2.list_cost_tag_metadata_months": false,
"v2.list_cost_tag_metadata_orchestrators": false,
"v2.search_cost_recommendations": false,
"v2.upsert_custom_forecast": false,
"v2.create_ownership_feedback": false,
"v2.get_ownership_evidence": false,
"v2.get_ownership_inference": false,
Expand Down
18 changes: 0 additions & 18 deletions lib/datadog_api_client/v2/api/cloud_cost_management_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -843,12 +843,6 @@ def delete_custom_forecast(budget_id, opts = {})
# @param opts [Hash] the optional parameters
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
def delete_custom_forecast_with_http_info(budget_id, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.delete_custom_forecast".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_custom_forecast")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_custom_forecast"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.delete_custom_forecast ...'
Expand Down Expand Up @@ -2585,12 +2579,6 @@ def get_custom_forecast(budget_id, opts = {})
# @param opts [Hash] the optional parameters
# @return [Array<(CustomForecastResponse, Integer, Hash)>] CustomForecastResponse data, response status code and response headers
def get_custom_forecast_with_http_info(budget_id, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.get_custom_forecast".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_custom_forecast")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_custom_forecast"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_custom_forecast ...'
Expand Down Expand Up @@ -4874,12 +4862,6 @@ def upsert_custom_forecast(body, opts = {})
# @param opts [Hash] the optional parameters
# @return [Array<(CustomForecastResponse, Integer, Hash)>] CustomForecastResponse data, response status code and response headers
def upsert_custom_forecast_with_http_info(body, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.upsert_custom_forecast".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.upsert_custom_forecast")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.upsert_custom_forecast"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.upsert_custom_forecast ...'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class IncidentUserDefinedRoleDataAttributesRequest
attr_reader :name

# Policy configuration for a user-defined role.
attr_reader :policy
attr_accessor :policy

attr_accessor :additional_properties

Expand Down Expand Up @@ -96,7 +96,6 @@ def initialize(attributes = {})
# @!visibility private
def valid?
return false if @name.nil?
return false if @policy.nil?
true
end

Expand All @@ -110,16 +109,6 @@ def name=(name)
@name = name
end

# Custom attribute writer method with validation
# @param policy [Object] Object to be assigned
# @!visibility private
def policy=(policy)
if policy.nil?
fail ArgumentError, 'invalid value for "policy", policy cannot be nil.'
end
@policy = policy
end

# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
Expand Down
Loading