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

ModifyLoadBalancerType

最近更新时间2024.02.29 14:48:21

首次发布时间2023.02.06 17:13:03

API 说明

API 名称:ModifyLoadBalancerType 。
API 域名:open.volcengineapi.com 。
API 描述:变更 ALB 实例网络类型。

使用限制

节流限制:每秒最多提交 20 个 API 请求。

快速调试

URI 参数

在使用该部分 API 提交请求时必须包含以下 URI 参数。

除了 URI 参数,该 API 请求还需要包含签名参数。关于更多签名参数的信息,参见公共请求参数

名称类型是否必选格式说明
Action
string
[a-zA-Z]+
API 名称,如 ModifyLoadBalancerType 。
VersionstringYYYY-MM-DDAPI 版本信息。该参数的取值是 2020-04-01 。
X-Expiresint900表示签名的有效时间,单位是秒,默认值是900。

请求正文

在使用该 API 提交请求时,请求正文中可以包含的参数如下。

参数类型是否必选参数说明示例
LoadBalancerId

String

ALB实例ID。

alb-*******

Type

String

ALB 实例的类型。支持取值如下:

  • public:表示将实例变更为一个公网ALB实例。

  • private:表示将实例变更为一个私网ALB实例。

private

ZoneMappingsArray可用区及子网映射列表,当ALB实例由私网类型变更为公网类型时,此参数必选。具体参见下表 ZoneMappings-

ZoneMappings

参数类型是否必选参数说明示例
ZoneMappings.N.AllocationId

String

公网IP的ID。
eip-****

ZoneMappings.N.ZoneId

String

ALB 实例的可用区ID。

  • ALB允许通过调用 DescribeZones 接口获取可用区ID对应的可用区的信息。

cn-beijing-a

ZoneMappings.N.EipType

String

公网 IP 的类型。

  • 空:弹性公网 IP。

  • anycast:Anycast 弹性公网IP。当前Anycast 弹性公网IP 类型需要分别在 Anycast公网IP、 ALB 两个产品中开通白名单才可以使用。

anycast

ZoneMappings.N.PopLocations

String

当绑定 Anycast 公网IP类型时,您可指定接入点。

cn-beijing-pop,cn-shanghai-pop

响应正文

参数类型参数说明示例值
RequestId
String
请求ID。
20210811152539010225146063030****

示例

请求示例

GET /?Action=ModifyLoadBalancerType&Version=2020-04-01&Type=public&ZoneMappings.1.AllocationId=eip-2fe6iauhyn3ls5oxruuyf****&ZoneMappings.1.ZoneId=cn-beijing-a
Host: open.volcengineapi.com
Region: cn-beijing
ServiceName: alb

响应示例

{
    "ResponseMetadata": {
        "RequestId": "20210816110638****2514606306AF947C",
        "Action": "ModifyLoadBalancerType",
        "Version": "2020-04-01",
        "Service": "alb",
        "Region": "cn-beijing"
    }, 
    "Result": {
        "RequestId": "20210811152539010225146063030****"
    }
}

错误码

如果响应正文包含 Error 字段,则表示 API 请求失败。此处仅展示当前 API 的错误码,更多错误码请参见公共错误码

HTTP Code

错误码

错误信息

错误描述

400

OperationDenied.DualStackUnsupported

The request on the specified LoadBalancer is denied due to dual stack loadbalancer does not support to modify type.

因双栈 ALB 实例暂时不支持变更网络类型,对于该 ALB 实例的操作请求被拒绝。

400InvalidType.MalformedThe specified Type is malformed.指定的 Type 参数格式不合法。

400

OperationDenied.TypeNotChange

The request on the specified LoadBalancer is denied due to the type not changing. The type to be modified should not be the same as the original one.

因指定的 Type 与原始 Type 一致,对于该 ALB 实例的操作请求被拒绝。期望变更的实例类型不能与原始类型相同。

400

InvalidNumberForZone.AllocationIdMismatch

The specified number of Zone and AllocationId do not match.

指定的可用区和 EIP 的数量不匹配。

400

InvalidZoneMappings.ZoneId.Duplicated

The specified ZoneMappings.ZoneId is duplicated.

指定的 ZoneMappings.ZoneId 重复。

400

MissingParameter

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

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

400

InvalidEipType.ExpectedEipTypeMismatch

The specified EIP type and expected EIP type do not match.

指定的 EIP 类型和期望的 EIP 类型不匹配。

400

InvalidEip.InvalidStatus

The specified EIP is not in the correct status for the request.

指定的 EIP 所处状态无法响应该请求。

400

OperationDenied.UnsupportedEipBillingType

The request on the specified LoadBalancer is denied due to unsupported EIP billing type.

因私网 ALB 实例绑定的 EIP 不支持此计费方式,对于该 ALB 实例的操作请求被拒绝。

400

InvalidZoneMappings.AllocationId.Duplicated

The specified ZoneMappings.AllocationId is duplicated.

指定的 ZoneMappings.AllocationId 重复。

400

OperationFailed.QueryIAM

The request on the specified resource failed due to the query on IAM failed.

因请求 IAM 失败,对于该资源的操作请求失败。

400

OperationFailed.QueryVpc

The request on the specified resource failed due to the query on VPC failed.

因请求 VPC 失败,对于该资源的操作请求失败。

400

InvalidAnycastEip.InvalidStatus

The specified Anycast EIP is not in the correct status for the request.

指定的 Anycast EIP 所处状态无法响应该请求。

400

OperationDenied.EipBindExist

The request on the specified LoadBalancer is denied due to the specified Anycast EIP has already bound instance in this region.

因指定的 Anycast EIP 已在该地域绑定实例,对于该 ALB 实例的操作请求被拒绝。

400

InvalidZoneMappings.EipType.Malformed

The specified ZoneMappings.EipType is malformed.

指定的 ZoneMappings.EipType 参数格式不合法。

400

InvalidEipBandwidthPackage.InUse

The specified EIP is being used by bandwidth package.

指定的 EIP 正在被共享带宽包使用。

400

InvalidLoadBalancer.InvalidStatus

The specified LoadBalancer is not in the correct status for the request.

指定的 ALB 实例所处状态无法响应该请求。

400OperationFailed.OperateGtmFailedThe request on the specified resource failed due to operating gtm failed.因操作 GTM 实例失败,对于该资源的操作请求失败。

400

OperationFailed.EipUsedByBandwidthPackage

The request on the specified LoadBalancer failed due to eip being used by bandwidth package.

因 EIP 实例仍然被共享带宽包使用,对于该 ALB 实例的操作请求失败。请先将 EIP 实例从共享带宽包移出后再进行操作。

403ForbiddenYou are not authorized to associate Anycast EIP with the specified LoadBalancer.您无权限对该 ALB 实例进行绑定 Anycast EIP 操作。

404

InvalidLoadBalancer.NotFound

The specified LoadBalancer does not exist.

指定的 ALB 实例不存在。

404

InvalidZone.NotFound

The specified Zone does not exist. The LoadBalancer has not been deployed in the specified zone yet.

指定的可用区不存在。ALB 实例尚未在该可用区部署。

404

InvalidEip.NotFound

The specified EIP does not exist.

指定的 EIP 不存在。

404InvalidAnycastEip.NotFoundThe specified Anycast EIP does not exist.指定的 Anycast EIP 不存在。
404InvalidPopLocation.NotFoundThe specified PopLocation does not exist.指定的接入点不存在。