Giter VIP home page Giter VIP logo

alicloud-tools's Introduction

AliCloud-tools

本工具为辅助使用阿里云API操作ECS以及策略组的小工具,如用于非法用途,与本人无关,出现任何问题,后果自负.

使用方式

该工具主要是方便快速使用阿里云api执行一些操作

Usage:
  AliCloud-Tools [flags]
  AliCloud-Tools [command]

Available Commands:
  ecs         ECS 操作(查询/执行命令),当前命令支持地域ID设置.
  help        Help about any command
  sg          安全组操作,当前命令支持地域ID设置.

Flags:
  -a, --ak string    阿里云 AccessKey
  -h, --help         help for AliCloud-Tools
      --regions      显示所有地域信息
  -r, --rid string   阿里云 地域ID,在其他支持rid的子命令中,如果设置了地域ID,则只显示指定区域的信息,否则为全部.
  -s, --sk string    阿里云 SecretKey

查看所有地域信息

./AliCloud-Tools -a <AccessKey> -s <SecretKey> --regions

regions

查看所有实例信息

./AliCloud-Tools -a <AccessKey> -s <SecretKey> ecs --list

list-1 list-2

查看所有正在运行的实例信息

./AliCloud-Tools -a <AccessKey> -s <SecretKey> ecs --list --runner

list-1 list-2

查看指定实例的信息

./AliCloud-Tools -a <AccessKey> -s <SecretKey> [-r <regionId>] ecs --eid <InstanceId>

instance-info

执行命令

./AliCloud-Tools -a <AccessKey> -s <SecretKey> [-r <regionId>] ecs exec -I <InstanceId[,InstanceId,InstanceId,...]> -c "touch /tmp/123123aaaa.txt"

exec exec-result

查看安全组策略

./AliCloud-Tools -a <AccessKey> -s <SecretKey> -r <regionId> sg --eid <SecruityGroupId>

sg-info

增加安全组策略

./AliCloud-Tools -a <AccessKey> -s <SecretKey> -r <regionId> --eid <SecruityGroupId> --action add --protocol tcp --port 0/0 --ip 0.0.0.0/0

sg-add

删除安全组策略

./AliCloud-Tools -a <AccessKey> -s <SecretKey> -r <regionId> --eid <SecruityGroupId> --action del --protocol tcp --port 0/0 --ip 0.0.0.0/0

sg-del

alicloud-tools's People

Contributors

iiiusky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.