326
阿里云
将实例加入安全组__实例相关接口_API 参考_云服务器 ECS-阿里云
描述
将实例加入到指定的安全组。
- 只有在实例状态为 Stopped 或 Running 状态下才可以执行该操作。
- 每个实例最多属于 5 个安全组
- 每个安全组最多拥有个 1000 个实例
请求参数
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
Action | String | 是 | 系统规定参数,取值:JoinSecurityGroup |
InstanceId | String | 是 | 指定的实例 ID |
SecurityGroupId | String | 是 | 安全组代码 |
返回参数
全是公共返回参数,详见公共返回参数
错误码
错误代码 | 描述 | Http 状态码 | 语义 |
---|---|---|---|
InvalidInstanceId.NotFound | The InstanceId provided does not exist in our records. | 404 | 指定的 InstanceId 不存在 |
MissingParameter | The input parameter "InstanceId" that is mandatory for processing this request is not supplied. | 400 | 缺少 InstanceId 值 |
InvalidSecurityGroupId.NotFound | The SecurityGroupId provided does not exist in our records. | 404 | 指定的 SecurityGroupId 不存在 |
MissingParameter | The input parameter "SecurityGroupId" that is mandatory for processing this request is not supplied. | 400 | 缺少 SecurityGroupId 值 |
InstanceSecurityGroupLimitExceeded | Exceeding the allowed amount of security groups that an instance can be in. | 400 | 实例加入的安全组数量达到上限 |
IncorrectInstanceStatus | The current status of the resource does not support this operation. | 403 | 该资源目前的状态不支持此操作 |
InstanceLockedForSecurity | The specified operation is denied as your instance is locked for security reasons. | 403 | 该资源目前被安全锁定被拒绝操作 |
SecurityGroupInstanceLimitExceeded | Exceeding the allowed amount of instances of a security group. | 403 | 该 SecurityGroup 内的 Instance 数量已经达到上限 |
InvalidInstanceId.Mismatch | Specified instance and security group are not in the same VPC. | 403 |
指定的实例和安全组不属于同一个虚拟专有网络 (包含另外两种特殊情况:
|
InvalidInstanceId.AlreadyExists | The specified instance is already in the specified security group. | 403 | 指定的实例已经在指定的安全组中 |
示例
请求示例
https://ecs.aliyuncs.com/?Action=JoinSecurityGroup
&InstanceId= i-instance1
&SecurityGroupId=F876FF7BA984
&<公共请求参数>
返回示例
XML
格式
<JoinSecurityGroupResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</JoinSecurityGroupResponse>
JSON
格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
最后更新:2016-11-23 16:03:50
上一篇:
删除实例__实例相关接口_API 参考_云服务器 ECS-阿里云
下一篇:
将实例移出安全组__实例相关接口_API 参考_云服务器 ECS-阿里云
添加截图配置__直播流操作接口_API 手册_CDN-阿里云
可重跑与幂等性__进阶与深入_数据集成-阿里云
阿里云系统的电视盒子全面升级,新系统如何快速查找应用?
2015-12-09__Release-Notes_日志服务-阿里云
针对移动App的临时授权管理__使用场景_用户指南_访问控制-阿里云
专有网络中云服务器修改交换机或者私网 IP 的方法__配置_用户指南_专有网络 VPC-阿里云
查询实例管理终端地址__实例相关接口_API 参考_云服务器 ECS-阿里云
错误结果__返回结果_API参考_弹性伸缩-阿里云
创建签名密钥__后端签名密钥相关接口_API_API 网关-阿里云
任务管理__运维中心手册_用户操作指南_大数据开发套件-阿里云
相关内容
常见错误说明__附录_大数据计算服务-阿里云
发送短信接口__API使用手册_短信服务-阿里云
接口文档__Android_安全组件教程_移动安全-阿里云
运营商错误码(联通)__常见问题_短信服务-阿里云
设置短信模板__使用手册_短信服务-阿里云
OSS 权限问题及排查__常见错误及排除_最佳实践_对象存储 OSS-阿里云
消息通知__操作指南_批量计算-阿里云
设备端快速接入(MQTT)__快速开始_阿里云物联网套件-阿里云
查询API调用流量数据__API管理相关接口_API_API 网关-阿里云
使用STS访问__JavaScript-SDK_SDK 参考_对象存储 OSS-阿里云