DescribeVpnGateways

Last updated: 2020-04-09 18:51:52

    1. API Description

    Domain name for API request: vpc.tencentcloudapi.com.

    This API (DescribeVpnGateways) is used to query the VPN gateway list.

    A maximum of 100 requests can be initiated per second for this API.

    Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: vpc.ap-shanghai-fsi.tencentcloudapi.com

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common parameter. The value used for this API: DescribeVpnGateways.
    Version Yes String Common parameter. The value used for this API: 2017-03-12.
    Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
    VpnGatewayIds.N No Array of String The VPN gateway instance ID, such as vpngw-f49l6u0z. Each request can have a maximum of 100 instances. VpnGatewayIds and Filters cannot be specified at the same time.
    Filters.N No Array of FilterObject Filter condition. VpnGatewayIds and Filters cannot be specified at the same time.
  • vpc-id - String - (Filter condition) VPC instance ID, such as vpc-f49l6u0z.
  • vpn-gateway-id - String - (Filter condition) VPN instance ID, such as vpngw-5aluhh9t.
  • vpn-gateway-name - String - (Filter condition) VPN instance name.
  • type - String - (Filter condition) VPN gateway type: 'IPSEC', 'SSL'.
  • public-ip-address- String - (Filter condition) Public IP.
  • renew-flag - String - (Filter condition) Gateway renewal type. Manual renewal: NOTIFY_AND_MANUAL_RENEW, Automatic renewal: NOTIFY_AND_AUTO_RENEW.
  • zone - String - (Filter condition) The availability zone where the VPN is located, such as ap-guangzhou-2.
  • Offset No Integer Offset
    Limit No Integer The number of request objects.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer The number of instances meeting the filter condition.
    VpnGatewaySet Array of VpnGateway The list of details of VPN gateway instances.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying VPN gateways

    Input Example

    https://vpc.tencentcloudapi.com/?Action=DescribeVpnGateways
    &Version=2017-03-12
    &Offset=0
    &Limit=2
    &Filters.0.Name=zone
    &Filters.0.Values.0=ap-guangzhou-2
    &Filters.0.Values.0=ap-guangzhou-3
    &<Common request parameters>

    Output Example

    {
      "Response": {
        "TotalCount": 2,
        "VpnGatewaySet": [
          {
            "VpcId": "vpc-ah9e9qu9",
            "VpnGatewayId": "vpngw-5aluhh9t",
            "VpnGatewayName": "joantest",
            "Type": "IPSEC",
            "State": "DELETING",
            "PublicIpAddress": "",
            "RenewFlag": "NOTIFY_AND_MANUAL_RENEW",
            "InstanceChargeType": "PREPAID",
            "InternetMaxBandwidthOut": 0,
            "CreatedTime": "2015-08-20 19:39:01",
            "ExpiredTime": "0000-00-00 00:00:00",
            "IsAddressBlocked": false,
            "NewPurchasePlan": "",
            "RestrictState": "NORMAL",
            "Zone": "ap-guangzhou-2",
            "VpnGatewayQuotaSet": [
                    {
                        "Bandwidth": 5,
                        "Cname": "Mini type",
                        "Name": "mini"
                    },
                    {
                        "Bandwidth": 20,
                        "Cname": "Middle type",
                        "Name": "middle"
                    },
                    {
                        "Bandwidth": 100,
                        "Cname": "Superlarge type",
                        "Name": "superLarge"
                    },
                    {
                        "Bandwidth": 10,
                        "Cname": "Small type",
                        "Name": "small"
                    },
                    {
                        "Bandwidth": 50,
                        "Cname": "Large type",
                        "Name": "large"
                    }
                ]
          },
          {
            "VpcId": "vpc-5rkcp0wb",
            "VpnGatewayId": "vpngw-97yhzme3",
            "VpnGatewayName": "leohli-simulate3",
            "Type": "IPSEC",
            "State": "AVAILABLE",
            "PublicIpAddress": "",
            "RenewFlag": "NOTIFY_AND_MANUAL_RENEW",
            "InstanceChargeType": "PREPAID",
            "InternetMaxBandwidthOut": 10,
            "CreatedTime": "2017-07-03 14:39:16",
            "ExpiredTime": "2018-05-31 13:03:47",
            "IsAddressBlocked": false,
            "NewPurchasePlan": "PREPAID_TO_POSTPAID",
            "RestrictState": "PROTECTIVELY_ISOLATED",
            "Zone": "ap-guangzhou-3"
            "VpnGatewayQuotaSet": [
                    {
                        "Bandwidth": 5,
                        "Cname": "Mini type",
                        "Name": "mini"
                    },
                    {
                        "Bandwidth": 20,
                        "Cname": "Middle type",
                        "Name": "middle"
                    },
                    {
                        "Bandwidth": 100,
                        "Cname": "Superlarge type",
                        "Name": "superLarge"
                    },
                    {
                        "Bandwidth": 10,
                        "Cname": "Small type",
                        "Name": "small"
                    },
                    {
                        "Bandwidth": 50,
                        "Cname": "Large type",
                        "Name": "large"
                    }
                ]
          }
        ],
        "RequestId": "feb949ef-8eb8-4eda-ba73-4fc5705bf8f5"
      }
    }

    5. Developer Resources

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InvalidVpnGatewayId.Malformed Invalid VPN gateway. The VPN instance ID is invalid.
    InvalidVpnGatewayId.NotFound Invalid VPN gateway. The VPN instance does not exist. Verify if you have entered the correct resource information.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help