Tüm Ürünler
Search
Belge Merkezi

:CreateVpcPeerConnection

Son Güncelleme:Oct 10, 2026

Bir VPC eşleme bağlantısı oluşturur.

Operation description

Bir VPC eşleme bağlantısı oluşturmadan önce aşağıdaki hususlara dikkat edin:

  • CreateVpcPeerConnection zaman uyumsuz bir işlemdir. Sistem bir örnek kimliği döndürür ancak IPsec bağlantısı henüz oluşturulmamıştır ve görevi arka planda çalıştırır. Görevin durumunu sorgulamak için GetVpcPeerConnectionAttribute işlemini çağırın.

    • VPC eşleme bağlantısı Creating durumundaysa, bağlantı oluşturulma aşamasındadır.

    • VPC eşleme bağlantısı Activated durumundaysa, bağlantı oluşturulmuş demektir.

    • VPC eşleme bağlantısı Accepting durumundaysa, bu hesaplar arası bir bağlantıdır. Bağlantının kabul eden tarafça kabul edilmesi gerekir.

  • Belirtilen süre içinde CreateVpcPeerConnection işlemini tekrar tekrar çağıramazsınız.

Bir VPC eşleme bağlantısı oluşturduğunuzda, sistem sizin için Cloud Data Transfer (CDT) hizmetini otomatik olarak etkinleştirir.

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:CreateVpcPeerConnection

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

VPC eşleme bağlantısı oluşturmak istediğiniz bölgenin kimliği.

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

cn-hangzhou

VpcId

string

Yes

İstekte bulunan VPC'nin kimliği.

vpc-bp1gsk7h12ew7oegk****

AcceptingAliUid

integer

Yes

Kabul eden VPC'nin ait olduğu Alibaba Cloud hesabının kimliği.

  • Alibaba Cloud hesabınız içinde bir VPC eşleme bağlantısı oluşturmak için Alibaba Cloud hesabınızın kimliğini girin.

  • Alibaba Cloud hesabınız ile başka bir Alibaba Cloud hesabı arasında bir VPC eşleme bağlantısı oluşturmak için eş Alibaba Cloud hesabının kimliğini girin.

Not

Kabul eden taraf bir RAM kullanıcısıysa, AcceptingAliUid parametresini RAM kullanıcısını oluşturan Alibaba Cloud hesabının kimliği olarak ayarlayın.

1210123456123456

AcceptingRegionId

string

Yes

Oluşturmak istediğiniz VPC eşleme bağlantısının kabul eden VPC'sinin bölge kimliği.

  • Bölge içi bir VPC eşleme bağlantısı oluşturmak için, istekte bulunan VPC'ninkiyle aynı olan bir bölge kimliği girin.

  • Bölgeler arası bir VPC eşleme bağlantısı oluşturmak için, istekte bulunan VPC'ninkinden farklı bir bölge kimliği girin.

cn-hangzhou

AcceptingVpcId

string

Yes

Kabul eden VPC'nin kimliği.

vpc-bp1vzjkp2q1xgnind****

Name

string

No

VPC eşleme bağlantısının adı.

Ad 2 ila 128 karakter uzunluğunda olmalı ve rakam, alt çizgi (_) ve tire (-) içerebilir. Bir harfle başlamalıdır.

vpcpeer

Description

string

No

VPC eşleme bağlantısının açıklaması.

Açıklama 2 ila 256 karakter uzunluğunda olmalıdır. Açıklama bir harfle başlamalı ancak http:// veya https:// ile başlayamaz.

description

DryRun

boolean

No

Gerçek istek gerçekleştirilmeden yalnızca 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 gibi olası sorunlara karşı isteği kontrol eder. İstek deneme çalıştırmasından geçemezse bir hata kodu 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ı yapılır ve gerçek istek gerçekleştirilir. İstek deneme çalıştırmasından geçerse 2xx HTTP durum kodu döndürülür ve işlem gerçekleştirilir.

false

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 istemci belirteci olarak istek kimliğini kullanır. İstek kimliği her istek için farklı olabilir.

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

ResourceGroupId

string

No

Kaynak grubunun kimliği.

Kaynak grupları hakkında daha fazla bilgi için Kaynak grupları konusuna bakın.

rg-acfmxazb4ph6aiy****

Bandwidth

integer

No

VPC eşleme bağlantısının bant genişliği. Birim: Mbit/s. Değer 0'dan büyük bir tam sayı olmalıdır. Bu parametreyi belirtmeden önce, bölgeler arası bir VPC eşleme bağlantısı oluşturduğunuzdan emin olun.

100

LinkType

string

No

Oluşturmak istediğiniz VPC eşleme bağlantısının bağlantı türü. Geçerli değerler:

  • Platinum.

  • Gold: varsayılan değer.

Not
  • Bu parametreyi belirtmeniz gerekiyorsa, VPC eşleme bağlantısının bölgeler arası bir bağlantı olduğundan emin olun.

