Skip to content

Commit d1241e2

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 27b019f of spec repo
1 parent d6973c6 commit d1241e2

18 files changed

Lines changed: 989 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27149,6 +27149,156 @@ components:
2714927149
$ref: "#/components/schemas/CustomDestinationResponseDefinition"
2715027150
type: array
2715127151
type: object
27152+
CustomForecastEntry:
27153+
description: A monthly entry of a custom budget forecast.
27154+
properties:
27155+
amount:
27156+
description: Forecast amount for the month.
27157+
example: 400
27158+
format: double
27159+
type: number
27160+
month:
27161+
description: Month the custom forecast entry applies to, in `YYYYMM` format.
27162+
example: 202501
27163+
format: int64
27164+
type: integer
27165+
tag_filters:
27166+
description: Tag filters that scope this custom forecast entry to specific resources.
27167+
items:
27168+
$ref: "#/components/schemas/CustomForecastEntryTagFilter"
27169+
type: array
27170+
required:
27171+
- month
27172+
- amount
27173+
- tag_filters
27174+
type: object
27175+
CustomForecastEntryTagFilter:
27176+
description: A tag filter that scopes a custom forecast entry to specific resource tags.
27177+
properties:
27178+
tag_key:
27179+
description: The tag key to filter on.
27180+
example: service
27181+
type: string
27182+
tag_value:
27183+
description: The tag value to filter on.
27184+
example: ec2
27185+
type: string
27186+
required:
27187+
- tag_key
27188+
- tag_value
27189+
type: object
27190+
CustomForecastResponse:
27191+
description: Response object containing the custom forecast for a budget.
27192+
properties:
27193+
data:
27194+
$ref: "#/components/schemas/CustomForecastResponseData"
27195+
required:
27196+
- data
27197+
type: object
27198+
CustomForecastResponseData:
27199+
description: Custom forecast resource wrapper in a response.
27200+
properties:
27201+
attributes:
27202+
$ref: "#/components/schemas/CustomForecastResponseDataAttributes"
27203+
id:
27204+
description: The unique identifier of the custom forecast.
27205+
example: 11111111-1111-1111-1111-111111111111
27206+
type: string
27207+
type:
27208+
$ref: "#/components/schemas/CustomForecastType"
27209+
required:
27210+
- id
27211+
- type
27212+
- attributes
27213+
type: object
27214+
CustomForecastResponseDataAttributes:
27215+
description: Attributes of a custom forecast.
27216+
properties:
27217+
budget_uid:
27218+
description: The UUID of the budget that this custom forecast belongs to.
27219+
example: 00000000-0000-0000-0000-000000000001
27220+
type: string
27221+
created_at:
27222+
description: Timestamp the custom forecast was created, in Unix milliseconds.
27223+
example: 1738258683590
27224+
format: int64
27225+
type: integer
27226+
created_by:
27227+
description: The id of the user that created the custom forecast.
27228+
example: 00000000-0a0a-0a0a-aaa0-00000000000a
27229+
type: string
27230+
entries:
27231+
description: Monthly custom forecast entries.
27232+
items:
27233+
$ref: "#/components/schemas/CustomForecastEntry"
27234+
type: array
27235+
updated_at:
27236+
description: Timestamp the custom forecast was last updated, in Unix milliseconds.
27237+
example: 1738258683590
27238+
format: int64
27239+
type: integer
27240+
updated_by:
27241+
description: The id of the user that last updated the custom forecast.
27242+
example: 00000000-0a0a-0a0a-aaa0-00000000000a
27243+
type: string
27244+
required:
27245+
- budget_uid
27246+
- created_at
27247+
- updated_at
27248+
- created_by
27249+
- updated_by
27250+
- entries
27251+
type: object
27252+
CustomForecastType:
27253+
default: custom_forecast
27254+
description: The type of the custom forecast resource. Must be `custom_forecast`.
27255+
enum:
27256+
- custom_forecast
27257+
example: custom_forecast
27258+
type: string
27259+
x-enum-varnames:
27260+
- CUSTOM_FORECAST
27261+
CustomForecastUpsertRequest:
27262+
description: Request body to upsert (create or replace) the custom forecast for a budget.
27263+
properties:
27264+
data:
27265+
$ref: "#/components/schemas/CustomForecastUpsertRequestData"
27266+
required:
27267+
- data
27268+
type: object
27269+
CustomForecastUpsertRequestData:
27270+
description: Custom forecast resource wrapper in an upsert request.
27271+
properties:
27272+
attributes:
27273+
$ref: "#/components/schemas/CustomForecastUpsertRequestDataAttributes"
27274+
id:
27275+
description: Unused on upsert; the resource is keyed by `budget_uid`. Send an empty string.
27276+
example: ""
27277+
type: string
27278+
type:
27279+
$ref: "#/components/schemas/CustomForecastType"
27280+
required:
27281+
- type
27282+
- attributes
27283+
type: object
27284+
CustomForecastUpsertRequestDataAttributes:
27285+
description: Attributes of a custom forecast upsert request.
27286+
properties:
27287+
budget_uid:
27288+
description: The UUID of the budget that this custom forecast belongs to.
27289+
example: 00000000-0000-0000-0000-000000000001
27290+
type: string
27291+
entries:
27292+
description: |-
27293+
Monthly custom forecast entries. An empty list deletes any existing
27294+
custom forecast for the budget.
27295+
items:
27296+
$ref: "#/components/schemas/CustomForecastEntry"
27297+
type: array
27298+
required:
27299+
- budget_uid
27300+
- entries
27301+
type: object
2715227302
CustomFrameworkControl:
2715327303
description: Framework Control.
2715427304
properties:
@@ -123849,6 +123999,82 @@ paths:
123849123999
summary: Validate CSV budget
123850124000
tags:
123851124001
- Cloud Cost Management
124002+
/api/v2/cost/budget/custom-forecast:
124003+
put:
124004+
description: |-
124005+
Create or replace the custom forecast for an existing budget.
124006+
Pass an empty `entries` list to delete the custom forecast for the budget.
124007+
operationId: UpsertCustomForecast
124008+
requestBody:
124009+
content:
124010+
application/json:
124011+
examples:
124012+
default:
124013+
value:
124014+
data:
124015+
attributes:
124016+
budget_uid: 00000000-0000-0000-0000-000000000001
124017+
entries:
124018+
- amount: 400
124019+
month: 202501
124020+
tag_filters:
124021+
- tag_key: service
124022+
tag_value: ec2
124023+
- amount: 450
124024+
month: 202502
124025+
tag_filters:
124026+
- tag_key: service
124027+
tag_value: ec2
124028+
id: ""
124029+
type: custom_forecast
124030+
schema:
124031+
$ref: "#/components/schemas/CustomForecastUpsertRequest"
124032+
required: true
124033+
responses:
124034+
"200":
124035+
content:
124036+
application/json:
124037+
examples:
124038+
default:
124039+
value:
124040+
data:
124041+
attributes:
124042+
budget_uid: 00000000-0000-0000-0000-000000000001
124043+
created_at: 1738258683590
124044+
created_by: 00000000-0a0a-0a0a-aaa0-00000000000a
124045+
entries:
124046+
- amount: 400
124047+
month: 202501
124048+
tag_filters:
124049+
- tag_key: service
124050+
tag_value: ec2
124051+
- amount: 450
124052+
month: 202502
124053+
tag_filters:
124054+
- tag_key: service
124055+
tag_value: ec2
124056+
updated_at: 1738258683590
124057+
updated_by: 00000000-0a0a-0a0a-aaa0-00000000000a
124058+
id: 11111111-1111-1111-1111-111111111111
124059+
type: custom_forecast
124060+
schema:
124061+
$ref: "#/components/schemas/CustomForecastResponse"
124062+
description: OK
124063+
"400":
124064+
$ref: "#/components/responses/BadRequestResponse"
124065+
"404":
124066+
$ref: "#/components/responses/NotFoundResponse"
124067+
"429":
124068+
$ref: "#/components/responses/TooManyRequestsResponse"
124069+
security:
124070+
- apiKeyAuth: []
124071+
appKeyAuth: []
124072+
summary: Create or replace a budget's custom forecast
124073+
tags:
124074+
- Cloud Cost Management
124075+
x-unstable: |-
124076+
**Note**: This endpoint is in preview and is subject to change.
124077+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
123852124078
/api/v2/cost/budget/validate:
123853124079
post:
123854124080
description: Validate a budget configuration without creating or modifying it
@@ -123971,6 +124197,30 @@ paths:
123971124197
summary: Get budget
123972124198
tags:
123973124199
- Cloud Cost Management
124200+
/api/v2/cost/budget/{budget_id}/custom-forecast:
124201+
delete:
124202+
description: Delete the custom forecast for a budget.
124203+
operationId: DeleteCustomForecast
124204+
parameters:
124205+
- $ref: "#/components/parameters/BudgetID"
124206+
responses:
124207+
"204":
124208+
description: No Content
124209+
"400":
124210+
$ref: "#/components/responses/BadRequestResponse"
124211+
"404":
124212+
$ref: "#/components/responses/NotFoundResponse"
124213+
"429":
124214+
$ref: "#/components/responses/TooManyRequestsResponse"
124215+
security:
124216+
- apiKeyAuth: []
124217+
appKeyAuth: []
124218+
summary: Delete a budget's custom forecast
124219+
tags:
124220+
- Cloud Cost Management
124221+
x-unstable: |-
124222+
**Note**: This endpoint is in preview and is subject to change.
124223+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
123974124224
/api/v2/cost/budgets:
123975124225
get:
123976124226
description: List budgets.

