CreateVpnAttachment işlemi çağrılarak bir geçiş yönlendirici örneğiyle ilişkilendirilecek bir IPsec-VPN bağlantısı oluşturur.
Operation description
Başlamadan önce.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:CreateVpnAttachment |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
IPsec-VPN bağlantısının bölge kimliği. Bölge kimliklerini sorgulamak için DescribeRegions işlemini çağırabilirsiniz. |
cn-hangzhou |
| Name |
string |
No |
IPsec-VPN bağlantısının adı. |
nametest |
| CustomerGatewayId |
string |
No |
Müşteri ağ geçidi kimliği. |
cgw-p0w2jemrcj5u61un8**** |
| NetworkType |
string |
No |
IPsec-VPN bağlantısının ağ türü. Geçerli değerler:
|
public |
| LocalSubnet |
string |
Yes |
Şirket içi veri merkeziyle iletişim kurması gereken VPC tarafındaki CIDR bloğu. Bu, 2. aşama pazarlığı için kullanılır. Birden fazla CIDR bloğunu virgül (,) ile ayırın. Örnek: 192.168.1.0/24,192.168.2.0/24. IPsec-VPN bağlantısı yönlendirme modlarının açıklaması:
|
10.1.1.0/24,10.1.2.0/24 |
| RemoteSubnet |
string |
Yes |
VPC ile iletişim kurması gereken şirket içi veri merkezinin CIDR bloğu. Bu, 2. aşama pazarlığı için kullanılır. Birden fazla CIDR bloğunu virgül (,) ile ayırın. Örnek: 192.168.3.0/24,192.168.4.0/24. IPsec-VPN bağlantısı yönlendirme modunun açıklaması:
|
10.1.3.0/24,10.1.4.0/24 |
| EffectImmediately |
boolean |
No |
IPsec-VPN bağlantısı yapılandırmasının hemen yürürlüğe girip girmeyeceğini belirtir. Geçerli değerler:
|
false |
| IkeConfig |
string |
No |
Bu parametre, tek tünelli modda bir IPsec-VPN bağlantısı oluşturduğunuzda desteklenir.
|
{"Psk":"1234****","IkeVersion":"ikev1","IkeMode":"main","IkeEncAlg":"aes","IkeAuthAlg":"sha1","IkePfs":"group2","IkeLifetime":86400,"LocalId":"47.XX.XX.1","RemoteId":"47.XX.XX.2"} |
| IpsecConfig |
string |
No |
Bu parametre, tek tünelli modda bir IPsec-VPN bağlantısı oluşturduğunuzda desteklenir.
|
{"IpsecEncAlg":"aes","IpsecAuthAlg":"sha1","IpsecPfs":"group2","IpsecLifetime":86400} |
| BgpConfig |
string |
No |
Bu parametre, tek tünelli modda bir IPsec-VPN bağlantısı oluşturduğunuzda desteklenir. BGP yapılandırması:
Not
|
{"EnableBgp":"true","LocalAsn":"45104","TunnelCidr":"169.254.11.0/30","LocalBgpIp":"169.254.11.1"} |
| HealthCheckConfig |
string |
No |
Bu parametre, tek tünelli modda bir IPsec-VPN bağlantısı oluşturduğunuzda desteklenir. |
{"enable":"true","dip":"192.168.1.1","sip":"10.1.1.1","interval":"3","retry":"3","Policy": "revoke_route"} |
| AutoConfigRoute |
boolean |
No |
Rotaların otomatik olarak yapılandırılıp yapılandırılmayacağını belirtir. Geçerli değerler:
|
true |
| EnableDpd |
boolean |
No |
Bu parametre, tek tünelli modda bir IPsec-VPN bağlantısı oluşturduğunuzda desteklenir. Dead Peer Detection (DPD) özelliğinin etkinleştirilip etkinleştirilmeyeceğini belirtir. Geçerli değerler:
|
true |
| EnableNatTraversal |
boolean |
No |
Bu parametre, tek tünelli modda bir IPsec-VPN bağlantısı oluşturduğunuzda desteklenir. NAT geçişinin etkinleştirilip etkinleştirilmeyeceğini belirtir. Geçerli değerler:
|
true |
| RemoteCaCert |
string |
No |
Karşı tarafın CA sertifikası. |
-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE----- |
| ClientToken |
string |
No |
İsteğin yinelenemezliğini 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. Not
Bu parametreyi belirtmezseniz, sistem otomatik olarak API isteğinin RequestId değerini ClientToken olarak kullanır. Her API isteğinin RequestId değeri farklıdır. |
123e4567-e89b-12d3-a456-4266**** |
| Tags |
array<object> |
No |
IPsec-VPN bağlantısına eklenecek etiketlerin listesi. |
|
|
object |
No |
Etiket bilgileri. |
||
| Key |
string |
No |
Etiket anahtarı. Bu değer boş bir dize olamaz. Etiket anahtarı en fazla 64 karakter uzunluğunda olabilir. Tek seferde en fazla 20 etiket anahtarı belirtebilirsiniz. |
TagKey |
| Value |
string |
No |
Etiket değeri. |
TagValue |
| ResourceGroupId |
string |
No |
IPsec-VPN bağlantısının ait olduğu kaynak grubunun kimliği. |
rg-acfmzs372yg**** |
| TunnelOptionsSpecification |
array<object> |
No |
Tünelleri yapılandırır.
|
|
|
array<object> |
No |
Tünel yapılandırma bilgileri. |
||
| CustomerGatewayId |
string |
No |
Tünelle ilişkili müşteri ağ geçidinin kimliği. |
cgw-p0w2jemrcj5u61un8**** |
| EnableDpd |
boolean |
No |
Tünel için Dead Peer Detection (DPD) özelliğinin etkinleştirilip etkinleştirilmeyeceğini belirtir. Geçerli değerler: |
true |
| EnableNatTraversal |
boolean |
No |
Tünel için NAT geçişinin etkinleştirilip etkinleştirilmeyeceğini belirtir. Geçerli değerler:
|
true |
| TunnelIndex |
integer |
No |
Tünelin oluşturma sırası. |
1 |
| TunnelBgpConfig |
object |
No |
Tünel için BGP yapılandırması. |
|
| LocalAsn |
integer |
No |
Tünelin Alibaba Cloud tarafındaki otonom sistem numarası (ASN). Geçerli değerler: 1 ile 4294967295 arası. Varsayılan değer: 45104. |
65530 |
| LocalBgpIp |
string |
No |
Tünelin Alibaba Cloud tarafındaki BGP adresi. Bu adres, BGP CIDR bloğu içinde bir IP adresıdır. |
169.254.10.1 |
| TunnelCidr |
string |
No |
Tünelin BGP CIDR bloğu. CIDR bloğu 169.254.0.0/16 içinde yer almalı ve 30 maske uzunluğuna sahip olmalıdır. CIDR bloğu 169.254.0.0/30, 169.254.1.0/30, 169.254.2.0/30, 169.254.3.0/30, 169.254.4.0/30, 169.254.5.0/30, 169.254.6.0/30 veya 169.254.169.252/30 olamaz. |
169.254.10.0/30 |
| TunnelIkeConfig |
object |
No |
|
|
| IkeAuthAlg |
string |
No |
|
sha1 |
| IkeEncAlg |
string |
No |
|
aes |
| IkeLifetime |
integer |
No |
Geçerli değerler: 0 ile 86400 arası. Varsayılan değer: 86400. |
86400 |
| IkeMode |
string |
No |
IKE sürümünün pazarlık modu. Geçerli değerler: main veya aggressive. Varsayılan değer: main.
|
main |
| IkePfs |
string |
No |
Birinci aşama pazarlığında kullanılan Diffie-Hellman anahtar değişim algoritması. Varsayılan değer: group2. Geçerli değerler: group1, group2, group5, group14. |
group2 |
| IkeVersion |
string |
No |
IKE protokolünün sürümü. Geçerli değerler: ikev1 veya ikev2. Varsayılan değer: ikev2. IKEv1 ile karşılaştırıldığında IKEv2, SA pazarlık sürecini basitleştirir ve çoklu CIDR bloğu senaryoları için daha iyi destek sağlar. |
ikev2 |
| LocalId |
string |
No |
|
47.XX.XX.1 |
| Psk |
string |
No |
Tünel ve tünel karşı tarafı arasındaki kimlik doğrulaması için kullanılan önceden paylaşılan anahtar.
Not
Tünelin ve tünel karşı tarafının önceden paylaşılan anahtarları aynı olmalıdır. Aksi takdirde tünel kurulamaz. |
123456**** |
| RemoteId |
string |
No |
|
47.XX.XX.2 |
| TunnelIpsecConfig |
object |
No |
|
|
| IpsecAuthAlg |
string |
No |
|
sha1 |
| IpsecEncAlg |
string |
No |
|
aes |
| IpsecLifetime |
integer |
No |
|
86400 |
| IpsecPfs |
string |
No |
Pazarlığın ikinci aşamasında kullanılan Diffie-Hellman anahtar değişim algoritması. Varsayılan değer: group2. Geçerli değerler: disabled, group1, group2, group5, group14. |
group2 |
| EnableTunnelsBgp |
boolean |
No |
Bu parametre, çift tünelli modda bir IPsec-VPN bağlantısı oluşturduğunuzda desteklenir. |
false |
| DryRun |
boolean |
No |
Deneme çalıştırması yapılıp yapılmayacağını belirtir. Geçerli değerler:
|
false |
| TunnelBandwidth |
string |
No |
Tek bir VPN tünelinin bant genişliği belirtimi. Geçerli değerler: |
Standard |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Yanıt parametreleri. |
||
| RequestId |
string |
İstek kimliği. |
88187252-0E26-3C4D-9D1D-32A04454EBBA |
| VpnConnectionId |
string |
IPsec-VPN bağlantı kimliği. |
vco-p0wb09rama8qwwgfn**** |
| Name |
string |
IPsec-VPN bağlantısının adı. |
nametest |
| CreateTime |
integer |
IPsec-VPN bağlantısının oluşturulduğu zaman damgası. Birim: milisaniye. Zaman damgası, 1 Ocak 1970 00:00:00 (UTC) tarihinden IPsec-VPN bağlantısının oluşturulduğu zamana kadar geçen toplam milisaniye sayısını temsil eden UNIX zaman damgası formatındadır. |
1658201810000 |
| Code |
string |
Geçerli görev tarafından döndürülen durum kodu. 200 değeri, görevin başarılı olduğunu gösterir. |
200 |
| Message |
string |
Geçerli görev tarafından döndürülen mesaj. |
successful |
| Success |
boolean |
Geçerli görevin başarıyla yürütülüp yürütülmediğini gösterir.
|
true |
Examples
Success response
JSON format
{
"RequestId": "88187252-0E26-3C4D-9D1D-32A04454EBBA",
"VpnConnectionId": "vco-p0wb09rama8qwwgfn****",
"Name": "nametest",
"CreateTime": 1658201810000,
"Code": "200",
"Message": "successful",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Resource.QuotaFull | The quota of resource is full | |
| 400 | InvalidVpnConnection.AlreadyExists | Vpn connection already exists. | |
| 400 | VpnRouteEntry.AlreadyExists | The specified route entry is already exist. | |
| 400 | VpnRouteEntry.Conflict | The specified route entry has conflict. | |
| 400 | NotSupportVpnConnectionParameter.IpsecPfs | The specified vpn connection ipsec Ipsec Pfs is not support. | |
| 400 | NotSupportVpnConnectionParameter.IpsecAuthAlg | The specified vpn connection ipsec Auth Alg is not support. | |
| 400 | VpnRouteEntry.BackupRoute | Validate backup route entry failed. | |
| 400 | VpnRouteEntry.InvalidWeight | Invalid route entry weight value. | |
| 400 | InvalidParameter.VpnConnectionName | The specified vpn connection name is invalid. | |
| 400 | QuotaExceeded.PolicyBasedRoute | The maximum number of policy-based routes is exceeded. Existing routes: %s. Routes to be created: %s. Maximum routes: %s. | |
| 400 | MissingParameter.TunnelCidr | The parameter TunnelCidr is mandatory when BGP is enabled. | |
| 400 | OperationUnsupported.EnableBgp | Current region does not support enable BGP. | |
| 400 | MissingParam.CustomerGatewayAsn | Asn of customer gateway is mandatory when BGP is enabled. | |
| 400 | IllegalParam.LocalAsn | The specified LocalAsn is invalid. | |
| 400 | InvalidParameter.BgpConfig | The specified BgpConfig is invalid. | |
| 400 | IllegalParam.EnableBgp | VPN connection must enable BGP when VPN gateway has enabled BGP. | |
| 400 | IllegalParam.TunnelCidr | The specified TunnelCidr is invalid. | |
| 400 | InvalidLocalBgpIp.Malformed | The specified LocalBgpIp is malformed. | |
| 400 | IllegalParam.LocalBgpIp | The specified LocalBgpIp is invalid. | |
| 400 | IllegalParam.LocalSubnet | The specified "LocalSubnet" (%s) is invalid. | |
| 400 | IllegalParam.RemoteSubnet | The specified "RemoteSubnet" (%s) is invalid. | |
| 400 | OperationFailed.MissCertificate | The VPN connecton has not associated any certificates. | |
| 400 | MissingParam.RemoteId | The remote ID is mandatory when creating national standard VPN connection. | |
| 400 | CustomerGateway.ConflictRouteEntry | The specified customer gateway has conflict with route entry. | |
| 400 | VpnTask.CONFLICT | Vpn task has conflict. | |
| 400 | Forbidden.TagKey.Duplicated | The specified tag key already exists. | |
| 400 | OperationFailed.NoAvailableAmount | The available amount of your account is less than 0, please recharge before attempting to purchase. | |
| 400 | SizeLimitExceeded.TagNum | The maximum number of tags is exceeded. | |
| 400 | InvalidParameter.TagValue | The specified parameter TagValue is invalid. | |
| 400 | InvalidParameter.TagKey | The specified parameter TagKey is invalid. | |
| 400 | Duplicated.TagKey | The specified parameter TagKey is duplicated. | |
| 400 | InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 400 | InvalidTunnelCidr.Malformed | The specified TunnelCidr is malformed. | |
| 400 | CustomerGateway.ConflictVpnIp | The customer gateway associated with the IPSec connection should not have the same IP address as the VPN gateway. | |
| 400 | MissingParameter.TunnelOptionsSpecification | The required parameters are missing when creating a tunnel for dual-tunnel VPN. | |
| 400 | CreateDbrRoutesQuotaFull.QuotaFull | The number of created destination routes exceeds the quota limit. | |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | |
| 400 | VpnConnection.InvalidCreateTunnelOptions | The master and slave tunnels must be created at the same time. | |
| 400 | OperationUnsupported.LargeTunnelBandwidth | Large tunnelBandwidth VpnAttachment is unsupported. | |
| 400 | IllegalParam.TunnelBandwidth | TunnelBandwidth is illegal. | |
| 400 | EncAlgInvalid.DesIncompatible | Des/3des in IkeEncAlg and IpsecEncAlg does not support multi algorithm. | |
| 400 | OperationFailed.OpenCdtServiceFirst | The operation is failed because of %s. | |
| 400 | IkeVersionInvalid.GcmIncompatible | Ikev1 does not support IkeEncAlg of gcm16. | |
| 400 | CustomerGateway.AsnNotConfigured | ASN of CustomerGateway is required when enabling BGP on an IPSec connection. | |
| 403 | Forbbiden.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. | |
| 404 | InvalidCustomerGatewayInstanceId.NotFound | The specified customer gateway instance id does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.