tencent cloud

Feedback

DescribeVpnGateways

Last updated: 2023-08-23 14:11:08

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 300 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

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 Params. The value used for this API: DescribeVpnGateways.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region No String Common Params. This parameter is not required for this API.
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

    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
    InternalError.ModuleError Internal module error
    InvalidParameter.Coexist The parameters cannot be specified at the same time.
    InvalidParameter.FilterInvalidKey The specified filter condition does not exist.
    InvalidParameter.FilterNotDict The specified filter condition should be a key-value pair.
    InvalidParameter.FilterValuesNotList The specified filter value should be a list.
    InvalidParameterValue.LimitExceeded The parameter value exceeds the limit.
    InvalidParameterValue.Malformed Invalid input parameter format.
    InvalidParameterValue.Range The parameter value is not in the specified range.
    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.
    ResourceNotFound The resource does not exist.
    UnsupportedOperation Unsupported operation.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support