← Back to Skills Marketplace
chucklong

Alicloud Database RDS Custom

by Chijie · GitHub ↗ · v1.14.0 · MIT-0
cross-platform ⚠ suspicious
324
Downloads
0
Stars
0
Active Installs
15
Versions
Install in OpenClaw
/install alicloud-database-rds-custom
Description
查询阿里云自定义实例(RC 实例)。使用 aliyun CLI 调用 DescribeRCInstances API 查询 RDS 相关自定义实例。当用户需要查询 RC 实例、RDS 自定义实例或云资源时触发此技能。
README (SKILL.md)

查询自定义实例(RC Instances)

概述

本技能提供阿里云 RC(RDS Custom)实例全生命周期查询能力,通过 aliyun CLI 调用 RDS API 获取实例及相关资源信息。适用于查询 RC 实例、监控指标、资源配置等场景。

核心能力

支持的查询命令

命令 功能 状态
DescribeRCInstances 查询 RC 实例列表
DescribeRCInstanceAttribute 查询单个实例详细信息
DescribeRCImageList 查询可用镜像列表
DescribeRCDisks 查询磁盘列表
DescribeRCSnapshots 查询快照列表
DescribeRCMetricList 查询监控指标(CPU、内存等)
DescribeRCClusterConfig 查询 ACK 集群 KubeConfig
DescribeRCNodePool 查询边缘节点池配置
DescribeRCInstanceVncUrl 查询 VNC 登录地址

暂不支持的命令

以下命令在 Java SDK 中存在,但在 aliyun CLI v3.2.13 中暂不支持:

命令 功能 替代方案
DescribeRCCloudAssistantStatus 查询云助手状态 SSH 登录实例检查
DescribeRCNetworkInterfaces 查询网络接口信息 使用 DescribeRCInstanceAttribute
DescribeRCInstanceHistoryEvents 查询历史事件 使用控制台查看

特性

  • 多地域支持:支持指定地域查询,默认 cn-beijing
  • 格式化输出:支持 JSON、表格等多种输出格式
  • jq 过滤:提供丰富的 jq 数据提取示例
  • 监控查询:支持 CPU、内存、磁盘等监控指标查询

使用方式

基本查询

aliyun rds DescribeRCInstances --region cn-beijing

指定地域

aliyun rds DescribeRCInstances --region cn-hangzhou

格式化输出(表格)

aliyun rds DescribeRCInstances --region cn-beijing --output cols=InstanceId,InstanceName,Status,RegionId,Cpu,Memory

查询特定实例

aliyun rds DescribeRCInstances --region cn-beijing --InstanceId rc-xxx

使用 jq 过滤

# 只查询运行中的实例
aliyun rds DescribeRCInstances --region cn-beijing | jq '.RCInstances[] | select(.Status == "Running")'

# 提取关键字段
aliyun rds DescribeRCInstances --region cn-beijing | jq '.RCInstances[] | {InstanceId, InstanceName, Status, Cpu, Memory}'

脚本使用

查询 RC 实例脚本

cd /path/to/skill/scripts
./query_rc_instances.sh [地域]

示例输出

$ ./query_rc_instances.sh cn-beijing

=== RC 实例列表 (cn-beijing) ===

实例 ID: rc-xxxxxxxxxxxxx
实例名称:rc-xxxxxxxxxxxxx
集群名称:RCC-xxxxxxxxxxxxxxx
状态:Running
CPU: 4 核
内存:32 GB
地域:cn-beijing
可用区:cn-beijing-x
私网 IP: 10.x.x.xxx
VPC: vpc-xxxxxxxxxxxxxxxxx
创建时间:2026-01-20 18:45:50
到期时间:2026-04-20T16:00:00Z

总计:1 台实例

前置条件

1. 安装 aliyun CLI

# 一键安装
/bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)"

2. 配置凭证

aliyun configure

需要输入:

  • AccessKey ID
  • AccessKey Secret
  • 默认地域(如:cn-beijing)
  • 输出格式(json)
  • 语言(zh)

3. 验证配置

aliyun version
aliyun rds DescribeRCInstances --region cn-beijing

常用命令参考

命令 说明
aliyun rds DescribeRCInstances 查询 RC 实例列表
aliyun rds DescribeRCInstanceAttribute 查询单个 RC 实例详细信息
aliyun rds DescribeRCImageList 查询 RC 实例可用镜像列表
aliyun rds DescribeRCNetworkInterfaces 查询 RC 实例网络接口信息
aliyun rds DescribeRCDeploymentSets 查询 RC 实例部署集列表
aliyun rds DescribeRCDisks 查询 RC 实例磁盘列表
aliyun rds DescribeRCSnapshots 查询 RC 实例快照列表
aliyun rds DescribeRCInstanceHistoryEvents 查询 RC 实例历史事件
aliyun rds DescribeRCCloudAssistantStatus 查询 RC 实例云助手状态
aliyun rds DescribeRCMetricList 查询 RC 实例监控指标(CPU、内存等)

