CreateLoadBalancer_负载均衡_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

注意事项

说明 CLB 包年包月实例 2024 年 12 月 01 日 00:00:00 起停止新购。详细信息请参见传统型负载均衡 CLB 包年包月停售公告
  • 实例创建前,请调用 DescribeAvailableResource 查询可用区支持的资源售卖情况。
  • 实例创建后,会产生费用。
  • 按量付费模式支持创建按规格计费实例和按使用量计费实例。

流控信息

请求速率为60/60(s)。更多流控信息,请前往配额中心查看

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
slb:CreateLoadBalancer
Create
LoadBalancer
acs:slb:{#regionId}:{#accountId}:loadbalancer/*
slb:AddressType

请求参数

字段名称字段详情
RegionIdstring

传统型负载均衡实例的地域 ID。展开详情

示例值:cn-hangzhou参考取值来源:
    DescribeRegions
AddressTypestring

传统型负载均衡实例的网络类型。取值:展开详情

示例值:internet
InternetChargeTypestring

公网类型实例的付费方式。取值:展开详情

示例值:paybytraffic
Bandwidthinteger<int32>

监听的带宽峰值,单位:Mbps。展开详情

示例值:10取值 <= 5000
ClientTokenstring

客户端 Token,用于保证请求的幂等性。展开详情

示例值:593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3
LoadBalancerNamestring

传统型负载均衡实例的名称。展开详情

示例值:lb-bp1o94dp5i6ea****参考取值来源:
    DescribeLoadBalancers
VpcIdstring

传统型负载均衡实例的所属的 VPC ID。

示例值:vpc-bp1aevy8sofi8mh1****
VSwitchIdstring

专有网络实例的所属的交换机 ID。展开详情

示例值:vsw-bp12mw1f8k3jgy****
MasterZoneIdstring

传统型负载均衡实例的主可用区 ID。展开详情

示例值:cn-hangzhou-b
SlaveZoneIdstring

传统型负载均衡实例的备可用区 ID。展开详情

示例值:cn-hangzhou-d
LoadBalancerSpecstring

传统型负载均衡实例的规格。取值:展开详情

示例值:slb.s1.small参考取值来源:
    DescribeLoadBalancers
ResourceGroupIdstring

企业资源组 ID。

示例值:rg-atstuj3rtopt****
deprecatedPayTypestring

实例的计费类型,取值:展开详情

示例值:PayOnDemand
deprecatedPricingCyclestring

预付费公网实例的计费周期,取值:展开详情

示例值:month
deprecatedDurationinteger<int32>

预付费公网实例的购买时长,取值:展开详情

示例值:1取值 >= 1
deprecatedAutoPayboolean

是否是自动支付预付费公网实例的账单。取值:展开详情

示例值:true
AddressIPVersionstring

传统型负载均衡实例的 IP 版本,取值:ipv4ipv6

示例值:ipv4参考取值来源:
    DescribeLoadBalancers
Addressstring

指定实例的私网 IP 地址,该地址必须包含在交换机的目标网段下。

示例值:192.168.XX.XX
Tagarray<object>

标签列表。

子级条数 <= 20
DeleteProtectionstring

是否开启实例删除保护。取值:展开详情

示例值:on
ModificationProtectionStatusstring

传统型负载均衡修改保护状态:展开详情

示例值:ConsoleProtection
ModificationProtectionReasonstring

设置修改保护状态的原因,长度为 1~80 个字符,必须以字母或中文开头,支持数字、半角句号(.)、下划线(_)和短划线(-)。展开详情

示例值:Managed instance
InstanceChargeTypestring

实例计费方式。取值:展开详情

示例值:PayBySpec

返回参数

字段名称字段详情
VpcIdstring

传统型负载均衡实例的所属专有网络的 ID。

示例值:vpc-25dvzy9****
AddressIPVersionstring

传统型负载均衡实例的 IP 地址类型。

示例值:ipv4
VSwitchIdstring

传统型负载均衡实例的所属交换机的 ID。

示例值:vsw-255ecr****
RequestIdstring

请求 ID。

示例值:365F4154-92F6-4AE4-92F8-7FF34B540710
LoadBalancerNamestring

传统型负载均衡实例的名称。

示例值:lb-bp1o94dp5i6ea****
LoadBalancerIdstring

传统型负载均衡实例的 ID。

示例值:lb-hddhfjg****
ResourceGroupIdstring

资源组 ID。

示例值:rg-atstuj3rto****
Addressstring

分配的负载均衡实例的 IP 地址。

示例值:42.XX.XX.6
NetworkTypestring

传统型负载均衡实例的网络类型,取值:展开详情

示例值:classic
OrderIdinteger<int64>

预付费实例的订单 ID。

注意 请注意,该值为 Long 类型,在某些语言中可能存在精度丢失的风险,请小心使用。
示例值:20212961978****

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
OperationFailed.ZoneResourceLimit
The operation failed because of resource limit of the specified zone.诊断
400
CloudBoxNotSupportIpv6
The cloudBox instance does not support ipv6.诊断
400
CloudBoxNotSupportInternet
The cloudBox instance does not support internet.诊断
400
OperationFailed.RegionResourceLimit
The operation failed because of resource limit of the specified region.诊断
400
Operation.NotAllowed
Operation Denied. The charge type of internet prepay instance can only be paybybandwidth.诊断
400
OperationFailed.UnpaidBillsExist
The account has unpaid bills. Please pay your overdue bill first.诊断
400
RegionOrZonesNotSupportIpv6
The specified region or master/slave zones does not support ipv6.诊断
400
InvalidParameter.Mismatch
AddressType and IpVersion is conflict, IPv6 does not support intranet instance.诊断
400
PAYFOR.CREDIT_PAY_INSUFFICIENT_BALANCE
Your account does not have enough balance.诊断
400
HighRiskOperationDenied
The operation is denied because of high risk.诊断
400
VSwitchAvailableIpNotExist
The specified VSwitch has no availabe ip.诊断
400
VSwitchNotExist
The specified VSwitch does not exist.诊断
400
InvalidParameter
Illegal parameter. The IP address is not in subnet.诊断
400
Instance.ShareSlbNotSupportPay95
Illegal parameter. The share instance not support PayBy95 or PayByOld95.诊断
400
Instance.Pay95RateInvalid
Illegal parameter. The rate is illegal.诊断
400
Instance.Pay95BandwidthIllegal
Illegal parameter. The bandwidth is illegal.诊断
400
Instance.InternetChargeTypeNotAllowed
Illegal parameter. The specified InternetChargeType not allowed.诊断
400
OperationFailed.TokenIsProcessing
The operation is failed, because the Client Token is processing.诊断
400
InsufficientBalance
Your account does not have enough balance.诊断
400
MissingParam.VSwitchId
The parameter VSwitchId is required.诊断
400
InvalidVpcId.NotExist
The specified VPC not exist.诊断
400
PAY.MAYI_WITHHOLDING_AGREEMENT_ILLEGAL
Your account did not sign a withholding agreement or no coupons in Alipay.诊断
400
InvalidParameter.CloudType
The specified CloudType is invalid.诊断
400
OperationFailed.InvalidAccount
The account information is incomplete.诊断
400
RegionOrZonesNotSupportCEN
The specified region or master/slave zones does not support cloudType of hybrid_cen.诊断
400
MissingParam.LoadBalancerSpec
The param LoadBalancerSpec is required.诊断
400
InvalidParameter.Bandwidth
The param Bandwidth is invalid.诊断
400
OperationForbidden.AccountRiskReject
The operation failed because of account risk reject.诊断
400
OperationForbidden.QuotaLimit
The operation failed because of quota limit of shared loadbalancers.诊断
400
InvalidParam.ModificationProtectionStatus
The param ModificationProtectionStatus is invalid.诊断
400
InvalidParam.ModificationProtectionReason
The param ModificationProtectionReason is invalid.诊断
400
ShareSlbHaltSales
The share instance has been discontinued.诊断
400
OperationFailed.CashBookInsufficient
No payment method is specified for your account, We recommend that you add a payment method or maintain a prepayment balance.诊断
400
OperationFailed.OnlyInnerCommoditySupportToPurchase
AliCroup2Cloud user only can buy inner commodity.诊断
400
OperationFailed.InvokeLingXiaoFailed
Failed to invoke lingxiao service.诊断
400
AllocateVpcInstanceFailed
Failed to allocate vpc instance.诊断
400
QueryCreditCtrlInfoFailed
Failed to query credit ctrl info.诊断
400
QueryCommodityCenterFailed
Failed to query commodity center.诊断
400
RegionNotSupportParameter
Current region does not support the param of %s.诊断
400
QueryAccountBookInfoFailed
Failed to invoke account book info.诊断
400
RateAccountFailed
Failed to rate account for pricing.诊断
400
TradeWaitDistributorAudit
The trade needs distributor to audit.诊断
400
OperationFailed.InvokeProxyFailed
Failed to invoke proxy.诊断
400
QueryAccountCompleteProgressFailed
Failed to query account progress.诊断
400
QueryVoucherInfoFailed
Failed to query voucher info.诊断
400
InvalidVSwitchId.NotFound
The specified vSwitch instance is invalid.诊断
400
IllegalParam.SpecType
The param of SpecType is illegal.诊断
400
MissingParam.SpecType
The param of SpecType is missing.诊断
400
UnsupportedRegion
The feature is not supported in current region.诊断
400
PayInsufficientBalance
Your account balance is insufficient.诊断
400
IllegalParam.InstanceChargeType
The parameter InstanceChargeType is illegal.诊断
400
SystemBusy
The system is busy.诊断
400
PRODUCT.NOT_AVAILABLE_IZ
The Instance zone id doesn t support诊断
400
PRICE.INQUIRY_FAILED
The instance pricing inquiry is failed.诊断
400
AssociateIpFail
The instance associating ip is failed.诊断
400
SDK.ServerUnreachable
Service is unreachable.诊断
400
OverQuota
The Total is over the quota诊断
400
InvalidParam.TagValue
%s.诊断
400
InvalidParam.TagKey
%s.诊断
400
SizeLimitExceeded.Tag
%s.诊断
400
MissingParam.TagKey
The param MissingParam.TagKey is missing.诊断
400
SubnetIpExhaust
No subnet IP addresses are available.诊断
400
BeforePayRuleBatchValidateError
The pre-payment rule center instance rule validation failed. Please check if the instance limit has been reached.诊断
400
TradeSyncCreateSubError
Subscription transfer failed.诊断
400
QueryOrderError
Failed to query the order. Please try again later.诊断
400
CreateOrderTimeout
Order creation timed out. Please try again later.诊断
400
MultiGrayKeyResourceInconsist
The identifier for the gray resource is set incorrectly.诊断
400
InsufficientAvailableQuota
Your account available balance is less than 0. Please recharge before attempting to make a purchase.诊断
400
Forbidden.AliGroupForbiddenRegion
Thre region is forbidden for aligroup user.诊断
403
SecurityRisk.AuthVerification
We have detected a security risk with your payment method. Please proceed with verification via the link in your email or console message and re-submit your order after verification.诊断

变更历史

变更时间变更内容概要操作
2024-12-19
新增错误码403
2024-01-26
变更错误码400
2023-09-26
变更错误码400
2023-09-08
变更错误码400
2023-06-06
变更错误码400
  • 1
  • 2
  • 10 条/页

相关示例

负载均衡SLB 创建SLB实例 CodeSample
2021-01-08
创建负载均衡并为创建的负载均衡创建监控规则
2021-02-13