You need to enable JavaScript to run this app.
导航

ModifyLoadBalancerAttributes

最近更新时间2024.01.12 10:21:37

首次发布时间2021.08.31 10:37:27

调用 ModifyLoadBalancerAttributes 接口修改指定负载均衡实例。

调试

请求参数

名称类型是否必填示例值
描述
ActionStringModifyLoadBalancerAttributes要执行的操作,取值为ModifyLoadBalancerAttributes。
VersionString2020-04-01API版本信息,当前版本为:2020-04-01。
LoadBalancerIdStringclb-bp1b6c719dfa08ex****负载均衡实例ID。您可以调用DescribeLoadBalancers接口获取负载均衡实例ID。

LoadBalancerName

String

clb-test1

负载均衡实例的名称。

  • 必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:点号(.)、下划线(_)和中划线(-)。
  • 长度限制为1 ~ 128个字符。

Description

String

test

负载均衡实例的描述。

  • 必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。
  • 长度限制为0 ~ 255个字符。

ModificationProtectionStatus

String

ConsoleProtection

负载均衡实例修改保护的状态。

  • NonProtection:不开启修改保护功能,配置后会清空已配置的ModificationProtectionReason
  • ConsoleProtection:开启控制台修改保护功能,表示禁止通过控制台修改实例或删除实例,但允许通过API接口修改或删除。

ModificationProtectionReason

String

实例托管

设置修改保护状态的原因。

  • 必须以字母或中文开头,支持数字、半角句号(.)、下划线(_)和中划线(-)。
  • 长度限制为1 ~ 80个字符。

说明

仅在参数ModificationProtectionStatus配置为 ConsoleProtection 时有效。

LoadBalancerSpec

String

small_1

负载均衡实例的规格,不同规格提供的转发能力不同,具体请参见产品类型与规格。取值如下:

  • small_1:小型I
  • small_2:小型II
  • medium_1:中型I
  • medium_2:中型II
  • large_1:大型I
  • large_2:大型II

说明

修改后的实例规格带宽应大于等于已配置监听器的带宽总和,否则无法修改规格。

Type

String

private

负载均衡实例的类型。取值如下:
private:表示将公网负载均衡实例转换为私网实例。转换后CLB实例与关联的公网IP生命周期独立,您可以按需解绑公网IP。
不传入该参数或该参数不传入数值时,表示不修改负载均衡实例的类型。

返回参数

字段类型示例值描述
RequestIdString202108161106382514606306AF947C****请求ID。

请求示例

GET /?Action=ModifyLoadBalancerAttributes&Version=2020-04-01&Description=test&LoadBalancerId=clb-bp1b6c719dfa08ex****&LoadBalancerName=clb-test1&LoadBalancerSpec=small_1&ModificationProtectionReason=实例托管&ModificationProtectionStatus=ConsoleProtection HTTP/1.1
Host: open.volcengineapi.com
Region: cn-beijing
Service: clb

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202108161106382514606306AF947C****",
        "Action": "ModifyLoadBalancerAttributes",
        "Version": "2020-04-01",
        "Service": "clb",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "202108161106382514606306AF947C****",
    }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

HttpCode错误码错误信息描述

400

MissingParameter

The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the XXX.

该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如XXX

说明

其中,XXX表示缺少的参数名称。

400InvalidLoadBalancerDescription.MalformedThe specified LoadBalancerDescription is malformed.指定的 LoadBalancerDescription 参数格式不合法。
400InvalidLoadBalancerName.MalformedThe specified LoadBalancerName is malformed.指定的 LoadBalancerName 参数格式不合法。
400InvalidLoadBalancerSpec.MalformedThe specified LoadBalancerSpec is malformed.指定的 LoadBalancerSpec 参数格式不合法。
400InvalidModificationProtectionReason.MalformedThe specified ModificationProtectionReason is malformed.指定的 ModificationProtectionReason 参数格式不合法。
400InvalidModificationProtectionStatus.MalformedThe specified ModificationProtectionStatus is malformed.指定的 ModificationProtectionStatus 参数格式不合法。
400UnsupportedOperation.AccountArrearsThe request on the specified instance is denied due to the account in arrears status.因账户处于欠费状态,对于该实例的操作请求被拒绝。
400UnsupportedOperation.AccountArrearsThe request on the specified instance is denied due to the account balance and available vouchers are less than 100 yuan in total.因账户余额及可用代金券共不足100元,对于该实例的操作请求被拒绝。
400InvalidLoadBalancer.InvalidStatusThe specified LoadBalancer is not in the correct status for the request.指定的负载均衡实例所处状态无法响应该请求。
400OrderError.PreOrderFailed to create an order.下单失败。
400OrderError.OrderPayFailed to create order and pay.下单支付失败。
400UnSupportedOperation.SpecUnchangedThe request on the specified LoadBalancer is denied due to the LoadBalancerSpec has not changed.负载均衡规格未改变。
400InvalidType.MalformedThe specified Type is malformed.指定的 Type 参数格式不合法。
400InvalidLoadBalancerSpec.ListenerBandwidthMismatchThe total bandwidth of all listeners exceeds the upper limit of the specified spec.实例内监听器指定带宽总和超过指定的负载均衡规格上限。
403InvalidResourceType.ServcieManagedThe specified ResourceType is managed by a service.指定的资源是服务托管资源。
404InvalidLoadBalancer.NotFoundThe specified LoadBalancer does not exist.指定的负载均衡不存在。
404InvalidLoadBalancerSpec.NotFoundThe specified LoadBalancerSpec does not exist.指定的负载均衡规格不存在。
412InvalidLoadBalancer.ExpiredThe specified LoadBalancer has expired.指定的负载均衡已过期。
412InvalidLoadBalancer.InvalidBillingTypeThe specified LoadBalancer is not in the correct BillingType for the request.指定的负载均衡所处计费类型无法响应该请求。