# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).
require 'date'
require 'oci'
# Create a default config using DEFAULT profile in default location
# Refer to https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File for more info
config = OCI::ConfigFileLoader.load_config
# Initialize service client with default config file
threat_intelligence_client =
OCI::ThreatIntelligence::ThreatintelClient.new(config: config)
# Send the request to service, some parameters are not required, see API doc for more info
summarize_indicators_response =
threat_intelligence_client.summarize_indicators(
'ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value',
OCI::ThreatIntelligence::Models::SummarizeIndicatorsDetails.new(
indicator_type: 'URL',
indicator_value: 'EXAMPLE-indicatorValue-Value',
threat_types: %w[EXAMPLE--Value],
confidence_greater_than_or_equal_to: 6,
time_updated_greater_than_or_equal_to:
DateTime.parse('2004-09-10T20:28:53.884Z'),
time_updated_less_than: DateTime.parse('2029-01-04T19:15:03.542Z'),
time_last_seen_greater_than_or_equal_to:
DateTime.parse('2041-02-10T11:07:01.053Z'),
time_last_seen_less_than: DateTime.parse('2031-04-20T08:52:49.864Z'),
time_created_greater_than_or_equal_to:
DateTime.parse('2000-01-29T03:51:09.608Z'),
time_created_less_than: DateTime.parse('2042-03-01T20:17:43.421Z'),
indicator_seen_by: 'EXAMPLE-indicatorSeenBy-Value',
malware: 'EXAMPLE-malware-Value',
threat_actor: 'EXAMPLE-threatActor-Value',
sort_order: 'ASC',
sort_by: 'TIMEUPDATED'
)
)
# Get the data from response
puts "#{summarize_indicators_response.data}"