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
80 changes: 80 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// List tags for an interface returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.NetworkDeviceMonitoringApi;
import com.datadog.api.client.v2.model.ListInterfaceTagsResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
NetworkDeviceMonitoringApi apiInstance = new NetworkDeviceMonitoringApi(defaultClient);

try {
ListInterfaceTagsResponse result = apiInstance.listInterfaceUserTags("example:1.2.3.4:1");
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworkDeviceMonitoringApi#listInterfaceUserTags");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Update the tags for an interface returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.NetworkDeviceMonitoringApi;
import com.datadog.api.client.v2.model.ListInterfaceTagsResponse;
import com.datadog.api.client.v2.model.ListInterfaceTagsResponseData;
import com.datadog.api.client.v2.model.ListTagsResponseDataAttributes;
import java.util.Arrays;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
NetworkDeviceMonitoringApi apiInstance = new NetworkDeviceMonitoringApi(defaultClient);

ListInterfaceTagsResponse body =
new ListInterfaceTagsResponse()
.data(
new ListInterfaceTagsResponseData()
.attributes(
new ListTagsResponseDataAttributes()
.tags(Arrays.asList("tag:test", "tag:testbis")))
.id("example:1.2.3.4:1")
.type("tags"));

try {
ListInterfaceTagsResponse result =
apiInstance.updateInterfaceUserTags("example:1.2.3.4:1", body);
System.out.println(result);
} catch (ApiException e) {
System.err.println(
"Exception when calling NetworkDeviceMonitoringApi#updateInterfaceUserTags");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Loading
Loading