Tüm Ürünler
Search
Belge Merkezi

:CreateLoadBalancer

Son Güncelleme:Sep 30, 2026

Belirtilen bir bölgede Ağ Yük Dengeleyicisi (NLB) örneği oluşturur.

Operation description

  • Bir NLB örneği oluşturduğunuzda, hizmete bağlı AliyunServiceRoleForNlb rolü otomatik olarak oluşturulur ve size atanır.

  • CreateLoadBalancer eşzamansız bir işlemdir. Bir istek gönderdikten sonra sistem bir örnek kimliği döndürür ve görevi arka planda çalıştırır. Bir NLB örneğinin durumunu sorgulamak için GetLoadBalancerAttribute işlemini çağırabilirsiniz.

    • Bir NLB örneği Provisioning durumundaysa, NLB örneği oluşturuluyor demektir.

    • Bir NLB örneği Active durumundaysa, NLB örneği oluşturulmuş demektir.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

nlb:CreateLoadBalancer

create

*LoadBalancer

acs:nlb:{#regionId}:{#accountId}:loadbalancer/*

*VSwitch

acs:vpc:{#regionId}:{#accountId}:vswitch/{#VSwitchId}

EipAddress

acs:vpc:{#regionId}:{#accountId}:eip/{#AllocationId}

*VPC

acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}

  • nlb:AddressType
None

Request parameters

Parameter

Type

Required

Description

Example

LoadBalancerType

string

No

Sunucu Yük Dengeleyicisi (SLB) örneğinin türü. Değeri, bir NLB örneğini belirten network olarak ayarlayın.

network

LoadBalancerName

string

No

NLB örneğinin adı.

Uzunluğu 2 ila 128 karakter arasında olmalı, harf, rakam, nokta (.), alt çizgi (_) ve tire (-) içerebilmeli ve bir harfle başlamalıdır.

NLB1

AddressType

string

Yes

NLB örneği için kullanılan IPv4 adreslerinin türü. Geçerli değerler:

  • Internet: İnternet'e açık bir NLB örneğinin düğümleri genel IP adreslarına sahiptir. İnternet'e açık bir NLB örneğinin DNS adı, düğümlerin genel IP adreslarına genel olarak çözümlenebilir. Bu nedenle, internet'e açık NLB örnekleri istemcilerden gelen istekleri internet üzerinden yönlendirebilir.

  • Intranet: Dahili bir NLB örneğinin düğümleri yalnızca özel IP adreslarına sahiptir. Dahili bir NLB örneğinin DNS adı, düğümlerin özel IP adreslarına genel olarak çözümlenebilir. Bu nedenle, dahili NLB örnekleri yalnızca NLB örneği için sanal özel buluta (VPC) erişimi olan istemcilerden gelen istekleri yönlendirebilir.

Not

Çift yığınlı bir NLB örneği için genel bir IPv6 adresini etkinleştirmek üzere EnableLoadBalancerIpv6Internet işlemini çağırın.

Internet

AddressIpVersion

string

No

NLB örneği için kullanılan IP adreslerinin sürümü. Geçerli değerler:

  • ipv4 (varsayılan)

  • DualStack

ipv4

VpcId

string

Yes

NLB örneğini oluşturmak istediğiniz VPC'nin kimliği.

vpc-bp1b49rqrybk45nio****

ZoneMappings

array<object>

Yes

Kullanılabilirlik bölgeleri ve vSwitch'ler arasındaki eşlemeler. Bir NLB örneği en fazla 10 kullanılabilirlik bölgesine dağıtılabilir. İlgili bölge iki veya daha fazla kullanılabilirlik bölgesini destekliyorsa, en az iki kullanılabilirlik bölgesi belirtmelisiniz.

object

No

Kullanılabilirlik bölgesi ve vSwitch arasındaki eşleme. Bir NLB örneği en fazla 10 kullanılabilirlik bölgesine dağıtılabilir. İlgili bölge iki veya daha fazla kullanılabilirlik bölgesini destekliyorsa, en az iki kullanılabilirlik bölgesi belirtmelisiniz.

VSwitchId

string

Yes

Kullanılabilirlik bölgesindeki vSwitch'in kimliği. Bir NLB örneğinin her kullanılabilirlik bölgesinde yalnızca bir vSwitch (alt ağ) belirtebilirsiniz. Bir NLB örneği en fazla 10 kullanılabilirlik bölgesine dağıtılabilir. İlgili bölge iki veya daha fazla kullanılabilirlik bölgesini destekliyorsa, en az iki kullanılabilirlik bölgesi belirtmelisiniz.

vsw-sersdf****

ZoneId

string

Yes

NLB örneğinin dağıtıldığı kullanılabilirlik bölgesinin kimliği. Bir NLB örneği en fazla 10 kullanılabilirlik bölgesine dağıtılabilir. İlgili bölge iki veya daha fazla kullanılabilirlik bölgesini destekliyorsa, en az iki kullanılabilirlik bölgesi belirtin.

En güncel kullanılabilirlik bölgesi listesini sorgulamak için DescribeZones işlemini çağırabilirsiniz.

cn-hangzhou-a

PrivateIPv4Address

string

No

IPv4 sürümünün özel sanal IP adresi (VIP). NLB örneğinin harici hizmetler sağlamak için kullandığı özel IPv4 adresi.

192.168.10.1

AllocationId

string

No

İnternet'e açık NLB örneğiyle ilişkilendirilen esnek IP adresinin (EIP) kimliği. Her kullanılabilirlik bölgesine bir EIP atanır. Bir NLB örneği en fazla 10 kullanılabilirlik bölgesine dağıtılabilir. İlgili bölge iki veya daha fazla kullanılabilirlik bölgesini destekliyorsa, en az iki kullanılabilirlik bölgesi belirtin.

eip-bp1aedxso6u80u0qf****

Ipv6Address

string

No

IPv6 sürümünün VIP'si. NLB örneğinin harici hizmetler sağlamak için kullandığı IPv6 adresi.

2408:400a:d5:3080:b409:840a:ca:e8e5

Ipv4LocalAddresses

array

No

Yerel IPv4 adresleri. NLB örneğinin arka uç sunucularla iletişim kurmak için kullandığı IP adresları. IP adresi sayısı çift sayı olmalı, en az 2 ve en fazla 8 olmalıdır.

string

No

Yerel IPv4 adresi.

192.168.10.2

Ipv6LocalAddresses

array

No

Yerel IPv6 adresleri. NLB örneğinin arka uç sunucularla iletişim kurmak için kullandığı IP adresları. IP adresi sayısı çift sayı olmalı, en az 2 ve en fazla 8 olmalıdır.

string

No

Yerel IPv6 adresi.

2408:400a:d5:3080:b409:840a:ca:e8e6

BandwidthPackageId

string

No

İnternet'e açık NLB örneğiyle ilişkilendirilen İnternet Paylaşımlı Bant Genişliği örneğinin kimliği.

cbwp-bp1vevu8h3ieh****

LoadBalancerBillingConfig

object

No

NLB örneğinin faturalandırma ayarları.

PayType

string

No

NLB örneğinin faturalandırma yöntemi.

Değeri, kullandıkça öde faturalandırma yöntemini belirten PostPay olarak ayarlayın.

PostPay

ResourceGroupId

string

No

Örneğin ait olduğu kaynak grubunun kimliği.

rg-atstuj3rtop****

DryRun

boolean

No

Gerçek isteği yapmadan bir deneme çalıştırması yapılıp yapılmayacağını belirtir. Geçerli değerler:

  • true: Yalnızca deneme çalıştırması yapılır. Sistem; eksik parametre değerleri, hatalı istek sözdizimi ve hizmet limitleri dahil olmak üzere istekteki olası sorunları kontrol eder. İstek kontrolü geçemezse, sorunu belirten bir hata mesajı döndürülür. İstek kontrolü geçerse, DryRunOperation hata kodu döndürülür.

  • false (varsayılan): İstek kontrol edilir ve işlem gerçekleştirilir. İstek kontrolü geçerse, 2xx HTTP durum kodu döndürülür ve işlem gerçekleştirilir.

false

ClientToken

string

No

İsteğin yinelenebilirliğini sağlamak için kullanılan istemci belirteci.

Belirteci oluşturmak için istemciyi kullanabilirsiniz. Belirtecin farklı istekler arasında benzersiz olduğundan emin olun. Yalnızca ASCII karakterlerine izin verilir.

Not

Bu parametreyi belirtmezseniz, RequestId değeri kullanılır.**** RequestId değeri her istek için farklıdır.

123e4567-e89b-12d3-a456-426655440000

RegionId

string

No

NLB örneğinin dağıtıldığı bölgenin kimliği.

En güncel bölge listesini sorgulamak için DescribeRegions işlemini çağırabilirsiniz.

cn-hangzhou

DeletionProtectionConfig

object

No

Silme koruması özelliğinin yapılandırması.

Enabled

boolean

No

Silme koruması özelliğinin etkinleştirilip etkinleştirilmeyeceğini belirtir. Geçerli değerler:

  • true

  • false (varsayılan)

false

Reason

string

No

Silme koruması özelliğinin etkinleştirilme veya devre dışı bırakılma nedeni. Neden 2 ila 128 karakter uzunluğunda olmalı, harf, rakam, nokta (.), alt çizgi (_) ve tire (-) içerebilmeli ve bir harfle başlamalıdır.

Instance is running

ModificationProtectionConfig

object

No

Yapılandırma salt okunur modunun yapılandırması.

Status

string

No

Yapılandırma salt okunur modunun etkinleştirilip etkinleştirilmeyeceğini belirtir. Geçerli değerler:

  • NonProtection: Yapılandırma salt okunur modunu etkinleştirmez. Reason parametresini ayarlayamazsınız. Reason parametresi ayarlanırsa, değer temizlenir.

  • ConsoleProtection: Yapılandırma salt okunur modunu etkinleştirir. Reason parametresini ayarlayabilirsiniz.

Not

Parametre ConsoleProtection olarak ayarlanırsa, yapılandırma salt okunur modu etkinleştirilir. NLB konsolunda NLB örneğinin yapılandırmalarını değiştiremezsiniz. Ancak, NLB örneğinin yapılandırmalarını değiştirmek için API işlemlerini çağırabilirsiniz.

ConsoleProtection

Reason

string

No

Yapılandırma salt okunur modunu etkinleştirme nedeni. Neden 2 ila 128 karakter uzunluğunda olmalı, harf, rakam, nokta (.), alt çizgi (_) ve tire (-) içerebilmeli ve bir harfle başlamalıdır.

Not

Bu parametre yalnızca Status, ConsoleProtection olarak ayarlandığında geçerli olur.

Business protection period

Tag

array<object>

No

Etiketler.

object

No

Etiket.

Key

string

No

Etiketin anahtarı. Etiket anahtarı en fazla 64 karakter uzunluğunda olabilir, aliyun veya acs: ile başlayamaz ve http:// veya https:// içeremez. Etiket anahtarı harf, rakam ve şu özel karakterleri içerebilir: _ . : / = + - @

Her çağrıda en fazla 20 etiket belirtebilirsiniz.

env

Value

string

No

Etiketin değeri. Etiket değeri en fazla 128 karakter uzunluğunda olabilir, acs: veya aliyun ile başlayamaz ve http:// veya https:// içeremez. Etiket değeri harf, rakam ve şu özel karakterleri içerebilir: _ . : / = + - @

Her çağrıda en fazla 20 etiket belirtebilirsiniz.

product

Response elements

Element

Type

Description

Example

object

Yanıt.

RequestId

string

İsteğin kimliği.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984

LoadbalancerId

string

NLB örneğinin kimliği.

nlb-83ckzc8d4xlp8o****

OrderId

integer

NLB örneği için siparişin kimliği.

20230000

Examples

Success response

JSON format

{
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "LoadbalancerId": "nlb-83ckzc8d4xlp8o****",
  "OrderId": 20230000
}

Error codes

HTTP status code

Error code

Error message

Description

400 OperationDenied.OnlyPayByTrafficSupported The operation is not allowed because of OnlyPayByTrafficSupported.
400 OperationFailed.%s The operation failed because of %s. Failed to call the API operation due to %.
400 Mismatch.ZoneIdAndVswitchId The ZoneIdAndVswitchId is mismatched for %s and %s.
400 QuotaExceeded.%s The quota of %s is exceeded, usage %s/%s.
400 DryRunOperation Request validation has been passed with DryRun flag set. Request validation has been passed with DryRun flag set.
400 OperationDenied.OnlyPostPaidSupported The operation is not allowed because of OnlyPostPaidSupported.
400 OperationFailed.DuplicateZones. The operation failed because of Can not Specify duplicate zones.
400 ResourceNotEnough.VSwitchIp The specified resource of VSwitchIp is not enough. The specified virtual switch (vSwitch) IP resources are insufficient.
400 DuplicatedParam.AllocationId The param of AllocationId is duplicated.
400 ResourceInConfiguring.VswitchId The specified resource of VswitchId is being configured, please try again later. The specified resource of VswitchId is being configured, please try again later.
400 IllegalParam The param of %s is illegal.
400 OperationFailed.UnpaidBill The operation failed because of UnpaidBill.
400 OperationDenied.ServiceLinkedRoleNotExist The operation is not allowed because of ServiceLinkedRoleNotExist. The operation is not allowed because of ServiceLinkedRoleNotExist.Please check if the necessary permissions are granted in RAM for the NLB.
400 ResourceAlreadyAssociated.AllocationId The specified resource of %s is already associated.
400 OperationFailed.vSwitchNotSupportIpv6 The operation failed because of vSwitchNotSupportIpv6.
400 InvalidZones The current zone list is illegal. The Availability Zone used in Zone maping is illegal.
400 QuotaExceeded.QuotaInsufficient The quota of %s is exceeded, usage %s/%s. The quota is insufficient, currently used %s/%s. Please modify the quota size in the quota center.
400 ResourceInUse.IP The specified resource of IP is in use.
400 OperationFailed.CreateOrderError Operation failed because CreateOrderError. The operation failed because the order creation failed.
400 OperationFailed.NotExist.ResourceGroup Operation failed because ResourceGroup not exist. The specified resource group does not exist.
400 IllegalParam.loadBalancerName Param loadBalancerName is illegal. The instance name is invalid. Check the parameters.
400 SystemBusy System is busy, please try again later.
400 MissingParam.%s The parameter of %s is missing.
400 IllegalParam.DeletionProtectionConfig DeletionProtectionConfig reason is illegal. The reason parameter for changing the delete protection status is invalid.
400 IllegalParam.ModificationProtectionConfig ModificationProtectionConfig reason is illegal. ModificationProtectionConfig reason is illegal.
400 Throttling.User Request was denied due to api flow control. Request was denied due to api flow control.
403 UnauthorizedZone The specified zone of %s is not authorized.
403 Forbidden.NoPermission Authentication is failed for NoPermission. Authentication is failed for NoPermission.
403 UnauthorizedRegion The specified region of %s is not authorized.
404 ResourceNotFound.VSwitch The specified resource of vSwitch is not found. The specified vSwitch resource was not found. Please check the input parameters.
404 ResourceNotFound.Vpc The specified resource of Vpc is not found. The specified VPC resource was not found. Please check the input parameters.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.