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
9 changes: 0 additions & 9 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38007,15 +38007,6 @@ paths:
schema:
format: int64
type: integer
- description: |-
Whether to return only deleted service level objective objects.
example: true
in: query
name: is_deleted
required: false
schema:
default: false
type: boolean
responses:
"200":
content:
Expand Down
9 changes: 7 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168213,7 +168213,12 @@ paths:
permissions:
- metric_tags_write
get:
description: Returns the tag configuration for the given metric name.
description: |-
Returns the tag configuration for the given metric name.

A metric may exist and submit data without having a tag configuration. If no tag configuration exists
for the metric, this endpoint returns `404 Not Found`. This response does not indicate that the metric
itself is missing.
operationId: ListTagConfigurationByName
parameters:
- $ref: "#/components/parameters/MetricName"
Expand Down Expand Up @@ -168246,7 +168251,7 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Not Found
description: No tag configuration exists for the metric
"429":
content:
application/json:
Expand Down
17 changes: 0 additions & 17 deletions src/datadog_api_client/v1/api/service_level_objectives_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,6 @@ def __init__(self, api_client=None):
"attribute": "offset",
"location": "query",
},
"is_deleted": {
"openapi_types": (bool,),
"attribute": "is_deleted",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
Expand Down Expand Up @@ -529,7 +524,6 @@ def list_slos(
metrics_query: Union[str, UnsetType] = unset,
limit: Union[int, UnsetType] = unset,
offset: Union[int, UnsetType] = unset,
is_deleted: Union[bool, UnsetType] = unset,
) -> SLOListResponse:
"""Get all SLOs.

Expand All @@ -547,8 +541,6 @@ def list_slos(
:type limit: int, optional
:param offset: The specific offset to use as the beginning of the returned response.
:type offset: int, optional
:param is_deleted: Whether to return only deleted service level objective objects.
:type is_deleted: bool, optional
:rtype: SLOListResponse
"""
kwargs: Dict[str, Any] = {}
Expand All @@ -570,9 +562,6 @@ def list_slos(
if offset is not unset:
kwargs["offset"] = offset

if is_deleted is not unset:
kwargs["is_deleted"] = is_deleted

return self._list_slos_endpoint.call_with_http_info(**kwargs)

def list_slos_with_pagination(
Expand All @@ -584,7 +573,6 @@ def list_slos_with_pagination(
metrics_query: Union[str, UnsetType] = unset,
limit: Union[int, UnsetType] = unset,
offset: Union[int, UnsetType] = unset,
is_deleted: Union[bool, UnsetType] = unset,
) -> collections.abc.Iterable[ServiceLevelObjective]:
"""Get all SLOs.

Expand All @@ -602,8 +590,6 @@ def list_slos_with_pagination(
:type limit: int, optional
:param offset: The specific offset to use as the beginning of the returned response.
:type offset: int, optional
:param is_deleted: Whether to return only deleted service level objective objects.
:type is_deleted: bool, optional

:return: A generator of paginated results.
:rtype: collections.abc.Iterable[ServiceLevelObjective]
Expand All @@ -627,9 +613,6 @@ def list_slos_with_pagination(
if offset is not unset:
kwargs["offset"] = offset

if is_deleted is not unset:
kwargs["is_deleted"] = is_deleted

local_page_size = get_attribute_from_path(kwargs, "limit", 1000)
endpoint = self._list_slos_endpoint
set_attribute_from_path(kwargs, "limit", local_page_size, endpoint.params_map)
Expand Down
4 changes: 4 additions & 0 deletions src/datadog_api_client/v2/api/metrics_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,10 @@ def list_tag_configuration_by_name(

Returns the tag configuration for the given metric name.

A metric may exist and submit data without having a tag configuration. If no tag configuration exists
for the metric, this endpoint returns ``404 Not Found``. This response does not indicate that the metric
itself is missing.

:param metric_name: The name of the metric.
:type metric_name: str
:rtype: MetricTagConfigurationResponse
Expand Down
4 changes: 2 additions & 2 deletions tests/v2/features/metrics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,12 @@ Feature: Metrics
And the response "data.id" is equal to "static_test_metric_donotdelete"

@generated @skip @team:DataDog/metrics-experience
Scenario: List tag configuration by name returns "Not Found" response
Scenario: List tag configuration by name returns "No tag configuration exists for the metric" response
Given a valid "appKeyAuth" key in the system
And new "ListTagConfigurationByName" request
And request contains "metric_name" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
Then the response status is 404 No tag configuration exists for the metric

@replay-only @skip-validation @team:DataDog/metrics-experience
Scenario: List tag configuration by name returns "Success" response
Expand Down
Loading