建立Server Load Balancer執行個體。
介面說明
執行個體建立前,請調用 DescribeAvailableResource 查詢可用性區域支援的資源售賣情況。
執行個體建立後,會產生費用。
隨用隨付模式只支援建立按使用量計費執行個體,按規格計費執行個體已於 2025 年 06 月 01 日 00:00:00(北京時間,UTC+8)停止售賣。詳情請參見傳統型負載平衡 CLB 按規格計費執行個體停售公告。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
slb:CreateLoadBalancer |
create |
*LoadBalancer
|
slb:AddressType
|
無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
傳統型Server Load Balancer執行個體的地區 ID。 您可以通過調用 DescribeRegions 介面查詢地區 ID。 |
cn-hangzhou |
| AddressType |
string |
否 |
傳統型Server Load Balancer執行個體的網路類型。取值:
|
internet |
| InternetChargeType |
string |
否 |
公網類型執行個體的付費方式。取值:
說明
|
paybytraffic |
| Bandwidth |
integer |
否 |
執行個體的頻寬峰值,單位:Mbps。 取值範圍:1~5000。 說明
僅 AddressType 取值為 internet,且 InternetChargeType 取值為 paybybandwidth 時,該參數生效。 |
10 |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的等冪性。 由用戶端產生該參數值,要保證在不同請求間唯一。 說明
若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 不一樣。 |
593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3 |
| LoadBalancerName |
string |
否 |
傳統型Server Load Balancer執行個體的名稱。 長度為 1~80 個英文或中文字元,必須以大小寫字母或中文開頭,可包含數字、半形句號(.)、底線(_)和短劃線(-)。 不指定該參數時,預設由系統分配一個執行個體名稱。 |
lb-bp1o94dp5i6ea**** |
| VpcId |
string |
否 |
傳統型Server Load Balancer執行個體的所屬的 VPC ID。 |
vpc-bp1aevy8sofi8mh1**** |
| VSwitchId |
string |
否 |
專用網路執行個體的所屬的交換器 ID。 建立專用網路類型的Server Load Balancer執行個體,必須指定該參數。如果指定了該參數,AddressType 參數的值會預設被設定為 intranet。 說明
請確保該 VSwitchId 所在可用性區域與主可用性區域一致。 |
vsw-bp12mw1f8k3jgy**** |
| MasterZoneId |
string |
否 |
傳統型Server Load Balancer執行個體的主可用性區域 ID。 您可以通過調用 DescribeZone 介面可查到相應地區下的主備可用性區域資訊。 說明
請確保該主可用性區域與 VSwitchId 所在可用性區域一致。 |
cn-hangzhou-b |
| SlaveZoneId |
string |
否 |
傳統型Server Load Balancer執行個體的備可用性區域 ID。 您可以通過調用 DescribeZone 介面查詢相應地區下的主備可用性區域資訊。 |
cn-hangzhou-d |
| LoadBalancerSpec |
string |
否 |
傳統型Server Load Balancer執行個體的規格。取值:
說明
|
slb.s1.small |
| ResourceGroupId |
string |
否 |
企業資源組 ID。 |
rg-atstuj3rtopt**** |
PayType
deprecated
|
string |
否 |
執行個體的計費類型,取值:
|
PayOnDemand |
PricingCycle
deprecated
|
string |
否 |
預付費公網執行個體的計費周期,取值:
說明
該參數僅適用於中國站且僅對訂用帳戶執行個體有效。 |
month |
Duration
deprecated
|
integer |
否 |
預付費公網執行個體的購買時間長度,取值:
說明
該參數僅適用於中國站且僅對訂用帳戶執行個體有效。 |
1 |
AutoPay
deprecated
|
boolean |
否 |
是否是自動支付預付費公網執行個體的賬單。取值:
說明
該參數僅適用於中國站且僅對訂用帳戶執行個體有效。 |
true |
| AddressIPVersion |
string |
否 |
傳統型Server Load Balancer執行個體的 IP 版本,取值:ipv4 或 ipv6。 |
ipv4 |
| Address |
string |
否 |
指定執行個體的私網 IP 位址,該地址必須包含在交換器的目標網段下。 |
192.168.XX.XX |
| Tag |
array<object> |
否 |
標籤列表。 |
|
|
object |
否 |
標籤列表。 |
||
| Key |
string |
否 |
執行個體的標籤鍵。N 的取值範圍:1~20。一旦輸入該值,則不允許為空白字串。 最多支援 64 個字元,不能以 |
test |
| Value |
string |
否 |
執行個體的標籤值。N 的取值範圍:1~20。一旦輸入該值,可以為空白字串。
最多支援 128 個字元,不能以 |
value |
| DeleteProtection |
string |
否 |
是否開啟執行個體刪除保護。取值:
|
on |
| ModificationProtectionStatus |
string |
否 |
傳統型負載平衡修改保護狀態:
說明
當取值為 ConsoleProtection,即開啟修改保護後,使用者不能通過負載平衡控制台修改執行個體配置,但可以通過調用 API 修改執行個體配置。 |
ConsoleProtection |
| ModificationProtectionReason |
string |
否 |
設定修改保護狀態的原因,長度為 1~80 個字元,必須以字母或中文開頭,支援數字、半形句號(.)、底線(_)和短劃線(-)。 說明
僅在 ModificationProtectionStatus 為 ConsoleProtection 時有效。 |
Managed instance |
| InstanceChargeType |
string |
否 |
執行個體計費方式。 取值:PayByCLCU:按使用量計費。 說明
|
PayBySpec |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| VpcId |
string |
傳統型Server Load Balancer執行個體的所屬專用網路的 ID。 |
vpc-25dvzy9**** |
| AddressIPVersion |
string |
傳統型Server Load Balancer執行個體的 IP 位址類型。 |
ipv4 |
| VSwitchId |
string |
傳統型Server Load Balancer執行個體的所屬交換器的 ID。 |
vsw-255ecr**** |
| RequestId |
string |
請求 ID。 |
365F4154-92F6-4AE4-92F8-7FF34B540710 |
| LoadBalancerName |
string |
傳統型Server Load Balancer執行個體的名稱。 |
lb-bp1o94dp5i6ea**** |
| LoadBalancerId |
string |
傳統型Server Load Balancer執行個體的 ID。 |
lb-hddhfjg**** |
| ResourceGroupId |
string |
資源群組 ID。 |
rg-atstuj3rto**** |
| Address |
string |
分配的Server Load Balancer執行個體的 IP 位址。 |
42.XX.XX.6 |
| NetworkType |
string |
傳統型Server Load Balancer執行個體的網路類型,取值:
|
classic |
| OrderId |
integer |
預付費執行個體的訂單 ID。 |
20212961978**** |
樣本
正常返回樣本
JSON格式
{
"VpcId": "vpc-25dvzy9****",
"AddressIPVersion": "ipv4",
"VSwitchId": "vsw-255ecr****",
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
"LoadBalancerName": "lb-bp1o94dp5i6ea****",
"LoadBalancerId": "lb-hddhfjg****",
"ResourceGroupId": "rg-atstuj3rto****",
"Address": "42.XX.XX.6",
"NetworkType": "classic",
"OrderId": 0
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | OperationFailed.ZoneResourceLimit | The operation failed because of resource limit of the specified zone. | 操作失敗,原因是當前可用性區域資源不足。 |
| 400 | CloudBoxNotSupportIpv6 | The cloudBox instance does not support ipv6. | 雲盒執行個體不支援ipv6 |
| 400 | CloudBoxNotSupportInternet | The cloudBox instance does not support internet. | 雲盒執行個體不支援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. | 指定地區或主備可用性區域不支援Ipv6。 |
| 400 | InvalidParameter.Mismatch | AddressType and IpVersion is conflict, IPv6 does not support intranet instance. | 網路類型和IP版本衝突,私網執行個體不支援IPv6。 |
| 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. | 指定的交換器沒有可用的Ip。 |
| 400 | VSwitchNotExist | The specified VSwitch does not exist. | 指定的交換器不存在。 |
| 400 | InvalidParameter | Illegal parameter. The IP address is not in subnet. | 參數非法,IP地址不在子網中。 |
| 400 | Instance.ShareSlbNotSupportPay95 | Illegal parameter. The share instance not support PayBy95 or PayByOld95. | 共用型執行個體不支援PayBy95或PayByOld95。 |
| 400 | Instance.Pay95RateInvalid | Illegal parameter. The rate is illegal. | 指定的Rate無效。請檢查參數約束,並在修改後重試。 |
| 400 | Instance.Pay95BandwidthIllegal | Illegal parameter. The bandwidth is illegal. | 指定的Bandwidth無效。請檢查參數約束,並在修改後重試。 |
| 400 | Instance.InternetChargeTypeNotAllowed | Illegal parameter. The specified InternetChargeType not allowed. | 參數非法,指定的InternetChargeType不支援。 |
| 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. | 參數VSwitchId缺失。 |
| 400 | InvalidVpcId.NotExist | The specified VPC not exist. | 指定的VPC不存在。 |
| 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. | 指定的CloudType無效。請檢查參數約束,並在修改後重試。 |
| 400 | OperationFailed.InvalidAccount | The account information is incomplete. | 操作失敗,原因是賬戶資訊不完整。 |
| 400 | RegionOrZonesNotSupportCEN | The specified region or master/slave zones does not support cloudType of hybrid_cen. | 指定的地區或主備可用性區域不支援CEN。 |
| 400 | MissingParam.LoadBalancerSpec | The param LoadBalancerSpec is required. | 參數LoadBalancerSpec缺失。 |
| 400 | InvalidParameter.Bandwidth | The param Bandwidth is invalid. | 指定的Bandwidth無效。請檢查參數約束,並在修改後重試。 |
| 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. | 指定的ModificationProtectionStatus無效。請檢查參數約束,並在修改後重試。 |
| 400 | InvalidParam.ModificationProtectionReason | The param ModificationProtectionReason is invalid. | 指定的ModificationProtectionReason無效。請檢查參數約束,並在修改後重試。 |
| 400 | ShareSlbHaltSales | The share instance has been discontinued. | 共用型Server Load Balancer執行個體已售罄。 |
| 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. | 分配VPC執行個體失敗。 |
| 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. | 非法的vswitch執行個體。 |
| 400 | IllegalParam.SpecType | The param of SpecType is illegal. | 指定的SpecType無效。請檢查參數約束,並在修改後重試。 |
| 400 | MissingParam.SpecType | The param of SpecType is missing. | 參數SpecType缺失。 |
| 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 | 執行個體可用性區域ID不支援。 |
| 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. | 沒有可用的子網ip |
| 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. | 您的賬戶可用額度小於0,請先儲值後再嘗試購買。 |
| 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. | 系統檢測到您的支付方式存在風險,請通過郵件或站內信中的連結完成驗證。驗證完成後重新下單。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。