Skip to content

Commit 1e5c295

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e78b9143 of spec repo
1 parent fce1eac commit 1e5c295

23 files changed

+981
-6
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-07-26 19:06:12.147951",
8-
"spec_repo_commit": "44cf4afe"
7+
"regenerated": "2024-07-30 13:34:21.518997",
8+
"spec_repo_commit": "e78b9143"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-26 19:06:12.165858",
13-
"spec_repo_commit": "44cf4afe"
12+
"regenerated": "2024-07-30 13:34:21.536687",
13+
"spec_repo_commit": "e78b9143"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11316,6 +11316,37 @@ components:
1131611316
example: /api/v2/scorecard/rules?page%5Blimit%5D=2&page%5Boffset%5D=2&page%5Bsize%5D=2
1131711317
type: string
1131811318
type: object
11319+
ListTagsResponse:
11320+
description: List tags response.
11321+
properties:
11322+
data:
11323+
$ref: '#/components/schemas/ListTagsResponseData'
11324+
type: object
11325+
ListTagsResponseData:
11326+
description: The list tags response data.
11327+
properties:
11328+
attributes:
11329+
$ref: '#/components/schemas/ListTagsResponseDataAttributes'
11330+
id:
11331+
description: The device ID
11332+
example: example:1.2.3.4
11333+
type: string
11334+
type:
11335+
description: The type of the resource. The value should always be tags.
11336+
type: string
11337+
type: object
11338+
ListTagsResponseDataAttributes:
11339+
description: The definition of ListTagsResponseDataAttributes object.
11340+
properties:
11341+
tags:
11342+
description: The list of tags
11343+
example:
11344+
- tag:test
11345+
- tag:testbis
11346+
items:
11347+
type: string
11348+
type: array
11349+
type: object
1131911350
ListTeamsInclude:
1132011351
description: Included related resources optionally requested.
1132111352
enum:
@@ -31426,6 +31457,67 @@ paths:
3142631457
summary: Get the list of interfaces of the device
3142731458
tags:
3142831459
- Network Device Monitoring
31460+
/api/v2/ndm/tags/devices/{device_id}:
31461+
get:
31462+
description: Get the list of tags for a device.
31463+
operationId: ListDeviceUserTags
31464+
parameters:
31465+
- description: The id of the device to fetch tags for.
31466+
example: example:1.2.3.4
31467+
in: path
31468+
name: device_id
31469+
required: true
31470+
schema:
31471+
type: string
31472+
responses:
31473+
'200':
31474+
content:
31475+
application/json:
31476+
schema:
31477+
$ref: '#/components/schemas/ListTagsResponse'
31478+
description: OK
31479+
'403':
31480+
$ref: '#/components/responses/ForbiddenResponse'
31481+
'404':
31482+
$ref: '#/components/responses/NotFoundResponse'
31483+
'429':
31484+
$ref: '#/components/responses/TooManyRequestsResponse'
31485+
summary: Get the list of tags for a device
31486+
tags:
31487+
- Network Device Monitoring
31488+
patch:
31489+
description: Update the tags for a device.
31490+
operationId: UpdateDeviceUserTags
31491+
parameters:
31492+
- description: The id of the device to update tags for.
31493+
example: example:1.2.3.4
31494+
in: path
31495+
name: device_id
31496+
required: true
31497+
schema:
31498+
type: string
31499+
requestBody:
31500+
content:
31501+
application/json:
31502+
schema:
31503+
$ref: '#/components/schemas/ListTagsResponse'
31504+
required: true
31505+
responses:
31506+
'200':
31507+
content:
31508+
application/json:
31509+
schema:
31510+
$ref: '#/components/schemas/ListTagsResponse'
31511+
description: OK
31512+
'403':
31513+
$ref: '#/components/responses/ForbiddenResponse'
31514+
'404':
31515+
$ref: '#/components/responses/NotFoundResponse'
31516+
'429':
31517+
$ref: '#/components/responses/TooManyRequestsResponse'
31518+
summary: Update the tags for a device
31519+
tags:
31520+
- Network Device Monitoring
3142931521
/api/v2/org_configs:
3143031522
get:
3143131523
description: Returns all Org Configs (name, description, and value).

