Tüm Ürünler
Search
Belge Merkezi

:ModifyTunnelAttribute

Son Güncelleme:Oct 02, 2026

Yüksek kullanılabilirliğe sahip bir VPN'in tünel yapılandırmasını değiştirmek için ModifyTunnelAttribute işlemini çağırır.

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

update

*VpnConnection

acs:vpc:{#regionId}:{#accountId}:vpnconnection/{#VpnConnectionId}

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

Not

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

02fb3da4-130e-11e9-8e44-0016e04115b

TunnelOptionsSpecification

object

No

Değiştirilecek tünel yapılandırması.

EnableDpd

boolean

No

Dead Peer Detection (DPD) özelliğinin etkinleştirilip etkinleştirilmeyeceğini belirtir. Geçerli değerler:

  • true: DPD'yi etkinleştirir. IPsec başlatıcısı, karşı ucun canlı olup olmadığını kontrol etmek için DPD paketleri gönderir. Belirtilen süre içinde doğru bir yanıt alınamazsa bağlantı kesilmiş kabul edilir ve ISAKMP SA, IPsec SA ve IPsec tüneli silinir.

  • false: DPD'yi devre dışı bırakır. IPsec başlatıcısı DPD paketleri göndermez.

true

EnableNatTraversal

boolean

No

NAT geçişinin etkinleştirilip etkinleştirilmeyeceğini belirtir. Geçerli değerler:

  • true: NAT geçişini etkinleştirir. NAT geçişi etkinleştirildikten sonra IKE anlaşma süreci UDP bağlantı noktası doğrulamasını atlar ve VPN tüneli boyunca NAT ağ geçidi cihazlarını keşfedebilir.

  • false: NAT geçişini devre dışı bırakır.

true

RemoteCaCertificate

string

No

IPsec-VPN bağlantısı China Certification Authority (China CA) uyumlu bir VPN ağ geçidi ile ilişkilendirildiğinde kullanılan karşı uç CA sertifikası.

-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----

TunnelBgpConfig

object

No

Değiştirilecek tünelin BGP yapılandırması.

Tünel için daha önce BGP etkinleştirilmediyse, BGP'yi etkinleştirmek ve tünel için BGP yapılandırmasını eklemek amacıyla ModifyVpnConnectionAttribute işlemini çağırın.

LocalAsn

integer

No

Tünelin yerel ucunun otonom sistem numarası (ASN). Geçerli değerler: 1 ile 4294967295 arası.

65530

LocalBgpIp

string

No

Tünelin yerel ucunun BGP IP adresi. Bu adres, TunnelCidr aralığı içindeki bir IP adresi olmalıdır.

169.254.11.1

TunnelCidr

string

No

Tünelin yerel ucundaki BGP IP adresinin CIDR bloğu.

CIDR bloğu, 169.254.0.0/16 içinde 30 maske uzunluğuna sahip bir alt ağ olmalıdır ve 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.

Not

Bir VPN ağ geçidi örneği altındaki her IPsec-VPN bağlantısının IPsec tüneli CIDR bloğu benzersiz olmalıdır.

169.254.11.0/30

TunnelIkeConfig

object

No

Değiştirilecek tünelin IKE aşaması (Aşama 1) yapılandırması.

IkeAuthAlg

string

No

Aşama 1 anlaşmasında kullanılan kimlik doğrulama algoritması.

Geçerli değerler: md5, sha1, sha256, sha384 veya sha512.

sha1

IkeEncAlg

string

No

Aşama 1 anlaşmasında kullanılan şifreleme algoritması.

Geçerli değerler: aes, aes192, aes256, des veya 3des.

aes

IkeLifetime

integer

No

Aşama 1'de anlaşılan SA'nın yaşam süresi. Birim: saniye. Geçerli değerler: 0 ile 86400 arası.

86400

IkeMode

string

No

IKE sürümünün anlaşma modu. Geçerli değerler:

  • main: ana mod. Anlaşma süreci daha güvenlidir.

  • aggressive: agresif mod. Anlaşma daha hızlıdır ve başarı oranı daha yüksektir.

main

IkePfs

string

No

Aşama 1 anlaşmasında kullanılan Diffie-Hellman anahtar değişim algoritması. 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.

ikev2

LocalId

string

No

Tünelin yerel ucunun tanımlayıcısı. Değer en fazla 100 karakter uzunluğunda olabilir ve boşluk içeremez. Değer, FQDN ve IP biçimlerini destekler. Varsayılan değer tünelin IP adresıdır.

47.XX.XX.87

Psk

string

No

Tünel ile karşı uç arasındaki kimlik doğrulama için kullanılan önceden paylaşılan anahtar.

  • Anahtar 1 ila 100 karakter uzunluğunda olmalı ve rakam, büyük harf, küçük harf ve aşağıdaki karakterleri içerebilir. Boşluk içeremez. ~!`@#$%^&*()_-+={}[]|;:',.<>/?

  • Önceden paylaşılan bir anahtar belirtmezseniz, sistem önceden paylaşılan anahtar olarak rastgele 16 karakterlik bir dize oluşturur. Sistem tarafından otomatik olarak oluşturulan önceden paylaşılan anahtarı sorgulamak için DescribeVpnConnection işlemini çağırabilirsiniz.

Not

Tünelde ve karşı uçta yapılandırılan önceden paylaşılan anahtarlar aynı olmalıdır. Aksi takdirde tünel kurulamaz.

123456****

RemoteId

string

No

Tünelin karşı ucunun tanımlayıcısı. Değer en fazla 100 karakter uzunluğunda olabilir ve boşluk içeremez. Değer, FQDN ve IP biçimlerini destekler. Varsayılan değer, tünelle ilişkilendirilen müşteri ağ geçidi örneğinin IP adresıdır.

47.XX.XX.207

TunnelIpsecConfig

object

No

Değiştirilecek tünelin IPsec aşaması (Aşama 2) yapılandırması.

IpsecAuthAlg

string

No

Aşama 2 anlaşmasında kullanılan kimlik doğrulama algoritması.

Geçerli değerler: md5, sha1, sha256, sha384 veya sha512.

sha1

IpsecEncAlg

string

No

Aşama 2 anlaşmasında kullanılan şifreleme algoritması.

Geçerli değerler: aes, aes192, aes256, des veya 3des.

aes

IpsecLifetime

integer

No

Aşama 2'de anlaşılan SA'nın yaşam süresi. Birim: saniye. Geçerli değerler: 0 ile 86400 arası.

86400

IpsecPfs

string

No

Aşama 2 anlaşmasında kullanılan Diffie-Hellman anahtar değişim algoritması. Geçerli değerler: disabled, group1, group2, group5, group14.

group2

CustomerGatewayId

string

No

Tünelle ilişkilendirilen müşteri ağ geçidinin örnek kimliği.

cgw-1nmwbpgrp7ssqm1yn****

RegionId

string

No

IPsec-VPN bağlantısının bölge kimliği.

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

cn-hangzhou

VpnConnectionId

string

Yes

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

vco-gw69vm1i71y354****

TunnelId

string

Yes

Tünel kimliği.

tun-gbyz2e070xzo93****

Response elements

Element

Type

Description

Example

object

Yanıt parametreleri.

TunnelId

string

Tünel kimliği.

tun-gbyz2e070xzo93****

RequestId

string

İstek kimliği.

E6F36FF0-9544-3AEE-8673-A4647D50064C

TunnelIkeConfig

object

Tünelin IKE aşaması (Aşama 1) yapılandırması.

IkeAuthAlg

string

IKE kimlik doğrulama algoritması.

sha1

IkeEncAlg

string

IKE şifreleme algoritması.

aes

IkeLifetime

integer

IKE yaşam süresi. Birim: saniye.

86400

IkeMode

string

IKE anlaşma modu.

  • main: ana mod. Anlaşma süreci daha güvenlidir.

  • aggressive: agresif mod. Anlaşma daha hızlıdır ve başarı oranı daha yüksektir.

main

IkePfs

string

DH grubu.

group2

IkeVersion

string

IKE protokolü sürümü.

  • ikev1

  • ikev2

IKEv1 ile karşılaştırıldığında IKEv2, SA anlaşma sürecini basitleştirir ve çoklu CIDR bloğu senaryoları için daha iyi destek sağlar.

ikev2

LocalId

string

Tünelin yerel ucunun tanımlayıcısı. Değer, FQDN ve IP biçimlerini destekler. Varsayılan değer tünelin IP adresıdır.

47.XX.XX.87

Psk

string

Önceden paylaşılan anahtar.

123456****

RemoteId

string

Tünelin karşı ucunun tanımlayıcısı. Değer, FQDN ve IP biçimlerini destekler. Varsayılan değer, tünelle ilişkilendirilen müşteri ağ geçidi örneğinin IP adresıdır.

47.XX.XX.207

TunnelIpsecConfig

object

Tünelin IPsec aşaması (Aşama 2) yapılandırması.

IpsecAuthAlg

string

IPsec kimlik doğrulama algoritması.

sha1

IpsecEncAlg

string

IPsec şifreleme algoritması.

aes

IpsecLifetime

integer

IPsec yaşam süresi. Birim: saniye.

86400

IpsecPfs

string

DH grubu.

group2

TunnelBgpConfig

object

Tünelin BGP yapılandırması.

EnableBgp

boolean

BGP'nin etkinleştirilme durumu.

  • true: etkin.

  • false: devre dışı.

true

LocalAsn

integer

Tünelin yerel ucunun otonom sistem numarası (ASN).

65530

LocalBgpIp

string

Tünelin yerel ucunun BGP IP adresi.

169.254.11.1

PeerAsn

integer

Tünelin karşı ucunun otonom sistem numarası (ASN).

65531

PeerBgpIp

string

Tünelin karşı ucunun BGP IP adresi.

169.254.11.2

TunnelCidr

string

Tünel BGP IP adresinin CIDR bloğu.

169.254.11.0/30

EnableNatTraversal

boolean

NAT geçişinin etkinleştirilip etkinleştirilmediğini gösterir. Geçerli değerler:

  • false: devre dışı.

  • true: etkin.

true

EnableDpd

boolean

Dead Peer Detection (DPD) özelliğinin etkinleştirilip etkinleştirilmediğini gösterir.

  • false: devre dışı.

  • true: etkin.

true

RemoteCaCertificate

string

IPsec-VPN bağlantısı China CA uyumlu bir VPN ağ geçidi ile oluşturulduğunda kullanılan karşı uç CA sertifikası.

-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----

CustomerGatewayId

string

Tünelle ilişkilendirilen müşteri ağ geçidinin örnek kimliği.

cgw-p0wx48ayhrygitm80****

Role

string

Tünelin rolü.

  • master: etkin tünel.

  • slave: yedek tünel.

master

ZoneNo

string

Tünelin bölgesi.

cn-hangzhou-h

InternetIp

string

Tünelin IP adresi.

47.XX.XX.87

State

string

Tünelin durumu.

  • active: Tünel kullanılabilir.

  • updating: Tünel güncelleniyor.

  • deleting: Tünel siliniyor.

active

Examples

Success response

JSON format

{
  "TunnelId": "tun-gbyz2e070xzo93****",
  "RequestId": "E6F36FF0-9544-3AEE-8673-A4647D50064C",
  "TunnelIkeConfig": {
    "IkeAuthAlg": "sha1",
    "IkeEncAlg": "aes",
    "IkeLifetime": 86400,
    "IkeMode": "main",
    "IkePfs": "group2",
    "IkeVersion": "ikev2",
    "LocalId": "47.XX.XX.87",
    "Psk": "123456****",
    "RemoteId": "47.XX.XX.207"
  },
  "TunnelIpsecConfig": {
    "IpsecAuthAlg": "sha1",
    "IpsecEncAlg": "aes",
    "IpsecLifetime": 86400,
    "IpsecPfs": "group2"
  },
  "TunnelBgpConfig": {
    "EnableBgp": true,
    "LocalAsn": 65530,
    "LocalBgpIp": "169.254.11.1",
    "PeerAsn": 65531,
    "PeerBgpIp": "169.254.11.2",
    "TunnelCidr": "169.254.11.0/30"
  },
  "EnableNatTraversal": true,
  "EnableDpd": true,
  "RemoteCaCertificate": "-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----",
  "CustomerGatewayId": "cgw-p0wx48ayhrygitm80****",
  "Role": "master",
  "ZoneNo": "cn-hangzhou-h",
  "InternetIp": "47.XX.XX.87",
  "State": "active"
}

Error codes

HTTP status code

Error code

Error message

Description

400 VpnGateway.Configuring The specified service is configuring.
400 VpnGateway.FinancialLocked The specified service is financial locked.
400 InvalidName The name is not valid
400 VpnRouteEntry.AlreadyExists The specified route entry is already exist. The route already exists.
400 VpnRouteEntry.Conflict The specified route entry has conflict. Route conflicts exist.
400 NotSupportVpnConnectionParameter.IpsecPfs The specified vpn connection ipsec Ipsec Pfs is not support. The PFS parameter set for the IPsec-VPN connection is not supported.
400 NotSupportVpnConnectionParameter.IpsecAuthAlg The specified vpn connection ipsec Auth Alg is not support. The authentication algorithm specified for the IPsec-VPN connection is not supported.
400 VpnConnectionParamInvalid.SameVpnAndCgwDifferentIkeConfigs IPSec connections associated with the same user gateway and VPN gateway should have the same pre-shared key and IKE configuration. The pre-shared key and IKE parameters must be the same for IPsec-VPN connections that are associated with the same VPN gateway and customer gateway.
400 VpnConnectionParamInvalid.SameVpnAndCgwTrafficSelectorOverlap Traffic selectors of IPSec connections associated with the same user gateway and VPN gateway should not overlap. The protected data flows of IPsec-VPN connections that are associated with the same VPN gateway and customer gateway cannot overlap.
400 IllegalParam.LocalAsn The param of LocalAsn is illegal The LocalAsn parameter is set to an invalid value.
400 IllegalParam.LocalBgpIp The specified LocalBgpIp is invalid. The local BGP IP address is invalid.
400 VpnGateway.task.conflict The VPN is in the configuration state, please wait a while before operating. The VPN is in the configuration state, please wait a while before operating.
400 ModifyIkeV1WithMultiRoutes.Invalid Failed to modify VPN connection parameters. Multi-network is configured while using IkeV1 protocol. Failed to modify VPN connection parameters. Multi-network is configured while using IkeV1 protocol.
400 EncAlgInvalid.DesIncompatible Des/3des in IkeEncAlg and IpsecEncAlg does not support multi algorithm. Des/3des in IkeEncAlg and IpsecEncAlg does not support multi algorithm.
400 IkeVersionInvalid.GcmIncompatible Ikev1 does not support IkeEncAlg of gcm16. Ikev1 does not support IkeEncAlg of gcm16.
400 CustomerGateway.ConflictVpnIp The specified customer gateway has conflict with vpn gateway ip. The specified customer gateway has conflict with vpn gateway ip.
400 CustomerGateway.AsnNotConfigured ASN of CustomerGateway is required when enabling BGP on an IPSec connection. When BGP is enabled for IPSec connection, ASN needs to be configured on the customer gateway.
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. You do not have the permissions to manage the specified resource. Apply for the permissions and try again.
404 InvalidVpnConnectionInstanceId.NotFound The specified vpn connection instance id does not exist. The specified vpn connection instance id does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.