All Products
Search
Document Center

:DescribeVpnGateway

最終更新日:Aug 22, 2023

Queries the detailed information about a VPN gateway.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

DescribeVpnGateway

The operation that you want to perform. Set the value to DescribeVpnGateway.

RegionId

String

Yes

ap-southeast-2

The region ID of the VPN gateway.

You can call the DescribeRegions operation to query the most recent region list.

VpnGatewayId

String

Yes

vpn-bp1r3v1xqkl0w519g****

The ID of the VPN gateway.

IncludeReservationData

Boolean

No

true

Specifies whether to include the data about pending orders. Valid values:

  • false (default)

  • true

Response parameters

Parameter

Type

Example

Description

VpnType

String

Normal

The type of the VPN gateway.

The value is set to Normal, which indicates a standard NAT gateway.

Status

String

init

The status of the VPN gateway. Valid values:

  • init

  • provisioning

  • active

  • updating

  • deleting

VpcId

String

vpc-bp19m2yx1m5q0avyq****

The ID of the virtual private cloud (VPC) to which the VPN gateway belongs.

SslMaxConnections

Long

5

The maximum number of concurrent SSL-VPN connections.

Spec

String

5

The maximum bandwidth of the VPN gateway. Unit: Mbit/s.

InternetIp

String

47.22.XX.XX

  • If the VPN gateway supports IPsec-VPN connections in single-tunnel mode, the address is the IP address of the VPN gateway and can be used to create an IPsec-VPN connection or an SSL-VPN connection.

  • If the VPN gateway supports IPsec-VPN connections in dual-tunnel mode, the address is the first IP address used to create an IPsec-VPN connection. The address cannot be used to create an SSL-VPN connection.

    If the VPN gateway supports IPsec-VPN connections in dual-tunnel mode, the system assigns two IP addresses to the VPN gateway to create two encrypted tunnels.

CreateTime

Long

1495382400000

The timestamp that indicates when the VPN gateway was created. Unit: milliseconds.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

AutoPropagate

Boolean

true

Indicates whether BGP routes are automatically advertised to the VPC. Valid values:

  • true

  • false

ChargeType

String

China site (aliyun.com): Prepay. International site (alibabacloud.com): POSTPAY.

The billing method of the VPN gateway. Valid values:

POSTPAY: pay-as-you-go

VpnGatewayId

String

vpn-bp1r3v1xqkl0w519g****

The ID of the VPN gateway.

Tag

String

