详情页标题前

阿里云负载均衡ModifyVServerGroupBackendServers – 替换服务器组中的后端服务器-云淘科技

详情页1

替换服务器组中的后端服务器。

接口说明

该接口只用于替换服务器中的后端服务器,如果您需要修改后端服务器的端口权重等配置,请参见SetVServerGroupAttribute。

调试

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

调试阿里云负载均衡ModifyVServerGroupBackendServers - 替换服务器组中的后端服务器-云淘科技调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 访问级别 资源类型 条件关键字 关联操作
slb:ModifyVServerGroupBackendServers Write
  • instanceacs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}
  • loadbalanceracs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
  • slb:tag

请求参数

名称 类型 必填 描述 示例值
RegionId string

负载均衡实例的地域ID。

cn-hangzhou
VServerGroupId string

服务器组ID。

rsp-cige6j****
OldBackendServers string

要被替换的后端服务器列表,单次调用每个服务器组最多可包含20个后端服务器。

取值:

  • ServerId:String类型,必选,后端服务器的实例ID。

  • Port:Integer类型,必选,后端服务器使用的端口,取值范围:1~65535

  • Weight:Integer类型,必选,后端服务器的权重,取值范围:0~100

  • Description:String类型,非必选,后端服务器描述,长度为1~80个字符,允许包含字母、数字、短划线(-)、正斜线(/)、半角句号(.)和下划线(_),支持中文。

  • Type:String类型,表示后端服务器的实例类型,取值:

    • ecs:ECS实例(默认)。

    • eni:弹性网卡实例。

  • ServerIp:ECS或者ENI的实例IP。

示例说明如下:

  • 挂载ECS示例:

