Help Center/ Virtual Private Network/ API Reference/ API/ S2C VPN API/ S2C VPN Gateway/ Querying the AZs of VPN Gateways (V5)
Updated on 2024-12-03 GMT+08:00

Querying the AZs of VPN Gateways (V5)

Function

This API is used to query the AZs of VPN gateways. The response body has less information than that in V5.1 (for example, new features such as IPv6 and edge sites are not supported in V5).

Calling Method

For details, see Calling APIs.

URI

GET /v5/{project_id}/vpn-gateways/availability-zones

Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID.

Request

  • Request parameters

    None

  • Example request
    GET https://{Endpoint}/v5/{project_id}/vpn-gateways/availability-zones

Response

  • Response parameters

    Returned status code 200: successful operation

    Table 2 Parameters in the response body

    Parameter

    Type

    Description

    availability_zones

    AvailabilityZones object

    Specifies the list of AZs.

    request_id

    String

    Specifies a request ID.

    Table 3 AvailabilityZones

    Parameter

    Type

    Description

    basic

    VpnGatewayAvailabilityZones object

    Indicates that the specification of VPN gateways is Basic.

    professional1

    VpnGatewayAvailabilityZones object

    Indicates that the specification of VPN gateways is Professional1.

    Professional1-NonFixedIP

    VpnGatewayAvailabilityZones object

    Indicates that the specification of VPN gateways is Professional1-NonFixedIP.

    professional2

    VpnGatewayAvailabilityZones object

    Indicates that the specification of VPN gateways is Professional2.

    Professional2-NonFixedIP

    VpnGatewayAvailabilityZones object

    Indicates that the specification of VPN gateways is Professional2-NonFixedIP.

    gm

    VpnGatewayAvailabilityZones object

    Indicates that the specification of VPN gateways is GM.

    The supported specification options are subject to the value range of the Specification parameter on the page for creating a VPN gateway on the VPN console.

    Table 4 VpnGatewayAvailabilityZones

    Parameter

    Type

    Description

    vpc

    Array of String

    Specifies the list of AZs for VPN gateways associated with VPCs.

    er

    Array of String

    Specifies the list of AZs for VPN gateways associated with enterprise routers.

  • Example response
    {
        "availability_zones": {
            "basic": {
                "vpc": ["cn-south-1f"],
                "er": []
            },
            "professional1": {
                "vpc": ["cn-south-1f", "cn-south-1e", "cn-south-1c"],
                "er": ["cn-south-1f"]
            },
            "professional2": {
                "vpc": ["cn-south-1f", "cn-south-1e", "cn-south-1c"],
                "er": ["cn-south-1f"]
            },
            "Professional1-NonFixedIP": {
                "vpc": [],
                "er": []
            },
            "Professional2-NonFixedIP": {
                "vpc": [],
                "er": []
            },
           "gm": {
                "vpc": ["cn-south-1f", "cn-south-1e", "cn-south-1c"],
                "er": ["cn-south-1f"]
            }
        },
        "request_id": "b60309ab-812c-4269-9de4-fb9a65e6db16"
    }

Status Codes

For details, see Status Codes.