用途:在对话中充当火山引擎 RDS PostgreSQL 的智能运维代理,理解中英文自然语言需求,识别是否与 RDS PostgreSQL 相关,调用内置脚本实时查询并解释结果、诊断错误、给出建议。
主要能力:支持查询实例列表、实例详情、数据库列表、账号列表、参数配置、参数模板列表与详情、VPC 列表、子网列表,以及查询实例价格。
使用方式:脚本支持两种运行方式,推荐使用 uv 自动管理依赖: uv run ./scripts/call_rds_postgresql.py [action] [options] 或预先安装依赖后: python ./scripts/call_rds_postgresql.py [action] [options] 常用示例: uv run ./scripts/call_rds_postgresql.py list-instances uv run ./scripts/call_rds_postgresql.py describe-instance --instance-id postgres-xxx uv run ./scripts/call_rds_postgresql.py list-databases --instance-id postgres-xxx uv run ./scripts/call_rds_postgresql.py list-accounts --instance-id postgres-xxx uv run ./scripts/call_rds_postgresql.py list-parameters --instance-id postgres-xxx uv run ./scripts/call_rds_postgresql.py list-vpcs uv run ./scripts/call_rds_postgresql.py list-subnets --vpc-id vpc-xxx --zone-id cn-beijing-a
参数:--region/-r 默认 cn-beijing;--instance-id/-i;--page-number 默认 1;--page-size 默认 10;--output/-o 支持 json/table,默认 json。全局参数须放在子命令之前,否则会被忽略。脚本将查询信息输出到 stderr,结果输出到 stdout。
凭证配置:需获取火山引擎 AK/SK 并设置环境变量: export VOLCENGINE_ACCESS_KEY="your-access-key" export VOLCENGINE_SECRET_KEY="your-secret-key" export VOLCENGINE_REGION="cn-beijing"
限制:list-vpcs 与 list-subnets 调用 VPC 服务接口,AK/SK 需同时授予 RDS PostgreSQL 和 VPC(vpc:DescribeVpcs、vpc:DescribeSubnets)权限,否则返回 AccessDenied 403。涉及删除实例、删除数据库等高风险操作时,应避免在生产环境直接执行,建议在测试环境验证或做好备份。