Gold

Tag

array<object>

No

Etiketler.

object

No

Etiketler.

Key

string

No

Etiket anahtarı. En az bir ve en fazla 20 etiket anahtarı belirtmelisiniz. Etiket anahtarı boş bir dize olamaz.

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

FinanceDept

Value

string

No

Etiket değeri. En az bir etiket değeri belirtmelisiniz ve en fazla 20 etiket değeri belirtebilirsiniz. Etiket değeri boş bir dize olabilir.

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

FinanceJoshua

Response elements

Element

Type

Description

Example

object

İstek kimliği.

RequestId

string

İstek kimliği.

54B48E3D-DF70-471B-AA93-08E683A1B45

InstanceId

string

VPC eşleme bağlantısının oluşturulduğu örneğin kimliği.

pcc-lnk0m24khwvtkm****

Examples

Success response

JSON format

{
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
  "InstanceId": "pcc-lnk0m24khwvtkm****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 OperationFailed.CdtNotOpened The operation failed because the Cdt service is not opened. The operation failed because CDT is not activated.
400 OperationFailed.CrossBorderCdtNotOpened The operation failed because the CrossBorderCdt service is not opened.
400 IncorrectStatus.Vpc The status of %s [%s] is incorrect. The status of the initiator VPC instance is incorrect.
400 IncorrectStatus.AcceptingVpc The status of %s [%s] is incorrect. The receiving VPC status is incorrect.
400 ResourceAlreadyExist.RouterInterface The specified resource of %s already exists. The specified router interface already exists.
400 ResourceAlreadyExist.VpcPeer The specified resource of %s already exists. The specified VPC peering connection already exists.
400 OperationDenied.CloudBoxExistsInVpc The operation is not allowed because the CloudBox device exists in vpc. A cloud box instance exists in the initiator VPC, so it is not allowed to create a VpcPeer instance.
400 OperationDenied.CloudBoxExistsInAcceptingVpc The operation is not allowed because the CloudBox device exists in accepting vpc. Cloud box instances exist in the receiving end VPC, so VpcPeer instances are not allowed to be created.
400 QuotaExceeded.VpcPeerCountPerVpc The quota of %s is exceeded, usage %s/%s. The number of VPC peering connections to the VPC has reached the upper limit.
400 UnsupportedRegion The feature of %s is not supported in the region of %s. VPC peering connections are not supported in this region.
400 QuotaExceeded.VpcPeerCountPerUserPerRegion The quota of %s is exceeded, usage %s/%s. The number of VpcPeer instances in a region exceeds the threshold.
400 IncorrectBusinessStatus.VpcPeer The business status of %s [%s] is incorrect. The current instance status is abnormal and the current operation is not allowed.
400 OperationFailed.NotExist.ResourceGroup The operation failed because the resource group does not exist. The operation failed because the resource group does not exist.
400 OperationFailed.AcceptUserCdtNotOpened The operation failed because the Cdt service of accept user is not opened. The operation failed because CDT is not activated for the peer.
400 OperationFailed.AcceptUserCrossBorderCdtNotOpened The operation failed because the CrossBorderCdt service of accept user is not opened. The operation failed because the cross-border service of CDT is not activated for the peer.
400 IncorrectBusinessStatus.AcceptUserVpcPeer The business status of %s [%s] is incorrect. The peer VPC is in an invalid business state.
400 OperationFailed.ViolativeVpcPeer The creation operation fails because it is not allowed to create a vpc peer instance between the originating region and the receiving region. the creation operation fails because it is not allowed to create a vpc peer instance between the originating region and the receiving region.
400 QuotaExceeded.CrossRegionVpcPeerCountPerVpc The quota of %s is exceeded, usage %s/%s. The number of cross-region VpcPeer in the specified VPC exceeds the limit
400 QuotaExceeded.IntraRegionVpcPeerCountPerVpc The quota of %s is exceeded, usage %s/%s. The number of VpcPeer in the same region in the specified VPC exceeds the limit
400 OperationDenied.OperateShareResource The operation is not allowed because of operating shared resource. Operating on shared resources causes the operation to fail
400 IncorrectBusinessStatus.AcceptVpcPeer The business status of peer account is incorrect. The business status of the peer VpcPeer in an invalid state.
400 OperationFailed.InterRegionLinkTypeNotSupported The same region not supported link type feature. Link type characteristics are not supported in the same region.
400 OperationFailed.RegionIdNotSupportLinkType The feature link type is not supported in the region. The gold, silver and copper settings for this feature are not supported in the region.
400 OperationFailed.SpecificLinkTypeNotSupported The operation failed because the special link type of user is not opened. The account does not support special link types.
400 OperationFailed.CrossBusinessNotAllowed Operation failed because receiver and accepter belong to different business site.
400 OperationFailed.ChargeTypeNotSupported Operation failed because the CDT charge type of receiver or accepter does not support the Underlay link type.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.