docs/datadog_api_client.v2.model.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10532,6 +10532,69 @@ datadog\_api\_client.v2.model.custom\_destinations\_response module
1053210532
:members:
1053310533
:show-inheritance:
1053410534

10535+
datadog\_api\_client.v2.model.custom\_forecast\_entry module
10536+
------------------------------------------------------------
10537+
10538+
.. automodule:: datadog_api_client.v2.model.custom_forecast_entry
10539+
:members:
10540+
:show-inheritance:
10541+
10542+
datadog\_api\_client.v2.model.custom\_forecast\_entry\_tag\_filter module
10543+
-------------------------------------------------------------------------
10544+
10545+
.. automodule:: datadog_api_client.v2.model.custom_forecast_entry_tag_filter
10546+
:members:
10547+
:show-inheritance:
10548+
10549+
datadog\_api\_client.v2.model.custom\_forecast\_response module
10550+
---------------------------------------------------------------
10551+
10552+
.. automodule:: datadog_api_client.v2.model.custom_forecast_response
10553+
:members:
10554+
:show-inheritance:
10555+
10556+
datadog\_api\_client.v2.model.custom\_forecast\_response\_data module
10557+
---------------------------------------------------------------------
10558+
10559+
.. automodule:: datadog_api_client.v2.model.custom_forecast_response_data
10560+
:members:
10561+
:show-inheritance:
10562+
10563+
datadog\_api\_client.v2.model.custom\_forecast\_response\_data\_attributes module
10564+
---------------------------------------------------------------------------------
10565+
10566+
.. automodule:: datadog_api_client.v2.model.custom_forecast_response_data_attributes
10567+
:members:
10568+
:show-inheritance:
10569+
10570+
datadog\_api\_client.v2.model.custom\_forecast\_type module
10571+
-----------------------------------------------------------
10572+
10573+
.. automodule:: datadog_api_client.v2.model.custom_forecast_type
10574+
:members:
10575+
:show-inheritance:
10576+
10577+
datadog\_api\_client.v2.model.custom\_forecast\_upsert\_request module
10578+
----------------------------------------------------------------------
10579+
10580+
.. automodule:: datadog_api_client.v2.model.custom_forecast_upsert_request
10581+
:members:
10582+
:show-inheritance:
10583+
10584+
datadog\_api\_client.v2.model.custom\_forecast\_upsert\_request\_data module
10585+
----------------------------------------------------------------------------
10586+
10587+
.. automodule:: datadog_api_client.v2.model.custom_forecast_upsert_request_data
10588+
:members:
10589+
:show-inheritance:
10590+
10591+
datadog\_api\_client.v2.model.custom\_forecast\_upsert\_request\_data\_attributes module
10592+
----------------------------------------------------------------------------------------
10593+
10594+
.. automodule:: datadog_api_client.v2.model.custom_forecast_upsert_request_data_attributes
10595+
:members:
10596+
:show-inheritance:
10597+
1053510598
datadog\_api\_client.v2.model.custom\_framework\_control module
1053610599
---------------------------------------------------------------
1053710600

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Delete a budget's custom forecast returns "No Content" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["delete_custom_forecast"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = CloudCostManagementApi(api_client)
12+
api_instance.delete_custom_forecast(
13+
budget_id="budget_id",
14+
)

0 commit comments

Comments
 (0)