Skip to content

Commit 44fc62a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit e913a88 of spec repo (DataDog#3487)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent fc87a38 commit 44fc62a

6 files changed

Lines changed: 6 additions & 38 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166470,9 +166470,6 @@ paths:
166470166470
permissions:
166471166471
- security_monitoring_findings_write
166472166472
- appsec_vm_write
166473-
x-unstable: |-
166474-
**Note**: This endpoint is in preview and is subject to change.
166475-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
166476166473
post:
166477166474
description: >-
166478166475
Create ServiceNow tickets for security findings.
@@ -166543,9 +166540,6 @@ paths:
166543166540
permissions:
166544166541
- security_monitoring_findings_write
166545166542
- appsec_vm_write
166546-
x-unstable: |-
166547-
**Note**: This endpoint is in preview and is subject to change.
166548-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
166549166543
/api/v2/security/sboms:
166550166544
get:
166551166545
description: |-

examples/v2/security-monitoring/AttachServiceNowTicket.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Attach security findings to a ServiceNow ticket returns "OK" response
22

33
require "datadog_api_client"
4-
DatadogAPIClient.configure do |config|
5-
config.unstable_operations["v2.attach_service_now_ticket".to_sym] = true
6-
end
74
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
85

96
body = DatadogAPIClient::V2::AttachServiceNowTicketRequest.new({

examples/v2/security-monitoring/CreateServiceNowTickets.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Create ServiceNow tickets for security findings returns "Created" response
22

33
require "datadog_api_client"
4-
DatadogAPIClient.configure do |config|
5-
config.unstable_operations["v2.create_service_now_tickets".to_sym] = true
6-
end
74
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
85

96
body = DatadogAPIClient::V2::CreateServiceNowTicketRequestArray.new({

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

lib/datadog_api_client/configuration.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ def initialize
337337
"v2.get_aws_cloud_auth_persona_mapping": false,
338338
"v2.list_aws_cloud_auth_persona_mappings": false,
339339
"v2.activate_content_pack": false,
340-
"v2.attach_service_now_ticket": false,
341340
"v2.batch_get_security_monitoring_dataset_dependencies": false,
342341
"v2.bulk_create_sample_log_generation_subscriptions": false,
343342
"v2.bulk_export_security_monitoring_terraform_resources": false,
@@ -347,7 +346,6 @@ def initialize
347346
"v2.create_sample_log_generation_subscription": false,
348347
"v2.create_security_monitoring_dataset": false,
349348
"v2.create_security_monitoring_integration_config": false,
350-
"v2.create_service_now_tickets": false,
351349
"v2.create_static_analysis_ast": false,
352350
"v2.create_static_analysis_server_analysis": false,
353351
"v2.deactivate_content_pack": false,

lib/datadog_api_client/v2/api/security_monitoring_api.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,6 @@ def attach_service_now_ticket(body, opts = {})
254254
# @param opts [Hash] the optional parameters
255255
# @return [Array<(FindingCaseResponse, Integer, Hash)>] FindingCaseResponse data, response status code and response headers
256256
def attach_service_now_ticket_with_http_info(body, opts = {})
257-
unstable_enabled = @api_client.config.unstable_operations["v2.attach_service_now_ticket".to_sym]
258-
if unstable_enabled
259-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.attach_service_now_ticket")
260-
else
261-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.attach_service_now_ticket"))
262-
end
263257

264258
if @api_client.config.debugging
265259
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.attach_service_now_ticket ...'
@@ -2054,12 +2048,6 @@ def create_service_now_tickets(body, opts = {})
20542048
# @param opts [Hash] the optional parameters
20552049
# @return [Array<(FindingCaseResponseArray, Integer, Hash)>] FindingCaseResponseArray data, response status code and response headers
20562050
def create_service_now_tickets_with_http_info(body, opts = {})
2057-
unstable_enabled = @api_client.config.unstable_operations["v2.create_service_now_tickets".to_sym]
2058-
if unstable_enabled
2059-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_service_now_tickets")
2060-
else
2061-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_service_now_tickets"))
2062-
end
20632051

20642052
if @api_client.config.debugging
20652053
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_service_now_tickets ...'

0 commit comments

Comments
 (0)