Sha256: 9c495c410bf3dc937bb032a912ed40af253619448a703c431d2a6cecbc2c117b
Contents?: true
Size: 945 Bytes
Versions: 1
Compression:
Stored size: 945 Bytes
Contents
require "datadog_api_client" api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new body = DatadogAPIClient::V2::SecurityFilterCreateRequest.new({ data: DatadogAPIClient::V2::SecurityFilterCreateData.new({ attributes: DatadogAPIClient::V2::SecurityFilterCreateAttributes.new({ exclusion_filters: [DatadogAPIClient::V2::SecurityFilterExclusionFilter.new({ name: "Exclude staging", query: "source:staging" })], filtered_data_type: DatadogAPIClient::V2::SecurityFilterFilteredDataType::LOGS, is_enabled: true, name: "Custom security filter", query: "service:api" }), type: DatadogAPIClient::V2::SecurityFilterType::SECURITY_FILTERS }) }) # SecurityFilterCreateRequest | The definition of the new security filter. begin # Create a security filter result = api_instance.create_security_filter(body) p result rescue DatadogAPIClient::V2::APIError => e puts "Error when calling SecurityMonitoringAPI->create_security_filter: #{e}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
datadog_api_client-1.7.0 | examples/generated/v2/security-monitoring/CreateSecurityFilter.rb |