查询实例详细信息

基本查询

aliyun rds DescribeRCInstanceAttribute \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID>

指定实例名称

aliyun rds DescribeRCInstanceAttribute \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  --InstanceName rc-\x3CINSTANCE_ID>

格式化输出

aliyun rds DescribeRCInstanceAttribute \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  --output cols=InstanceId,InstanceName,Status,Cpu,Memory,RegionId,ZoneId

使用 jq 提取字段

# 提取基本信息
aliyun rds DescribeRCInstanceAttribute \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  | jq '.RCInstances[0] | {InstanceId, InstanceName, Status, Cpu, Memory}'

# 提取网络信息
aliyun rds DescribeRCInstanceAttribute \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  | jq '.RCInstances[0].VpcAttributes | {VpcId, VSwitchId, PrivateIpAddress}'

查询可用镜像列表

基本查询

aliyun rds DescribeRCImageList \
  --region cn-beijing

指定实例类型查询

aliyun rds DescribeRCImageList \
  --region cn-beijing \
  --InstanceType mysql.x2.xlarge.6cm

格式化输出

aliyun rds DescribeRCImageList \
  --region cn-beijing \
  --output cols=ImageId,ImageName,OSType,OSName

使用 jq 过滤

# 提取镜像基本信息
aliyun rds DescribeRCImageList \
  --region cn-beijing \
  | jq '.Images[] | {ImageId, ImageName, OSType}'

# 查询 Alibaba Cloud Linux 镜像
aliyun rds DescribeRCImageList \
  --region cn-beijing \
  | jq '.Images[] | select(.OSName | contains("Alibaba Cloud Linux"))'

# 统计镜像数量
aliyun rds DescribeRCImageList \
  --region cn-beijing \
  | jq '.Images | length'

输出字段说明

字段 说明
ImageId 镜像 ID
ImageName 镜像名称
OSType 操作系统类型(linux/windows)
OSName 操作系统名称
ImageVersion 镜像版本

查询磁盘列表

基本查询

aliyun rds DescribeRCDisks \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID>

按地域查询

aliyun rds DescribeRCDisks \
  --region cn-beijing

格式化输出

aliyun rds DescribeRCDisks \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  --output cols=DiskId,DiskName,Size,Category,Status

使用 jq 提取字段

# 提取磁盘基本信息
aliyun rds DescribeRCDisks \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  | jq '.Disks[] | {DiskId, DiskName, Size, Category}'

# 查询系统盘和数据盘
aliyun rds DescribeRCDisks \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  | jq '.Disks[] | select(.Type == "system")'

# 统计磁盘总容量
aliyun rds DescribeRCDisks \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  | jq '[.Disks[].Size | tonumber] | add'

# 统计磁盘数量
aliyun rds DescribeRCDisks \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  | jq '.Disks | length'

输出字段说明

字段 说明
DiskId 磁盘 ID
DiskName 磁盘名称
Size 磁盘容量(GB)
Category 磁盘种类(cloud_essd/cloud_ssd 等)
Status 磁盘状态(In_Use/Available)
Type 磁盘类型(system/data)
Device 设备名(/dev/vda 等)
Encrypted 是否加密

查询快照列表

基本查询

aliyun rds DescribeRCSnapshots \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID>

按地域查询

aliyun rds DescribeRCSnapshots \
  --region cn-beijing

指定磁盘 ID 查询

aliyun rds DescribeRCSnapshots \
  --region cn-beijing \
  --DiskId d-c5kyo15381wht249k498

格式化输出

aliyun rds DescribeRCSnapshots \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  --output cols=SnapshotId,SnapshotName,Size,Status,CreationTime

使用 jq 提取字段

# 提取快照基本信息
aliyun rds DescribeRCSnapshots \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  | jq '.Snapshots[] | {SnapshotId, SnapshotName, Size, Status}'

# 查询成功状态的快照
aliyun rds DescribeRCSnapshots \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  | jq '.Snapshots[] | select(.Status == "success")'

# 统计快照总数量
aliyun rds DescribeRCSnapshots \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  | jq '.Snapshots | length'

# 统计快照总容量
aliyun rds DescribeRCSnapshots \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  | jq '[.Snapshots[].Size | tonumber] | add'

输出字段说明

字段 说明
SnapshotId 快照 ID
SnapshotName 快照名称
Size 快照容量(GB)
Status 快照状态(success/failed/progressing)
CreationTime 创建时间
SourceDiskId 源磁盘 ID
SourceInstanceId 源实例 ID
Progress 快照进度(百分比)
RetentionDays 保留天数

