Skip to content

Commit c94cf3d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 0e116ca of spec repo (#4046)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent a839a86 commit c94cf3d

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
@@ -93479,7 +93479,7 @@ components:
9347993479
attributes:
9348093480
scope: ccm
9348193481
sort:
93482-
- expression: potential_daily_savings.amount
93482+
- expression: "@potential_daily_savings"
9348393483
order: DESC
9348493484
id: "@resource_table:aws_ec2_instance"
9348593485
type: recommendations_filter
@@ -93498,8 +93498,9 @@ components:
9349893498
$ref: "#/components/schemas/RecommendationsFilterRequestDataAttributes"
9349993499
id:
9350093500
description: |-
93501-
Filter expression applied to the recommendations. The server treats an omitted ID as `*`
93502-
and returns all recommendations.
93501+
Filter expression applied to the recommendations when `attributes.filter` is omitted.
93502+
When supplied, `attributes.filter` overrides this value, including when empty. If the
93503+
resulting filter is empty, it defaults to `*`. Scope, view, and pagination still apply.
9350393504
type: string
9350493505
type:
9350593506
$ref: "#/components/schemas/RecommendationsFilterRequestDataType"
@@ -93509,6 +93510,13 @@ components:
9350993510
RecommendationsFilterRequestDataAttributes:
9351093511
description: Attributes used to filter and sort cost recommendations.
9351193512
properties:
93513+
filter:
93514+
description: |-
93515+
Filter expression applied to the recommendations. When supplied, this attribute overrides
93516+
`data.id`, including when empty. When omitted, `data.id` is used. If the resulting filter
93517+
is empty, it defaults to `*`. Scope, view, and pagination still apply.
93518+
example: "@resource_table:aws_ec2_instance"
93519+
type: string
9351293520
scope:
9351393521
$ref: "#/components/schemas/RecommendationsFilterRequestScope"
9351493522
sort:
@@ -93544,7 +93552,7 @@ components:
9354493552
description: A single sort clause applied to the cost recommendations result set.
9354593553
properties:
9354693554
expression:
93547-
description: Field to sort by (for example, `potential_daily_savings.amount`).
93555+
description: Field to sort by (for example, `@potential_daily_savings`).
9354893556
type: string
9354993557
order:
9355093558
description: Sort direction, either `ASC` or `DESC`.
@@ -148373,7 +148381,7 @@ paths:
148373148381
attributes:
148374148382
scope: ccm
148375148383
sort:
148376-
- expression: potential_daily_savings.amount
148384+
- expression: "@potential_daily_savings"
148377148385
order: DESC
148378148386
id: "@resource_table:aws_ec2_instance"
148379148387
type: recommendations_filter

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

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

‎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)