阿里云 CLI 使用
安装
macOS:
brew install aliyun-cli
Linux:
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar xzvf aliyun-cli-linux-3.0.16-amd64.tgz
sudo cp aliyun /usr/local/bin
配置
配置文件位置在 ~/.aliyun
配置:
aliyun configure
启用自动补全:
aliyun auto-completion
关闭自动补全:
aliyun auto-completion --uninstall
使用
ECS
aliyun ecs CreateInstance
--InstanceName myvm1
--ImageId centos_7_03_64_40G_alibase_20170625.vhd
--InstanceType ecs.n4.small
--SecurityGroupId sg-xxxxxx123
--VSwitchId vsw-xxxxxx456
--InternetChargeType PayByTraffic
--Password xxx
命令可以通过 OpenAPI 门户生成