Skip to content

Commit 57d21fc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e77fb1a of spec repo
1 parent 2843963 commit 57d21fc

6 files changed

Lines changed: 29 additions & 10 deletions

File tree

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91855,7 +91855,7 @@ components:
9185591855
attributes:
9185691856
scope: ccm
9185791857
sort:
91858-
- expression: potential_daily_savings.amount
91858+
- expression: "@potential_daily_savings"
9185991859
order: DESC
9186091860
id: "@resource_table:aws_ec2_instance"
9186191861
type: recommendations_filter
@@ -91874,8 +91874,9 @@ components:
9187491874
$ref: "#/components/schemas/RecommendationsFilterRequestDataAttributes"
9187591875
id:
9187691876
description: |-
91877-
Filter expression applied to the recommendations. The server treats an omitted ID as `*`
91878-
and returns all recommendations.
91877+
Filter expression applied to the recommendations when `attributes.filter` is omitted.
91878+
When supplied, `attributes.filter` overrides this value, including when empty. If the
91879+
resulting filter is empty, it defaults to `*`. Scope, view, and pagination still apply.
9187991880
type: string
9188091881
type:
9188191882
$ref: "#/components/schemas/RecommendationsFilterRequestDataType"
@@ -91885,6 +91886,13 @@ components:
9188591886
RecommendationsFilterRequestDataAttributes:
9188691887
description: Attributes used to filter and sort cost recommendations.
9188791888
properties:
91889+
filter:
91890+
description: |-
91891+
Filter expression applied to the recommendations. When supplied, this attribute overrides
91892+
`data.id`, including when empty. When omitted, `data.id` is used. If the resulting filter
91893+
is empty, it defaults to `*`. Scope, view, and pagination still apply.
91894+
example: "@resource_table:aws_ec2_instance"
91895+
type: string
9188891896
scope:
9188991897
$ref: "#/components/schemas/RecommendationsFilterRequestScope"
9189091898
sort:
@@ -91920,7 +91928,7 @@ components:
9192091928
description: A single sort clause applied to the cost recommendations result set.
9192191929
properties:
9192291930
expression:
91923-
description: Field to sort by (for example, `potential_daily_savings.amount`).
91931+
description: Field to sort by (for example, `@potential_daily_savings`).
9192491932
type: string
9192591933
order:
9192691934
description: Sort direction, either `ASC` or `DESC`.
@@ -146525,7 +146533,7 @@ paths:
146525146533
attributes:
146526146534
scope: ccm
146527146535
sort:
146528-
- expression: potential_daily_savings.amount
146536+
- expression: "@potential_daily_savings"
146529146537
order: DESC
146530146538
id: "@resource_table:aws_ec2_instance"
146531146539
type: recommendations_filter

‎examples/v2/cloud-cost-management/SearchCostRecommendations.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
scope=RecommendationsFilterRequestScope.CCM,
2020
sort=[
2121
RecommendationsFilterRequestSortItems(
22-
expression="potential_daily_savings.amount",
22+
expression="@potential_daily_savings",
2323
order="DESC",
2424
),
2525
],

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ def __init__(
5858
:param attributes: Attributes used to filter and sort cost recommendations.
5959
:type attributes: RecommendationsFilterRequestDataAttributes, optional
6060
61-
:param id: Filter expression applied to the recommendations. The server treats an omitted ID as ``*``
62-
and returns all recommendations.
61+
:param id: Filter expression applied to the recommendations when ``attributes.filter`` is omitted.
62+
When supplied, ``attributes.filter`` overrides this value, including when empty. If the
63+
resulting filter is empty, it defaults to ``*``. Scope, view, and pagination still apply.
6364
:type id: str, optional
6465
6566
:param type: Legacy JSON:API resource type required by the cost recommendations search decoder.

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,22 @@ def openapi_types(_):
2929
)
3030

3131
return {
32+
"filter": (str,),
3233
"scope": (RecommendationsFilterRequestScope,),
3334
"sort": ([RecommendationsFilterRequestSortItems],),
3435
"view": (str,),
3536
}
3637

3738
attribute_map = {
39+
"filter": "filter",
3840
"scope": "scope",
3941
"sort": "sort",
4042
"view": "view",
4143
}
4244

4345
def __init__(
4446
self_,
47+
filter: Union[str, UnsetType] = unset,
4548
scope: Union[RecommendationsFilterRequestScope, UnsetType] = unset,
4649
sort: Union[List[RecommendationsFilterRequestSortItems], UnsetType] = unset,
4750
view: Union[str, UnsetType] = unset,
@@ -50,6 +53,11 @@ def __init__(
5053
"""
5154
Attributes used to filter and sort cost recommendations.
5255
56+
:param filter: Filter expression applied to the recommendations. When supplied, this attribute overrides
57+
``data.id`` , including when empty. When omitted, ``data.id`` is used. If the resulting filter
58+
is empty, it defaults to ``*``. Scope, view, and pagination still apply.
59+
:type filter: str, optional
60+
5361
:param scope: Recommendations scope. Defaults to ``ccm`` ; use ``experiment`` for experimental recommendations or ``*`` for both.
5462
:type scope: RecommendationsFilterRequestScope, optional
5563
@@ -59,6 +67,8 @@ def __init__(
5967
:param view: Active view name (for example, ``active`` , ``dismissed`` , ``open`` , ``in-progress`` , or ``completed`` ).
6068
:type view: str, optional
6169
"""
70+
if filter is not unset:
71+
kwargs["filter"] = filter
6272
if scope is not unset:
6373
kwargs["scope"] = scope
6474
if sort is not unset:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self_, expression: Union[str, UnsetType] = unset, order: Union[str,
3030
"""
3131
A single sort clause applied to the cost recommendations result set.
3232
33-
:param expression: Field to sort by (for example, ``potential_daily_savings.amount`` ).
33+
:param expression: Field to sort by (for example, ``@potential_daily_savings`` ).
3434
:type expression: str, optional
3535
3636
:param order: Sort direction, either ``ASC`` or ``DESC``.

‎tests/v2/features/cloud_cost_management.feature‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ Feature: Cloud Cost Management
974974
Scenario: Search cost recommendations returns "OK" response
975975
Given operation "SearchCostRecommendations" enabled
976976
And new "SearchCostRecommendations" request
977-
And body with value {"data": {"attributes": {"scope": "ccm", "sort": [{"expression": "potential_daily_savings.amount", "order": "DESC"}]}, "id": "@resource_table:aws_ec2_instance", "type": "recommendations_filter"}}
977+
And body with value {"data": {"attributes": {"scope": "ccm", "sort": [{"expression": "@potential_daily_savings", "order": "DESC"}]}, "id": "@resource_table:aws_ec2_instance", "type": "recommendations_filter"}}
978978
When the request is sent
979979
Then the response status is 200 OK
980980

0 commit comments

Comments
 (0)