Tüm Ürünler
Search
Belge Merkezi

:CreateTransitRouterVpnAttachment

Son Güncelleme:Sep 29, 2026

Geçiş yönlendiricileri, VPN ağ geçitlerinin IPsec bağlantılarına bağlanmayı destekler. Şirket içi bir veri merkezi, bir IPsec bağlantısı üzerinden doğrudan bir geçiş yönlendiricisine bağlanabilir ve ardından geçiş yönlendiricisi aracılığıyla diğer ağlarla iletişim kurabilir. Bir VPN bağlantısı oluşturmak için CreateTransitRouterVpnAttachment işlemini çağırır.

Operation description

  • Bir VPN bağlantısı oluşturulduktan sonra, VPN bağlantısı varsayılan olarak herhangi bir geçiş yönlendiricisi yönlendirme tablosuyla rota öğrenme veya ilişkilendirme yönlendirme ilişkileri kurmaz.

  • CreateTransitRouterVpnAttachment işlemini çağırırken CenId ve RegionId parametreleri için değer belirtirseniz, TransitRouterId parametresini belirtmenize gerek yoktur. TransitRouterId ve RegionId parametreleri için değer belirtirseniz, CenId parametresini belirtmenize gerek yoktur.

Başlamadan önce

  • Bir VPN bağlantısı oluşturmadan önce, geçiş yönlendiricisi örneğinin bulunduğu bölgede bir IPsec bağlantısı oluşturduğunuzdan ve IPsec bağlantısının herhangi bir kaynağa bağlı olmadığından emin olun. Daha fazla bilgi için CreateVpnAttachment konusuna bakın.

  • Geçiş yönlendiricisi örneğinin farklı bir Alibaba Cloud hesabına ait olan bir IPsec bağlantısına bağlanması gerekiyorsa, IPsec bağlantısının geçiş yönlendiricisi örneğine yetkilendirildiğinden emin olun. Daha fazla bilgi için GrantInstanceToTransitRouter konusuna bakın.

  • Bir VPN bağlantısı oluşturmadan önce, geçiş yönlendiricisi için TR CIDR bloğunu yapılandırdığınızdan emin olun. Daha fazla bilgi için CreateTransitRouterCidr konusuna bakın.

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

cen:CreateTransitRouterVpnAttachment

create

CenInstance

acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}

TransitRouter

