alibabacloud-dataworks-infra-manage
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDataWorks Infrastructure Management
DataWorks 基础设施管理
Unified management of Data Sources, Compute Resources, and Resource Groups in Alibaba Cloud DataWorks workspaces, supporting create and query operations.
统一管理阿里云 DataWorks 工作空间内的 数据源、计算资源 和 资源组,支持创建和查询操作。
Architecture
架构
DataWorks
├── Workspaces ─── Query and search workspaces
│ ├── Data Sources ─── 51 types: MySQL, Hologres, MaxCompute, ...
│ └── Compute Resources ─── Hologres, MaxCompute, Flink, Spark
└── Resource Groups ─── Serverless resource group management (cross-workspace)
Dependencies:
Workspace ◀── Data Sources, Compute Resources (must belong to a workspace)
Workspace ◀── Resource Groups (associated via binding; one resource group can bind to multiple workspaces)
Connectivity Test ──depends on──▶ Resource Group (must be bound to the workspace of the data source)
Standard Mode ──requires──▶ Dev (Development) + Prod (Production) dual data sources and compute resourcesDataWorks
├── Workspaces ─── 查询和搜索工作空间
│ ├── Data Sources ─── 51种:MySQL、Hologres、MaxCompute、...
│ └── Compute Resources ─── Hologres、MaxCompute、Flink、Spark
└── Resource Groups ─── Serverless 资源组管理(跨工作空间)
依赖关系:
工作空间 ◀── 数据源、计算资源(必须隶属于某个工作空间)
工作空间 ◀── 资源组(通过绑定关联;一个资源组可绑定多个工作空间)
连通性测试 ──依赖──▶ 资源组(必须绑定到数据源所属的工作空间)
标准模式 ──要求──▶ 开发(Dev)+ 生产(Prod)双数据源和计算资源Global Rules
全局规则
Prerequisites
前置条件
- Aliyun CLI >= 3.3.1: (Installation guide: references/cli-installation-guide.md)
aliyun version - First-time use:
aliyun configure set --auto-plugin-install true - jq (required for resource group operations):
which jq - Credential status: , verify valid credentials exist
aliyun configure list - DataWorks edition: Basic edition or above required
Security Rules: DO NOT read/print/echo AK/SK values, DO NOT let users input AK/SK directly, ONLY useto check credential status.aliyun configure list
- Aliyun CLI >= 3.3.1:执行 查看(安装指南:references/cli-installation-guide.md)
aliyun version - 首次使用配置:执行
aliyun configure set --auto-plugin-install true - jq(资源组操作必需):执行 确认已安装
which jq - 凭证状态:执行 验证存在有效凭证
aliyun configure list - DataWorks 版本:需要基础版及以上版本
安全规则:严禁 读取/打印/输出 AK/SK 数值,严禁 让用户直接输入 AK/SK,仅可 使用检查凭证状态。aliyun configure list
Command Formatting
命令格式化要求
- User-Agent (mandatory): All CLI commands must include the
aliyunparameter to identify the source.--user-agent AlibabaCloud-Agent-Skills - Single-line commands: When executing Bash commands, must construct as a single-line string; do not use for line breaks.
\ - jq step-by-step execution: First execute the command to get JSON, then format with
aliyun(to avoid multi-line security prompts).jq - Endpoint mandatory: When specifying the parameter, you must also add
--region. Not needed when--endpoint dataworks.<REGION_ID>.aliyuncs.comis not specified.--region
- User-Agent(必填):所有 CLI 命令 必须 携带
aliyun参数标识请求来源。--user-agent AlibabaCloud-Agent-Skills - 单行命令要求:执行 Bash 命令时 必须 构造为 单行字符串,不可使用 换行。
\ - jq 分步执行:先执行 命令获取 JSON,再用
aliyun格式化(避免多行安全提示)。jq - Endpoint 要求:指定 参数时 必须 同时添加
--region,未指定--endpoint dataworks.<REGION_ID>.aliyuncs.com时无需添加。--region
Parameter Confirmation
参数确认规则
Before executing any command, all user-customizable parameters must be confirmed by the user. Do not assume or use default values. Exception: When the user has explicitly specified parameter values in the conversation, use them directly without re-confirmation.
Resource group related parameters (mandatory user selection): VPC, VSwitch, Resource Group ID (for binding/connectivity testing) — involve networking and billing, DO NOT auto-select; must display a list for the user to explicitly choose. Confirm even if there is only one option.
执行任何命令前,所有用户可自定义参数 必须 经用户确认,不可假设或使用默认值。 例外:当用户在对话中 明确指定 参数值时,可直接使用无需二次确认。
资源组相关参数(必须由用户选择):VPC、VSwitch、资源组 ID(用于绑定/连通性测试)——涉及网络和计费,严禁自动选择,必须展示列表供用户明确选择,即便只有一个选项也需要确认。
RAM Permissions
RAM 权限要求
All operations require permissions. Creating resource groups additionally requires and , .
dataworks:<APIAction>AliyunBSSOrderAccessvpc:DescribeVpcsvpc:DescribeVSwitchesFull permission matrix: references/ram-policies.md
所有操作都需要 权限。创建资源组额外需要 、、 权限。
dataworks:<APIAction>AliyunBSSOrderAccessvpc:DescribeVpcsvpc:DescribeVSwitches完整权限矩阵:references/ram-policies.md
Quick Start: New Workspace Infrastructure Initialization
快速入门:新工作空间基础设施初始化
When the user is unsure about specific operations or has vague requirements, guide them through the following process:
- Environment check — Check CLI and credentials per Prerequisites
- Confirm workspace — Use to locate the workspace,
ListProjectsto confirm the mode (Simple/Standard)GetProject - Create compute resources — Guide engine type selection; the system will automatically create corresponding data sources. Standard Mode requires Dev+Prod pairs. Only pure storage-type data sources (MySQL, Kafka, etc.) need separate data source creation
- Create/bind resource groups — Query existing resource groups → let user select → bind. Guide creation when no resource groups are available
- Test connectivity — Test with bound resource groups; when all pass, inform "Infrastructure configuration complete"
After each step, proactively suggest the next action.
当用户 不确定具体操作 或需求模糊时,引导用户按照以下流程操作:
- 环境检查 —— 按照前置条件要求检查 CLI 和凭证状态
- 确认工作空间 —— 使用 定位工作空间,调用
ListProjects确认模式(简单/标准模式)GetProject - 创建计算资源 —— 引导用户选择引擎类型;系统会 自动创建对应的数据源。标准模式需要创建开发+生产成对资源,仅纯存储类数据源(MySQL、Kafka 等)需要单独创建数据源
- 创建/绑定资源组 —— 查询现有资源组 → 供用户选择 → 完成绑定。无可用资源组时引导用户创建
- 连通性测试 —— 使用绑定的资源组进行测试;全部测试通过后告知用户「基础设施配置完成」
每一步完成后,主动向用户建议下一步操作。
Next Step Guidance
后续步骤指引
After each write operation is completed and verified, proactively suggest follow-up actions:
| Completed Operation | Recommended Next Step |
|---|---|
| Create compute resource | Standard Mode: "Create the corresponding Dev resource?"; "Test connectivity?" |
| Create data source separately | "Test connectivity?"; Standard Mode: "Create Dev/Prod environment data sources?" |
| Create resource group | "Bind to a workspace?" |
| Bind resource group | "Test data source connectivity?" |
| Connectivity test passed | "Infrastructure is ready." |
| Connectivity test failed | Analyze the error cause, guide the fix |
| Unbind resource group | "Bind to another workspace?" |
每一个写操作完成并验证通过后,主动建议 后续操作:
| 已完成操作 | 推荐下一步操作 |
|---|---|
| 创建计算资源 | 标准模式:「是否创建对应的开发环境资源?」;「是否测试连通性?」 |
| 单独创建数据源 | 「是否测试连通性?」;标准模式:「是否创建开发/生产环境数据源?」 |
| 创建资源组 | 「是否绑定到工作空间?」 |
| 绑定资源组 | 「是否测试数据源连通性?」 |
| 连通性测试通过 | 「基础设施已就绪。」 |
| 连通性测试失败 | 分析错误原因,引导用户修复 |
| 解绑资源组 | 「是否绑定到其他工作空间?」 |
Trigger Rules
触发规则
Trigger scenarios: Data source create/query, compute resource create/query, resource group management, infrastructure initialization, colloquial aliases (DW database connection failure, configure holo/mc resources, create rg)
Not triggered: Data development tasks, scheduling configuration, MaxCompute table management, data integration tasks, ECS/RDS/OSS, workspace member management, data quality/lineage/preview. Standalone workspace queries are handled by the skill.
alibabacloud-dataworks-workspace-manage触发场景:数据源创建/查询、计算资源创建/查询、资源组管理、基础设施初始化、口语化别名(DW 数据库连接失败、配置 holo/mc 资源、创建 rg)
不触发场景:数据开发任务、调度配置、MaxCompute 表管理、数据集成任务、ECS/RDS/OSS 操作、工作空间成员管理、数据质量/血缘/预览。独立工作空间查询由 技能处理。
alibabacloud-dataworks-workspace-manageInteraction Flow
交互流程
All operations follow: Identify module → Environment check → Collect parameters → Execute command → Verify result → Guide next step
Common aliases: DW=DataWorks, holo=Hologres, mc/MC/odps=MaxCompute, pg=PostgreSQL, rg=Resource Group, ds=Data Source, RDS=InstanceMode MySQL/PG/SQLServer, ADB=AnalyticDB
Naming suggestions: Data source , Compute resource , Resource group
{type}_{business}_{purpose}{type}_{business}dw_{purpose}_rg_{env}所有操作遵循:识别模块 → 环境检查 → 收集参数 → 执行命令 → 验证结果 → 引导下一步
常用别名:DW=DataWorks、holo=Hologres、mc/MC/odps=MaxCompute、pg=PostgreSQL、rg=资源组、ds=数据源、RDS=实例模式 MySQL/PG/SQLServer、ADB=AnalyticDB
命名建议:数据源 、计算资源 、资源组
{类型}_{业务}_{用途}{类型}_{业务}dw_{用途}_rg_{环境}Module 0: Workspace Query
模块 0:工作空间查询
If theskill is available, prefer using it for workspace queries. The following is only a fallback.alibabacloud-dataworks-workspace-manage
bash
aliyun dataworks-public ListProjects --user-agent AlibabaCloud-Agent-Skills --Status Available --PageSize 100When searching by name, first get the full list then filter by Name/DisplayName using .
.PagingInfo.Projects[]jq如果有可用的技能,优先使用该技能进行工作空间查询,以下内容仅作为降级方案。alibabacloud-dataworks-workspace-manage
bash
aliyun dataworks-public ListProjects --user-agent AlibabaCloud-Agent-Skills --Status Available --PageSize 100按名称搜索时,先获取完整列表,再使用 按 Name/DisplayName 过滤 。
jq.PagingInfo.Projects[]Module 1: Data Source Management
模块 1:数据源管理
Supports 51 data source types. See references/data-sources/README.md for details.
When do you need to create a data source separately? Creating a compute resource (Module 2) will automatically create the corresponding data source. Only pure storage-type databases (MySQL, PostgreSQL, Kafka, MongoDB, etc.) need separate creation.
Some types do not currently support OpenAPI:,polardb-o,polardb-x-2-0,oceanbase,oss-hdfs,graph-database,bigquery,dlf,hdfs,ssh,redis,salesforce,elasticsearchhttpfile
Connection modes: UrlMode (self-hosted databases, requires host/port) or InstanceMode (Alibaba Cloud managed instances, requires instanceId). When unsure, proactively ask the user. InstanceMode is preferred.
Instance query APIs: references/data-sources/instance-apis.md
支持 51 种数据源类型,详情见 references/data-sources/README.md。
什么时候需要单独创建数据源? 创建计算资源(模块 2)会 自动创建对应的数据源,仅纯存储类数据库(MySQL、PostgreSQL、Kafka、MongoDB 等)需要单独创建。
部分类型当前暂不支持 OpenAPI:、polardb-o、polardb-x-2-0、oceanbase、oss-hdfs、graph-database、bigquery、dlf、hdfs、ssh、redis、salesforce、elasticsearchhttpfile
连接模式:UrlMode(自建数据库,需要 host/port)或 InstanceMode(阿里云托管实例,需要 instanceId)。不确定时主动询问用户,优先推荐 InstanceMode。
实例查询 API:references/data-sources/instance-apis.md
⚠️ Security Restriction
⚠️ 安全限制
IMPORTANT: For security reasons, this skill does NOT support modifying or deleting data sources. These operations are disabled to prevent:
- Accidental data loss or service interruption
- Exposure of sensitive credentials (passwords, connection strings)
- Disruption of running data integration tasks
- Unintended changes to production data source configurations
If you need to modify or delete a data source, please use the DataWorks console directly or contact your administrator.
重要提示:出于安全考虑,本技能 不支持 修改或删除数据源,禁用此类操作是为了避免:
- 意外数据丢失或服务中断
- 敏感凭证(密码、连接串)泄露
- 影响运行中的数据集成任务
- 意外修改生产数据源配置
如需修改或删除数据源,请直接使用 DataWorks 控制台或联系管理员。
Workspace Mode
工作空间模式说明
Environment note: Prod (Production) is for production data processing; Dev (Development) is for development and debugging, physically isolated from production.
aliyun dataworks-public GetProject --user-agent AlibabaCloud-Agent-Skills --Id <PROJECT_ID>DevEnvironmentEnabled- → Simple Mode (1 data source, envType=Prod)
false - → Standard Mode (2 data sources, Dev + Prod, physically isolated)
true
Full mode comparison: references/data-sources/README.md
环境说明:Prod(生产) 用于生产数据处理;Dev(开发) 用于开发调试,与生产环境物理隔离。
aliyun dataworks-public GetProject --user-agent AlibabaCloud-Agent-Skills --Id <PROJECT_ID>DevEnvironmentEnabled- → 简单模式(仅1个数据源,envType=Prod)
false - → 标准模式(2个数据源,Dev + Prod,物理隔离)
true
完整模式对比:references/data-sources/README.md
Task 1.1: Create Data Source (CreateDataSource)
任务 1.1:创建数据源(CreateDataSource)
bash
aliyun dataworks-public CreateDataSource --user-agent AlibabaCloud-Agent-Skills [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com] --ProjectId <PROJECT_ID> --Name <NAME> --Type <TYPE> --ConnectionPropertiesMode <UrlMode|InstanceMode> --ConnectionProperties '<JSON>' --Description "<DESC>"ConnectionProperties common structure:
- UrlMode:
{"envType":"Prod","address":[{"host":"<IP>","port":<PORT>}],"database":"<DB>","username":"<USER>","password":"<PWD>"} - InstanceMode:
{"envType":"Prod","instanceId":"<ID>","regionId":"<REGION>","database":"<DB>","username":"<USER>","password":"<PWD>"}
Special type structures (Oracle, MaxCompute, HBase, etc.): see references/data-sources/ per-type docs
Cross-account data source configuration: references/cross-account-datasources.md
bash
aliyun dataworks-public CreateDataSource --user-agent AlibabaCloud-Agent-Skills [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com] --ProjectId <PROJECT_ID> --Name <NAME> --Type <TYPE> --ConnectionPropertiesMode <UrlMode|InstanceMode> --ConnectionProperties '<JSON>' --Description "<DESC>"ConnectionProperties 通用结构:
- UrlMode:
{"envType":"Prod","address":[{"host":"<IP>","port":<PORT>}],"database":"<DB>","username":"<USER>","password":"<PWD>"} - InstanceMode:
{"envType":"Prod","instanceId":"<ID>","regionId":"<REGION>","database":"<DB>","username":"<USER>","password":"<PWD>"}
特殊类型结构(Oracle、MaxCompute、HBase 等):见 references/data-sources/ 下各类型文档
跨账号数据源配置:references/cross-account-datasources.md
Task 1.2: Get Data Source (GetDataSource)
任务 1.2:查询数据源详情(GetDataSource)
bash
aliyun dataworks-public GetDataSource --user-agent AlibabaCloud-Agent-Skills --Id <DATASOURCE_ID> [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com]bash
aliyun dataworks-public GetDataSource --user-agent AlibabaCloud-Agent-Skills --Id <DATASOURCE_ID> [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com]Task 1.3: List Data Sources (ListDataSources)
任务 1.3:查询数据源列表(ListDataSources)
bash
aliyun dataworks-public ListDataSources --user-agent AlibabaCloud-Agent-Skills --ProjectId <PROJECT_ID> [--Types '["mysql"]'] [--EnvType <Dev|Prod>] [--PageNumber 1] [--PageSize 20]Returns nested structure; Name/Type are in the outer layer, Id/Description in the inner layer.DataSources[].DataSource[]
bash
aliyun dataworks-public ListDataSources --user-agent AlibabaCloud-Agent-Skills --ProjectId <PROJECT_ID> [--Types '["mysql"]'] [--EnvType <Dev|Prod>] [--PageNumber 1] [--PageSize 20]返回嵌套结构;Name/Type 在外层,Id/Description 在内层。DataSources[].DataSource[]
Task 1.4: Test Connectivity (TestDataSourceConnectivity)
任务 1.4:测试连通性(TestDataSourceConnectivity)
Process: Query resource group list → Let user select a resource group → Execute test.
bash
undefined流程:查询资源组列表 → 让用户选择 资源组 → 执行测试。
bash
undefinedStep 1: Query project resource groups
步骤1:查询项目关联的资源组
aliyun dataworks-public ListResourceGroups --user-agent AlibabaCloud-Agent-Skills --ProjectId <PROJECT_ID>
aliyun dataworks-public ListResourceGroups --user-agent AlibabaCloud-Agent-Skills --ProjectId <PROJECT_ID>
Step 2: Execute test after user selects a resource group
步骤2:用户选择资源组后执行测试
aliyun dataworks-public TestDataSourceConnectivity --user-agent AlibabaCloud-Agent-Skills --DataSourceId <ID> --ProjectId <PROJECT_ID> --ResourceGroupId "<RG_ID>"
> If error `"resourceGroupId is not in the project"`, the resource group needs to be bound first (confirm with user, then execute `AssociateProjectToResourceGroup`).
---aliyun dataworks-public TestDataSourceConnectivity --user-agent AlibabaCloud-Agent-Skills --DataSourceId <ID> --ProjectId <PROJECT_ID> --ResourceGroupId "<RG_ID>"
> 如果报错 `"resourceGroupId is not in the project"`,需要先绑定资源组(经用户确认后执行 `AssociateProjectToResourceGroup`)。
---Module 2: Compute Resource Management
模块 2:计算资源管理
Supports Hologres, MaxCompute, Flink, Spark, and other types. The system will automatically create corresponding data sources upon creation.
支持 Hologres、MaxCompute、Flink、Spark 等类型,创建时系统会 自动创建对应的数据源。
⚠️ Security Restriction
⚠️ 安全限制
IMPORTANT: For security reasons, this skill does NOT support modifying or deleting compute resources. These operations are disabled to prevent:
- Accidental data loss or service interruption
- Disruption of running data development and scheduling tasks
- Unintended changes to production compute resource configurations
If you need to modify or delete a compute resource, please use the DataWorks console directly or contact your administrator.
重要提示:出于安全考虑,本技能 不支持 修改或删除计算资源,禁用此类操作是为了避免:
- 意外数据丢失或服务中断
- 影响运行中的数据开发和调度任务
- 意外修改生产计算资源配置
如需修改或删除计算资源,请直接使用 DataWorks 控制台或联系管理员。
authType Rules
authType 规则
- Dev environment: is fixed as
authTypeExecutor - Prod environment: Options are (recommended),
PrimaryAccount,TaskOwner,SubAccount. Default recommendation isRamRoleunless user has special requirementsPrimaryAccount
authType details and guidance: references/compute-resources/README.md
- 开发环境:固定为
authTypeExecutor - 生产环境:可选值为 (推荐)、
PrimaryAccount、TaskOwner、SubAccount,无特殊需求时默认推荐RamRolePrimaryAccount
authType 详情和指引:references/compute-resources/README.md
Type-Specific Notes
类型专属说明
- Hologres: Only supports InstanceMode, requires ,
instanceIdsecurityProtocol - MaxCompute: Only supports UrlMode, requires ,
projectendpointMode
Full ConnectionProperties examples: references/compute-resources/README.md
- Hologres:仅支持 InstanceMode,需要 、
instanceIdsecurityProtocol - MaxCompute:仅支持 UrlMode,需要 、
projectendpointMode
完整 ConnectionProperties 示例:references/compute-resources/README.md
Task 2.1: Create Compute Resource (CreateComputeResource)
任务 2.1:创建计算资源(CreateComputeResource)
bash
aliyun dataworks-public CreateComputeResource --user-agent AlibabaCloud-Agent-Skills [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com] --ProjectId <PROJECT_ID> --Name <NAME> --Type <TYPE> --ConnectionPropertiesMode <InstanceMode|UrlMode> --ConnectionProperties '<JSON>' [--Description "<DESC>"]After creation, useto verify the corresponding data source was auto-generated.ListDataSources
bash
aliyun dataworks-public CreateComputeResource --user-agent AlibabaCloud-Agent-Skills [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com] --ProjectId <PROJECT_ID> --Name <NAME> --Type <TYPE> --ConnectionPropertiesMode <InstanceMode|UrlMode> --ConnectionProperties '<JSON>' [--Description "<DESC>"]创建完成后,使用验证对应的数据源已自动生成。ListDataSources
Task 2.2: Get Compute Resource (GetComputeResource)
任务 2.2:查询计算资源详情(GetComputeResource)
bash
aliyun dataworks-public GetComputeResource --user-agent AlibabaCloud-Agent-Skills --Id <ID> --ProjectId <PROJECT_ID>bash
aliyun dataworks-public GetComputeResource --user-agent AlibabaCloud-Agent-Skills --Id <ID> --ProjectId <PROJECT_ID>Task 2.3: List Compute Resources (ListComputeResources)
任务 2.3:查询计算资源列表(ListComputeResources)
bash
aliyun dataworks-public ListComputeResources --user-agent AlibabaCloud-Agent-Skills --ProjectId <PROJECT_ID> [--Name <FILTER>] [--EnvType <Dev|Prod>] [--PageSize 20] [--SortBy CreateTime] [--Order Desc]Returns nested structure; Name/Type are in the outer layer, Id in the inner layer.ComputeResources[].ComputeResource[]
bash
aliyun dataworks-public ListComputeResources --user-agent AlibabaCloud-Agent-Skills --ProjectId <PROJECT_ID> [--Name <FILTER>] [--EnvType <Dev|Prod>] [--PageSize 20] [--SortBy CreateTime] [--Order Desc]返回嵌套结构;Name/Type 在外层,Id 在内层。ComputeResources[].ComputeResource[]
Module 3: Resource Group Management
模块 3:资源组管理
Manages the full lifecycle of Serverless resource groups.
管理 Serverless 资源组的全生命周期。
Task 3.1: Create Resource Group (CreateResourceGroup)
任务 3.1:创建资源组(CreateResourceGroup)
Requirespermission.AliyunBSSOrderAccess
Interaction flow (let user choose at each step, DO NOT auto-select):
- Query and select VPC:
bash
aliyun vpc DescribeVpcs --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION_ID>" --PageSize 50If the list is empty, guide the user to create a VPC; DO NOT auto-create.
- Query and select VSwitch:
bash
aliyun vpc DescribeVSwitches --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION_ID>" --VpcId "<VPC_ID>" --PageSize 50- Confirm name and specification → Execute creation:
bash
aliyun dataworks-public CreateResourceGroup --user-agent AlibabaCloud-Agent-Skills [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com] --Name "<NAME>" --PaymentType PostPaid --VpcId "<VPC_ID>" --VswitchId "<VSWITCH_ID>" --ClientToken "$(uuidgen 2>/dev/null || echo "token-$(date +%s)")" --Remark "Created by Agent"After creation, poll until status becomes (every 10 seconds, up to 10 minutes).
GetResourceGroupNormal需要权限。AliyunBSSOrderAccess
交互流程(每一步都让用户选择,严禁自动选择):
- 查询并选择 VPC:
bash
aliyun vpc DescribeVpcs --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION_ID>" --PageSize 50如果列表为空,引导用户创建 VPC;严禁 自动创建。
- 查询并选择 VSwitch:
bash
aliyun vpc DescribeVSwitches --user-agent AlibabaCloud-Agent-Skills --RegionId "<REGION_ID>" --VpcId "<VPC_ID>" --PageSize 50- 确认名称和规格 → 执行创建:
bash
aliyun dataworks-public CreateResourceGroup --user-agent AlibabaCloud-Agent-Skills [--region <REGION_ID> --endpoint dataworks.<REGION_ID>.aliyuncs.com] --Name "<NAME>" --PaymentType PostPaid --VpcId "<VPC_ID>" --VswitchId "<VSWITCH_ID>" --ClientToken "$(uuidgen 2>/dev/null || echo "token-$(date +%s)")" --Remark "Created by Agent"创建完成后,轮询 直到状态变为 (每10秒轮询一次,最长等待10分钟)。
GetResourceGroupNormalTask 3.2: Get Resource Group (GetResourceGroup)
任务 3.2:查询资源组详情(GetResourceGroup)
bash
aliyun dataworks-public GetResourceGroup --user-agent AlibabaCloud-Agent-Skills --Id "<ID>"bash
aliyun dataworks-public GetResourceGroup --user-agent AlibabaCloud-Agent-Skills --Id "<ID>"Task 3.3: List Resource Groups (ListResourceGroups)
任务 3.3:查询资源组列表(ListResourceGroups)
bash
aliyun dataworks-public ListResourceGroups --user-agent AlibabaCloud-Agent-Skills [--ProjectId <PROJECT_ID>] [--Statuses '["Normal"]'] --PageSize 100bash
aliyun dataworks-public ListResourceGroups --user-agent AlibabaCloud-Agent-Skills [--ProjectId <PROJECT_ID>] [--Statuses '["Normal"]'] --PageSize 100Task 3.4: Bind Resource Group (AssociateProjectToResourceGroup)
任务 3.4:绑定资源组(AssociateProjectToResourceGroup)
Process: Query available resource groups → Display list for user to select → Bind after user confirms.
bash
aliyun dataworks-public AssociateProjectToResourceGroup --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>" --ProjectId "<PROJECT_ID>"流程:查询可用资源组 → 展示列表供用户选择 → 用户确认后执行绑定。
bash
aliyun dataworks-public AssociateProjectToResourceGroup --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>" --ProjectId "<PROJECT_ID>"Task 3.5: Query Binding Relationships
任务 3.5:查询绑定关系
bash
aliyun dataworks-public ListResourceGroupAssociateProjects --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>"bash
aliyun dataworks-public ListResourceGroupAssociateProjects --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>"Task 3.6: Unbind Resource Group (DissociateProjectFromResourceGroup)
任务 3.6:解绑资源组(DissociateProjectFromResourceGroup)
bash
aliyun dataworks-public DissociateProjectFromResourceGroup --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>" --ProjectId "<PROJECT_ID>"bash
aliyun dataworks-public DissociateProjectFromResourceGroup --user-agent AlibabaCloud-Agent-Skills --ResourceGroupId "<RG_ID>" --ProjectId "<PROJECT_ID>"Success Verification
成功验证
After all write operations, use the corresponding Get/List command to verify the result.
所有写操作完成后,使用对应的 Get/List 命令验证操作结果。
Common Errors
常见错误
| Error Code | Solution |
|---|---|
| Forbidden.Access / PermissionDenied | Check RAM permissions, see references/ram-policies.md |
| InvalidParameter | Check ConnectionProperties JSON and required parameters |
| EntityNotExists | Verify the ID and Region are correct |
| QuotaExceeded | Delete unused resources or request a quota increase |
| Duplicate* | Use a different name |
| 错误码 | 解决方案 |
|---|---|
| Forbidden.Access / PermissionDenied | 检查 RAM 权限,参考 references/ram-policies.md |
| InvalidParameter | 检查 ConnectionProperties JSON 格式和必填参数 |
| EntityNotExists | 验证 ID 和 Region 是否正确 |
| QuotaExceeded | 删除闲置资源或申请提升配额 |
| Duplicate* | 更换名称重试 |
Region
Region 说明
Common: , , , . Endpoint:
cn-hangzhoucn-shanghaicn-beijingcn-shenzhendataworks.<region-id>.aliyuncs.comFull list: references/related-apis.md
常用 Region:、、、。Endpoint 格式:
cn-hangzhoucn-shanghaicn-beijingcn-shenzhendataworks.<region-id>.aliyuncs.com完整列表:references/related-apis.md
Best Practices
最佳实践
- Query before action — Confirm current state before create operations
- Manage by environment — Manage Dev and Prod resources separately
- Verify operations — Use Get/List to verify after each write operation
- Proactive guidance — Suggest the next step after each step completes
- Protect data sources and compute resources — Never modify or delete data sources or compute resources via this skill; use the DataWorks console for such operations
- 操作前先查询 —— 执行创建操作前先确认当前状态
- 按环境隔离管理 —— 分别管理开发和生产环境资源
- 操作后验证 —— 每次写操作后使用 Get/List 接口验证结果
- 主动引导 —— 每一步完成后主动建议下一步操作
- 保护数据源和计算资源 —— 禁止通过本技能修改或删除数据源、计算资源,此类操作请使用 DataWorks 控制台
Reference Links
参考链接
| Reference | Description |
|---|---|
| references/data-sources/README.md | Data source type list and ConnectionProperties examples |
| references/data-sources/ | Detailed configuration docs for each data source type (51 files) |
| references/cross-account-datasources.md | Cross-account data source configuration guide |
| references/compute-resources/README.md | Compute resource ConnectionProperties examples |
| references/cli-installation-guide.md | Aliyun CLI installation guide |
| references/ram-policies.md | RAM permission configuration and policy examples |
| references/related-apis.md | API parameter details and Region Endpoints |
| 参考文档 | 说明 |
|---|---|
| references/data-sources/README.md | 数据源类型列表和 ConnectionProperties 示例 |
| references/data-sources/ | 各数据源类型详细配置文档(共51个文件) |
| references/cross-account-datasources.md | 跨账号数据源配置指南 |
| references/compute-resources/README.md | 计算资源 ConnectionProperties 示例 |
| references/cli-installation-guide.md | Aliyun CLI 安装指南 |
| references/ram-policies.md | RAM 权限配置和策略示例 |
| references/related-apis.md | API 参数详情和 Region Endpoint 列表 |