You need to enable JavaScript to run this app.
文档中心
负载均衡

负载均衡

复制全文
下载 pdf
实例
ModifyLoadBalancerType - 变更 ALB 实例网络类型
复制全文
下载 pdf
ModifyLoadBalancerType - 变更 ALB 实例网络类型
调用 ModifyLoadBalancerType 接口,变更 ALB 实例网络类型。​
使用说明​
  • 每秒最多提交 5 个 API 请求。​
  • IPv4&IPv6双栈ALB实例不支持变更网络类型。​
  • IPv4的ALB实例变更网络类型说明如下表:​
  • ​
    变更操作​
    变更影响​
    私网实例变更为公网实例​
    ALB实例域名会被解析为公网 IP 地址。​
    说明​
    公网 IP 地址会被计费。计费详情,请参见公网 IP 计费或Anycast 公网 IP 计费。​
    • 首次选择 Anycast弹性公网IP 时,您需要为服务角色 ServiceRoleForAlb 授予 Anycast 公网 IP 服务的权限。请注意,不要删除该角色,否则跨服务授权将失效。​
    • 如果 ALB 实例是 Anycast 公网 IP 绑定的第一个源站,ALB 实例成为默认源站。该情形下,系统会默认把所有接入点与该源站关联。如需调整 Anycast 公网 IP 的默认源站,请您前往 Anycast 公网 IP 控制台。​
    公网实例变更为私网实例​
    • 实例关联的所有公网 IP 地址会自动解绑。​
    • 如果公网 IP 地址是随实例同步创建的,这些公网 IP 地址会被删除。​
    • 如果公网 IP 地址是您手动创建的,这些公网 IP 地址不会被删除。如果您无需再使用,可以手动将其删除以避免产生费用。​
    • 实例域名会被解析为私网 IP 地址。​
    • 无法从互联网访问实例。​
    ​
​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:ModifyLoadBalancerType​
要执行的操作,取值:ModifyLoadBalancerType。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
Type string 必选 示例值:private​
ALB 实例的类型。取值如下:​
  • public:变更成公网ALB实例。​
  • private:变更成私网ALB实例。​
​
ZoneMappings.N.AllocationId string[] 可选 示例值:ZoneMappings.1.AllocationId=eip-****&ZoneMappings.2.AllocationId=eip-***​
公网IP的ID。​
​
ZoneMappings.N.ZoneId string[] 可选 示例值:ZoneMappings.1.ZoneId=cn-beijing-a&ZoneMappings.2.ZoneId=cn-beijing-b​
ALB 实例的可用区ID。​
  • ALB允许通过调用 DescribeZones 接口获取可用区ID对应的可用区的信息。​
​
ZoneMappings.N.EipType string[] 可选 示例值:ZoneMappings.1.EipType=anycast&ZoneMappings.2.EipType=anycast​
公网 IP 的类型。​
  • 空:公网 IP。​
  • anycast:Anycast公网IP。当前Anycast 弹性公网IP 类型需要分别在 Anycast公网IP、 ALB 两个产品中开通白名单才可以使用。​
​
ZoneMappings.N.PopLocations string[] 可选 示例值:ZoneMappings.1.PopLocations=cn-beijing-pop,cn-shanghai-pop&ZoneMappings.1.PopLocations=cn-beijing-pop,cn-shanghai-pop​
当绑定 Anycast 公网IP类型时,您可指定接入点。​
  • 多个接入点请用半角逗号(,)分隔。​