LICENSE-3rdparty.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ base64,https://github.com/marshallpierce/rust-base64,MIT OR Apache-2.0,"Alice Ma
1111
base64,https://github.com/marshallpierce/rust-base64,MIT OR Apache-2.0,Marshall Pierce <marshall@mpierce.org>
1212
bitflags,https://github.com/bitflags/bitflags,MIT OR Apache-2.0,The Rust Project Developers
1313
bumpalo,https://github.com/fitzgen/bumpalo,MIT OR Apache-2.0,Nick Fitzgerald <fitzgen@gmail.com>
14+
byteorder,https://github.com/BurntSushi/byteorder,Unlicense OR MIT,Andrew Gallant <jamslam@gmail.com>
1415
bytes,https://github.com/tokio-rs/bytes,MIT,"Carl Lerche <me@carllerche.com>, Sean McArthur <sean@seanmonstar.com>"
1516
cfg-if,https://github.com/alexcrichton/cfg-if,MIT OR Apache-2.0,Alex Crichton <alex@alexcrichton.com>
1617
chrono,https://github.com/chronotope/chrono,MIT OR Apache-2.0,The chrono Authors
@@ -150,6 +151,7 @@ windows_x86_64_gnu,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Mic
150151
windows_x86_64_gnullvm,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
151152
windows_x86_64_msvc,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
152153
winreg,https://github.com/gentoo90/winreg-rs,MIT,Igor Shaula <gentoo90@gmail.com>
154+
zerocopy,https://github.com/google/zerocopy,BSD-2-Clause OR Apache-2.0 OR MIT,Joshua Liebow-Feeser <joshlf@google.com>
153155
zstd,https://github.com/gyscos/zstd-rs,MIT,Alexandre Bury <alexandre.bury@gmail.com>
154156
zstd-safe,https://github.com/gyscos/zstd-rs,MIT OR Apache-2.0,Alexandre Bury <alexandre.bury@gmail.com>
155157
zstd-sys,https://github.com/gyscos/zstd-rs,MIT OR Apache-2.0,Alexandre Bury <alexandre.bury@gmail.com>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Get the list of tags for a device returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_network_device_monitoring::NetworkDeviceMonitoringAPI;
4+
5+
#[tokio::main]
6+
async fn main() {
7+
let configuration = datadog::Configuration::new();
8+
let api = NetworkDeviceMonitoringAPI::with_config(configuration);
9+
let resp = api
10+
.list_device_user_tags("default_device".to_string())
11+
.await;
12+
if let Ok(value) = resp {
13+
println!("{:#?}", value);
14+
} else {
15+
println!("{:#?}", resp.unwrap_err());
16+
}
17+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Update the tags for a device returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_network_device_monitoring::NetworkDeviceMonitoringAPI;
4+
use datadog_api_client::datadogV2::model::ListTagsResponse;
5+
use datadog_api_client::datadogV2::model::ListTagsResponseData;
6+
use datadog_api_client::datadogV2::model::ListTagsResponseDataAttributes;
7+
8+
#[tokio::main]
9+
async fn main() {
10+
let body = ListTagsResponse::new().data(
11+
ListTagsResponseData::new()
12+
.attributes(
13+
ListTagsResponseDataAttributes::new()
14+
.tags(vec!["tag:test".to_string(), "tag:testbis".to_string()]),
15+
)
16+
.id("default_device".to_string())
17+
.type_("tags".to_string()),
18+
);
19+
let configuration = datadog::Configuration::new();
20+
let api = NetworkDeviceMonitoringAPI::with_config(configuration);
21+
let resp = api
22+
.update_device_user_tags("default_device".to_string(), body)
23+
.await;
24+
if let Ok(value) = resp {
25+
println!("{:#?}", value);
26+
} else {
27+
println!("{:#?}", resp.unwrap_err());
28+
}
29+
}

0 commit comments

Comments
 (0)