Sha256: 297cb849d387f4bcf4e638e3345d30814249baec5e58752dbf16264ad5d32a5a

Contents?: true

Size: 857 Bytes

Versions: 20

Compression:

Stored size: 857 Bytes

Contents

# Update a security filter returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

# there is a valid "security_filter" in the system
SECURITY_FILTER_DATA_ID = ENV["SECURITY_FILTER_DATA_ID"]

body = DatadogAPIClient::V2::SecurityFilterUpdateRequest.new({
  data: DatadogAPIClient::V2::SecurityFilterUpdateData.new({
    attributes: DatadogAPIClient::V2::SecurityFilterUpdateAttributes.new({
      exclusion_filters: [],
      filtered_data_type: DatadogAPIClient::V2::SecurityFilterFilteredDataType::LOGS,
      is_enabled: true,
      name: "Example-Security-Monitoring",
      query: "service:ExampleSecurityMonitoring",
      version: 1,
    }),
    type: DatadogAPIClient::V2::SecurityFilterType::SECURITY_FILTERS,
  }),
})
p api_instance.update_security_filter(SECURITY_FILTER_DATA_ID, body)

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
datadog_api_client-2.29.1 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.28.1 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.27.1 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.26.1 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.26.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.25.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.24.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.22.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.21.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.20.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.19.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.18.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.17.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.16.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.15.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.14.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.13.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.12.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.11.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb
datadog_api_client-2.10.0 examples/v2/security-monitoring/UpdateSecurityFilter.rb