# 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).
import oci
from datetime import datetime
# 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.config.from_file()
# Initialize service client with default config file
generative_ai_client = oci.generative_ai.GenerativeAiClient(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(
create_vector_store_connector_details=oci.generative_ai.models.CreateVectorStoreConnectorDetails(
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.generative_ai.models.OciObjectStorageConfiguration(
type="OBJECT_STORAGE_FILES",
storage_config_list=[
oci.generative_ai.models.ObjectStorageConfig(
namespace="EXAMPLE-namespace-Value",
bucket_name="EXAMPLE-bucketName-Value",
prefix_list=["EXAMPLE--Value"])]),
description="EXAMPLE-description-Value",
schedule_config=oci.generative_ai.models.ScheduleIntervalConfig(
config_type="INTERVAL",
frequency="DAILY",
interval=308,
state="DISABLED",
time_start=datetime.strptime(
"2020-01-24T22:13:16.405Z",
"%Y-%m-%dT%H:%M:%S.%fZ"),
time_end=datetime.strptime(
"2048-04-20T20:12:48.899Z",
"%Y-%m-%dT%H:%M:%S.%fZ")),
vault_secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-vaultSecretId-Value",
freeform_tags={
'EXAMPLE_KEY_C4Y2f': 'EXAMPLE_VALUE_i20rLEpiASESWfl4gkz5'},
defined_tags={
'EXAMPLE_KEY_3n2Ul': {
'EXAMPLE_KEY_CFprX': 'EXAMPLE--Value'}}),
opc_retry_token="EXAMPLE-opcRetryToken-Value",
opc_request_id="X0RD06A0V7EERCOSJNDM<unique_ID>")
# Get the data from response
print(create_vector_store_connector_response.data)