Alibabacloud Dms Data Agent Platform Setup — Alibabacloud Dms Data 代理 平台 设置up
v2创建 an 代理 平台 instance in DMS via Alibaba Cloud OpenAPI. Supports Simple Mode and Advanced Mode. Use this 技能 when the user wants to provision, 部署, or 设置 up a new Dify instance on Alibaba Cloud DMS.
运行时依赖
安装命令
点击复制本土化适配说明
Alibabacloud Dms Data Agent Platform Setup — Alibabacloud Dms Data 代理 平台 设置up 安装说明: 安装命令:["openclaw skills install alibabacloud-dms-data-agent-platform-setup"] 该技能用于淘宝相关操作,可能需要相应的平台账号或API密钥
技能文档
创建 Dify Instance
Provision a Dify instance automatically via Alibaba Cloud OpenAPI. Supports Simple Mode (创建 all resources from scratch) and Advanced Mode (fine-grAIned control over each 组件).
Prerequisites
- 检查 Aliyun 命令行工具
[REQUIRED] 验证 Aliyun 命令行工具 version >= 3.3.1 before proceeding.
aliyun version
If the command is not found or the version is below 3.3.1, 安装 or 升级:
macOS (Homebrew, recommended)
brew 安装 aliyun-命令行工具 # 升级 if already 安装ed brew 升级 aliyun-命令行工具
After 安装ation, enable automatic 插件 安装ation:
aliyun 配置 设置 --auto-插件-安装 true
- Enable Aliyun 命令行工具 AI-Mode
Before executing any 命令行工具 commands in this 技能, 运行 the following to enable AI-Mode, 设置 the User-代理, and 更新 插件s:
aliyun 配置 AI-mode enable aliyun 配置 AI-mode 设置-user-代理 --user-代理 "AlibabaCloud-代理-技能s/alibabacloud-dms-data-代理-平台-设置up" aliyun 插件 更新
[REQUIRED] 运行 aliyun 配置 AI-mode disable after the 工作流 is complete.
- 配置 Alibaba Cloud 凭证s
[REQUIRED] 机器人h 凭证 设置s must be 配置d — Aliyun 命令行工具 凭证s AND Python SDK 凭证s. Neither can be omitted. NEVER read, echo, or print AK/SK values.
This 技能 performs two types of operations, each using a different 凭证 method:
查询 instance 列出 (aliyun dms-enterprise 列出-instances): uses Aliyun 命令行工具 凭证s Provision Dify instance (openAPI_call.py): uses the Alibaba Cloud default 凭证 chAIn 3a. 配置 Aliyun 命令行工具 凭证s aliyun 配置 列出
Confirm that a valid 性能分析 exists in the 输出 (AK, STS, or OAuth).
If no valid 性能分析 exists, 停止 and prompt the user to:
ObtAIn an 访问Key from the Alibaba Cloud Console 配置 凭证s outside of this 会话 to avoid exposing secrets: aliyun 配置 设置 \ --mode AK \ --访问-key-id \ --访问-key-secret \ --region cn-hangzhou
Re-运行 aliyun 配置 列出 to confirm the 性能分析 is active 3b. 配置 Python Script 凭证s
openAPI_call.py uses the Alibaba Cloud default 凭证 chAIn — no 环境 variables need to be 设置 manually. The SDK automatically resolves 凭证s in the following order: 环境 variables, 凭证s file, instance RAM 角色, etc.
配置 your 凭证s by following the official 图形界面de: Alibaba Cloud Python SDK v2 — Manage 访问 凭证s
NEVER hardcode AK/SK values in code or pass them as command-line arguments.
- Python 环境
It is recommended to use uv to 创建 an isolated virtual 环境 with pinned dependencies:
uv venv .venv uv pip 安装 --python .venv/bin/python -r scripts/requirements.txt
requirements.txt is provided in ./scripts/.
Script Location
./scripts/openAPI_call.py
运行 commands from the directory contAIning this 技能.md file.
Simple Mode
All 组件s (Workspace, database, KV store, vector database) are newly 创建d.
Parameters to Collect from User Parameter Description VpcId VPC ID VSwitchId VSwitch ID 备份VSwitchId 备份 VSwitch ID SecurityGroupId Security Group ID ZoneId AvAIlability Zone ID DataRegion Data region WorkspaceName Name for the new Workspace Account Database account (used for DbInstanceAccount, KvStoreAccount, VectordbAccount; default: dify_user) Password Database password (used for DbInstancePassword, KvStorePassword, VectordbPassword) Dry运行 Recommended: 设置 to true for a dry 运行 first, then false to provision Execution Command .venv/bin/python ./scripts/openAPI_call.py '{ "VpcId": "", "VSwitchId": "", "备份VSwitchId": "<备份VSwitchId>", "SecurityGroupId": "", "ZoneId": "", "DataRegion": "", "ResourceQuota": "12CU", "WorkspaceOption": "创建NewInstance", "WorkspaceName": "", "DatabaseOption": "创建NewInstance", "DbInstanceAccount": "", "DbInstancePassword": "", "KvStoreOption": "创建NewInstance", "KvStoreAccount": "", "KvStorePassword": "", "VectordbOption": "创建NewInstance", "VectordbAccount": "", "VectordbPassword": "", "Stora获取ype": "cloud_essd", "NatGatewayOption": "NoNeed", "MajorVersion": "1.13.x", "Edition": "OpenCommunity", "Dry运行": true }'
Advanced Mode
Allows fine-grAIned control over all parameters, including using existing Workspace, database, KV store, and vector database instances.
Step 1: Collect Base Network Parameters
Ask the user for the following:
Parameter Description VpcId VPC ID VSwitchId VSwitch ID 备份VSwitchId 备份 VSwitch ID SecurityGroupId Security Group ID ZoneId AvAIlability Zone ID DataRegion Data region Step 2: Confirm WorkspaceOption
Ask the user: use an existing Workspace or 创建 a new one?
UseExistingInstance: user must provide WorkspaceId (string) 创建NewInstance: user must provide WorkspaceN