插件
Aliyun
阿里云ECS
概述
帮助
具体内容
下载
chariot plugin download chariot/aliyun:0.1.2
描述
阿里云ECS
动作
- 创建按量付费ECS实例
- 创建包年包月ECS实例
- 查询ECS实例状态; 仅Stopped状态的实例可以执行StartInstance操作。仅Running状态的实例可以执行StopInstance操作。
- 启动ECS实例, 创建成功后的ECS实例默认状态为Stopped。如果需要实例进入Running状态,可以通过StartInstance完成
- 停止ECS实例, 如果需要运行中的实例进入Stopped状态,可以通过StopInstance完成
- 查询当前账号支持的地域列表
- 查询指定地域下的ECS实例
- 释放ECS实例, 当ECS实例处于Stopped状态时,您可以执行释放ECS实例
- 续费云服务器
- 自动续费
- 批量创建实例
Aliyun
关于
阿里云ECS动作
创建按量付费ECS实例
创建按量付费ECS实例.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
image_id | string | None | True | 镜像ID。您可以使用公共映像或自定义映像 | None |
instance_type | string | None | True | 实例规格。例如,选择2核8GiB g6.large则入参为ecs.g6.large | None |
security_group_id | string | None | True | 安全组ID。安全组相当于虚拟防火墙,通过安全组规则控制和保护实例的网络出入请求。建议按需开放和设置安全组出入规则时,不要默认开放所有的出入规则 | None |
vsw_vswitch_ide_id | string | None | True | 交换机ID,创建VPC类型的ECS实例需要指定交换机ID | None |
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: 失败,1:成功 |
instance_id | string | True | ECS实例id |
创建包年包月ECS实例
创建包年包月ECS实例.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
image_id | string | None | True | 镜像ID。您可以使用公共映像或自定义映像 | None |
instance_type | string | None | True | 实例规格。例如,选择2核8GiB g6.large则入参为ecs.g6.large | None |
security_group_id | string | None | True | 安全组ID。安全组相当于虚拟防火墙,通过安全组规则控制和保护实例的网络出入请求。建议按需开放和设置安全组出入规则时,不要默认开放所有的出入规则 | None |
vsw_vswitch_ide_id | string | None | True | 交换机ID,创建VPC类型的ECS实例需要指定交换机ID | None |
period | integer | 1 | False | 长期续约,默认为单位月数 | None |
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: 失败,1:成功 |
instance_id | string | True | ECS实例id |
查询ECS实例状态
查询ECS实例状态; 仅Stopped状态的实例可以执行StartInstance操作。仅Running状态的实例可以执行StopInstance操作。.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
instance_id | string | None | True | 实例ID | None |
status | string | Stopped | False | 实例状态 | None |
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: failure, 1: success |
instance_detail | object | True | 实例信息 |
启动ECS实例
启动ECS实例, 创建成功后的ECS实例默认状态为Stopped。如果需要实例进入Running状态,可以通过StartInstance完成.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
instance_id | string | None | True | 实例ID | None |
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: 失败,1:成功 |
停止ECS实例
停止ECS实例, 如果需要运行中的实例进入Stopped状态,可以通过StopInstance完成.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
instance_id | string | None | True | 实例ID | None |
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: 失败,1:成功 |
地域列表
查询当前账号支持的地域列表.
输入
该动作不包含任何输入。
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: failure, 1: success |
regions | []string | True | 查询当前帐户支持的位置列表 |
ECS实例列表
查询指定地域下的ECS实例.
输入
该动作不包含任何输入。
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: 失败,1:成功 |
instances | []string | True | 查询指定区域设置下的ECS实例 |
释放ECS实例
释放ECS实例, 当ECS实例处于Stopped状态时,您可以执行释放ECS实例.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
instance_id | string | None | True | 实例id | None |
force | boolean | None | False | 如果此参数设置为true,将执行强制释放。ECS实例不处于停止状态也可以释放。执行时要小心,以防止错误发布影响您的业务。 | None |
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: failure, 1: success |
result | object | True | 释放ECS实例返回数据 |
续费云服务器
续费云服务器.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
instance_id | string | None | True | 实例id | None |
period | string | 1 | False | 长期续约,默认为单位月数 | None |
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: 失败,1:成功 |
instance_id | string | True | 实例id |
自动续费
自动续费.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
instance_ids | string | None | True | 支持查询多达100个包年、月实例,多个实例ID用逗号连接 | None |
autorenew | boolean | None | False | True/false,True启用自动续费,false取消自动续费。 | None |
duration | integer | 1 | 支持1,2,3,6,12,单位数月。 | None |
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: 失败,1:成功 |
result | object | True | 自动续费退回 |
批量创建实例
批量创建实例.
输入
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
image_id | string | None | True | 镜像ID。您可以使用公共映像或自定义映像 | None |
instance_type | string | None | True | 实例规范。例如,选择2 nuclear 8GiB g6。大到包括ecs。G6。大 | None |
security_group_id | string | None | True | 安全组ID。安全组是通过安全组规则控制和保护实例的网络访问请求的虚拟防火墙。建议在按需打开和设置安全组的访问规则时,默认情况下不要将所有访问规则保持打开状态 | None |
vsw_vswitch_ide_id | string | None | True | 交换机ID,创建VPC类型的ECS实例需要指定交换机ID | None |
amount | integer | 1 | True | 批量创建的ECS实例数,取值范围:1-100,默认为1 | None |
auto_release_time | string | None | True | 自动释放时间。UTC时间的格式为YYYy-Mm-DDthh:Mm:ssZ。最短释放时间为当前时间后半小时;最长释放时间不得超过当前的三年时间。 | None |
instance_name | string | None | True | 实例名称 | None |
输出
Name | Type | Required | Description |
---|---|---|---|
code | integer | True | -1: 失败,1:成功 |
instance_ids | []string | True | 启动列表返回成功 |
触发器
该插件不包含任何触发器。
连接
连接配置接受如下参数:
Name | Type | Default | Required | Description | Enum |
---|---|---|---|---|---|
accesskey | string | None | True | 您的访问密钥Id | None |
accesssecret | password | None | True | 您的访问密钥 Secret | None |
region | string | None | True | 设置区域 | None |
故障排除
该插件不包含任何故障排除信息。
版本
- 0.1.2 -
- 0.1.1 -
- 0.1.0 -
索引
该插件不包含任何索引。
plugin_spec_version: v2
name: aliyun
title: 阿里云ECS
description: 阿里云ECS
version: 0.1.2
vendor: chariot
tags:
- aliyun
- ecs
enable_cache: true
status:
- supported
language: python
connection:
accesskey:
title:
en: AccessKey
zh-CN: AccessKey
type: string
description:
en: Your Access Key Id
zh-CN: 您的访问密钥Id
required: true
accesssecret:
title:
en: AccesSecret
zh-CN: AccesSecret
type: password
description:
en: Your Access Key Secret
zh-CN: 您的访问密钥 Secret
required: true
region:
title:
en: Region
zh-CN: 地区
type: string
description:
en: Set up the regional
zh-CN: 设置区域
required: true
actions:
create_pay_ecs:
title: 创建按量付费ECS实例
description: 创建按量付费ECS实例
input:
image_id:
title:
en: Image ID
zh-CN: 镜像ID
type: string
description:
en: Mirror ID. You can use a public image or a custom image
zh-CN: 镜像ID。您可以使用公共映像或自定义映像
required: true
instance_type:
title:
en: Instance type
zh-CN: 实例规格
type: string
description:
en: Instance specification. For example, select 2 nuclear 8GiB g6. Large to include ecs. G6. Large
zh-CN: 实例规格。例如,选择2核8GiB g6.large则入参为ecs.g6.large
required: true
security_group_id:
title:
en: Security group id
zh-CN: 安全组ID
type: string
description:
en: Security group ID. A security group is a virtual firewall that controls and protects the network access requests of instances through security group rules. It is recommended that all access rules are not left open by default when opening and setting access rules for security groups on demand
zh-CN: 安全组ID。安全组相当于虚拟防火墙,通过安全组规则控制和保护实例的网络出入请求。建议按需开放和设置安全组出入规则时,不要默认开放所有的出入规则
required: true
vsw_vswitch_ide_id:
title:
en: Vsw vswitch id
zh-CN: 交换机ID
type: string
description:
en: Switch ID. Creating an ECS instance of type VPC requires specifying the switch ID
zh-CN: 交换机ID,创建VPC类型的ECS实例需要指定交换机ID
required: true
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: 失败,1:成功"
required: true
instance_id:
title:
en: Instance id
zh-CN: ECS 实例id
type: string
description:
en: ECS instance id
zh-CN: ECS实例id
required: true
create_prepay_ecs:
title: 创建包年包月ECS实例
description: 创建包年包月ECS实例
input:
image_id:
title:
en: Image ID
zh-CN: 镜像ID
type: string
description:
en: Mirror ID. You can use a public image or a custom image
zh-CN: 镜像ID。您可以使用公共映像或自定义映像
required: true
instance_type:
title:
en: Instance type
zh-CN: 实例规格
type: string
description:
en: Instance specification. For example, select 2 nuclear 8GiB g6. Large to include ecs. G6. Large
zh-CN: 实例规格。例如,选择2核8GiB g6.large则入参为ecs.g6.large
required: true
security_group_id:
title:
en: Security group id
zh-CN: 安全组ID
type: string
description:
en: Security group ID. A security group is a virtual firewall that controls and protects the network access requests of instances through security group rules. It is recommended that all access rules are not left open by default when opening and setting access rules for security groups on demand
zh-CN: 安全组ID。安全组相当于虚拟防火墙,通过安全组规则控制和保护实例的网络出入请求。建议按需开放和设置安全组出入规则时,不要默认开放所有的出入规则
required: true
vsw_vswitch_ide_id:
title:
en: Vsw vswitch id
zh-CN: 交换机ID
type: string
description:
en: Switch ID. Creating an ECS instance of type VPC requires specifying the switch ID
zh-CN: 交换机ID,创建VPC类型的ECS实例需要指定交换机ID
required: true
period:
title:
en: Period
zh-CN: 周期
type: integer
description:
en: Long renewals, default to unit months
zh-CN: 长期续约,默认为单位月数
required: false
default: 1
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: 失败,1:成功"
required: true
instance_id:
title:
en: Instance id
zh-CN: ECS 实例 id
type: string
description:
en: ECS instance id
zh-CN: ECS实例id
required: true
get_instance_detail:
title: 查询ECS实例状态
description: 查询ECS实例状态; 仅Stopped状态的实例可以执行StartInstance操作。仅Running状态的实例可以执行StopInstance操作。
input:
instance_id:
title:
en: Instance id
zh-CN: 实例ID
type: string
description:
en: Instance ID
zh-CN: 实例ID
required: true
status:
title:
en: Status
zh-CN: 状态
type: string
description:
en: The instance state
zh-CN: 实例状态
required: false
default: Stopped
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: failure, 1: success"
required: true
instance_detail:
title:
en: Instance detail
zh-CN: 实例信息
type: object
description:
en: Instance information
zh-CN: 实例信息
required: true
start_instance:
title: 启动ECS实例
description: 启动ECS实例, 创建成功后的ECS实例默认状态为Stopped。如果需要实例进入Running状态,可以通过StartInstance完成
input:
instance_id:
title:
en: Instance id
zh-CN: 实例ID
type: string
description:
en: Instance ID
zh-CN: 实例ID
required: true
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: 失败,1:成功"
required: true
stop_instance:
title: 停止ECS实例
description: 停止ECS实例, 如果需要运行中的实例进入Stopped状态,可以通过StopInstance完成
input:
instance_id:
title:
en: Instance id
zh-CN: 实例ID
type: string
description:
en: Instance ID
zh-CN: 实例ID
required: true
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: 失败,1:成功"
required: true
list_regions:
title: 地域列表
description: 查询当前账号支持的地域列表
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: failure, 1: success"
required: true
regions:
title:
en: Regions
zh-CN: 地区
type: "[]string"
description:
en: Query the list of locations supported by the current account
zh-CN: 查询当前帐户支持的位置列表
required: true
list_instances:
title: ECS实例列表
description: 查询指定地域下的ECS实例
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: 失败,1:成功"
required: true
instances:
title:
en: Instances
zh-CN: 实例
type: "[]string"
description:
en: Query the ECS instance under the specified locale
zh-CN: 查询指定区域设置下的ECS实例
required: true
release_instance:
title: 释放ECS实例
description: 释放ECS实例, 当ECS实例处于Stopped状态时,您可以执行释放ECS实例
input:
instance_id:
title:
en: Instance id
zh-CN: 实例id
type: string
description:
en: Instance id
zh-CN: 实例id
required: true
force:
title:
en: Force
zh-CN: 强制释放
type: boolean
description:
en: If this parameter is set to true, a forced release will be performed. An ECS instance can be freed even if it is not in the Stopped state. Be careful when executing to prevent error releases from affecting your business.
zh-CN: 如果此参数设置为true,将执行强制释放。ECS实例不处于停止状态也可以释放。执行时要小心,以防止错误发布影响您的业务。
required: false
default: false
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: failure, 1: success"
required: true
result:
title:
en: Result
zh-CN: 结果
type: object
description:
en: Release the ECS instance return data
zh-CN: 释放ECS实例返回数据
required: true
renew_instance:
title: 续费云服务器
description: 续费云服务器
input:
instance_id:
title:
en: Instance id
zh-CN: 实例id
type: string
description:
en: Instance id
zh-CN: 实例id
required: true
period:
title:
en: Period
zh-CN: 周期
type: string
description:
en: Long renewals, default to unit months
zh-CN: 长期续约,默认为单位月数
required: false
default: '1'
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: 失败,1:成功"
required: true
instance_id:
title:
en: Instance id
zh-CN: 实例id
type: string
description:
en: Instance id
zh-CN: 实例id
required: true
auto_renew:
title: 自动续费
description: 自动续费
input:
instance_ids:
title:
en: Instance ids
zh-CN: 实例ID列表
type: string
description:
en: Supports querying up to 100 instances of package year and month, with multiple instance ids connected by commas
zh-CN: 支持查询多达100个包年、月实例,多个实例ID用逗号连接
required: true
autorenew:
title:
en: Autorenew
zh-CN: 自动续费
type: boolean
description:
en: True /false, true to enable automatic renewal, false to cancel automatic renewal.
zh-CN: True/false,True启用自动续费,false取消自动续费。
required: false
default: false
duration:
title:
en: Duration
zh-CN: 持续时间
type: integer
description:
en: Support 1, 2, 3, 6, 12, unit for months.
zh-CN: 支持1,2,3,6,12,单位数月。
default: 1
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: 失败,1:成功"
required: true
result:
title:
en: Result
zh-CN: 结果
type: object
description:
en: Automatic renewal return
zh-CN: 自动续费退回
required: true
create_multiple_ecs:
title: 批量创建实例
description: 批量创建实例
input:
image_id:
title:
en: Image id
zh-CN: 镜像ID
type: string
description:
en: Mirror ID. You can use a public image or a custom image
zh-CN: 镜像ID。您可以使用公共映像或自定义映像
required: true
instance_type:
title:
en: Instance type
zh-CN: 实例规格
type: string
description:
en: Instance specification. For example, select 2 nuclear 8GiB g6. Large to include ecs. G6. Large
zh-CN: 实例规范。例如,选择2 nuclear 8GiB g6。大到包括ecs。G6。大
required: true
security_group_id:
title:
en: Security group id
zh-CN: 安全组ID
type: string
description:
en: Security group ID. A security group is a virtual firewall that controls and protects the network access requests of instances through security group rules. It is recommended that all access rules are not left open by default when opening and setting access rules for security groups on demand
zh-CN: 安全组ID。安全组是通过安全组规则控制和保护实例的网络访问请求的虚拟防火墙。建议在按需打开和设置安全组的访问规则时,默认情况下不要将所有访问规则保持打开状态
required: true
vsw_vswitch_ide_id:
title:
en: Vsw vswitch id
zh-CN: 交换机ID
type: string
description:
en: Switch ID. Creating an ECS instance of type VPC requires specifying the switch ID
zh-CN: 交换机ID,创建VPC类型的ECS实例需要指定交换机ID
required: true
amount:
title:
en: Amount
zh-CN: 数量
type: integer
description:
en: 'The number of ECS instances to be created in batch, value range: 1-100, default: 1'
zh-CN: 批量创建的ECS实例数,取值范围:1-100,默认为1
required: true
default: 1
auto_release_time:
title:
en: Auto release time
zh-CN: 自动释放时间
type: string
description:
en: 'Automatic release time. UTC time is used in the format YYYy-Mm-DDthh: MM :ssZ. The minimum release time is half an hour after the current time; The maximum release time cannot exceed the current time of three years.'
zh-CN: 自动释放时间。UTC时间的格式为YYYy-Mm-DDthh:Mm:ssZ。最短释放时间为当前时间后半小时;最长释放时间不得超过当前的三年时间。
required: true
instance_name:
title:
en: Instance name
zh-CN: 实例名
type: string
description:
en: The instance name
zh-CN: 实例名称
required: true
output:
code:
title:
en: Code
zh-CN: 代码
type: integer
description:
en: "-1: failure, 1: success"
zh-CN: "-1: 失败,1:成功"
required: true
instance_ids:
title:
en: Instance ids
zh-CN: 实例ID列表
type: "[]string"
description:
en: The boot list is returned successfully
zh-CN: 启动列表返回成功
required: true