diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 95a832b986b..47f19e6b4c4 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -134587,16 +134587,45 @@ paths: application/json: examples: default: + summary: CCM cost summary widget value: data: attributes: definition: - title: My Widget - type: bar_chart + graph_options: + - type: query_value + view: total + - type: query_value + view: change + - display_type: bars + type: timeseries + - type: cloud_cost_table + view: summary + requests: + - formulas: + - formula: query1 + queries: + - data_source: cloud_cost + name: query1 + query: sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, daily) + response_format: timeseries + time: + type: live + unit: day + value: 30 + title: AWS spend by service (last 30 days) + type: cloud_cost_summary + tags: ["finops", "aws"] type: widgets schema: $ref: "#/components/schemas/CreateOrUpdateWidgetRequest" - description: Widget request body. + description: |- + Widget request body. The `definition` object's required fields vary + by `widget.definition.type`: every type requires `requests`, and + some types require additional fields (e.g. `cloud_cost_summary` + requires `graph_options`, `geomap` requires `style` and `view`). + The example below shows a complete `cloud_cost_summary` payload + for the `ccm_reports` experience type. required: true responses: "200": @@ -134766,16 +134795,42 @@ paths: application/json: examples: default: + summary: CCM cost summary widget value: data: attributes: definition: - title: My Widget - type: bar_chart + graph_options: + - type: query_value + view: total + - type: query_value + view: change + - display_type: bars + type: timeseries + - type: cloud_cost_table + view: summary + requests: + - formulas: + - formula: query1 + queries: + - data_source: cloud_cost + name: query1 + query: sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, daily) + response_format: timeseries + time: + type: live + unit: day + value: 30 + title: AWS spend by service (last 30 days) + type: cloud_cost_summary + tags: ["finops", "aws"] type: widgets schema: $ref: "#/components/schemas/CreateOrUpdateWidgetRequest" - description: Widget request body. + description: |- + Widget request body. The `definition` object's required fields vary + by `widget.definition.type`; see `CreateWidget` above for a complete + worked payload. Update is a full replacement of the widget definition. required: true responses: "200": diff --git a/src/main/java/com/datadog/api/client/v2/api/WidgetsApi.java b/src/main/java/com/datadog/api/client/v2/api/WidgetsApi.java index dc28ab77bf1..151b1205376 100644 --- a/src/main/java/com/datadog/api/client/v2/api/WidgetsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/WidgetsApi.java @@ -55,7 +55,12 @@ public void setApiClient(ApiClient apiClient) { *

See {@link #createWidgetWithHttpInfo}. * * @param experienceType The experience type for the widget. (required) - * @param body Widget request body. (required) + * @param body Widget request body. The definition object's required fields vary by + * widget.definition.type: every type requires requests, and some + * types require additional fields (e.g. cloud_cost_summary requires + * graph_options, geomap requires style and view + * ). The example below shows a complete cloud_cost_summary payload for the + * ccm_reports experience type. (required) * @return WidgetResponse * @throws ApiException if fails to make API call */ @@ -70,7 +75,12 @@ public WidgetResponse createWidget( *

See {@link #createWidgetWithHttpInfoAsync}. * * @param experienceType The experience type for the widget. (required) - * @param body Widget request body. (required) + * @param body Widget request body. The definition object's required fields vary by + * widget.definition.type: every type requires requests, and some + * types require additional fields (e.g. cloud_cost_summary requires + * graph_options, geomap requires style and view + * ). The example below shows a complete cloud_cost_summary payload for the + * ccm_reports experience type. (required) * @return CompletableFuture<WidgetResponse> */ public CompletableFuture createWidgetAsync( @@ -86,7 +96,12 @@ public CompletableFuture createWidgetAsync( * Create a new widget for a given experience type. * * @param experienceType The experience type for the widget. (required) - * @param body Widget request body. (required) + * @param body Widget request body. The definition object's required fields vary by + * widget.definition.type: every type requires requests, and some + * types require additional fields (e.g. cloud_cost_summary requires + * graph_options, geomap requires style and view + * ). The example below shows a complete cloud_cost_summary payload for the + * ccm_reports experience type. (required) * @return ApiResponse<WidgetResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -149,7 +164,12 @@ public ApiResponse createWidgetWithHttpInfo( *

See {@link #createWidgetWithHttpInfo}. * * @param experienceType The experience type for the widget. (required) - * @param body Widget request body. (required) + * @param body Widget request body. The definition object's required fields vary by + * widget.definition.type: every type requires requests, and some + * types require additional fields (e.g. cloud_cost_summary requires + * graph_options, geomap requires style and view + * ). The example below shows a complete cloud_cost_summary payload for the + * ccm_reports experience type. (required) * @return CompletableFuture<ApiResponse<WidgetResponse>> */ public CompletableFuture> createWidgetWithHttpInfoAsync( @@ -859,7 +879,9 @@ public CompletableFuture> searchWidgetsWithHttpI * * @param experienceType The experience type for the widget. (required) * @param uuid The UUID of the widget. (required) - * @param body Widget request body. (required) + * @param body Widget request body. The definition object's required fields vary by + * widget.definition.type; see CreateWidget above for a complete + * worked payload. Update is a full replacement of the widget definition. (required) * @return WidgetResponse * @throws ApiException if fails to make API call */ @@ -876,7 +898,9 @@ public WidgetResponse updateWidget( * * @param experienceType The experience type for the widget. (required) * @param uuid The UUID of the widget. (required) - * @param body Widget request body. (required) + * @param body Widget request body. The definition object's required fields vary by + * widget.definition.type; see CreateWidget above for a complete + * worked payload. Update is a full replacement of the widget definition. (required) * @return CompletableFuture<WidgetResponse> */ public CompletableFuture updateWidgetAsync( @@ -894,7 +918,9 @@ public CompletableFuture updateWidgetAsync( * * @param experienceType The experience type for the widget. (required) * @param uuid The UUID of the widget. (required) - * @param body Widget request body. (required) + * @param body Widget request body. The definition object's required fields vary by + * widget.definition.type; see CreateWidget above for a complete + * worked payload. Update is a full replacement of the widget definition. (required) * @return ApiResponse<WidgetResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -967,7 +993,9 @@ public ApiResponse updateWidgetWithHttpInfo( * * @param experienceType The experience type for the widget. (required) * @param uuid The UUID of the widget. (required) - * @param body Widget request body. (required) + * @param body Widget request body. The definition object's required fields vary by + * widget.definition.type; see CreateWidget above for a complete + * worked payload. Update is a full replacement of the widget definition. (required) * @return CompletableFuture<ApiResponse<WidgetResponse>> */ public CompletableFuture> updateWidgetWithHttpInfoAsync(