Skip to content

Commit 1b1ff08

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cadf9ae of spec repo
1 parent cad8a33 commit 1b1ff08

2 files changed

Lines changed: 70 additions & 8 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134587,16 +134587,45 @@ paths:
134587134587
application/json:
134588134588
examples:
134589134589
default:
134590+
summary: CCM cost summary widget
134590134591
value:
134591134592
data:
134592134593
attributes:
134593134594
definition:
134594-
title: My Widget
134595-
type: bar_chart
134595+
graph_options:
134596+
- type: query_value
134597+
view: total
134598+
- type: query_value
134599+
view: change
134600+
- display_type: bars
134601+
type: timeseries
134602+
- type: cloud_cost_table
134603+
view: summary
134604+
requests:
134605+
- formulas:
134606+
- formula: query1
134607+
queries:
134608+
- data_source: cloud_cost
134609+
name: query1
134610+
query: sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, daily)
134611+
response_format: timeseries
134612+
time:
134613+
type: live
134614+
unit: day
134615+
value: 30
134616+
title: AWS spend by service (last 30 days)
134617+
type: cloud_cost_summary
134618+
tags: ["finops", "aws"]
134596134619
type: widgets
134597134620
schema:
134598134621
$ref: "#/components/schemas/CreateOrUpdateWidgetRequest"
134599-
description: Widget request body.
134622+
description: |-
134623+
Widget request body. The `definition` object's required fields vary
134624+
by `widget.definition.type`: every type requires `requests`, and
134625+
some types require additional fields (e.g. `cloud_cost_summary`
134626+
requires `graph_options`, `geomap` requires `style` and `view`).
134627+
The example below shows a complete `cloud_cost_summary` payload
134628+
for the `ccm_reports` experience type.
134600134629
required: true
134601134630
responses:
134602134631
"200":
@@ -134766,16 +134795,42 @@ paths:
134766134795
application/json:
134767134796
examples:
134768134797
default:
134798+
summary: CCM cost summary widget
134769134799
value:
134770134800
data:
134771134801
attributes:
134772134802
definition:
134773-
title: My Widget
134774-
type: bar_chart
134803+
graph_options:
134804+
- type: query_value
134805+
view: total
134806+
- type: query_value
134807+
view: change
134808+
- display_type: bars
134809+
type: timeseries
134810+
- type: cloud_cost_table
134811+
view: summary
134812+
requests:
134813+
- formulas:
134814+
- formula: query1
134815+
queries:
134816+
- data_source: cloud_cost
134817+
name: query1
134818+
query: sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, daily)
134819+
response_format: timeseries
134820+
time:
134821+
type: live
134822+
unit: day
134823+
value: 30
134824+
title: AWS spend by service (last 30 days)
134825+
type: cloud_cost_summary
134826+
tags: ["finops", "aws"]
134775134827
type: widgets
134776134828
schema:
134777134829
$ref: "#/components/schemas/CreateOrUpdateWidgetRequest"
134778-
description: Widget request body.
134830+
description: |-
134831+
Widget request body. The `definition` object's required fields vary
134832+
by `widget.definition.type`; see `CreateWidget` above for a complete
134833+
worked payload. Update is a full replacement of the widget definition.
134779134834
required: true
134780134835
responses:
134781134836
"200":

src/datadog_api_client/v2/api/widgets_api.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,12 @@ def create_widget(
227227
228228
:param experience_type: The experience type for the widget.
229229
:type experience_type: WidgetExperienceType
230-
:param body: Widget request body.
230+
:param body: Widget request body. The ``definition`` object's required fields vary
231+
by ``widget.definition.type`` : every type requires ``requests`` , and
232+
some types require additional fields (e.g. ``cloud_cost_summary``
233+
requires ``graph_options`` , ``geomap`` requires ``style`` and ``view`` ).
234+
The example below shows a complete ``cloud_cost_summary`` payload
235+
for the ``ccm_reports`` experience type.
231236
:type body: CreateOrUpdateWidgetRequest
232237
:rtype: WidgetResponse
233238
"""
@@ -363,7 +368,9 @@ def update_widget(
363368
:type experience_type: WidgetExperienceType
364369
:param uuid: The UUID of the widget.
365370
:type uuid: UUID
366-
:param body: Widget request body.
371+
:param body: Widget request body. The ``definition`` object's required fields vary
372+
by ``widget.definition.type`` ; see ``CreateWidget`` above for a complete
373+
worked payload. Update is a full replacement of the widget definition.
367374
:type body: CreateOrUpdateWidgetRequest
368375
:rtype: WidgetResponse
369376
"""

0 commit comments

Comments
 (0)