Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 51 additions & 12 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67238,6 +67238,32 @@ components:
type: string
x-enum-varnames:
- CLICKHOUSE
ObservabilityPipelineClientTls:
description: Configuration for enabling TLS encryption between the pipeline component and external services.
properties:
ca_file:
description: Path to the Certificate Authority (CA) file used to validate the server鈥檚 TLS certificate.
type: string
crt_file:
description: Path to the TLS client certificate file used to authenticate the pipeline component with upstream or downstream services.
example: "/path/to/cert.crt"
type: string
key_file:
description: Path to the private key file associated with the TLS client certificate. Used for mutual TLS authentication.
type: string
key_pass_key:
description: Name of the environment variable or secret that holds the passphrase for the private key file.
example: TLS_KEY_PASSPHRASE
type: string
server_name:
description: Server name to use for Server Name Indication (SNI) and to verify against the certificate presented by the remote host. Use this when the address you connect to doesn't match the certificate's Common Name or Subject Alternative Name.
example: server.example.com
maxLength: 253
minLength: 1
type: string
required:
- crt_file
type: object
ObservabilityPipelineCloudPremDestination:
description: |-
The `cloud_prem` destination sends logs to Datadog CloudPrem.
Expand All @@ -67262,7 +67288,7 @@ components:
type: string
type: array
tls:
$ref: "#/components/schemas/ObservabilityPipelineTls"
$ref: "#/components/schemas/ObservabilityPipelineClientTls"
description: Configuration for TLS encryption.
type:
$ref: "#/components/schemas/ObservabilityPipelineCloudPremDestinationType"
Expand Down Expand Up @@ -68977,7 +69003,7 @@ components:
example: HTTP_AUTH_PASSWORD
type: string
tls:
$ref: "#/components/schemas/ObservabilityPipelineTls"
$ref: "#/components/schemas/ObservabilityPipelineClientTls"
token_key:
description: Name of the environment variable or secret that holds the bearer token (used when `auth_strategy` is `bearer`).
example: HTTP_AUTH_TOKEN
Expand Down Expand Up @@ -69075,7 +69101,7 @@ components:
format: int64
type: integer
tls:
$ref: "#/components/schemas/ObservabilityPipelineTls"
$ref: "#/components/schemas/ObservabilityPipelineClientTls"
token_key:
description: Name of the environment variable or secret that holds the bearer token (used when `auth_strategy` is `bearer`).
example: HTTP_AUTH_TOKEN
Expand Down Expand Up @@ -71158,7 +71184,7 @@ components:
mode:
$ref: "#/components/schemas/ObservabilityPipelineSocketDestinationMode"
tls:
$ref: "#/components/schemas/ObservabilityPipelineTls"
$ref: "#/components/schemas/ObservabilityPipelineClientTls"
description: TLS configuration. Relevant only when `mode` is `tcp`.
type:
$ref: "#/components/schemas/ObservabilityPipelineSocketDestinationType"
Expand Down Expand Up @@ -71890,7 +71916,7 @@ components:
minimum: 0
type: integer
tls:
$ref: "#/components/schemas/ObservabilityPipelineTls"
$ref: "#/components/schemas/ObservabilityPipelineClientTls"
type:
$ref: "#/components/schemas/ObservabilityPipelineSyslogNgDestinationType"
required:
Expand Down Expand Up @@ -87654,13 +87680,26 @@ components:
ScheduleTrigger:
description: "Trigger a workflow from a Schedule. The workflow must be published."
properties:
overlapBehavior:
$ref: "#/components/schemas/ScheduleTriggerOverlapBehavior"
rruleExpression:
description: "Recurrence rule expression for scheduling."
example: ""
type: string
required:
- rruleExpression
type: object
ScheduleTriggerOverlapBehavior:
default: EXCLUSIVE_RUN
description: Controls whether a scheduled workflow run may start while another instance is still running.
enum:
- EXCLUSIVE_RUN
- OVERLAP_ALLOWED
example: EXCLUSIVE_RUN
type: string
x-enum-varnames:
- EXCLUSIVE_RUN
- OVERLAP_ALLOWED
ScheduleTriggerWrapper:
description: "Schema for a Schedule-based trigger."
properties:
Expand Down Expand Up @@ -138086,7 +138125,7 @@ paths:
get:
description: |-
Returns a list of environments for the organization.
Supports filtering by name and key.
Supports filtering by name, key, and DD_ENV.
operationId: ListFeatureFlagsEnvironments
parameters:
- description: Filter environments by name (partial matching).
Expand All @@ -138101,6 +138140,12 @@ paths:
name: key
schema:
type: string
- description: Filter environments by queries that contain the provided DD_ENV value.
example: "staging"
in: query
name: dd_env
schema:
type: string
- description: Maximum number of results to return.
example: 10
in: query
Expand Down Expand Up @@ -179962,9 +180007,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.
Expand Down Expand Up @@ -180038,9 +180080,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: >-
Expand Down
3 changes: 0 additions & 3 deletions examples/v2/security-monitoring/AttachLinearIssue.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Attach security findings to a Linear issue returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.attach_linear_issue".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

