Skip to content

Commit ac7afc8

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit bdef51a0 of spec repo
1 parent e320233 commit ac7afc8

File tree

10 files changed

+32
-19
lines changed

10 files changed

+32
-19
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": "2025-02-07 15:58:47.022889",
8-
"spec_repo_commit": "1ff7c087"
7+
"regenerated": "2025-02-10 11:43:29.753842",
8+
"spec_repo_commit": "bdef51a0"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-07 15:58:47.038214",
13-
"spec_repo_commit": "1ff7c087"
12+
"regenerated": "2025-02-10 11:43:29.770487",
13+
"spec_repo_commit": "bdef51a0"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44069,6 +44069,9 @@ paths:
4406944069
summary: Get SBOM
4407044070
tags:
4407144071
- Security Monitoring
44072+
x-unstable: '**Note**: This endpoint is a private preview.
44073+
44074+
If you are interested in accessing this API, please [fill out this form](https://forms.gle/kMYC1sDr6WDUBDsx9).'
4407244075
/api/v2/security/signals/notification_rules:
4407344076
get:
4407444077
description: Returns the list of notification rules for security signals.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2025-01-31T12:04:00.490Z"
1+
"2025-02-10T11:40:12.098Z"

cassettes/v2/Security-Monitoring_1187227211/Get-SBOM-returns-Not-found-asset-not-found-response_1830059764/recording.har

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
"url": "https://api.datadoghq.com/api/v2/security/sboms/Host?filter%5Basset_name%5D=unknown-host"
3636
},
3737
"response": {
38-
"bodySize": 112,
38+
"bodySize": 127,
3939
"content": {
4040
"mimeType": "application/vnd.api+json",
41-
"size": 112,
42-
"text": "{\"errors\":[{\"title\":\"Asset not found\",\"detail\":\"asset_type: 'Host' with asset_name: 'unknown-host' not found\"}]}"
41+
"size": 127,
42+
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Asset not found\",\"detail\":\"asset_type: 'Host' with asset_name: 'unknown-host' not found\"}]}"
4343
},
4444
"cookies": [],
4545
"headers": [
@@ -54,8 +54,8 @@
5454
"status": 404,
5555
"statusText": "Not Found"
5656
},
57-
"startedDateTime": "2025-01-31T12:04:00.501Z",
58-
"time": 1317
57+
"startedDateTime": "2025-02-10T11:40:12.494Z",
58+
"time": 314
5959
}
6060
],
6161
"pages": [],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2025-01-31T12:04:14.913Z"
1+
"2025-02-10T11:38:04.662Z"

cassettes/v2/Security-Monitoring_1187227211/Get-SBOM-returns-OK-response_169029814/recording.har

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

examples/v2/security-monitoring/GetSBOM.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getSBOM"] = true;
89
const apiInstance = new v2.SecurityMonitoringApi(configuration);
910

1011
const params: v2.SecurityMonitoringApiGetSBOMRequest = {

features/v2/security_monitoring.feature

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,23 +447,26 @@ Feature: Security Monitoring
447447

448448
@generated @skip @team:DataDog/asm-vm
449449
Scenario: Get SBOM returns "Bad request: The server cannot process the request due to invalid syntax in the request." response
450-
Given new "GetSBOM" request
450+
Given operation "GetSBOM" enabled
451+
And new "GetSBOM" request
451452
And request contains "asset_type" parameter from "REPLACE.ME"
452453
And request contains "filter[asset_name]" parameter from "REPLACE.ME"
453454
When the request is sent
454455
Then the response status is 400 Bad request: The server cannot process the request due to invalid syntax in the request.
455456

456457
@team:DataDog/asm-vm
457458
Scenario: Get SBOM returns "Not found: asset not found" response
458-
Given new "GetSBOM" request
459+
Given operation "GetSBOM" enabled
460+
And new "GetSBOM" request
459461
And request contains "asset_type" parameter with value "Host"
460462
And request contains "filter[asset_name]" parameter with value "unknown-host"
461463
When the request is sent
462464
Then the response status is 404 Not found: asset not found
463465

464466
@team:DataDog/asm-vm
465467
Scenario: Get SBOM returns "OK" response
466-
Given new "GetSBOM" request
468+
Given operation "GetSBOM" enabled
469+
And new "GetSBOM" request
467470
And request contains "asset_type" parameter with value "Repository"
468471
And request contains "filter[asset_name]" parameter with value "github.com/datadog/datadog-agent"
469472
When the request is sent

packages/datadog-api-client-common/configuration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ export function createConfiguration(
276276
"v2.deleteHistoricalJob": false,
277277
"v2.getFinding": false,
278278
"v2.getHistoricalJob": false,
279+
"v2.getSBOM": false,
279280
"v2.listFindings": false,
280281
"v2.listHistoricalJobs": false,
281282
"v2.muteFindings": false,

packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,11 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
962962
): Promise<RequestContext> {
963963
const _config = _options || this.configuration;
964964

965+
logger.warn("Using unstable operation 'getSBOM'");
966+
if (!_config.unstableOperations["v2.getSBOM"]) {
967+
throw new Error("Unstable operation 'getSBOM' is disabled");
968+
}
969+
965970
// verify required parameter 'assetType' is not null or undefined
966971
if (assetType === null || assetType === undefined) {
967972
throw new RequiredError("assetType", "getSBOM");

0 commit comments

Comments
 (0)