analyticdb_config.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. from typing import Optional
  2. from pydantic import BaseModel, Field
  3. class AnalyticdbConfig(BaseModel):
  4. """
  5. Configuration for connecting to AnalyticDB.
  6. Refer to the following documentation for details on obtaining credentials:
  7. https://www.alibabacloud.com/help/en/analyticdb-for-postgresql/getting-started/create-an-instance-instances-with-vector-engine-optimization-enabled
  8. """
  9. ANALYTICDB_KEY_ID : Optional[str] = Field(
  10. default=None,
  11. description="The Access Key ID provided by Alibaba Cloud for authentication."
  12. )
  13. ANALYTICDB_KEY_SECRET : Optional[str] = Field(
  14. default=None,
  15. description="The Secret Access Key corresponding to the Access Key ID for secure access."
  16. )
  17. ANALYTICDB_REGION_ID : Optional[str] = Field(
  18. default=None,
  19. description="The region where the AnalyticDB instance is deployed (e.g., 'cn-hangzhou')."
  20. )
  21. ANALYTICDB_INSTANCE_ID : Optional[str] = Field(
  22. default=None,
  23. description="The unique identifier of the AnalyticDB instance you want to connect to (e.g., 'gp-ab123456').."
  24. )
  25. ANALYTICDB_ACCOUNT : Optional[str] = Field(
  26. default=None,
  27. description="The account name used to log in to the AnalyticDB instance."
  28. )
  29. ANALYTICDB_PASSWORD : Optional[str] = Field(
  30. default=None,
  31. description="The password associated with the AnalyticDB account for authentication."
  32. )
  33. ANALYTICDB_NAMESPACE : Optional[str] = Field(
  34. default=None,
  35. description="The namespace within AnalyticDB for schema isolation."
  36. )
  37. ANALYTICDB_NAMESPACE_PASSWORD : Optional[str] = Field(
  38. default=None,
  39. description="The password for accessing the specified namespace within the AnalyticDB instance."
  40. )