Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104026,7 +104026,9 @@ components:
$ref: "#/components/schemas/RecommendationsFilterRequestSortItems"
type: array
view:
description: Active view name (for example, `active`, `dismissed`, `open`, `in-progress`, or `completed`).
description: |-
Status view to return: `all`, `active` (not dismissed), `dismissed`, `open`, `in-progress`,
or `completed`. Defaults to `all`, which returns recommendations in every status.
type: string
type: object
RecommendationsFilterRequestDataType:
Expand All @@ -104039,7 +104041,9 @@ components:
x-enum-varnames:
- RECOMMENDATIONS_FILTER
RecommendationsFilterRequestScope:
description: Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations or `*` for both.
description: |-
Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations
or `*` for both.
enum:
- ccm
- experiment
Expand Down Expand Up @@ -104075,9 +104079,9 @@ components:
description: Opaque token used to fetch the next page; absent on the last page.
type: string
page_size:
description: Number of items returned in this page (1–10000).
description: Number of items returned in this page (1–5000).
format: int32
maximum: 10000
maximum: 5000
minimum: 1
type: integer
page_token:
Expand Down Expand Up @@ -161181,11 +161185,15 @@ paths:
description: List cost recommendations matching a filter, with pagination and sorting.
operationId: SearchCostRecommendations
parameters:
- description: Number of results per page (1–10000).
- description: Number of results per page, from 1 to 5000. Defaults to 50.
in: query
name: page[size]
schema:
type: string
default: 50
format: int32
maximum: 5000
minimum: 1
type: integer
- description: Pagination token from a previous response.
in: query
name: page[token]
Expand Down Expand Up @@ -161232,11 +161240,16 @@ paths:
meta:
page:
filter: "@resource_table:aws_ec2_instance"
next_page_token: ""
page_size: 100
schema:
$ref: "#/components/schemas/CostRecommendationArray"
description: OK
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
Expand All @@ -161247,6 +161260,10 @@ paths:
summary: Search cost recommendations
tags:
- Cloud Cost Management
x-permission:
operator: OR
permissions:
- cloud_cost_management_read
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11427,16 +11427,17 @@ public CompletableFuture<ApiResponse<Void>> reorderTagPipelinesRulesetsWithHttpI

/** Manage optional parameters to searchCostRecommendations. */
public static class SearchCostRecommendationsOptionalParameters {
private String pageSize;
private Integer pageSize;
private String pageToken;

/**
* Set pageSize.
*
* @param pageSize Number of results per page (1–10000). (optional)
* @param pageSize Number of results per page, from 1 to 5000. Defaults to 50. (optional,
* default to 50)
* @return SearchCostRecommendationsOptionalParameters
*/
public SearchCostRecommendationsOptionalParameters pageSize(String pageSize) {
public SearchCostRecommendationsOptionalParameters pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
Expand Down Expand Up @@ -11533,6 +11534,7 @@ public CompletableFuture<CostRecommendationArray> searchCostRecommendationsAsync
* <caption>Response details</caption>
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
Expand All @@ -11553,7 +11555,7 @@ public ApiResponse<CostRecommendationArray> searchCostRecommendationsWithHttpInf
throw new ApiException(
400, "Missing the required parameter 'body' when calling searchCostRecommendations");
}
String pageSize = parameters.pageSize;
Integer pageSize = parameters.pageSize;
String pageToken = parameters.pageToken;
// create path and map variables
String localVarPath = "/api/v2/cost/recommendations";
Expand Down Expand Up @@ -11617,7 +11619,7 @@ public ApiResponse<CostRecommendationArray> searchCostRecommendationsWithHttpInf
400, "Missing the required parameter 'body' when calling searchCostRecommendations"));
return result;
}
String pageSize = parameters.pageSize;
Integer pageSize = parameters.pageSize;
String pageToken = parameters.pageToken;
// create path and map variables
String localVarPath = "/api/v2/cost/recommendations";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ public RecommendationsFilterRequestDataAttributes view(String view) {
}

/**
* Active view name (for example, <code>active</code>, <code>dismissed</code>, <code>open</code>,
* <code>in-progress</code>, or <code>completed</code>).
* Status view to return: <code>all</code>, <code>active</code> (not dismissed), <code>dismissed
* </code>, <code>open</code>, <code>in-progress</code>, or <code>completed</code>. Defaults to
* <code>all</code>, which returns recommendations in every status.
*
* @return view
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public RecommendationsPageMetaPage pageSize(Integer pageSize) {
}

/**
* Number of items returned in this page (1–10000). minimum: 1 maximum: 10000
* Number of items returned in this page (1–5000). minimum: 1 maximum: 5000
*
* @return pageSize
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,14 @@ Feature: Cloud Cost Management
When the request is sent
Then the response status is 204 Successfully reordered rulesets

@generated @skip @team:ddoghq/ccm-optimize
Scenario: Search cost recommendations returns "Bad Request" response
Given operation "SearchCostRecommendations" enabled
And new "SearchCostRecommendations" request
And body with value {"data": {"attributes": {"scope": "ccm", "sort": [{"expression": "@potential_daily_savings", "order": "DESC"}]}, "id": "@resource_table:aws_ec2_instance", "type": "recommendations_filter"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/ccm-optimize
Scenario: Search cost recommendations returns "OK" response
Given operation "SearchCostRecommendations" enabled
Expand Down
Loading