All Products
Search
Document Center

VPN Gateway:DescribeVpnGateways

Last Updated:Feb 11, 2026

Queries VPN gateways in a region.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:DescribeVpnGatewayslist
VpnGateway
acs:vpc:{#regionId}:{#accountId}:vpngateway/*
VpnGateway
acs:vpc:{#regionId}:{#accountId}:vpngateway/{#VpnInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the VPN gateway.

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

cn-hangzhou
VpcIdstringNo

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

vpc-bp1m3i0kn1nd4wiw9****
VpnGatewayIdstringNo

The ID of the VPN gateway.

vpn-bp17lofy9fd0dnvzv****
StatusstringNo

The status of the VPN gateway. Valid values:

  • init
  • provisioning
  • active
  • updating
  • deleting
active
BusinessStatusstringNo

The payment status of the VPN gateway. Valid values:

  • Normal
  • FinancialLocked
Normal
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Valid values: 1 to 50. Default value: 10.

10
IncludeReservationDatabooleanNo

Specifies whether to return information about pending orders. Valid values:

  • false (default)
  • true
true
Tagarray<object>No

The tags that are added to the VPN gateway.

objectNo

The tag added to the VPN gateway.

KeystringNo

The tag key.

You can specify at most 20 tag keys at a time.

FinanceDept
ValuestringNo

The tag value.

Each tag key corresponds to one tag value. You can specify at most 20 tag values at a time.

FinanceJoshua
ResourceGroupIdstringNo

The ID of the resource group to which the VPN gateway belongs.

You can call the ListResourceGroups operation to query the resource group list.

rg-acfmzs372yg****
GatewayTypestringNo

VPN 网关类型,取值: Traditional:传统型 VPN 网关,覆盖 IPsec 功能和 SSL 功能 Enhance.SiteToSite:增强型站点入云 VPN,只覆盖 IPsec 功能

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

PageSizeinteger

The number of entries returned per page.

10
RequestIdstring

The request ID.

DF11D6F6-E35A-41C3-9B20-6FC8A901FE65
PageNumberinteger

The number of the returned page.

1
TotalCountinteger

The number of entries returned.

1
VpnGatewaysobject

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "DF11D6F6-E35A-41C3-9B20-6FC8A901FE65",
  "PageNumber": 1,
  "TotalCount": 1,
  "VpnGateways": {
    "test": "test",
    "test2": 1
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter.TagKeyThe specified parameter TagKey is invalid.The error message returned because the specified tag key is invalid.
400InvalidParameter.TagValueThe specified parameter TagValue is invalid.The error message returned because the specified tag value is invalid.
400Duplicated.TagKeyThe specified parameter TagKey is duplicated.The error message returned because the specified tag key already exists.
400InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error occurred.
403Forbidden.SubUserUser 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.
403ForbiddenUser 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.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2026-01-15The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2024-05-06The Error code has changed. The response structure of the API has changedView Change Details
2023-10-19API Description Update. The API operation is not deprecated.. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-06-30The Error code has changed. The response structure of the API has changedView Change Details
2023-05-04The Error code has changedView Change Details