Skip to content

Commit b3b0106

Browse files
dd-octo-sts[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 0b31819 of spec repo (#4239)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3da63d7 commit b3b0106

6 files changed

Lines changed: 48 additions & 16 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104034,7 +104034,9 @@ components:
104034104034
$ref: "#/components/schemas/RecommendationsFilterRequestSortItems"
104035104035
type: array
104036104036
view:
104037-
description: Active view name (for example, `active`, `dismissed`, `open`, `in-progress`, or `completed`).
104037+
description: |-
104038+
Status view to return: `all`, `active` (not dismissed), `dismissed`, `open`, `in-progress`,
104039+
or `completed`. Defaults to `all`, which returns recommendations in every status.
104038104040
type: string
104039104041
type: object
104040104042
RecommendationsFilterRequestDataType:
@@ -104047,7 +104049,9 @@ components:
104047104049
x-enum-varnames:
104048104050
- RECOMMENDATIONS_FILTER
104049104051
RecommendationsFilterRequestScope:
104050-
description: Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations or `*` for both.
104052+
description: |-
104053+
Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations
104054+
or `*` for both.
104051104055
enum:
104052104056
- ccm
104053104057
- experiment
@@ -104083,9 +104087,9 @@ components:
104083104087
description: Opaque token used to fetch the next page; absent on the last page.
104084104088
type: string
104085104089
page_size:
104086-
description: Number of items returned in this page (1–10000).
104090+
description: Number of items returned in this page (1–5000).
104087104091
format: int32
104088-
maximum: 10000
104092+
maximum: 5000
104089104093
minimum: 1
104090104094
type: integer
104091104095
page_token:
@@ -161228,11 +161232,15 @@ paths:
161228161232
description: List cost recommendations matching a filter, with pagination and sorting.
161229161233
operationId: SearchCostRecommendations
161230161234
parameters:
161231-
- description: Number of results per page (1–10000).
161235+
- description: Number of results per page, from 1 to 5000. Defaults to 50.
161232161236
in: query
161233161237
name: page[size]
161234161238
schema:
161235-
type: string
161239+
default: 50
161240+
format: int32
161241+
maximum: 5000
161242+
minimum: 1
161243+
type: integer
161236161244
- description: Pagination token from a previous response.
161237161245
in: query
161238161246
name: page[token]
@@ -161279,11 +161287,16 @@ paths:
161279161287
meta:
161280161288
page:
161281161289
filter: "@resource_table:aws_ec2_instance"
161282-
next_page_token: ""
161283161290
page_size: 100
161284161291
schema:
161285161292
$ref: "#/components/schemas/CostRecommendationArray"
161286161293
description: OK
161294+
"400":
161295+
content:
161296+
application/json:
161297+
schema:
161298+
$ref: "#/components/schemas/JSONAPIErrorResponse"
161299+
description: Bad Request
161287161300
"429":
161288161301
$ref: "#/components/responses/TooManyRequestsResponse"
161289161302
security:
@@ -161294,6 +161307,10 @@ paths:
161294161307
summary: Search cost recommendations
161295161308
tags:
161296161309
- Cloud Cost Management
161310+
x-permission:
161311+
operator: OR
161312+
permissions:
161313+
- cloud_cost_management_read
161297161314
x-unstable: |-
161298161315
**Note**: This endpoint is in preview and is subject to change.
161299161316
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).

‎src/datadog_api_client/v2/api/cloud_cost_management_api.py‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,11 @@ def __init__(self, api_client=None):
18361836
},
18371837
params_map={
18381838
"page_size": {
1839-
"openapi_types": (str,),
1839+
"validation": {
1840+
"inclusive_maximum": 5000,
1841+
"inclusive_minimum": 1,
1842+
},
1843+
"openapi_types": (int,),
18401844
"attribute": "page[size]",
18411845
"location": "query",
18421846
},
@@ -3653,16 +3657,16 @@ def search_cost_recommendations(
36533657
self,
36543658
body: RecommendationsFilterRequest,
36553659
*,
3656-
page_size: Union[str, UnsetType] = unset,
3660+
page_size: Union[int, UnsetType] = unset,
36573661
page_token: Union[str, UnsetType] = unset,
36583662
) -> CostRecommendationArray:
36593663
"""Search cost recommendations.
36603664
36613665
List cost recommendations matching a filter, with pagination and sorting.
36623666
36633667
:type body: RecommendationsFilterRequest
3664-
:param page_size: Number of results per page (1–10000).
3665-
:type page_size: str, optional
3668+
:param page_size: Number of results per page, from 1 to 5000. Defaults to 50.
3669+
:type page_size: int, optional
36663670
:param page_token: Pagination token from a previous response.
36673671
:type page_token: str, optional
36683672
:rtype: CostRecommendationArray

‎src/datadog_api_client/v2/model/recommendations_filter_request_data_attributes.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ def __init__(
5858
is empty, it defaults to ``*``. Scope, view, and pagination still apply.
5959
:type filter: str, optional
6060
61-
:param scope: Recommendations scope. Defaults to ``ccm`` ; use ``experiment`` for experimental recommendations or ``*`` for both.
61+
:param scope: Recommendations scope. Defaults to ``ccm`` ; use ``experiment`` for experimental recommendations
62+
or ``*`` for both.
6263
:type scope: RecommendationsFilterRequestScope, optional
6364
6465
:param sort: Ordered list of sort clauses applied to the result set.
6566
:type sort: [RecommendationsFilterRequestSortItems], optional
6667
67-
:param view: Active view name (for example, ``active`` , ``dismissed`` , ``open`` , ``in-progress`` , or ``completed`` ).
68+
:param view: Status view to return: ``all`` , ``active`` (not dismissed), ``dismissed`` , ``open`` , ``in-progress`` ,
69+
or ``completed``. Defaults to ``all`` , which returns recommendations in every status.
6870
:type view: str, optional
6971
"""
7072
if filter is not unset:

‎src/datadog_api_client/v2/model/recommendations_filter_request_scope.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
class RecommendationsFilterRequestScope(ModelSimple):
1616
"""
17-
Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations or `*` for both.
17+
Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations
18+
or `*` for both.
1819
1920
:param value: Must be one of ["ccm", "experiment", "*"].
2021
:type value: str

‎src/datadog_api_client/v2/model/recommendations_page_meta_page.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class RecommendationsPageMetaPage(ModelNormal):
1717
validations = {
1818
"page_size": {
19-
"inclusive_maximum": 10000,
19+
"inclusive_maximum": 5000,
2020
"inclusive_minimum": 1,
2121
},
2222
}
@@ -54,7 +54,7 @@ def __init__(
5454
:param next_page_token: Opaque token used to fetch the next page; absent on the last page.
5555
:type next_page_token: str, optional
5656
57-
:param page_size: Number of items returned in this page (1–10000).
57+
:param page_size: Number of items returned in this page (1–5000).
5858
:type page_size: int, optional
5959
6060
:param page_token: Pagination token echoed back from the request.

‎tests/v2/features/cloud_cost_management.feature‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,14 @@ Feature: Cloud Cost Management
10201020
When the request is sent
10211021
Then the response status is 204 Successfully reordered rulesets
10221022

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

0 commit comments

Comments
 (0)