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

Querying the AZs of VPN Gateways (V5.1)

Function

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

Calling Method

For details, see Calling APIs.

URI

GET /v5.1/{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.1/{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

    Array of ExtendedAvailabilityZone object

    Specifies the list of AZs.

    request_id

    String

    Specifies a request ID.

    Table 3 ExtendedAvailabilityZone

    Parameter

    Type

    Description

    name

    String

    Specifies an AZ name.

    public_border_group

    String

    Specifies a public border group.

    available_specs

    Array of AvailableSpec object

    Specifies available VPN gateway specifications in the AZ.

    Table 4 AvailableSpec

    Parameter

    Type

    Description

    flavor

    String

    Specifies a VPN gateway specification.

    attachment_type

    String

    Specifies the association mode of the VPN gateway.

    ip_version

    String

    Specifies the IP protocol version of the VPN gateway.

  • Example response
    {
        "availability_zones": [
            {
                "name": "cn-southwest-242a",
                "public_border_group": "center",
                "available_specs": [
                    {
                        "flavor": "Basic",
                        "attachment_type": "vpc",
                        "ip_version": "ipv4"
                    },
                    {
                        "flavor": "GM",
                        "attachment_type": "vpc",
                        "ip_version": "ipv4"
                    },
                    {
                        "flavor": "Professional2",
                        "attachment_type": "vpc",
                        "ip_version": "ipv6"
                    }
                ]
            }
        ],
        "request_id": "9c114ae240ac4e2afdedc113fadae34c"
    }

Status Codes

For details, see Status Codes.