​
LoadBalancerId string 必选 示例值:alb-*******​
ALB实例ID。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId string 示例值:20210811152539010225146063030****​
请求ID。​
​
​
​
请求示例​
​
GET /?Action=ModifyLoadBalancerType&Version=2020-04-01&Type=public&ZoneMappings.1.AllocationId=eip-2fe6iauhyn3ls5oxruuyf****&ZoneMappings.1.ZoneId=cn-beijing-a​
Host: alb.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/alb/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20210816110638****2514606306AF947C",​
"Action": "ModifyLoadBalancerType",​
"Version": "2020-04-01",​
"Service": "alb",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "20210811152539010225146063030****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
Invalid%s.Malformed​
MismatchThe specified %s is malformed.​
指定的 %s 参数格式不合法。​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, '%s'.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如: %s。​
400​
InvalidParameter​
Data unmarshal failed.​
请求解析失败。​
400​
InvalidType.Malformed​
The specified Type is malformed.​
指定的 Type 参数格式不合法。​
400​
OperationFailed.EipUsedByBandwidthPackage​
The request on the specified LoadBalancer failed due to eip being used by bandwidth package.​
因 EIP 实例仍然被共享带宽包使用,对于该 ALB 实例的操作请求失败。请先将 EIP 实例从共享带宽包移出后再进行操作。​
400​
OperationFailed.OperateGtmFailed​
The request on the specified resource failed due to operating gtm failed.​
因操作 GTM 实例失败,对于该资源的操作请求失败。​
400​
InvalidLoadBalancer.InvalidStatus​
The specified LoadBalancer is not in the correct status for the request.​
指定的 ALB 实例所处状态无法响应该请求。​
400​
InvalidEipBandwidthPackage.InUse​
The specified EIP is being used by bandwidth package.​
指定的 EIP 正在被共享带宽包使用。​
400​
InvalidZoneMappings.EipType.Malformed​
The specified ZoneMappings.EipType is malformed.​
指定的 ZoneMappings.EipType 参数格式不合法。​
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​
InvalidAnycastEip.InvalidStatus​
The specified Anycast EIP is not in the correct status for the request.​
指定的 Anycast EIP 所处状态无法响应该请求。​
400​
OperationFailed.QueryVpc​
The request on the specified resource failed due to the query on VPC failed.​
因请求 VPC 失败,对于该资源的操作请求失败。​
400​
OperationFailed.QueryIAM​
The request on the specified resource failed due to the query on IAM failed.​
因请求 IAM 失败,对于该资源的操作请求失败。​
400​
InvalidZoneMappings.AllocationId.Duplicated​
The specified ZoneMappings.AllocationId is duplicated.​
指定的 ZoneMappings.AllocationId 重复。​
400​
OperationDenied.UnsupportedEipBillingType​
The request on the specified LoadBalancer is denied due to unsupported EIP billing type.​
因私网 ALB 实例绑定的 EIP 不支持此计费方式,对于该 ALB 实例的操作请求被拒绝。​
400​
InvalidEip.InvalidStatus​
The specified EIP is not in the correct status for the request.​
指定的 EIP 所处状态无法响应该请求。​
400​
InvalidEipType.ExpectedEipTypeMismatch​
The specified EIP type and expected EIP type do not match.​
指定的 EIP 类型和期望的 EIP 类型不匹配。​
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​
InvalidZoneMappings.ZoneId.Duplicated​
The specified ZoneMappings.ZoneId is duplicated.​
指定的 ZoneMappings.ZoneId 重复。​
400​
InvalidNumberForZone.AllocationIdMismatch​
The specified number of Zone and AllocationId do not match.​
指定的可用区和 EIP 的数量不匹配。​
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​
OperationDenied.DualStackUnsupported​
The request on the specified LoadBalancer is denied due to dual stack loadbalancer does not support to modify type.​
因双栈 ALB 实例暂时不支持变更网络类型,对于该 ALB 实例的操作请求被拒绝。​
400​
OperationDenied.ModifyLoadBalancerType​
The request on the specified LoadBalancer is denied due to the LoadBalancer is used by ArkClaw.​
因 ALB 实例开启 ArkClaw,不支持修改实例类型,对于该 ALB 实例的操作请求被拒绝。​
403​
Forbidden​
You 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 不存在。​
404​
InvalidAnycastEip.NotFound​
The specified Anycast EIP does not exist.​
指定的 Anycast EIP 不存在。​
404​
InvalidPopLocation.NotFound​
The specified PopLocation does not exist.​
指定的接入点不存在。​
500​
InternalError​
An internal error has occurred.​
发生内部错误。请稍后重试或联系工程师进一步咨询。​
​
​
最近更新时间:2026.07.10 15:34:56
这个页面对您有帮助吗?
有用
有用
无用
无用