[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }]

  • 挂载ENI:

    [{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port":"80","Description":"test-112" }]

  • 挂载ENI多IP:

[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.**.**", "Port":"80","Description":"test-113" }]

[{ “ServerId”: “i-xxxxxxxxx”, “Weight”: “100”, “Type”: “ecs”, “Port”:”80″,”Description”:”test-112″ }]
NewBackendServers string

新的后端服务器列表,单次调用每个服务器组最多可调用20个后端服务器。

取值:

  • ServerId:String类型,必选,后端服务器的实例ID。

  • Port:Integer类型,必选,后端服务器使用的端口,取值范围:1~65535

  • Weight:Integer类型,必选,后端服务器的权重,取值范围:0~100

  • Description:String类型,非必选,后端服务器描述,允许包含字母、数字、短划线(-)、正斜线(/)、半角句号(.)和下划线(_),支持中文。

  • Type:String类型,表示后端服务器的实例类型,取值:

    • ecs: ECS实例(默认)。

    • eni:弹性网卡实例。

  • ServerIp:ECS或者ENI的实例IP。

示例说明如下:

  • 挂载ECS示例:

[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }]

  • 挂载ENI:

    [{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port":"80","Description":"test-112" }]

  • 挂载ENI多IP:

[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.**.**", "Port":"80","Description":"test-113" }]

[{ “ServerId”: “eni-xxxxxxxxx”, “Weight”: “100”, “Type”: “eni”, “ServerIp”: “192.168.**.**”, “Port”:”80″,”Description”:”test-112″ },{ “ServerId”: “eni-xxxxxxxxx”, “Weight”: “100”, “Type”: “eni”, “ServerIp”: “172.166.**.**”, “Port”:”80″,”Description”:”test-113″ }]

返回参数

名称 类型 描述 示例值
object
VServerGroupId string

服务器组ID。

rsp-cige6j****
RequestId string

请求ID。

9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C
BackendServers object []

后端服务器列表。

Type string

Type后端服务器类型,取值:

  • ecs(默认):ECS实例

  • eni:弹性网卡实例

ecs
Weight integer

后端服务器的权重。

100
Description string

后端服务器描述。

后端服务器描述。
Port integer

后端服务器使用的端口。

70
ServerId string

ECS实例ID或ENI的实例ID。

i-bp1ge5hrp****

示例

正常返回示例

JSON格式

{
  "VServerGroupId": "rsp-cige6j****",
  "RequestId": "9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C",
  "BackendServers": {
    "BackendServer": [
      {
        "Type": "ecs",
        "Weight": 100,
        "Description": "后端服务器描述。",
        "Port": 70,
        "ServerId": "i-bp1ge5hrp****"
      }
    ]
  }
}

错误码

HTTP status code 错误码 错误信息 描述
400 InvalidParameter The specified BackendServers contain duplicated value of ServerID and Port. 指定的后端服务器包含重复的服务ID和端口值。
400 Mismatched.ZoneId The zone of the server is not matched with the cloud box loadbalancer. 当前服务器的可用区与云盒实例可用区不匹配。
400 InvalidBackendServers.ServerIpConflict %s. 存在相同TunnelId和RsIp配置的后端服务器。
400 OperationUnsupported.ModifyVServerGroupBackendServers This type of backend server is not allowed to attached to singleTunnel or anyTunnel lb. 这种类型的后端服务器不允许附加到 singleTunnel 或 anyTunnel lb。
400 IncorrectStatus.RSByPassToas %s. 指定后端服务器的BypassToa配置无效。
400 BackendServer.InvalidType The specified Type is invalid. 后端服务器类型非法。
400 BackendServer.ServerRegionIdNotEqual The specified ServerRegionId must be equal. 后端服务器必须属于同一个地域。
400 OperationFailed.InvalidCen The cen related with this loadbalancer is invalid. 操作失败,原因是指定负载均衡实例关联的Cen信息缺失。
400 IncorrectStatus.CenNotAssociated The action is invalid because the loadbalancer is not associated with cen. 该操作无效,因为当前负载均衡实例未与cen关联。
400 InvalidBackendServers.MissingCenBandWidth The bandwidth is missing between loadbalancer and backendServers in cen. Cen中的负载均衡实例所在的地域和挂载的目标地域之间要有带宽包。
400 InvalidBackendServers.VpcNotInCen The BackendServers is not in the cen associated with the loadbalancer. 后端服务器不在与负载均衡关联的cen中。
400 InvalidServerId.NotExist The specified ServerId is not exist. 指定的后端服务器不存在。
400 MissingParameter.ServerRegionId The parameter ServerRegionId is required. 参数ServerRegionId缺失。
400 MissingParameter.VbrId The parameter VbrId is required. 参数VbrId缺失。
400 InvalidParameter.ServerRegionId The parameter ServerRegionId is invalid for crossborder. 指定的ServerRegionId无效。请检查参数约束,并在修改后重试。
400 InvalidVbrId.NotInCen The VbrId is not in the cen associated with the loadbalancer. 指定的Vbr不在实例关联的Cen内。
400 InvalidParameter.ServerRegionId The specified ServerRegionId is invalid. 指定的ServerRegionId无效。请检查参数约束,并在修改后重试。
400 InvalidParameter.ZoneNotSupport The zone does not support the parameter %s. 当前可用区不支持指定参数。
400 MasterSlaveServerConflict The servers are conflict for MasterSlaveGroup. 主备服务器组的后端服务器冲突。
400 NetworkConflict %s. 虚拟服务器组和ECS配置信息不一致。

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

变更历史

变更时间 变更内容概要 操作
2023-09-08 OpenAPI 错误码发生变更 看变更集
变更项 变更内容
错误码 OpenAPI 错误码发生变更
    错误码 400 变更

内容没看懂? 不太想学习?想快速解决? 有偿解决: 联系专家

阿里云企业补贴进行中: 马上申请

腾讯云限时活动1折起,即将结束: 马上收藏

同尘科技为腾讯云授权服务中心。

购买腾讯云产品享受折上折,更有现金返利:同意关联,立享优惠

转转请注明出处:https://www.yunxiaoer.com/169788.html

(0)
上一篇 2023年12月10日
下一篇 2023年12月10日
详情页2

相关推荐

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信
本站为广大会员提供阿里云、腾讯云、华为云、百度云等一线大厂的购买,续费优惠,保证底价,买贵退差。