From 6f3766157b253aff8cf0bc1574c5bc7c587ea740 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 17 Feb 2026 13:35:41 +0000 Subject: [PATCH] Regenerate client from commit 38784f5 of spec repo --- .generator/schemas/v2/openapi.yaml | 80 +++++++++++++++++ docs/datadog_api_client.v2.model.rst | 14 +++ .../ListInterfaceUserTags.py | 15 ++++ .../UpdateInterfaceUserTags.py | 29 ++++++ .../v2/api/network_device_monitoring_api.py | 88 +++++++++++++++++++ .../v2/model/list_interface_tags_response.py | 42 +++++++++ .../list_interface_tags_response_data.py | 62 +++++++++++++ src/datadog_api_client/v2/models/__init__.py | 4 + ...nterface_returns_not_found_response.frozen | 1 + ..._interface_returns_not_found_response.yaml | 18 ++++ ...or_an_interface_returns_ok_response.frozen | 1 + ..._for_an_interface_returns_ok_response.yaml | 18 ++++ ...nterface_returns_not_found_response.frozen | 1 + ..._interface_returns_not_found_response.yaml | 20 +++++ ...or_an_interface_returns_ok_response.frozen | 1 + ..._for_an_interface_returns_ok_response.yaml | 20 +++++ .../network_device_monitoring.feature | 38 ++++++++ tests/v2/features/undo.json | 12 +++ 18 files changed, 464 insertions(+) create mode 100644 examples/v2/network-device-monitoring/ListInterfaceUserTags.py create mode 100644 examples/v2/network-device-monitoring/UpdateInterfaceUserTags.py create mode 100644 src/datadog_api_client/v2/model/list_interface_tags_response.py create mode 100644 src/datadog_api_client/v2/model/list_interface_tags_response_data.py create mode 100644 tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_not_found_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_not_found_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_ok_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_not_found_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_not_found_response.yaml create mode 100644 tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_ok_response.frozen create mode 100644 tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_ok_response.yaml diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 093a28a0b5..72945c2c0f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -33939,6 +33939,25 @@ components: - data - meta type: object + ListInterfaceTagsResponse: + description: Response for listing interface tags. + properties: + data: + $ref: '#/components/schemas/ListInterfaceTagsResponseData' + type: object + ListInterfaceTagsResponseData: + description: Response data for listing interface tags. + properties: + attributes: + $ref: '#/components/schemas/ListTagsResponseDataAttributes' + id: + description: The interface ID + example: example:1.2.3.4:1 + type: string + type: + description: The type of the resource. The value should always be tags. + type: string + type: object ListKindCatalogResponse: description: List kind response. properties: @@ -86637,6 +86656,67 @@ paths: summary: Update the tags for a device tags: - Network Device Monitoring + /api/v2/ndm/tags/interfaces/{interface_id}: + get: + description: Returns the tags associated with the specified interface. + operationId: ListInterfaceUserTags + parameters: + - description: The ID of the interface for which to retrieve tags. + example: example:1.2.3.4:1 + in: path + name: interface_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListInterfaceTagsResponse' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List tags for an interface + tags: + - Network Device Monitoring + patch: + description: Updates the tags associated with the specified interface. + operationId: UpdateInterfaceUserTags + parameters: + - description: The ID of the interface for which to update tags. + example: example:1.2.3.4:1 + in: path + name: interface_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ListInterfaceTagsResponse' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListInterfaceTagsResponse' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update the tags for an interface + tags: + - Network Device Monitoring /api/v2/network/connections/aggregate: get: description: Get all aggregated connections. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 6ea9cfc5d1..2650a2bc3c 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -14578,6 +14578,20 @@ datadog\_api\_client.v2.model.list\_findings\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.list\_interface\_tags\_response module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.list_interface_tags_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.list\_interface\_tags\_response\_data module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.list_interface_tags_response_data + :members: + :show-inheritance: + datadog\_api\_client.v2.model.list\_kind\_catalog\_response module ------------------------------------------------------------------ diff --git a/examples/v2/network-device-monitoring/ListInterfaceUserTags.py b/examples/v2/network-device-monitoring/ListInterfaceUserTags.py new file mode 100644 index 0000000000..678f04e72a --- /dev/null +++ b/examples/v2/network-device-monitoring/ListInterfaceUserTags.py @@ -0,0 +1,15 @@ +""" +List tags for an interface returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.network_device_monitoring_api import NetworkDeviceMonitoringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = NetworkDeviceMonitoringApi(api_client) + response = api_instance.list_interface_user_tags( + interface_id="example:1.2.3.4:1", + ) + + print(response) diff --git a/examples/v2/network-device-monitoring/UpdateInterfaceUserTags.py b/examples/v2/network-device-monitoring/UpdateInterfaceUserTags.py new file mode 100644 index 0000000000..dc020b6990 --- /dev/null +++ b/examples/v2/network-device-monitoring/UpdateInterfaceUserTags.py @@ -0,0 +1,29 @@ +""" +Update the tags for an interface returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.network_device_monitoring_api import NetworkDeviceMonitoringApi +from datadog_api_client.v2.model.list_interface_tags_response import ListInterfaceTagsResponse +from datadog_api_client.v2.model.list_interface_tags_response_data import ListInterfaceTagsResponseData +from datadog_api_client.v2.model.list_tags_response_data_attributes import ListTagsResponseDataAttributes + +body = ListInterfaceTagsResponse( + data=ListInterfaceTagsResponseData( + attributes=ListTagsResponseDataAttributes( + tags=[ + "tag:test", + "tag:testbis", + ], + ), + id="example:1.2.3.4:1", + type="tags", + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = NetworkDeviceMonitoringApi(api_client) + response = api_instance.update_interface_user_tags(interface_id="example:1.2.3.4:1", body=body) + + print(response) diff --git a/src/datadog_api_client/v2/api/network_device_monitoring_api.py b/src/datadog_api_client/v2/api/network_device_monitoring_api.py index 249aa1533c..0d6fe352f1 100644 --- a/src/datadog_api_client/v2/api/network_device_monitoring_api.py +++ b/src/datadog_api_client/v2/api/network_device_monitoring_api.py @@ -19,6 +19,7 @@ from datadog_api_client.v2.model.get_device_response import GetDeviceResponse from datadog_api_client.v2.model.get_interfaces_response import GetInterfacesResponse from datadog_api_client.v2.model.list_tags_response import ListTagsResponse +from datadog_api_client.v2.model.list_interface_tags_response import ListInterfaceTagsResponse class NetworkDeviceMonitoringApi: @@ -142,6 +143,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_interface_user_tags_endpoint = _Endpoint( + settings={ + "response_type": (ListInterfaceTagsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/ndm/tags/interfaces/{interface_id}", + "operation_id": "list_interface_user_tags", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "interface_id": { + "required": True, + "openapi_types": (str,), + "attribute": "interface_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._update_device_user_tags_endpoint = _Endpoint( settings={ "response_type": (ListTagsResponse,), @@ -168,6 +192,32 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._update_interface_user_tags_endpoint = _Endpoint( + settings={ + "response_type": (ListInterfaceTagsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/ndm/tags/interfaces/{interface_id}", + "operation_id": "update_interface_user_tags", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "interface_id": { + "required": True, + "openapi_types": (str,), + "attribute": "interface_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (ListInterfaceTagsResponse,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + def get_device( self, device_id: str, @@ -312,6 +362,23 @@ def list_device_user_tags( return self._list_device_user_tags_endpoint.call_with_http_info(**kwargs) + def list_interface_user_tags( + self, + interface_id: str, + ) -> ListInterfaceTagsResponse: + """List tags for an interface. + + Returns the tags associated with the specified interface. + + :param interface_id: The ID of the interface for which to retrieve tags. + :type interface_id: str + :rtype: ListInterfaceTagsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["interface_id"] = interface_id + + return self._list_interface_user_tags_endpoint.call_with_http_info(**kwargs) + def update_device_user_tags( self, device_id: str, @@ -332,3 +399,24 @@ def update_device_user_tags( kwargs["body"] = body return self._update_device_user_tags_endpoint.call_with_http_info(**kwargs) + + def update_interface_user_tags( + self, + interface_id: str, + body: ListInterfaceTagsResponse, + ) -> ListInterfaceTagsResponse: + """Update the tags for an interface. + + Updates the tags associated with the specified interface. + + :param interface_id: The ID of the interface for which to update tags. + :type interface_id: str + :type body: ListInterfaceTagsResponse + :rtype: ListInterfaceTagsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["interface_id"] = interface_id + + kwargs["body"] = body + + return self._update_interface_user_tags_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/model/list_interface_tags_response.py b/src/datadog_api_client/v2/model/list_interface_tags_response.py new file mode 100644 index 0000000000..fa4c816e93 --- /dev/null +++ b/src/datadog_api_client/v2/model/list_interface_tags_response.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.list_interface_tags_response_data import ListInterfaceTagsResponseData + + +class ListInterfaceTagsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.list_interface_tags_response_data import ListInterfaceTagsResponseData + + return { + "data": (ListInterfaceTagsResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[ListInterfaceTagsResponseData, UnsetType] = unset, **kwargs): + """ + Response for listing interface tags. + + :param data: Response data for listing interface tags. + :type data: ListInterfaceTagsResponseData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/list_interface_tags_response_data.py b/src/datadog_api_client/v2/model/list_interface_tags_response_data.py new file mode 100644 index 0000000000..c83c4710d6 --- /dev/null +++ b/src/datadog_api_client/v2/model/list_interface_tags_response_data.py @@ -0,0 +1,62 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.list_tags_response_data_attributes import ListTagsResponseDataAttributes + + +class ListInterfaceTagsResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.list_tags_response_data_attributes import ListTagsResponseDataAttributes + + return { + "attributes": (ListTagsResponseDataAttributes,), + "id": (str,), + "type": (str,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[ListTagsResponseDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Response data for listing interface tags. + + :param attributes: The definition of ListTagsResponseDataAttributes object. + :type attributes: ListTagsResponseDataAttributes, optional + + :param id: The interface ID + :type id: str, optional + + :param type: The type of the resource. The value should always be tags. + :type type: str, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 2eece21eff..7128642248 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2745,6 +2745,8 @@ from datadog_api_client.v2.model.list_findings_meta import ListFindingsMeta from datadog_api_client.v2.model.list_findings_page import ListFindingsPage from datadog_api_client.v2.model.list_findings_response import ListFindingsResponse +from datadog_api_client.v2.model.list_interface_tags_response import ListInterfaceTagsResponse +from datadog_api_client.v2.model.list_interface_tags_response_data import ListInterfaceTagsResponseData from datadog_api_client.v2.model.list_kind_catalog_response import ListKindCatalogResponse from datadog_api_client.v2.model.list_notification_channels_response import ListNotificationChannelsResponse from datadog_api_client.v2.model.list_on_call_notification_rules_response import ListOnCallNotificationRulesResponse @@ -8111,6 +8113,8 @@ "ListFindingsMeta", "ListFindingsPage", "ListFindingsResponse", + "ListInterfaceTagsResponse", + "ListInterfaceTagsResponseData", "ListKindCatalogResponse", "ListNotificationChannelsResponse", "ListOnCallNotificationRulesResponse", diff --git a/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_not_found_response.frozen new file mode 100644 index 0000000000..a695995fbb --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_not_found_response.frozen @@ -0,0 +1 @@ +2026-02-17T10:20:35.870Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_not_found_response.yaml new file mode 100644 index 0000000000..73a441ceed --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_not_found_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/ndm/tags/interfaces/unknown_interface_id + response: + body: + string: '{"errors":[{"status":"404","title":"Not Found"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_ok_response.frozen new file mode 100644 index 0000000000..e67a379152 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-02-17T10:20:36.480Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_ok_response.yaml new file mode 100644 index 0000000000..a5a0e115d6 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_list_tags_for_an_interface_returns_ok_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/ndm/tags/interfaces/example%3A1.2.3.4%3A1 + response: + body: + string: '{"data":{"id":"example:1.2.3.4:1","type":"tags","attributes":{"tags":["tag:test","tag:testbis"]}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_not_found_response.frozen new file mode 100644 index 0000000000..b5d1d980bf --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_not_found_response.frozen @@ -0,0 +1 @@ +2026-02-17T10:20:36.989Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_not_found_response.yaml new file mode 100644 index 0000000000..e574aef9ab --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_not_found_response.yaml @@ -0,0 +1,20 @@ +interactions: +- request: + body: '{"data":{"attributes":{"tags":["tag:test","tag:testbis"]},"id":"unknown_interface_id","type":"tags"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/ndm/tags/interfaces/unknown_interface_id + response: + body: + string: '{"errors":[{"status":"404","title":"Not Found"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_ok_response.frozen new file mode 100644 index 0000000000..66efae7412 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_ok_response.frozen @@ -0,0 +1 @@ +2026-02-17T10:20:37.189Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_ok_response.yaml new file mode 100644 index 0000000000..d9e9710306 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_the_tags_for_an_interface_returns_ok_response.yaml @@ -0,0 +1,20 @@ +interactions: +- request: + body: '{"data":{"attributes":{"tags":["tag:test","tag:testbis"]},"id":"example:1.2.3.4:1","type":"tags"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/ndm/tags/interfaces/example%3A1.2.3.4%3A1 + response: + body: + string: '{"data":{"id":"example:1.2.3.4:1","type":"tags","attributes":{"tags":["tag:test","tag:testbis"]}}}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/features/network_device_monitoring.feature b/tests/v2/features/network_device_monitoring.feature index f6f7a78f25..165564dc39 100644 --- a/tests/v2/features/network_device_monitoring.feature +++ b/tests/v2/features/network_device_monitoring.feature @@ -124,6 +124,24 @@ Feature: Network Device Monitoring And the response "data.attributes.tags[0]" is equal to "tag:test" And the response "data.attributes.tags[1]" is equal to "tag:testbis" + @replay-only @team:DataDog/network-device-monitoring + Scenario: List tags for an interface returns "Not Found" response + Given new "ListInterfaceUserTags" request + And request contains "interface_id" parameter with value "unknown_interface_id" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:DataDog/network-device-monitoring + Scenario: List tags for an interface returns "OK" response + Given new "ListInterfaceUserTags" request + And request contains "interface_id" parameter with value "example:1.2.3.4:1" + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "example:1.2.3.4:1" + And the response "data.type" is equal to "tags" + And the response "data.attributes.tags[0]" is equal to "tag:test" + And the response "data.attributes.tags[1]" is equal to "tag:testbis" + @replay-only @team:DataDog/network-device-monitoring Scenario: Update the tags for a device returns "Not Found" response Given new "UpdateDeviceUserTags" request @@ -143,3 +161,23 @@ Feature: Network Device Monitoring And the response "data.type" is equal to "tags" And the response "data.attributes.tags[0]" is equal to "tag:test" And the response "data.attributes.tags[1]" is equal to "tag:testbis" + + @replay-only @team:DataDog/network-device-monitoring + Scenario: Update the tags for an interface returns "Not Found" response + Given new "UpdateInterfaceUserTags" request + And request contains "interface_id" parameter with value "unknown_interface_id" + And body with value {"data": {"attributes": {"tags": ["tag:test", "tag:testbis"]}, "id": "unknown_interface_id", "type":"tags"}} + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:DataDog/network-device-monitoring + Scenario: Update the tags for an interface returns "OK" response + Given new "UpdateInterfaceUserTags" request + And request contains "interface_id" parameter with value "example:1.2.3.4:1" + And body with value {"data": {"attributes": {"tags": ["tag:test", "tag:testbis"]}, "id": "example:1.2.3.4:1", "type":"tags"}} + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "example:1.2.3.4:1" + And the response "data.type" is equal to "tags" + And the response "data.attributes.tags[0]" is equal to "tag:test" + And the response "data.attributes.tags[1]" is equal to "tag:testbis" diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index ef9246c8e6..5758d28e03 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -3197,6 +3197,18 @@ "type": "idempotent" } }, + "ListInterfaceUserTags": { + "tag": "Network Device Monitoring", + "undo": { + "type": "safe" + } + }, + "UpdateInterfaceUserTags": { + "tag": "Network Device Monitoring", + "undo": { + "type": "idempotent" + } + }, "GetAggregatedConnections": { "tag": "Cloud Network Monitoring", "undo": {