Skip to content

Commit 2b1653a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 235ad9c of spec repo (#4562)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 4b86dc7 commit 2b1653a

6 files changed

Lines changed: 6 additions & 36 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173432,9 +173432,6 @@ paths:
173432173432
permissions:
173433173433
- security_monitoring_findings_write
173434173434
- appsec_vm_write
173435-
x-unstable: |-
173436-
**Note**: This endpoint is in preview and is subject to change.
173437-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
173438173435
post:
173439173436
description: >-
173440173437
Create ServiceNow tickets for security findings.
@@ -173505,9 +173502,6 @@ paths:
173505173502
permissions:
173506173503
- security_monitoring_findings_write
173507173504
- appsec_vm_write
173508-
x-unstable: |-
173509-
**Note**: This endpoint is in preview and is subject to change.
173510-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
173511173505
/api/v2/security/sboms:
173512173506
get:
173513173507
description: |-

examples/v2/security-monitoring/AttachServiceNowTicket.ts

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

77
const configuration = client.createConfiguration();
8-
configuration.unstableOperations["v2.attachServiceNowTicket"] = true;
98
const apiInstance = new v2.SecurityMonitoringApi(configuration);
109

1110
const params: v2.SecurityMonitoringApiAttachServiceNowTicketRequest = {

examples/v2/security-monitoring/CreateServiceNowTickets.ts

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

77
const configuration = client.createConfiguration();
8-
configuration.unstableOperations["v2.createServiceNowTickets"] = true;
98
const apiInstance = new v2.SecurityMonitoringApi(configuration);
109

1110
const params: v2.SecurityMonitoringApiCreateServiceNowTicketsRequest = {

features/v2/security_monitoring.feature

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,21 @@ Feature: Security Monitoring
113113

114114
@generated @skip @team:DataDog/k9-investigation
115115
Scenario: Attach security findings to a ServiceNow ticket returns "Bad Request" response
116-
Given operation "AttachServiceNowTicket" enabled
117-
And new "AttachServiceNowTicket" request
116+
Given new "AttachServiceNowTicket" request
118117
And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}}
119118
When the request is sent
120119
Then the response status is 400 Bad Request
121120

122121
@generated @skip @team:DataDog/k9-investigation
123122
Scenario: Attach security findings to a ServiceNow ticket returns "Not Found" response
124-
Given operation "AttachServiceNowTicket" enabled
125-
And new "AttachServiceNowTicket" request
123+
Given new "AttachServiceNowTicket" request
126124
And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}}
127125
When the request is sent
128126
Then the response status is 404 Not Found
129127

130128
@generated @skip @team:DataDog/k9-investigation
131129
Scenario: Attach security findings to a ServiceNow ticket returns "OK" response
132-
Given operation "AttachServiceNowTicket" enabled
133-
And new "AttachServiceNowTicket" request
130+
Given new "AttachServiceNowTicket" request
134131
And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}}
135132
When the request is sent
136133
Then the response status is 200 OK
@@ -532,24 +529,21 @@ Feature: Security Monitoring
532529

533530
@generated @skip @team:DataDog/k9-investigation
534531
Scenario: Create ServiceNow tickets for security findings returns "Bad Request" response
535-
Given operation "CreateServiceNowTickets" enabled
536-
And new "CreateServiceNowTickets" request
532+
Given new "CreateServiceNowTickets" request
537533
And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]}
538534
When the request is sent
539535
Then the response status is 400 Bad Request
540536

541537
@generated @skip @team:DataDog/k9-investigation
542538
Scenario: Create ServiceNow tickets for security findings returns "Created" response
543-
Given operation "CreateServiceNowTickets" enabled
544-
And new "CreateServiceNowTickets" request
539+
Given new "CreateServiceNowTickets" request
545540
And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]}
546541
When the request is sent
547542
Then the response status is 201 Created
548543

549544
@generated @skip @team:DataDog/k9-investigation
550545
Scenario: Create ServiceNow tickets for security findings returns "Not Found" response
551-
Given operation "CreateServiceNowTickets" enabled
552-
And new "CreateServiceNowTickets" request
546+
Given new "CreateServiceNowTickets" request
553547
And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]}
554548
When the request is sent
555549
Then the response status is 404 Not Found

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ export function createConfiguration(
370370
"v2.getAWSCloudAuthPersonaMapping": false,
371371
"v2.listAWSCloudAuthPersonaMappings": false,
372372
"v2.activateContentPack": false,
373-
"v2.attachServiceNowTicket": false,
374373
"v2.batchGetSecurityMonitoringDatasetDependencies": false,
375374
"v2.bulkCreateSampleLogGenerationSubscriptions": false,
376375
"v2.bulkExportSecurityMonitoringTerraformResources": false,
@@ -384,7 +383,6 @@ export function createConfiguration(
384383
"v2.createSecurityFindingsAutomationTicketCreationRule": false,
385384
"v2.createSecurityMonitoringDataset": false,
386385
"v2.createSecurityMonitoringIntegrationConfig": false,
387-
"v2.createServiceNowTickets": false,
388386
"v2.createStaticAnalysisAst": false,
389387
"v2.createStaticAnalysisServerAnalysis": false,
390388
"v2.deactivateContentPack": false,

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,6 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
326326
): Promise<RequestContext> {
327327
const _config = _options || this.configuration;
328328

329-
logger.warn("Using unstable operation 'attachServiceNowTicket'");
330-
if (!_config.unstableOperations["v2.attachServiceNowTicket"]) {
331-
throw new Error(
332-
"Unstable operation 'attachServiceNowTicket' is disabled"
333-
);
334-
}
335-
336329
// verify required parameter 'body' is not null or undefined
337330
if (body === null || body === undefined) {
338331
throw new RequiredError("body", "attachServiceNowTicket");
@@ -1845,13 +1838,6 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory {
18451838
): Promise<RequestContext> {
18461839
const _config = _options || this.configuration;
18471840

1848-
logger.warn("Using unstable operation 'createServiceNowTickets'");
1849-
if (!_config.unstableOperations["v2.createServiceNowTickets"]) {
1850-
throw new Error(
1851-
"Unstable operation 'createServiceNowTickets' is disabled"
1852-
);
1853-
}
1854-
18551841
// verify required parameter 'body' is not null or undefined
18561842
if (body === null || body === undefined) {
18571843
throw new RequiredError("body", "createServiceNowTickets");

0 commit comments

Comments
 (0)