Skip to content

Commit 7f6b3e2

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c1438fd6 of spec repo
1 parent ad4c6de commit 7f6b3e2

30 files changed

+1245
-4
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-04-24 15:56:56.654944",
8-
"spec_repo_commit": "d2685952"
7+
"regenerated": "2025-04-28 09:04:31.388659",
8+
"spec_repo_commit": "c1438fd6"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-24 15:56:56.669858",
13-
"spec_repo_commit": "d2685952"
12+
"regenerated": "2025-04-28 09:04:31.404122",
13+
"spec_repo_commit": "c1438fd6"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+247
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ components:
186186
required: true
187187
schema:
188188
type: string
189+
BudgetID:
190+
description: Budget id.
191+
in: path
192+
name: budget_id
193+
required: true
194+
schema:
195+
type: string
189196
CaseIDPathParameter:
190197
description: Case's UUID or key
191198
example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de504
@@ -4664,6 +4671,135 @@ components:
46644671
data:
46654672
$ref: '#/components/schemas/BillingDimensionsMappingBody'
46664673
type: object
4674+
Budget:
4675+
description: A budget.
4676+
properties:
4677+
attributes:
4678+
$ref: '#/components/schemas/BudgetAttributes'
4679+
id:
4680+
description: The id of the budget.
4681+
type: string
4682+
type:
4683+
description: The type of the object, must be `budget`.
4684+
type: string
4685+
type: object
4686+
BudgetArray:
4687+
description: An array of budgets.
4688+
example:
4689+
data:
4690+
- attributes:
4691+
created_at: 1741011342772
4692+
created_by: user1
4693+
end_month: 202502
4694+
metrics_query: aws.cost.amortized{service:ec2} by {service}
4695+
name: my budget
4696+
org_id: 123
4697+
start_month: 202501
4698+
total_amount: 1000
4699+
updated_at: 1741011342772
4700+
updated_by: user2
4701+
id: 00000000-0a0a-0a0a-aaa0-00000000000a
4702+
type: budget
4703+
properties:
4704+
data:
4705+
description: The `BudgetArray` `data`.
4706+
items:
4707+
$ref: '#/components/schemas/Budget'
4708+
type: array
4709+
type: object
4710+
BudgetAttributes:
4711+
description: The attributes of a budget.
4712+
properties:
4713+
created_at:
4714+
description: The timestamp when the budget was created.
4715+
example: 1738258683590
4716+
format: int64
4717+
type: integer
4718+
created_by:
4719+
description: The id of the user that created the budget.
4720+
example: 00000000-0a0a-0a0a-aaa0-00000000000a
4721+
type: string
4722+
end_month:
4723+
description: The month when the budget ends.
4724+
example: 202502
4725+
format: int64
4726+
type: integer
4727+
entries:
4728+
description: The entries of the budget.
4729+
items:
4730+
$ref: '#/components/schemas/BudgetEntry'
4731+
type: array
4732+
metrics_query:
4733+
description: The cost query used to track against the budget.
4734+
example: aws.cost.amortized{service:ec2} by {service}
4735+
type: string
4736+
name:
4737+
description: The name of the budget.
4738+
example: my budget
4739+
type: string
4740+
org_id:
4741+
description: The id of the org the budget belongs to.
4742+
example: 123
4743+
format: int64
4744+
type: integer
4745+
start_month:
4746+
description: The month when the budget starts.
4747+
example: 202501
4748+
format: int64
4749+
type: integer
4750+
total_amount:
4751+
description: The sum of all budget entries' amounts.
4752+
example: 1000
4753+
format: double
4754+
type: number
4755+
updated_at:
4756+
description: The timestamp when the budget was last updated.
4757+
example: 1738258683590
4758+
format: int64
4759+
type: integer
4760+
updated_by:
4761+
description: The id of the user that created the budget.
4762+
example: 00000000-0a0a-0a0a-aaa0-00000000000a
4763+
type: string
4764+
type: object
4765+
BudgetEntry:
4766+
description: The entry of a budget.
4767+
properties:
4768+
amount:
4769+
description: The `amount` of the budget entry.
4770+
example: 500
4771+
format: double
4772+
type: number
4773+
month:
4774+
description: The `month` of the budget entry.
4775+
example: 202501
4776+
format: int64
4777+
type: integer
4778+
tag_filters:
4779+
description: The `BudgetEntry` `tag_filters`.
4780+
items:
4781+
$ref: '#/components/schemas/TagFilter'
4782+
type: array
4783+
type: object
4784+
BudgetWithEntries:
4785+
description: The definition of the `BudgetWithEntries` object.
4786+
properties:
4787+
data:
4788+
$ref: '#/components/schemas/BudgetWithEntriesData'
4789+
type: object
4790+
BudgetWithEntriesData:
4791+
description: A budget and all its entries.
4792+
properties:
4793+
attributes:
4794+
$ref: '#/components/schemas/BudgetAttributes'
4795+
id:
4796+
description: The `BudgetWithEntriesData` `id`.
4797+
example: 00000000-0a0a-0a0a-aaa0-00000000000a
4798+
type: string
4799+
type:
4800+
description: The type of the object, must be `budget`.
4801+
type: string
4802+
type: object
46674803
BulkMuteFindingsRequest:
46684804
description: The new bulk mute finding request.
46694805
properties:
@@ -34059,6 +34195,18 @@ components:
3405934195
format: double
3406034196
type: number
3406134197
type: object
34198+
TagFilter:
34199+
description: Tag filter for the budget's entries.
34200+
properties:
34201+
tag_key:
34202+
description: The key of the tag.
34203+
example: service
34204+
type: string
34205+
tag_value:
34206+
description: The value of the tag.
34207+
example: ec2
34208+
type: string
34209+
type: object
3406234210
TagsEventAttribute:
3406334211
description: Array of tags associated with your event.
3406434212
example:
@@ -40412,6 +40560,105 @@ paths:
4041240560
operator: OR
4041340561
permissions:
4041440562
- cloud_cost_management_write
40563+
/api/v2/cost/budget:
40564+
put:
40565+
description: Create a new budget or update an existing one.
40566+
operationId: UpsertBudget
40567+
requestBody:
40568+
content:
40569+
application/json:
40570+
schema:
40571+
$ref: '#/components/schemas/BudgetWithEntries'
40572+
required: true
40573+
responses:
40574+
'200':
40575+
content:
40576+
application/json:
40577+
schema:
40578+
$ref: '#/components/schemas/BudgetWithEntries'
40579+
description: OK
40580+
'400':
40581+
$ref: '#/components/responses/BadRequestResponse'
40582+
'404':
40583+
$ref: '#/components/responses/NotFoundResponse'
40584+
'429':
40585+
$ref: '#/components/responses/TooManyRequestsResponse'
40586+
security:
40587+
- apiKeyAuth: []
40588+
appKeyAuth: []
40589+
- AuthZ:
40590+
- cloud_cost_management_write
40591+
summary: Update if exists, or create a new budget
40592+
tags:
40593+
- Cloud Cost Management
40594+
/api/v2/cost/budget/{budget_id}:
40595+
delete:
40596+
description: Delete a budget.
40597+
operationId: DeleteBudget
40598+
parameters:
40599+
- $ref: '#/components/parameters/BudgetID'
40600+
responses:
40601+
'204':
40602+
description: No Content
40603+
'400':
40604+
$ref: '#/components/responses/BadRequestResponse'
40605+
'429':
40606+
$ref: '#/components/responses/TooManyRequestsResponse'
40607+
security:
40608+
- apiKeyAuth: []
40609+
appKeyAuth: []
40610+
- AuthZ:
40611+
- cloud_cost_management_write
40612+
summary: Delete a budget
40613+
tags:
40614+
- Cloud Cost Management
40615+
get:
40616+
description: Get a budget.
40617+
operationId: GetBudget
40618+
parameters:
40619+
- $ref: '#/components/parameters/BudgetID'
40620+
responses:
40621+
'200':
40622+
content:
40623+
application/json:
40624+
schema:
40625+
$ref: '#/components/schemas/BudgetWithEntries'
40626+
description: OK
40627+
'400':
40628+
$ref: '#/components/responses/BadRequestResponse'
40629+
'404':
40630+
$ref: '#/components/responses/NotFoundResponse'
40631+
'429':
40632+
$ref: '#/components/responses/TooManyRequestsResponse'
40633+
security:
40634+
- apiKeyAuth: []
40635+
appKeyAuth: []
40636+
- AuthZ:
40637+
- cloud_cost_management_read
40638+
summary: Get a budget
40639+
tags:
40640+
- Cloud Cost Management
40641+
/api/v2/cost/budgets:
40642+
get:
40643+
description: List budgets.
40644+
operationId: ListBudgets
40645+
responses:
40646+
'200':
40647+
content:
40648+
application/json:
40649+
schema:
40650+
$ref: '#/components/schemas/BudgetArray'
40651+
description: OK
40652+
'429':
40653+
$ref: '#/components/responses/TooManyRequestsResponse'
40654+
security:
40655+
- apiKeyAuth: []
40656+
appKeyAuth: []
40657+
- AuthZ:
40658+
- cloud_cost_management_read
40659+
summary: List budgets
40660+
tags:
40661+
- Cloud Cost Management
4041540662
/api/v2/cost/custom_costs:
4041640663
get:
4041740664
description: List the Custom Costs files.

