返回顶部
a

aliyun-cli-manage阿里云CLI管理

Use when users need command-line operations on Alibaba Cloud resources (list/query/create/update/delete), credential/profile setup, region/endpoint selection, or API discovery from CLI.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
128
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

aliyun-cli-manage

技能名称: aliyun-cli-manage
详细描述:
类别: 工具

阿里云通用CLI(aliyun)技能

验证

bash
mkdir -p output/aliyun-cli-manage
python skills/platform/cli/aliyun-cli-manage/scripts/ensurealiyuncli.py --help > output/aliyun-cli-manage/validate-help.txt

通过标准:命令退出码为0,且生成了 output/aliyun-cli-manage/validate-help.txt 文件。

输出与证据

  • - 将CLI版本检查、API输出和错误日志保存在 output/aliyun-cli-manage/ 目录下。
  • 对于每个变更操作,保留请求参数和结果摘要。

目标

  • - 使用官方 aliyun CLI执行阿里云OpenAPI操作。
  • 提供安装、配置、API发现、执行和故障排除的标准流程。

快速流程

  1. 1. 首先运行版本保护脚本(先检查,再决定是否升级)。
  2. 如果未安装或检查间隔已到,脚本将下载并安装最新的官方包。
  3. 配置凭证和默认区域(推荐使用 default 配置文件)。
  4. 使用 aliyun <产品> --help / aliyun <产品> --help 确认参数。
  5. 先执行只读查询,再执行变更操作。

版本保护(实用)

优先使用内置脚本,避免每次运行时进行不必要的下载:

bash
python skills/platform/cli/aliyun-cli-manage/scripts/ensurealiyuncli.py

默认行为:

  • - 检查间隔:24小时(可通过环境变量配置)。
  • 在间隔内且版本足够:跳过下载。
  • 超过间隔/未安装/低于最低版本:自动下载并安装最新的官方包。

可选控制(环境变量):

  • - ALIYUNCLICHECKINTERVALHOURS=24:检查间隔。
  • ALIYUNCLIFORCEUPDATE=1:强制更新(忽略间隔)。
  • ALIYUNCLIMINVERSION=3.2.9:可接受的最低版本。
  • ALIYUNCLIINSTALL_DIR=~/.local/bin:安装目录。

手动参数示例:

bash
python skills/platform/cli/aliyun-cli-manage/scripts/ensurealiyuncli.py \
--interval-hours 24 \
--min-version 3.2.9

安装(Linux示例)

bash
curl -fsSL https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz -o /tmp/aliyun-cli.tgz
mkdir -p ~/.local/bin
tar -xzf /tmp/aliyun-cli.tgz -C /tmp
mv /tmp/aliyun ~/.local/bin/aliyun
chmod +x ~/.local/bin/aliyun
~/.local/bin/aliyun version

配置凭证

bash
aliyun configure set \
--profile default \
--mode AK \
--access-key-id \
--access-key-secret \
--region cn-hangzhou

查看已配置的配置文件:

bash
aliyun configure list

命令结构

  • - 通用形式:aliyun <产品> --参数1 值1 --参数2 值2
  • REST形式:aliyun <产品> [GET|POST|PUT|DELETE] <路径模式> --body ...json...

API发现与参数验证

bash
aliyun help
aliyun ecs --help
aliyun ecs DescribeRegions --help

常见只读示例

bash

ECS:列出区域


aliyun ecs DescribeRegions

ECS:按区域列出实例

aliyun ecs DescribeInstances --RegionId cn-hangzhou

SLS:按端点列出项目

aliyun sls ListProject --endpoint cn-hangzhou.log.aliyuncs.com --size 100

常见问题

  • - InvalidAccessKeyId.NotFound / SignatureDoesNotMatch:检查AK/SK和配置文件。
  • MissingRegionId:添加 --region 或在配置文件中配置默认区域。
  • 对于SLS端点错误,显式传递 --endpoint <区域>.log.aliyuncs.com。

执行建议

  • - 在开始任务前运行 ensurealiyuncli.py。
  • 如果资源范围不明确,先查询再变更。
  • 在删除/覆盖操作前,先输出目标资源列表。
  • 对于批量操作,先在小范围内验证一个项目。

参考

  • - 官方来源列表:references/sources.md

前置条件

  • - 执行前配置最小权限的阿里云凭证。
  • 优先使用环境变量:ALICLOUDACCESSKEYID、ALICLOUDACCESSKEYSECRET,可选 ALICLOUDREGIONID。
  • 如果区域不明确,在执行变更操作前询问用户。

工作流程

1) 确认用户意图、区域、标识符,以及操作是只读还是变更。
2) 先运行一个最小的只读查询,验证连接性和权限。
3) 使用明确的参数和有限的范围执行目标操作。
4) 验证结果并保存输出/证据文件。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 aliyun-cli-manage-1775877736 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 aliyun-cli-manage-1775877736 技能

通过命令行安装

skillhub install aliyun-cli-manage-1775877736

下载

⬇ 下载 aliyun-cli-manage v1.0.0(免费)

文件大小: 5.53 KB | 发布时间: 2026-4-12 08:54

v1.0.0 最新 2026-4-12 08:54
Initial release of aliyun-cli-manage skill:

- Enables command-line operations on Alibaba Cloud resources using the official aliyun CLI.
- Provides automated install/version guard with configurable intervals and controls.
- Guides setup for credentials, profiles, region selection, and endpoint handling.
- Documents standard workflow for API discovery, safe execution, and troubleshooting.
- Includes command examples for common resource queries and management tasks.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部