-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_connector.py
More file actions
44 lines (33 loc) · 1.05 KB
/
update_connector.py
File metadata and controls
44 lines (33 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""
Author: L. Saetta
Last modified: 2026-03-16
License: MIT
Description:
Update schedule settings for an existing connector.
"""
from oci.generative_ai.models import (
UpdateVectorStoreConnectorDetails,
ScheduleIntervalConfig,
)
from common import build_oci_genai_client, print_runtime_config
CONNECTOR_ID = "put your ocid"
def main() -> None:
"""Update schedule settings for a connector by OCID."""
print_runtime_config()
print("")
genai_client = build_oci_genai_client()
details = UpdateVectorStoreConnectorDetails(
schedule_config=ScheduleIntervalConfig(
config_type="INTERVAL",
frequency="HOURLY",
interval=1,
state="ENABLED",
),
)
update_response = genai_client.update_vector_store_connector(CONNECTOR_ID, details)
connector = update_response.data
print(f"Updated connector : {connector.display_name}")
print(f" description : {connector.description}")
print(f" lifecycle : {connector.lifecycle_state}")
if __name__ == "__main__":
main()