acs:cen:*:{#accountId}:centransitrouter/{#TransitRouterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

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. İstemci belirteci yalnızca ASCII karakterleri içerebilir.

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.

123e4567-e89b-12d3-a456-42665544****

DryRun

boolean

No

Deneme çalıştırması yapılıp yapılmayacağını belirtir. Geçerli değerler:

  • true: Deneme çalıştırması yapar. Sistem gerekli parametreleri, istek sözdizimini ve sınırları kontrol eder. İstek deneme çalıştırmasından geçemezse bir hata mesajı döndürülür. İstek deneme çalıştırmasından geçerse DryRunOperation hata kodu döndürülür.

  • false (varsayılan): Deneme çalıştırması yapar ve isteği gönderir. İstek deneme çalıştırmasından geçerse VPN bağlantısı oluşturulur.

false

CenId

string

No

Cloud Enterprise Network (CEN) örneği kimliği.

cen-rsgxs8ng2awen2****

TransitRouterId

string

No

Geçiş yönlendiricisi örneği kimliği.

tr-p0wm740vjnbaprv0m****

RegionId

string

No

Geçiş yönlendiricisi örneğinin bölge kimliği.

Bölge kimliklerini sorgulamak için DescribeChildInstanceRegions işlemini çağırabilirsiniz.

cn-hangzhou

TransitRouterAttachmentName

string

No

VPN bağlantısının adı.

Ad boş olabilir veya 1 ila 128 karakter uzunluğunda olabilir ve http:// veya https:// ile başlayamaz.

nametest

TransitRouterAttachmentDescription

string

No

VPN bağlantısının açıklaması.

Açıklama boş olabilir veya 1 ila 256 karakter uzunluğunda olabilir ve http:// veya https:// ile başlayamaz.

desctest

VpnId

string

Yes

IPsec bağlantısının kimliği.

vco-p0w042cqwvlhl4zyw****

VpnOwnerId

integer

No

IPsec bağlantısının ait olduğu Alibaba Cloud hesabının Alibaba Cloud hesap kimliği.

  • Bu parametreyi belirtmezseniz, varsayılan olarak mevcut oturum açma hesabının Alibaba Cloud hesap kimliği kullanılır.

  • Farklı bir hesaba ait olan bir IPsec bağlantısına bağlanmak istiyorsanız bu parametre gereklidir.

1210123456123456

AutoPublishRouteEnabled

boolean

No

Geçiş yönlendiricisi örneğinin IPsec bağlantısına rota girişlerini otomatik olarak yayımlamasına izin verilip verilmeyeceğini belirtir. Geçerli değerler:

  • true (varsayılan): İzin verilir.

  • false: İzin verilmez.

true

ChargeType

string

No

Faturalandırma yöntemi.

Değeri, kullanıma dayalı kullandıkça öde faturalandırma yöntemini belirten POSTPAY (varsayılan) olarak ayarlayın.

POSTPAY

Zone

array<object>

No

Mevcut bölgedeki kullanılabilirlik bölgesi kimliği.

Sistem, kaynakları belirttiğiniz kullanılabilirlik bölgesinde oluşturur.

Not

Bağlı IPsec bağlantısı çift tünelli modu kullanıyorsa, bu parametreyi boş bırakın.

object

No

Kullanılabilirlik bölgesi kimliği.

ZoneId

string

No

Kullanılabilirlik bölgesi kimliği.

Kullanılabilirlik bölgesi kimliklerini sorgulamak için ListTransitRouterAvailableResource işlemini çağırabilirsiniz.

cn-hangzhou-h

Tag

array<object>

No

Etiket bilgi listesi.

Tek seferde en fazla 20 etiket belirtebilirsiniz.

object

No

Etiket bilgileri.

Key

string

No

Kaynağın etiket anahtarı.

Belirtildikten sonra etiket anahtarı 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

Kaynağın etiket değeri.

Belirtildikten sonra etiket değeri boş olamaz. Etiket değeri en fazla 128 karakter uzunluğunda olabilir ve aliyun veya acs: ile başlayamaz. 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

Response elements

Element

Type

Description

Example

object

Yanıt parametreleri.

TransitRouterAttachmentId

string

VPN bağlantısının kimliği.

tr-attach-y5dup2qwfyh9lu****

RequestId

string

İstek kimliği.

8B5DD40A-3A29-5AC0-B8DA-05FD10D5C893

Examples

Success response

JSON format

{
  "TransitRouterAttachmentId": "tr-attach-y5dup2qwfyh9lu****",
  "RequestId": "8B5DD40A-3A29-5AC0-B8DA-05FD10D5C893"
}

Error codes

HTTP status code

Error code

Error message

Description

400 NoPermission.AliyunServiceRolePolicyForCEN You are not authorized to create the service linked role. Role Name: AliyunServiceRolePolicyForCEN. Service Name: cen.aliyuncs.com. Make sure that the user has been granted the ram:CreateServiceLinkedRole permission.
400 OperationUnsupported.TransitRouterRegionId The specified TransitRouterRegion does not support the operation.
400 InvalidCenId.NotFound CenId is not found.
400 InvalidStatus.ResourceStatus The resource is not in a valid state for the attachment operation.
400 InvalidTransitRouterId.NotFound TransitRouterId is not found.
400 Forbbiden.TransitRouterServiceNotOpen The user has not open transit router service.
400 InvalidTransitRouterMode.NeedUpgrade TransitRouter need to upgrade.
400 InvalidAvailable.NoResource No resource in the available zone.
400 OperationUnsupported.VpnAttachment The specified region does not support the operation.
400 OperationUnsupported.TransitRouterType The specified TransitRouterType does not support the operation.
400 OperationFailed.AllocateCidrFailed Operation failed because vpn allocate cidr failed.
400 OperationUnsupported.ZoneId The specified ZoneId does not support the operation.
400 MissingParam.CenIdOrRegionId Either CenId or RegionId must be specified.
400 IllegalParam.RegionId RegionId is illegal.
400 OperationUnsupported.CenFullLevel CEN full level does not support TransitRouter
400 InvalidOperation.CenInstanceStatus The CEN instance is not in a valid state for the operation.
400 IllegalParam.ZoneMappings The Specified Parameter ZoneMappings is illegal
400 IncorrectStatus.TransitRouter The status of TransitRouter is incorrect.
400 InvalidOperation.VpnNetworkTypeInvalid The network type of child-instance is invalid.
400 QuotaExceeded.CenQuotaVpnAttachPerTransitRouter The maximum number of VPN attachment per Transit Router is exceeded.
400 QuotaFull.ChildInstanceRelatedCen The childinstance has exceed the quota of the times that a childinstance can be attached as an attachment.
400 Forbidden.ResourceOwnerTransitRouterServiceNotOpen The resource owner user has not opened transit router service.
400 OperationUnsupported.VcoTunnelNotMatchZoneParam The tunnel type of the entered Vco does not match the Zone parameter.
400 Forbidden.ResourceOwnerTransitRouterServiceExpired The transit router service of the account to which the resource belongs has been suspended due to arrears. Please notify the other party to renew the service and try again.
400 Forbidden.TransitRouterServiceExpired The transit router service is out of service.
400 InvalidParameter Invalid parameter.
400 Unauthorized The AccessKeyId is unauthorized.
400 IllegalParam.TransitRouterRegionId TransitRouterRegionId is illegal.
400 InvalidVpnId.NotFound The specified vpn connection instance id does not exist.
400 InvalidParameter.ResourceType The specified parameter ResourceType is invalid.
400 InvalidParameter.VpnId The specified parameter VpnId is invalid.
400 IllegalParam.ChargeType The specified ChargeType is illegal.
400 Forbidden.AttachChildInstanceAcrossBid Operation is not supported for current account.
400 InvalidParameter.TagValue The specified parameter TagValue is invalid.
400 InvalidParameter.CenBandwidthPackageId The specified parameter CenBandwidthPackageId is invalid.
400 InvalidParameter.CenId The specified parameter CenId is invalid.
400 InvalidParameter.TransitRouterId The specified parameter TransitRouterId is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.