# 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
generative_ai_client = OCI::GenerativeAi::GenerativeAiClient.new(config: config)
# Send the request to service, some parameters are not required, see API doc for more info
create_vector_store_connector_response =
generative_ai_client.create_vector_store_connector(
OCI::GenerativeAi::Models::CreateVectorStoreConnectorDetails.new(
compartment_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value',
vector_store_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-vectorStoreId-Value',
display_name: 'EXAMPLE-displayName-Value',
configuration:
OCI::GenerativeAi::Models::OciObjectStorageConfiguration.new(
type: 'OBJECT_STORAGE_FILES',
storage_config_list: [
OCI::GenerativeAi::Models::ObjectStorageConfig.new(
namespace: 'EXAMPLE-namespace-Value',
bucket_name: 'EXAMPLE-bucketName-Value',
prefix_list: %w[EXAMPLE--Value]
)
]
),
description: 'EXAMPLE-description-Value',
schedule_config:
OCI::GenerativeAi::Models::ScheduleIntervalConfig.new(
config_type: 'INTERVAL',
frequency: 'HOURLY',
interval: 837,
state: 'ENABLED',
time_start: DateTime.parse('2021-01-07T01:45:38.987Z'),
time_end: DateTime.parse('2000-04-21T01:42:52.232Z')
),
vault_secret_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-vaultSecretId-Value',
freeform_tags: {
'EXAMPLE_KEY_VTTYs' => 'EXAMPLE_VALUE_OLu0DRlxIb2liANUwYKU'
},
defined_tags: {
'EXAMPLE_KEY_IPIih' => { 'EXAMPLE_KEY_VwQm8' => 'EXAMPLE--Value' }
}
)
)
# Get the data from response
puts "#{create_vector_store_connector_response.data}"