body = DatadogAPIClient::V2::AttachLinearIssueRequest.new({
Expand Down
3 changes: 0 additions & 3 deletions examples/v2/security-monitoring/CreateLinearIssues.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Create Linear issues for security findings returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_linear_issues".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

body = DatadogAPIClient::V2::CreateLinearIssueRequestArray.new({
Expand Down
1 change: 1 addition & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3315,6 +3315,7 @@
"v2.ListFeatureFlagsEnvironments" => {
"name" => "String",
"key" => "String",
"dd_env" => "String",
"limit" => "Integer",
"offset" => "Integer",
},
Expand Down
18 changes: 6 additions & 12 deletions features/v2/security_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,13 @@ def initialize
"v2.list_aws_cloud_auth_persona_mappings": false,
"v2.activate_content_pack": false,
"v2.activate_integration": false,
"v2.attach_linear_issue": false,
"v2.batch_get_security_monitoring_dataset_dependencies": false,
"v2.bulk_create_sample_log_generation_subscriptions": false,
"v2.bulk_export_security_monitoring_terraform_resources": false,
"v2.cancel_historical_job": false,
"v2.convert_job_result_to_signal": false,
"v2.convert_security_monitoring_terraform_resource": false,
"v2.create_io_c_triage_state": false,
"v2.create_linear_issues": false,
"v2.create_sample_log_generation_subscription": false,
"v2.create_security_findings_automation_due_date_rule": false,
"v2.create_security_findings_automation_mute_rule": false,
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5122,6 +5122,7 @@ def overrides
"v2.observability_pipeline_clickhouse_destination_compression_object" => "ObservabilityPipelineClickhouseDestinationCompressionObject",
"v2.observability_pipeline_clickhouse_destination_format" => "ObservabilityPipelineClickhouseDestinationFormat",
"v2.observability_pipeline_clickhouse_destination_type" => "ObservabilityPipelineClickhouseDestinationType",
"v2.observability_pipeline_client_tls" => "ObservabilityPipelineClientTls",
"v2.observability_pipeline_cloud_prem_destination" => "ObservabilityPipelineCloudPremDestination",
"v2.observability_pipeline_cloud_prem_destination_type" => "ObservabilityPipelineCloudPremDestinationType",
"v2.observability_pipeline_config" => "ObservabilityPipelineConfig",
Expand Down Expand Up @@ -6473,6 +6474,7 @@ def overrides
"v2.schedule_target_position" => "ScheduleTargetPosition",
"v2.schedule_target_type" => "ScheduleTargetType",
"v2.schedule_trigger" => "ScheduleTrigger",
"v2.schedule_trigger_overlap_behavior" => "ScheduleTriggerOverlapBehavior",
"v2.schedule_trigger_wrapper" => "ScheduleTriggerWrapper",
"v2.schedule_update_request" => "ScheduleUpdateRequest",
"v2.schedule_update_request_data" => "ScheduleUpdateRequestData",
Expand Down
4 changes: 3 additions & 1 deletion lib/datadog_api_client/v2/api/feature_flags_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -875,11 +875,12 @@ def list_feature_flags_environments(opts = {})
# List environments.
#
# Returns a list of environments for the organization.
# Supports filtering by name and key.
# Supports filtering by name, key, and DD_ENV.
#
# @param opts [Hash] the optional parameters
# @option opts [String] :name Filter environments by name (partial matching).
# @option opts [String] :key Filter environments by key (partial matching).
# @option opts [String] :dd_env Filter environments by queries that contain the provided DD_ENV value.
# @option opts [Integer] :limit Maximum number of results to return.
# @option opts [Integer] :offset Number of results to skip.
# @return [Array<(ListEnvironmentsResponse, Integer, Hash)>] ListEnvironmentsResponse data, response status code and response headers
Expand All @@ -904,6 +905,7 @@ def list_feature_flags_environments_with_http_info(opts = {})
query_params = opts[:query_params] || {}
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
query_params[:'key'] = opts[:'key'] if !opts[:'key'].nil?
query_params[:'dd_env'] = opts[:'dd_env'] if !opts[:'dd_env'].nil?
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

Expand Down
12 changes: 0 additions & 12 deletions lib/datadog_api_client/v2/api/security_monitoring_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,6 @@ def attach_linear_issue(body, opts = {})
# @param opts [Hash] the optional parameters
# @return [Array<(FindingCaseResponse, Integer, Hash)>] FindingCaseResponse data, response status code and response headers
def attach_linear_issue_with_http_info(body, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.attach_linear_issue".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.attach_linear_issue")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.attach_linear_issue"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.attach_linear_issue ...'
Expand Down Expand Up @@ -1774,12 +1768,6 @@ def create_linear_issues(body, opts = {})
# @param opts [Hash] the optional parameters
# @return [Array<(FindingCaseResponseArray, Integer, Hash)>] FindingCaseResponseArray data, response status code and response headers
def create_linear_issues_with_http_info(body, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.create_linear_issues".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_linear_issues")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_linear_issues"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_linear_issues ...'
Expand Down
Loading
Loading