监控指标查询

查询 CPU 使用率

aliyun rds DescribeRCMetricList \
  --region cn-beijing \
  --InstanceId rc-xxx \
  --MetricName CPUUtilization \
  --StartTime "2026-03-12 10:05:00" \
  --EndTime "2026-03-12 10:15:00" \
  --Period 60 \
  --Length 1000

查询内存使用率

aliyun rds DescribeRCMetricList \
  --region cn-beijing \
  --InstanceId rc-xxx \
  --MetricName MemoryUtilization \
  --StartTime "2026-03-12 10:05:00" \
  --EndTime "2026-03-12 10:15:00" \
  --Period 60

常用指标名称

指标名 说明
CPUUtilization CPU 使用率 (%)
MemoryUtilization 内存使用率 (%)
DiskUtilization 磁盘使用率 (%)
IOPS 每秒 IO 操作数
ConnectionUsage 连接数使用率

参数说明

参数 必填 说明
InstanceId RC 实例 ID
MetricName 指标名称
StartTime 开始时间,格式 YYYY-MM-DD HH:mm:ss
EndTime 结束时间,格式 YYYY-MM-DD HH:mm:ss
Period 采集周期(秒),默认 60
Length 返回数据点数,默认 1000

示例:查询最近 1 小时 CPU

# 计算 1 小时前的时间
START=$(date -d "1 hour ago" "+%Y-%m-%d %H:%M:%S")
END=$(date "+%Y-%m-%d %H:%M:%S")

aliyun rds DescribeRCMetricList \
  --region cn-beijing \
  --InstanceId rc-\x3CINSTANCE_ID> \
  --MetricName CPUUtilization \
  --StartTime "$START" \
  --EndTime "$END" \
  --Period 300

使用 jq 提取数据

# 提取 CPU 使用率数据点
aliyun rds DescribeRCMetricList \
  --region cn-beijing \
  --InstanceId rc-xxx \
  --MetricName CPUUtilization \
  --StartTime "2026-03-12 10:05:00" \
  --EndTime "2026-03-12 10:15:00" \
  | jq '.Data[] | {Timestamp, Value}'

# 计算平均 CPU 使用率
aliyun rds DescribeRCMetricList \
  --region cn-beijing \
  --InstanceId rc-xxx \
  --MetricName CPUUtilization \
  --StartTime "2026-03-12 10:05:00" \
  --EndTime "2026-03-12 10:15:00" \
  | jq '[.Data[].Value | tonumber] | add / length'

输出字段说明

字段 说明
InstanceId 实例 ID
InstanceName 实例名称
ClusterName 集群名称
Status 运行状态(Running/Stopped 等)
Cpu CPU 核数
Memory 内存大小(MB)
RegionId 地域 ID
ZoneId 可用区 ID
VpcId VPC ID
PrivateIpAddress 私网 IP
InstanceChargeType 计费类型(PrePaid/PostPaid)
ExpiredTime 到期时间
GmtCreated 创建时间

常见问题

1. 权限错误

ERROR: InvalidAccessKeyId.NotFound

解决: 检查 aliyun configure 配置的 AccessKey 是否正确

2. 地域错误

ERROR: InvalidRegionId.NotFound

解决: 使用有效的地域 ID,如 cn-beijingcn-hangzhoucn-shanghai

3. CLI 未安装

bash: aliyun: command not found

解决: 参考前置条件安装 aliyun CLI

4. 返回空列表

{"RCInstances": [], "TotalCount": 0}

解决:

  • 检查地域是否正确
  • 确认当前账号下是否有 RC 实例
  • 尝试其他地域查询

参考资料

