Tüm Ürünler
Search
Belge Merkezi

:CreateCustomerGateway

Son Güncelleme:Oct 02, 2026

Bir müşteri ağ geçidi oluşturur.

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

vpc:CreateCustomerGateway

create

*CustomerGateway

acs:vpc:{#regionId}:{#accountId}:customergateway/*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

Müşteri ağ geçidinin bölge kimliği.

Bölge kimliğini sorgulamak için DescribeRegions işlemini çağırabilirsiniz.

cn-shanghai

ClientToken

string

No

İsteğin idempotent olmasını sağlamak için kullanılan istemci belirteci.

Belirteci oluşturmak için istemciyi kullanabilirsiniz, ancak belirtecin farklı istekler arasında benzersiz olduğundan emin olmalısınız. Belirteç yalnızca ASCII karakterleri içerebilir ve uzunluğu 64 karakteri aşamaz.

Not

Bu parametreyi belirtmezseniz, sistem otomatik olarak API isteğinin RequestId değerini ClientToken olarak kullanır. RequestId her API isteği için farklı olabilir.

02fb3da4-130e-11e9-8e44****

IpAddress

string

Yes

Şirket içi veri merkezindeki ağ geçidi cihazının statik IP adresi.

  • Genel ağ türünü kullanan bir IPsec-VPN bağlantısı oluşturmak istiyorsanız, genel bir IP adresi girin.

  • Özel ağ türünü kullanan bir IPsec-VPN bağlantısı oluşturmak istiyorsanız, özel bir IP adresi girin.

Aşağıdaki IP adresleri desteklenmez. Bu IP adreslerini kullanırsanız IPsec-VPN bağlantısı kurulamaz:

  • 100.64.0.0 - 100.127.255.255

  • 127.0.0.0 - 127.255.255.255

  • 169.254.0.0 - 169.254.255.255

  • 224.0.0.0 - 239.255.255.255

  • 255.0.0.0 - 255.255.255.255

101.12.XX.XX

Name

string

No

Müşteri ağ geçidinin adı.

Ad 1 ila 100 karakter uzunluğunda olmalıdır ve http:// veya https:// ile başlayamaz.

nametest

Description

string

No

Müşteri ağ geçidinin açıklaması.

Açıklama 1 ila 100 karakter uzunluğunda olmalıdır ve http:// veya https:// ile başlayamaz.

desctest

Asn

string

No

IPsec-VPN bağlantısı için BGP dinamik yönlendirme protokolünü etkinleştirmeyi planlıyorsanız, şirket içi veri merkezindeki ağ geçidi cihazının Otonom Sistem Numarasını (ASN) tahsis etmeniz gerekir. Geçerli değerler: 1 ila 4294967295. 45104 değeri desteklenmez.

Asn 4 baytlık bir sayıdır. Sayıyı iki segmentli formatta girebilirsiniz: ilk 16 bit, son 16 bit. Her segment ondalık formatta girilir.

Örneğin, 123.456 girerseniz ASN 123 × 65536 + 456 = 8061384 olur.

Not
  • Alibaba Cloud ile bir BGP bağlantısı kurmak için özel bir ASN kullanın. Özel ASN aralığı hakkında daha fazla bilgi için ilgili belgelere bakın.

  • 45104, İnternet Tahsisli Sayılar Otoritesi (IANA) tarafından Alibaba Cloud Computing Co., Ltd.'ye tahsis edilen benzersiz bir kimliktir. Küresel İnternet yönlendirmesinde ve veri iletiminde Alibaba Cloud için bir kimlik olarak kullanılır.

65530

AuthKey

string

No

Şirket içi veri merkezindeki ağ geçidi cihazı için BGP yönlendirme protokolünün kimlik doğrulama anahtarı.

Anahtar 1 ila 64 karakter uzunluğunda olmalıdır ve yalnızca ASCII karakterleri içerebilir. Boşluklar, Çince karakterler ve yarım genişlikli soru işaretleri (?) desteklenmez.

AuthKey****

Tags

array<object>

No

Müşteri ağ geçidine eklenecek etiketlerin listesi.

Bir müşteri ağ geçidine tek seferde en fazla 20 etiket ekleyebilirsiniz.

object

No

Etiket bilgileri.

Key

string

No

Etiket anahtarı. Bu parametreyi belirtirseniz değer boş bir dize olamaz.

Etiket anahtarı en fazla 64 karakter uzunluğunda olabilir ve aliyun veya acs: ile başlayamaz. http:// veya https:// içeremez.

Tek seferde en fazla 20 etiket anahtarı belirtebilirsiniz.

TagKey

Value

string

No

Etiket değeri.

Etiket değeri en fazla 128 karakter uzunluğunda olabilir ve boş bir dize olabilir. aliyun veya acs: ile başlayamaz ve http:// veya https:// içeremez.

Her etiket anahtarı bir etiket değerine karşılık gelir. Tek seferde en fazla 20 etiket değeri belirtebilirsiniz.

TagValue

ResourceGroupId

string

No

Müşteri ağ geçidinin ait olduğu kaynak grubunun kimliği.

  • Kaynak grubu kimliğini sorgulamak için ListResourceGroups işlemini çağırabilirsiniz.

  • Bir kaynak grubu belirtmezseniz, müşteri ağ geçidi oluşturulduktan sonra varsayılan kaynak grubuna ait olur.

rg-aek2qo2h4jy****

Response elements

Element

Type

Description

Example

object

Yanıt parametreleri.

RequestId

string

İstek kimliği.

D32B3C26-6C6C-4988-93E9-D2A6444CE6AE

IpAddress

string

Şirket içi veri merkezindeki ağ geçidi cihazının statik IP adresi.

101.12.XX.XX

Description

string

Müşteri ağ geçidinin açıklaması.

desctest

CustomerGatewayId

string

Müşteri ağ geçidi kimliği.

cgw-bp1jrawp82av6bws9****

CreateTime

integer

Müşteri ağ geçidinin oluşturulduğu zaman damgası. Birim: milisaniye.

Zaman damgası UNIX formatındadır ve 1 Ocak 1970 00:00:00 UTC'den bu yana geçen milisaniye sayısını temsil eder.

1493363486000

Name

string

Müşteri ağ geçidinin adı.

nametest

Examples

Success response

JSON format

{
  "RequestId": "D32B3C26-6C6C-4988-93E9-D2A6444CE6AE",
  "IpAddress": "101.12.XX.XX",
  "Description": "desctest",
  "CustomerGatewayId": "cgw-bp1jrawp82av6bws9****",
  "CreateTime": 1493363486000,
  "Name": "nametest"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidAuthkey.Malformed The specified BGP authentication key (%s) is malformed.
400 InvalidIpAddress.AlreadyExist Specified IpAddress is already exist.
400 InvalidIpAddress.WrongFormat Specified IpAddress is invalid.
400 InvalidName The name is not valid
400 InvalidDescription The description is not valid
400 Resource.QuotaFull The quota of resource is full
400 IllegalParam.Asn The specified Asn is invalid.
400 OperationDenied.MissingAsn The autonomous system number of the customer gateway is mandatory when BGP authentication key is specified.
400 InvalidParameter.TagValue The specified parameter TagValue is invalid.
400 SizeLimitExceeded.TagNum The maximum number of tags is exceeded.
400 Forbidden.TagKey.Duplicated The specified tag key already exists.
400 InvalidParameter.TagKey The specified parameter TagKey is invalid.
400 Duplicated.TagKey The specified parameter TagKey is duplicated.
400 OperationFailed.NoRamPermission Vpn Service has no permission to operate your IDaaS instances.
400 CreateVpnUserGatewayQuotaFull.QuotaFull The number of created VPN customer gateways exceeds the quota.
403 Forbidden.SubUser User not authorized to operate on the specified resource as your account is created by another user.
403 Forbidden User not authorized to operate on the specified resource.
409 OperationConflict The operation against this instance is too frequent, please try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.