Skip to content

Commit 4e3d0dc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ede00fe of spec repo
1 parent 40aab44 commit 4e3d0dc

16 files changed

+946
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33939,6 +33939,25 @@ components:
3393933939
- data
3394033940
- meta
3394133941
type: object
33942+
ListInterfaceTagsResponse:
33943+
description: Response for listing interface tags.
33944+
properties:
33945+
data:
33946+
$ref: '#/components/schemas/ListInterfaceTagsResponseData'
33947+
type: object
33948+
ListInterfaceTagsResponseData:
33949+
description: Response data for listing interface tags.
33950+
properties:
33951+
attributes:
33952+
$ref: '#/components/schemas/ListTagsResponseDataAttributes'
33953+
id:
33954+
description: The interface ID
33955+
example: example:1.2.3.4:1
33956+
type: string
33957+
type:
33958+
description: The resource type. This value should always be `tags`.
33959+
type: string
33960+
type: object
3394233961
ListKindCatalogResponse:
3394333962
description: List kind response.
3394433963
properties:
@@ -86637,6 +86656,67 @@ paths:
8663786656
summary: Update the tags for a device
8663886657
tags:
8663986658
- Network Device Monitoring
86659+
/api/v2/ndm/tags/interfaces/{interface_id}:
86660+
get:
86661+
description: Returns the tags associated with the specified interface.
86662+
operationId: ListInterfaceUserTags
86663+
parameters:
86664+
- description: The ID of the interface for which to retrieve tags.
86665+
example: example:1.2.3.4:1
86666+
in: path
86667+
name: interface_id
86668+
required: true
86669+
schema:
86670+
type: string
86671+
responses:
86672+
'200':
86673+
content:
86674+
application/json:
86675+
schema:
86676+
$ref: '#/components/schemas/ListInterfaceTagsResponse'
86677+
description: OK
86678+
'403':
86679+
$ref: '#/components/responses/ForbiddenResponse'
86680+
'404':
86681+
$ref: '#/components/responses/NotFoundResponse'
86682+
'429':
86683+
$ref: '#/components/responses/TooManyRequestsResponse'
86684+
summary: List tags for an interface
86685+
tags:
86686+
- Network Device Monitoring
86687+
patch:
86688+
description: Updates the tags associated with the specified interface.
86689+
operationId: UpdateInterfaceUserTags
86690+
parameters:
86691+
- description: The ID of the interface for which to update tags.
86692+
example: example:1.2.3.4:1
86693+
in: path
86694+
name: interface_id
86695+
required: true
86696+
schema:
86697+
type: string
86698+
requestBody:
86699+
content:
86700+
application/json:
86701+
schema:
86702+
$ref: '#/components/schemas/ListInterfaceTagsResponse'
86703+
required: true
86704+
responses:
86705+
'200':
86706+
content:
86707+
application/json:
86708+
schema:
86709+
$ref: '#/components/schemas/ListInterfaceTagsResponse'
86710+
description: OK
86711+
'403':
86712+
$ref: '#/components/responses/ForbiddenResponse'
86713+
'404':
86714+
$ref: '#/components/responses/NotFoundResponse'
86715+
'429':
86716+
$ref: '#/components/responses/TooManyRequestsResponse'
86717+
summary: Update the tags for an interface
86718+
tags:
86719+
- Network Device Monitoring
8664086720
/api/v2/network/connections/aggregate:
8664186721
get:
8664286722
description: Get all aggregated connections.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// List tags for an interface returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.NetworkDeviceMonitoringApi;
6+
import com.datadog.api.client.v2.model.ListInterfaceTagsResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
NetworkDeviceMonitoringApi apiInstance = new NetworkDeviceMonitoringApi(defaultClient);
12+
13+
try {
14+
ListInterfaceTagsResponse result = apiInstance.listInterfaceUserTags("example:1.2.3.4:1");
15+
System.out.println(result);
16+
} catch (ApiException e) {
17+
System.err.println("Exception when calling NetworkDeviceMonitoringApi#listInterfaceUserTags");
18+
System.err.println("Status code: " + e.getCode());
19+
System.err.println("Reason: " + e.getResponseBody());
20+
System.err.println("Response headers: " + e.getResponseHeaders());
21+
e.printStackTrace();
22+
}
23+
}
24+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Update the tags for an interface returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.NetworkDeviceMonitoringApi;
6+
import com.datadog.api.client.v2.model.ListInterfaceTagsResponse;
7+
import com.datadog.api.client.v2.model.ListInterfaceTagsResponseData;
8+
import com.datadog.api.client.v2.model.ListTagsResponseDataAttributes;
9+
import java.util.Arrays;
10+
11+
public class Example {
12+
public static void main(String[] args) {
13+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
14+
NetworkDeviceMonitoringApi apiInstance = new NetworkDeviceMonitoringApi(defaultClient);
15+
16+
ListInterfaceTagsResponse body =
17+
new ListInterfaceTagsResponse()
18+
.data(
19+
new ListInterfaceTagsResponseData()
20+
.attributes(
21+
new ListTagsResponseDataAttributes()
22+
.tags(Arrays.asList("tag:test", "tag:testbis")))
23+
.id("example:1.2.3.4:1")
24+
.type("tags"));
25+
26+
try {
27+
ListInterfaceTagsResponse result =
28+
apiInstance.updateInterfaceUserTags("example:1.2.3.4:1", body);
29+
System.out.println(result);
30+
} catch (ApiException e) {
31+
System.err.println(
32+
"Exception when calling NetworkDeviceMonitoringApi#updateInterfaceUserTags");
33+
System.err.println("Status code: " + e.getCode());
34+
System.err.println("Reason: " + e.getResponseBody());
35+
System.err.println("Response headers: " + e.getResponseHeaders());
36+
e.printStackTrace();
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)