Usage Guidance
This skill appears to do what it says (call aliyun CLI to list RDS Custom instances), but there are a few inconsistencies to consider before installing: - The metadata does not declare required binaries or config paths, yet the skill requires the 'aliyun' CLI and 'jq' and asks you to run 'aliyun configure' to provide AccessKey ID/Secret. Expect the CLI to store credentials on disk (local aliyun CLI config). Only proceed if you trust the skill source. - The instructions recommend executing a remote installer via curl | bash (https://aliyuncli.alicdn.com/install.sh). While this is likely the official installer, running remote install scripts is higher-risk; review the installer first or install the CLI via your OS package manager if available. - Provide least-privilege credentials: create an AccessKey with read-only permissions limited to RDS listing if possible, rather than using a high-privilege key. - Verify jq is installed (or adapt the script), and inspect the included script (scripts/query_rc_instances.sh) before executing it — it's short and only parses CLI output, but you should confirm no unexpected network calls or data exfiltration. - If you are concerned about autonomous invocation, confirm how your agent platform grants skills access and consider limiting automatic invocation or reviewing logs when the skill runs. If you want, I can: (1) point out the exact local paths where aliyun CLI stores credentials on your OS, (2) produce a checked, safer installation sequence that avoids curl | bash, or (3) produce a read-only ACL policy example for minimal credentials.
Capability Analysis
Type: OpenClaw Skill Name: alicloud-database-rds-custom Version: 1.14.0 The skill contains a potential shell injection vulnerability in `scripts/query_rc_instances.sh` where the `$REGION` parameter is passed directly to a command without sanitization. Additionally, `SKILL.md` instructs the agent to perform a high-risk `curl | bash` installation for the Alibaba Cloud CLI (aliyuncli.alicdn.com). While the functionality aligns with its stated purpose of querying RDS instances, these patterns represent significant security risks.
Capability Assessment
Purpose & Capability
The name/description match the implemented behavior: the SKILL.md and included script call aliyun rds DescribeRCInstances and other RDS APIs to list and format RC (RDS Custom) instance data. The provided API reference and example commands align with the stated purpose.
Instruction Scope
The runtime instructions ask the user to install the aliyun CLI (via a one-line curl | bash installer) and run 'aliyun configure' to enter AccessKey ID/Secret, then run CLI commands and jq to parse results. These steps are appropriate for the stated task but they modify local CLI configuration and require network access and execution of a remote install script — so they expand scope beyond mere read-only examples.
Install Mechanism
There is no formal install spec in the registry (instruction-only), but SKILL.md recommends running /bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)". That installer URL appears to be the official aliyun CDN; using curl | bash is common but higher-risk than a vetted package. The included bash script is small and harmless (it simply runs aliyun and jq).
Credentials
The skill metadata declares no required binaries, env vars, or config paths, yet the instructions and script require the 'aliyun' CLI and 'jq' on PATH and instruct the user to run 'aliyun configure' to store AccessKey ID/Secret locally. The omission in metadata is an incoherence: the skill will rely on credentials and config files (CLI config) even though none are declared.
Persistence & Privilege
The skill does not request always:true, but it does instruct users to run 'aliyun configure', which will write credentials to the local CLI config (persisted on disk). That persistence is expected for a cloud CLI but was not declared in required config paths. Autonomous invocation is allowed by default (disable-model-invocation=false); combined with the missing declarations this increases the importance of trusting the skill source.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install alicloud-database-rds-custom
  3. After installation, invoke the skill by name or use /alicloud-database-rds-custom
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.14.0
移除 DescribeRCDeploymentSets 部署集查询能力
v1.13.0
安全更新:隐藏所有敏感信息(实例 ID、IP 地址、VPC ID 等)使用占位符替代
v1.12.0
修复:移除 CLI 中不可用的命令参考 (DescribeRCCloudAssistantStatus/DescribeRCNetworkInterfaces/DescribeRCDeploymentSets/DescribeRCInstanceHistoryEvents)
v1.11.0
更新概述,完整列出所有支持的查询命令和能力
v1.10.0
新增 DescribeRCCloudAssistantStatus 命令参考
v1.9.0
新增 DescribeRCInstanceHistoryEvents 命令参考
v1.8.0
新增 DescribeRCSnapshots 命令参考
v1.7.0
新增 DescribeRCDisks 命令参考
v1.6.0
新增 DescribeRCDeploymentSets 命令参考
v1.5.0
新增 DescribeRCNetworkInterfaces 命令参考
v1.4.0
新增 DescribeRCImageList 命令参考
v1.3.0
新增 DescribeRCInstanceAttribute 命令参考
v1.2.0
删除 query_ecs.sh 脚本,只保留 RC 实例查询功能
v1.1.0
精简命令参考,只保留 DescribeRCInstances 和 DescribeRCMetricList
v1.0.0
Rename from query-custom-instances
Metadata
Slug alicloud-database-rds-custom
Version 1.14.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 15
Frequently Asked Questions

What is Alicloud Database RDS Custom?

查询阿里云自定义实例(RC 实例)。使用 aliyun CLI 调用 DescribeRCInstances API 查询 RDS 相关自定义实例。当用户需要查询 RC 实例、RDS 自定义实例或云资源时触发此技能。 It is an AI Agent Skill for Claude Code / OpenClaw, with 324 downloads so far.

How do I install Alicloud Database RDS Custom?

Run "/install alicloud-database-rds-custom" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Alicloud Database RDS Custom free?

Yes, Alicloud Database RDS Custom is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Alicloud Database RDS Custom support?

Alicloud Database RDS Custom is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Alicloud Database RDS Custom?

It is built and maintained by Chijie (@chucklong); the current version is v1.14.0.

💬 Comments