diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 95e9aad6a..d6bc1bc09 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -166470,9 +166470,6 @@ paths: permissions: - security_monitoring_findings_write - appsec_vm_write - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: description: >- Create ServiceNow tickets for security findings. @@ -166543,9 +166540,6 @@ paths: permissions: - security_monitoring_findings_write - appsec_vm_write - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security/sboms: get: description: |- diff --git a/examples/v2_security-monitoring_AttachServiceNowTicket.rs b/examples/v2_security-monitoring_AttachServiceNowTicket.rs index 3b6c13c01..c230f21c5 100644 --- a/examples/v2_security-monitoring_AttachServiceNowTicket.rs +++ b/examples/v2_security-monitoring_AttachServiceNowTicket.rs @@ -41,8 +41,7 @@ async fn main() { ServiceNowTicketsDataType::SERVICENOW_TICKETS, ), ); - let mut configuration = datadog::Configuration::new(); - configuration.set_unstable_operation_enabled("v2.AttachServiceNowTicket", true); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.attach_service_now_ticket(body).await; if let Ok(value) = resp { diff --git a/examples/v2_security-monitoring_CreateServiceNowTickets.rs b/examples/v2_security-monitoring_CreateServiceNowTickets.rs index cbaf740d9..7e1719763 100644 --- a/examples/v2_security-monitoring_CreateServiceNowTickets.rs +++ b/examples/v2_security-monitoring_CreateServiceNowTickets.rs @@ -37,8 +37,7 @@ async fn main() { .priority(CasePriority::NOT_DEFINED) .title("A title for the ServiceNow ticket.".to_string()), )]); - let mut configuration = datadog::Configuration::new(); - configuration.set_unstable_operation_enabled("v2.CreateServiceNowTickets", true); + let configuration = datadog::Configuration::new(); let api = SecurityMonitoringAPI::with_config(configuration); let resp = api.create_service_now_tickets(body).await; if let Ok(value) = resp { diff --git a/src/datadog/configuration.rs b/src/datadog/configuration.rs index 699fac891..24bb229c1 100644 --- a/src/datadog/configuration.rs +++ b/src/datadog/configuration.rs @@ -291,7 +291,6 @@ impl Default for Configuration { ("v2.get_aws_cloud_auth_persona_mapping".to_owned(), false), ("v2.list_aws_cloud_auth_persona_mappings".to_owned(), false), ("v2.activate_content_pack".to_owned(), false), - ("v2.attach_service_now_ticket".to_owned(), false), ( "v2.batch_get_security_monitoring_dataset_dependencies".to_owned(), false, @@ -319,7 +318,6 @@ impl Default for Configuration { "v2.create_security_monitoring_integration_config".to_owned(), false, ), - ("v2.create_service_now_tickets".to_owned(), false), ("v2.create_static_analysis_ast".to_owned(), false), ( "v2.create_static_analysis_server_analysis".to_owned(), diff --git a/src/datadogV2/api/api_security_monitoring.rs b/src/datadogV2/api/api_security_monitoring.rs index 72199b3b0..f32d4d89b 100644 --- a/src/datadogV2/api/api_security_monitoring.rs +++ b/src/datadogV2/api/api_security_monitoring.rs @@ -3063,14 +3063,6 @@ impl SecurityMonitoringAPI { > { let local_configuration = &self.config; let operation_id = "v2.attach_service_now_ticket"; - if local_configuration.is_unstable_operation_enabled(operation_id) { - warn!("Using unstable operation {operation_id}"); - } else { - let local_error = datadog::UnstableOperationDisabledError { - msg: "Operation 'v2.attach_service_now_ticket' is not enabled".to_string(), - }; - return Err(datadog::Error::UnstableOperationDisabledError(local_error)); - } let local_client = &self.client; @@ -7042,14 +7034,6 @@ impl SecurityMonitoringAPI { > { let local_configuration = &self.config; let operation_id = "v2.create_service_now_tickets"; - if local_configuration.is_unstable_operation_enabled(operation_id) { - warn!("Using unstable operation {operation_id}"); - } else { - let local_error = datadog::UnstableOperationDisabledError { - msg: "Operation 'v2.create_service_now_tickets' is not enabled".to_string(), - }; - return Err(datadog::Error::UnstableOperationDisabledError(local_error)); - } let local_client = &self.client; diff --git a/tests/scenarios/features/v2/security_monitoring.feature b/tests/scenarios/features/v2/security_monitoring.feature index ce99ef89a..40957727e 100644 --- a/tests/scenarios/features/v2/security_monitoring.feature +++ b/tests/scenarios/features/v2/security_monitoring.feature @@ -113,24 +113,21 @@ Feature: Security Monitoring @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a ServiceNow ticket returns "Bad Request" response - Given operation "AttachServiceNowTicket" enabled - And new "AttachServiceNowTicket" request + Given new "AttachServiceNowTicket" request 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"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a ServiceNow ticket returns "Not Found" response - Given operation "AttachServiceNowTicket" enabled - And new "AttachServiceNowTicket" request + Given new "AttachServiceNowTicket" request 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"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a ServiceNow ticket returns "OK" response - Given operation "AttachServiceNowTicket" enabled - And new "AttachServiceNowTicket" request + Given new "AttachServiceNowTicket" request 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"}} When the request is sent Then the response status is 200 OK @@ -532,24 +529,21 @@ Feature: Security Monitoring @generated @skip @team:DataDog/k9-investigation Scenario: Create ServiceNow tickets for security findings returns "Bad Request" response - Given operation "CreateServiceNowTickets" enabled - And new "CreateServiceNowTickets" request + Given new "CreateServiceNowTickets" request 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"}]} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/k9-investigation Scenario: Create ServiceNow tickets for security findings returns "Created" response - Given operation "CreateServiceNowTickets" enabled - And new "CreateServiceNowTickets" request + Given new "CreateServiceNowTickets" request 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"}]} When the request is sent Then the response status is 201 Created @generated @skip @team:DataDog/k9-investigation Scenario: Create ServiceNow tickets for security findings returns "Not Found" response - Given operation "CreateServiceNowTickets" enabled - And new "CreateServiceNowTickets" request + Given new "CreateServiceNowTickets" request 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"}]} When the request is sent Then the response status is 404 Not Found