Sha256: 58218e98ed0d77984a38cfbaffecd87e28f940e8a1156a88ec295e30c54df072

Contents?: true

Size: 926 Bytes

Versions: 5

Compression:

Stored size: 926 Bytes

Contents

# Mute or unmute a finding returns "OK" response

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

body = DatadogAPIClient::V2::MuteFindingRequest.new({
  data: DatadogAPIClient::V2::MuteFindingRequestData.new({
    attributes: DatadogAPIClient::V2::MuteFindingRequestAttributes.new({
      mute: DatadogAPIClient::V2::MuteFindingRequestProperties.new({
        description: "To be resolved later",
        expiration_date: 1778721573794,
        muted: true,
        reason: DatadogAPIClient::V2::FindingMuteReason::ACCEPTED_RISK,
      }),
    }),
    id: "AQAAAYbb1i0gijTHEQAAAABBWWJiMWkwZ0FBQ2FuNzBJVGZXZ3B3QUE",
    type: DatadogAPIClient::V2::FindingType::FINDING,
  }),
})
p api_instance.update_finding("AQAAAYbb1i0gijTHEQAAAABBWWJiMWkwZ0FBQ2FuNzBJVGZXZ3B3QUE", body)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
datadog_api_client-2.16.0 examples/v2/security-monitoring/UpdateFinding.rb
datadog_api_client-2.15.0 examples/v2/security-monitoring/UpdateFinding.rb
datadog_api_client-2.14.0 examples/v2/security-monitoring/UpdateFinding.rb
datadog_api_client-2.13.0 examples/v2/security-monitoring/UpdateFinding.rb
datadog_api_client-2.12.0 examples/v2/security-monitoring/UpdateFinding.rb