alicloud-tools

command module
v1.0.4-alpha-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

README

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

Documentation

Overview

Copyright © 2020 iiusky sky@03sec.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL