You need to enable JavaScript to run this app.
导航
ModifyLoadBalancerAttributes
最近更新时间:2024.06.04 17:36:52首次发布时间:2021.08.31 10:37:27

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

调用说明

以下可选参数如不配置,则保持不变。

调试

请求参数

名称
类型
是否必选
示例值
描述
ActionStringModifyLoadBalancerAttributes要执行的操作,取值为ModifyLoadBalancerAttributes。
VersionString2020-04-01API版本信息,当前版本为:2020-04-01。

LoadBalancerId

String

clb-bp1b6c719dfa08ex****

CLB实例ID。
您可以调用 DescribeLoadBalancers 接口,查询CLB实例ID。

LoadBalancerName

String

clb-1

CLB实例的名称。

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

Description

String

test

CLB实例的描述。

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

LoadBalancerSpec

String

small_1

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

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

说明

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

Type

String

private

CLB实例的类型。取值如下:
private:表示将公网CLB实例转换为私网实例。转换后CLB实例与关联的公网IP生命周期独立,您可以按需解绑公网IP。

ModificationProtectionStatus

String

ConsoleProtection

CLB实例是否开启控制台上修改保护。开启后,禁止通过控制台修改实例或删除实例。取值如下:

  • NonProtection或空:不开启。
  • ConsoleProtection:开启。

ModificationProtectionReason

String

托管实例

设置控制台修改保护的原因。
仅参数ModificationProtectionStatus取ConsoleProtection时,本参数有效。

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

返回参数

名称
类型
示例值
描述
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.指定的负载均衡规格不存在。
404InvalidExclusiveCluster.NotFoundThe specified ExclusiveCluster does not exist.指定的独占集群不存在。
412InvalidLoadBalancer.ExpiredThe specified LoadBalancer has expired.指定的负载均衡已过期。
412InvalidLoadBalancer.InvalidBillingTypeThe specified LoadBalancer is not in the correct BillingType for the request.指定的负载均衡所处计费类型无法响应该请求。
412InvalidExclusiveCluster.ExpiredThe specified ExclusiveCluster has expired.指定的独占集群已过期。
412InvalidExclusiveCluster.UnPurchasedThe specified ExclusiveCluster is not purchased.指定的独占集群未购买。