Skip to content

Commit 1793a99

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5a9eb98 of spec repo
1 parent 0b32005 commit 1793a99

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
@@ -134534,16 +134534,45 @@ paths:
134534134534
application/json:
134535134535
examples:
134536134536
default:
134537+
summary: CCM cost summary widget
134537134538
value:
134538134539
data:
134539134540
attributes:
134540134541
definition:
134541-
title: My Widget
134542-
type: bar_chart
134542+
graph_options:
134543+
- type: query_value
134544+
view: total
134545+
- type: query_value
134546+
view: change
134547+
- display_type: bars
134548+
type: timeseries
134549+
- type: cloud_cost_table
134550+
view: summary
134551+
requests:
134552+
- formulas:
134553+
- formula: query1
134554+
queries:
134555+
- data_source: cloud_cost
134556+
name: query1
134557+
query: sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, daily)
134558+
response_format: timeseries
134559+
time:
134560+
type: live
134561+
unit: day
134562+
value: 30
134563+
title: AWS spend by service (last 30 days)
134564+
type: cloud_cost_summary
134565+
tags: ["finops", "aws"]
134543134566
type: widgets
134544134567
schema:
134545134568
$ref: "#/components/schemas/CreateOrUpdateWidgetRequest"
134546-
description: Widget request body.
134569+
description: |-
134570+
Widget request body. The `definition` object's required fields vary
134571+
by `widget.definition.type`: every type requires `requests`, and
134572+
some types require additional fields (e.g. `cloud_cost_summary`
134573+
requires `graph_options`, `geomap` requires `style` and `view`).
134574+
The example below shows a complete `cloud_cost_summary` payload
134575+
for the `ccm_reports` experience type.
134547134576
required: true
134548134577
responses:
134549134578
"200":
@@ -134713,16 +134742,42 @@ paths:
134713134742
application/json:
134714134743
examples:
134715134744
default:
134745+
summary: CCM cost summary widget
134716134746
value:
134717134747
data:
134718134748
attributes:
134719134749
definition:
134720-
title: My Widget
134721-
type: bar_chart
134750+
graph_options:
134751+
- type: query_value
134752+
view: total
134753+
- type: query_value
134754+
view: change
134755+
- display_type: bars
134756+
type: timeseries
134757+
- type: cloud_cost_table
134758+
view: summary
134759+
requests:
134760+
- formulas:
134761+
- formula: query1
134762+
queries:
134763+
- data_source: cloud_cost
134764+
name: query1
134765+
query: sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, daily)
134766+
response_format: timeseries
134767+
time:
134768+
type: live
134769+
unit: day
134770+
value: 30
134771+
title: AWS spend by service (last 30 days)
134772+
type: cloud_cost_summary
134773+
tags: ["finops", "aws"]
134722134774
type: widgets
134723134775
schema:
134724134776
$ref: "#/components/schemas/CreateOrUpdateWidgetRequest"
134725-
description: Widget request body.
134777+
description: |-
134778+
Widget request body. The `definition` object's required fields vary
134779+
by `widget.definition.type`; see `CreateWidget` above for a complete
134780+
worked payload. Update is a full replacement of the widget definition.
134726134781
required: true
134727134782
responses:
134728134783
"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)