docs/datadog_api_client.v2.model.rst

+49
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,48 @@ datadog\_api\_client.v2.model.billing\_dimensions\_mapping\_response module
17821782
:members:
17831783
:show-inheritance:
17841784

1785+
datadog\_api\_client.v2.model.budget module
1786+
-------------------------------------------
1787+
1788+
.. automodule:: datadog_api_client.v2.model.budget
1789+
:members:
1790+
:show-inheritance:
1791+
1792+
datadog\_api\_client.v2.model.budget\_array module
1793+
--------------------------------------------------
1794+
1795+
.. automodule:: datadog_api_client.v2.model.budget_array
1796+
:members:
1797+
:show-inheritance:
1798+
1799+
datadog\_api\_client.v2.model.budget\_attributes module
1800+
-------------------------------------------------------
1801+
1802+
.. automodule:: datadog_api_client.v2.model.budget_attributes
1803+
:members:
1804+
:show-inheritance:
1805+
1806+
datadog\_api\_client.v2.model.budget\_entry module
1807+
--------------------------------------------------
1808+
1809+
.. automodule:: datadog_api_client.v2.model.budget_entry
1810+
:members:
1811+
:show-inheritance:
1812+
1813+
datadog\_api\_client.v2.model.budget\_with\_entries module
1814+
----------------------------------------------------------
1815+
1816+
.. automodule:: datadog_api_client.v2.model.budget_with_entries
1817+
:members:
1818+
:show-inheritance:
1819+
1820+
datadog\_api\_client.v2.model.budget\_with\_entries\_data module
1821+
----------------------------------------------------------------
1822+
1823+
.. automodule:: datadog_api_client.v2.model.budget_with_entries_data
1824+
:members:
1825+
:show-inheritance:
1826+
17851827
datadog\_api\_client.v2.model.bulk\_mute\_findings\_request module
17861828
------------------------------------------------------------------
17871829

@@ -14893,6 +14935,13 @@ datadog\_api\_client.v2.model.step\_display\_bounds module
1489314935
:members:
1489414936
:show-inheritance:
1489514937

14938+
datadog\_api\_client.v2.model.tag\_filter module
14939+
------------------------------------------------
14940+
14941+
.. automodule:: datadog_api_client.v2.model.tag_filter
14942+
:members:
14943+
:show-inheritance:
14944+
1489614945
datadog\_api\_client.v2.model.tags\_event\_attribute module
1489714946
-----------------------------------------------------------
1489814947

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Delete a budget 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+
with ApiClient(configuration) as api_client:
10+
api_instance = CloudCostManagementApi(api_client)
11+
api_instance.delete_budget(
12+
budget_id="budget_id",
13+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Get a budget returns "OK" 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+
with ApiClient(configuration) as api_client:
10+
api_instance = CloudCostManagementApi(api_client)
11+
response = api_instance.get_budget(
12+
budget_id="budget_id",
13+
)
14+
15+
print(response)

0 commit comments

Comments
 (0)