{\"VpnEnableBgp\":\"true\",\"VisuallySsl\":\"true\",\"PbrPriority\":\"true\",\"VpnNewImage\":\"true\",\"description\":\"forwarding1.3.7\",\"VpnVersion\":\"v1.2.4\"}

The automatically generated tag of the VPN gateway.

  • VpnEnableBgp: indicates whether the VPN gateway supports BGP. Valid values:

    • true

    • false

  • VisuallySsl: indicates whether the VPN gateway allows you to view information about connected SSL clients. Valid values:

    • true

    • false

  • PbrPriority: indicates whether the VPN gateway allows you to configure priorities for policy-based routes. Valid values:

    • true

    • false

  • VpnNewImage: indicates whether the VPN gateway is upgraded.

    • true

    • false

  • description: the description of the VPN gateway. This parameter is for internal system use only.

  • VpnVersion: the version of the VPN gateway.

IpsecVpn

String

enable

Indicates whether the IPsec-VPN feature is enabled. Valid values:

  • enable

  • disable

EndTime

Long

1544666102000

The timestamp that indicates when the VPN gateway expires. Unit: milliseconds.

This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

VSwitchId

String

vsw-bp1dmzugdikc6hdgx****

The ID of the vSwitch to which the VPN gateway belongs.

RequestId

String

27E4E088-8DE0-4672-BF5C-0A412389DB9E

The request ID.

Description

String

vpngatewaydescription

The description of the VPN gateway.

EnableBgp

Boolean

true

Indicates whether BGP is enabled for the VPN gateway. Valid values:

  • true

  • false

BusinessStatus

String

Normal

The payment status of the VPN gateway. Valid values:

  • Normal

  • FinancialLocked

SslVpn

String

enable

The status of the SSL-VPN feature. Valid values:

  • enable

  • disable

Name

String

vpngatewayname

The name of the VPN gateway.

ReservationData

Object

The information about pending orders.

Note

This parameter is returned only when IncludeReservationData is set to true.

Status

String

1

The status of the pending order. Valid values:

  • 1: indicates that the order of the renewal or specification change has not taken effect.

  • 2: indicates that the order of the temporary upgrade has taken effect. After the temporary upgrade expires, the system restores the VPN gateway to its previous specification. In this case, ReservationIpsec, ReservationMaxConnections, ReservationSpec, and ReservationSsl indicate the previous specifications.

ReservationOrderType

String

TEMP_UPGRADE

The type of the pending order. Valid values:

  • RENEWCHANGE: renewal with upgrade or downgrade

  • TEMP_UPGRADE: temporary upgrade

  • RENEW: renewal

ReservationIpsec

String

enable

The IPsec-VPN status of the pending order. Valid values:

  • enable

  • disable

ReservationSpec

String

5

The bandwidth specification of the pending order. Unit: Mbit/s.

ReservationSsl

String

enable

The SSL-VPN status of the pending order. Valid values:

  • enable

  • disable

ReservationMaxConnections

Integer

5

The maximum number of concurrent SSL-VPN connections for the pending order.

ReservationEndTime

String

2020-07-20T16:00:00Z

If the order type is TEMP_UPGRADE (temporary upgrade), this parameter indicates the time when the temporary upgrade expires.

If the order type is RENEWCHANGE (specification change) or RENEW (renewal), this parameter indicates the time when the renewal or specification change takes effect.

Tags

Array of Tag

The custom tag of the VPN gateway.

Tag

Key

String

aaa

The key of tag N.

Value

String

bbb

The value of tag N.

NetworkType

String

public

The network type of the VPN gateway.

  • public: public VPN gateway

  • private

DisasterRecoveryInternetIp

String

47.91.XX.XX

The second IP address assigned by the system to create an IPsec-VPN connection.

This parameter is returned only when the VPN gateway supports the dual-tunnel mode.

DisasterRecoveryVSwitchId

String

vsw-p0w95ql6tmr2ludkt****

The ID of the second vSwitch associated with the VPN gateway.

This parameter is returned only when the VPN gateway supports the dual-tunnel mode.

SslVpnInternetIp

String

47.74.XX.XX

The IP address of the SSL-VPN connection.

This parameter is returned only when the VPN gateway is a public VPN gateway and supports only the single-tunnel mode. In addition, the VPN gateway must have the SSL-VPN feature enabled.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeVpnGateway
&RegionId=ap-southeast-2
&VpnGatewayId=vpn-bp1r3v1xqkl0w519g****
&IncludeReservationData=true
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeVpnGatewayResponse>
    <VpnType>Normal</VpnType>
    <Status>init</Status>
    <VpcId>vpc-bp19m2yx1m5q0avyq****</VpcId>
    <SslMaxConnections>5</SslMaxConnections>
    <Spec>5</Spec>
    <InternetIp>47.22.XX.XX</InternetIp>
    <CreateTime>1495382400000</CreateTime>
    <AutoPropagate>true</AutoPropagate>
    <ChargeType>Example value for Alibaba Cloud China Site: PREPAY. Example value for Alibaba Cloud International Site: POSTPAY.</ChargeType>
    <VpnGatewayId>vpn-bp1r3v1xqkl0w519g****</VpnGatewayId>
    <Tag>{\"VpnEnableBgp\":\"true\",\"VisuallySsl\":\"true\",\"PbrPriority\":\"true\",\"VpnNewImage\":\"true\",\"description\":\"forwarding1.3.7\",\"VpnVersion\":\"v1.2.4\"}</Tag>
    <IpsecVpn>enable</IpsecVpn>
    <EndTime>1544666102000</EndTime>
    <VSwitchId>vsw-bp1dmzugdikc6hdgx****</VSwitchId>
    <RequestId>27E4E088-8DE0-4672-BF5C-0A412389DB9E</RequestId>
    <Description>vpngatewaydescription</Description>
    <EnableBgp>true</EnableBgp>
    <BusinessStatus>Normal</BusinessStatus>
    <SslVpn>enable</SslVpn>
    <Name>vpngatewayname</Name>
    <DisasterRecoveryVSwitchId>vsw-p0w95ql6tmr2ludkt****</DisasterRecoveryVSwitchId>
    <DisasterRecoveryInternetIp>47.91.XX.XX</DisasterRecoveryInternetIp>
    <SslVpnInternetIp>47.74.XX.XX</SslVpnInternetIp>
    <ReservationData>
        <Status>1</Status>
        <ReservationOrderType>TEMP_UPGRADE</ReservationOrderType>
        <ReservationIpsec>enable</ReservationIpsec>
        <ReservationSpec>5</ReservationSpec>
        <ReservationSsl>enable</ReservationSsl>
        <ReservationMaxConnections>5</ReservationMaxConnections>
        <ReservationEndTime>2020-07-20T16:00:00Z</ReservationEndTime>
    </ReservationData>
    <Tags>
        <Key>aaa</Key>
        <Value>bbb</Value>
    </Tags>
    <NetworkType>public</NetworkType>
</DescribeVpnGatewayResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "VpnType" : "Normal",
  "Status" : "init",
  "VpcId" : "vpc-bp19m2yx1m5q0avyq****",
  "SslMaxConnections" : 5,
  "Spec" : "5",
  "InternetIp" : "47.22.XX.XX",
  "CreateTime" : 1495382400000,
  "AutoPropagate" : true,
  "ChargeType": Example value for Alibaba Cloud China Site: PREPAY. Example value for Alibaba Cloud International Site: POSTPAY.
  "VpnGatewayId" : "vpn-bp1r3v1xqkl0w519g****",
  "Tag" : "{\"VpnEnableBgp\":\"true\",\"VisuallySsl\":\"true\",\"PbrPriority\":\"true\",\"VpnNewImage\":\"true\",\"description\":\"forwarding1.3.7\",\"VpnVersion\":\"v1.2.4\"}",
  "IpsecVpn" : "enable",
  "EndTime" : 1544666102000,
  "VSwitchId" : "vsw-bp1dmzugdikc6hdgx****",
  "RequestId" : "27E4E088-8DE0-4672-BF5C-0A412389DB9E",
  "Description" : "vpngatewaydescription",
  "EnableBgp" : true,
  "BusinessStatus" : "Normal",
  "SslVpn" : "enable",
  "Name" : "vpngatewayname",
  "DisasterRecoveryVSwitchId" : "vsw-p0w95ql6tmr2ludkt****",
  "DisasterRecoveryInternetIp" : "47.91.XX.XX",
  "SslVpnInternetIp" : "47.74.XX.XX",
  "ReservationData" : {
    "Status" : "1",
    "ReservationOrderType" : "TEMP_UPGRADE",
    "ReservationIpsec" : "enable",
    "ReservationSpec" : "5",
    "ReservationSsl" : "enable",
    "ReservationMaxConnections" : 5,
    "ReservationEndTime" : "2020-07-20T16:00:00Z"
  },
  "Tags" : [ {
    "Key" : "aaa",
    "Value" : "bbb"
  } ],
  "NetworkType" : "public"
}

Error codes

HttpCode

Error code

Error message

Description

403

Forbbiden.SubUser

User not authorized to operate on the specified resource as your account is created by another user.

The error message returned because you are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again.

403

Forbidden

User not authorized to operate on the specified resource.

The error message returned because you are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again.

404

InvalidVpnGatewayInstanceId.NotFound

The specified vpn gateway instance id does not exist.

The error message returned because the specified VPN gateway does not exist. Check whether the specified VPN gateway is valid.

For a list of error codes, see Service error codes.