diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 53a4ea6a1a5..d92bb93db9a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -179962,9 +179962,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 Linear issues for security findings. @@ -180038,9 +180035,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/findings/mute: patch: description: >- diff --git a/api/datadog/configuration.go b/api/datadog/configuration.go index 9fb4fda860f..b84bf0a6fd7 100644 --- a/api/datadog/configuration.go +++ b/api/datadog/configuration.go @@ -775,7 +775,6 @@ func NewConfiguration() *Configuration { "v2.ListAWSCloudAuthPersonaMappings": false, "v2.ActivateContentPack": false, "v2.ActivateIntegration": false, - "v2.AttachLinearIssue": false, "v2.BatchGetSecurityMonitoringDatasetDependencies": false, "v2.BulkCreateSampleLogGenerationSubscriptions": false, "v2.BulkExportSecurityMonitoringTerraformResources": false, @@ -783,7 +782,6 @@ func NewConfiguration() *Configuration { "v2.ConvertJobResultToSignal": false, "v2.ConvertSecurityMonitoringTerraformResource": false, "v2.CreateIoCTriageState": false, - "v2.CreateLinearIssues": false, "v2.CreateSampleLogGenerationSubscription": false, "v2.CreateSecurityFindingsAutomationDueDateRule": false, "v2.CreateSecurityFindingsAutomationMuteRule": false, diff --git a/api/datadogV2/api_security_monitoring.go b/api/datadogV2/api_security_monitoring.go index 51f48542cce..c01f8e9bfe1 100644 --- a/api/datadogV2/api_security_monitoring.go +++ b/api/datadogV2/api_security_monitoring.go @@ -401,15 +401,6 @@ func (a *SecurityMonitoringApi) AttachLinearIssue(ctx _context.Context, body Att localVarReturnValue FindingCaseResponse ) - operationId := "v2.AttachLinearIssue" - isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId) - if !isOperationEnabled { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} - } - if isOperationEnabled && a.Client.Cfg.Debug { - _log.Printf("WARNING: Using unstable operation '%s'", operationId) - } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SecurityMonitoringApi.AttachLinearIssue") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} @@ -2103,15 +2094,6 @@ func (a *SecurityMonitoringApi) CreateLinearIssues(ctx _context.Context, body Cr localVarReturnValue FindingCaseResponseArray ) - operationId := "v2.CreateLinearIssues" - isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId) - if !isOperationEnabled { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)} - } - if isOperationEnabled && a.Client.Cfg.Debug { - _log.Printf("WARNING: Using unstable operation '%s'", operationId) - } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.SecurityMonitoringApi.CreateLinearIssues") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} diff --git a/examples/v2/security-monitoring/AttachLinearIssue.go b/examples/v2/security-monitoring/AttachLinearIssue.go index 7691827030a..b8a16f93b0e 100644 --- a/examples/v2/security-monitoring/AttachLinearIssue.go +++ b/examples/v2/security-monitoring/AttachLinearIssue.go @@ -39,7 +39,6 @@ func main() { } ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() - configuration.SetUnstableOperationEnabled("v2.AttachLinearIssue", true) apiClient := datadog.NewAPIClient(configuration) api := datadogV2.NewSecurityMonitoringApi(apiClient) resp, r, err := api.AttachLinearIssue(ctx, body) diff --git a/examples/v2/security-monitoring/CreateLinearIssues.go b/examples/v2/security-monitoring/CreateLinearIssues.go index 5defb6192ba..ac766b84c46 100644 --- a/examples/v2/security-monitoring/CreateLinearIssues.go +++ b/examples/v2/security-monitoring/CreateLinearIssues.go @@ -48,7 +48,6 @@ func main() { } ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() - configuration.SetUnstableOperationEnabled("v2.CreateLinearIssues", true) apiClient := datadog.NewAPIClient(configuration) api := datadogV2.NewSecurityMonitoringApi(apiClient) resp, r, err := api.CreateLinearIssues(ctx, body) diff --git a/tests/scenarios/features/v2/security_monitoring.feature b/tests/scenarios/features/v2/security_monitoring.feature index c713293f463..10c4c66afa1 100644 --- a/tests/scenarios/features/v2/security_monitoring.feature +++ b/tests/scenarios/features/v2/security_monitoring.feature @@ -140,24 +140,21 @@ Feature: Security Monitoring @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a Linear issue returns "Bad Request" response - Given operation "AttachLinearIssue" enabled - And new "AttachLinearIssue" request + Given new "AttachLinearIssue" request And body with value {"data": {"attributes": {"linear_issue_url": "https://linear.app/your-workspace/issue/ENG-123"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}} 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 Linear issue returns "Not Found" response - Given operation "AttachLinearIssue" enabled - And new "AttachLinearIssue" request + Given new "AttachLinearIssue" request And body with value {"data": {"attributes": {"linear_issue_url": "https://linear.app/your-workspace/issue/ENG-123"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}} 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 Linear issue returns "OK" response - Given operation "AttachLinearIssue" enabled - And new "AttachLinearIssue" request + Given new "AttachLinearIssue" request And body with value {"data": {"attributes": {"linear_issue_url": "https://linear.app/your-workspace/issue/ENG-123"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}} When the request is sent Then the response status is 200 OK @@ -580,24 +577,21 @@ Feature: Security Monitoring @generated @skip @team:DataDog/k9-investigation Scenario: Create Linear issues for security findings returns "Bad Request" response - Given operation "CreateLinearIssues" enabled - And new "CreateLinearIssues" request + Given new "CreateLinearIssues" request And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Linear issue.", "label_ids": ["a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"], "linear_project_id": "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d", "priority": "NOT_DEFINED", "title": "A title for the Linear issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}]} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/k9-investigation Scenario: Create Linear issues for security findings returns "Created" response - Given operation "CreateLinearIssues" enabled - And new "CreateLinearIssues" request + Given new "CreateLinearIssues" request And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Linear issue.", "label_ids": ["a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"], "linear_project_id": "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d", "priority": "NOT_DEFINED", "title": "A title for the Linear issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}]} When the request is sent Then the response status is 201 Created @generated @skip @team:DataDog/k9-investigation Scenario: Create Linear issues for security findings returns "Not Found" response - Given operation "CreateLinearIssues" enabled - And new "CreateLinearIssues" request + Given new "CreateLinearIssues" request And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Linear issue.", "label_ids": ["a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"], "linear_project_id": "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d", "priority": "NOT_DEFINED", "title": "A title for the Linear issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}]} When the request is sent Then the response status is 404 Not Found