JoinSecurityGroup - 加入安全组

调用JoinSecurityGroup将一台ENS实例加入到指定的安全组。

接口说明

调用该接口时,您需要注意:加入安全组之前,实例必须处于已停止(Stopped)或者运行中(Running)状态。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
SecurityGroupIdstring

安全组 ID。

sg-bp67acfmxazb4ph***
InstanceIdstring

实例 ID。

i-bp67acfmxazb4ph***
NetworkInterfaceIdstring

弹性网卡 ID。

eni-58z57orgmt6d1****

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

示例

正常返回示例

JSON格式

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

错误码

HTTP status code错误码错误信息描述
400MissingParameterThe input parameter that is mandatory for processing this request is not supplied.-
400NoPermissionPermission denied.没有足够的权限,请联系云账号管理员授予您相应权限。
400CallInterfaceCall Interface Happen Error.接口调用出错。
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-
400InvalidParameterThe errorMessage is %s. Please check it again.-
400InvalidSecurityGroupId.NotFoundThe specified SecurityGroupId does not exist.指定的安全组ID不存在。
400SecurityGroupRuleConflict.DuplicatedThe SecurityGroup rule already exists.安全组规则重复。
400AuthorizationLimitExceedThe limit of authorization records in the security group reaches.安全组规则数量超出限额。
400SecurityGroupRule.NotFoundThe input security group rule does not exist.-
400IncorrectInstanceStatusThe current status of the resource does not support this operation.当前操作不被支持,磁盘正在重置中。
400InvalidInstanceId.NotFoundThe specified InstanceId does not exist.指定实例不存在
400ens.interface.errorAn error occurred while calling the API.-
400RegionNotSupportThe specified InstanceId of regionId does not support SecurityGroup-
400InstanceAlreadyBoundThe instance is already bound to a SecurityGroup.-

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-09-21OpenAPI 错误码发生变更、OpenAPI 入参发生变更查看变更详情