Updated on 2024-12-03 GMT+08:00

Querying the P2C VPN Gateway List

Function

This API is used to query the P2C VPN gateway list.

Calling Method

For details, see Calling APIs.

URI

GET /v5/{project_id}/p2c-vpn-gateways

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.

Table 2 Parameter in a query request

Parameter

Type

Mandatory

Description

limit

Integer

No

Specifies the number of records returned on each page during pagination query.

marker

String

No

  • Specifies the start flag for querying the current page. If this parameter is left blank, the first page is queried. The marker for querying the next page is the next_marker in the page_info object returned on the current page.
  • This parameter must be used together with limit.

Request

  • Request parameters

    None

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

Response

  • Response parameters
    Returned status code 200: successful query
    Table 3 Parameters in the response body

    Parameter

    Type

    Description

    p2c_vpn_gateways

    Array of p2c_vpn_gateway objects

    Specifies the gateway information list.

    total_count

    Integer

    Specifies the total number of gateways.

    page_info

    PageInfo object

    Specifies pagination query information.

    request_id

    string

    Specifies a request ID.

    Table 4 p2c_vpn_gateway

    Parameter

    Type

    Description

    id

    String

    • Specifies the ID of a P2C VPN gateway.
    • The value is a UUID containing 36 characters.

    name

    String

    • Specifies the name of a P2C VPN gateway.
    • The value is a string of 1 to 64 characters, which can contain digits, letters, underscores (_), and hyphens (-).

    status

    String

    • Specifies the status of the P2C VPN gateway.
    • Value range:

      PENDING_CREATE: creating

      PENDING_UPDATE: updating

      PENDING_DELETE: deleting

      ACTIVE: normal

      FAULT: abnormal

      FROZEN: frozen

    vpc_id

    String

    Specifies the ID of the VPC to which the P2C VPN gateway connects.

    connect_subnet

    String

    Specifies the ID of the VPC subnet used by the P2C VPN gateway.

    flavor

    String

    • Specifies the specification of the P2C VPN gateway.
    • Value range:

      Professional1

    availability_zone_ids

    Array of strings

    Specifies the list of AZs.

    eip

    ResponseEipInfo

    object

    Indicates information about the EIP bound to the gateway.

    max_connection_number

    Integer

    • Specifies the maximum number of concurrent online client connections.
    • Value range: 1–500

    current_connection_number

    Integer

    Specifies the number of current client connections.

    enterprise_project_id

    String

    Specifies an enterprise project ID.

    tags

    Array of

    VpnResourceTag

    objects

    Specifies a tag list.

    order_id

    String

    Specifies an order ID.

    admin_state_up

    Boolean

    • Specifies the frozen status.
    • Value range:

      true: not frozen

      false: frozen

    frozen_effect

    Integer

    • Specifies whether a frozen resource can be deleted.
    • Value range:

      0: A resource is not frozen.

      1: A resource can be deleted after being frozen.

      2: A resource cannot be deleted after being frozen.

    created_at

    String

    • Specifies the creation time.
    • The UTC time format is yyyy-MM-ddTHH:mm:ssZ.

    updated_at

    String

    • Specifies the last update time.
    • The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
    Table 5 ResponseEipInfo

    Parameter

    Type

    Description

    id

    String

    • Specifies an EIP ID.
    • The value is a UUID containing 36 characters.

    ip_version

    Integer

    • Specifies the EIP version.
    • The value can only be 4, indicating IPv4 address.

    ip_billing_info

    String

    • Specifies the EIP order information. This parameter is available only for yearly/monthly EIPs.
    • The value is in the format of order_id:product_id:region_id:project_id, for example:

      CS22********LIBIV:00301-******-0--0:br-iaas-odin1:0605768a************c006c7e484aa

    type

    String

    ip_address

    String

    • Specifies an EIP, that is, a public IPv4 address.
    • The value is an IPv4 address, for example, 88.***.***.11.

    charge_mode

    String

    • Specifies the billing mode of EIP bandwidth.
    • Value range:

      bandwidth: billed by bandwidth

      traffic: billed by traffic

    bandwidth_id

    String

    • Specifies the bandwidth ID of an EIP.
    • The value is a UUID containing 36 characters.

    bandwidth_size

    Integer

    • Specifies the bandwidth (Mbit/s) of an EIP. The maximum EIP bandwidth varies according to regions and depends on the EIP service. You can submit a service ticket to increase the maximum EIP bandwidth under your account.
    • The value ranges from 1 to 1000. For details, see the EIP documentation.

    bandwidth_name

    String

    • Specifies the bandwidth name of an EIP.
    • The value is a string of 1 to 64 characters, which can contain digits, letters, underscores (_), hyphens (-), and periods (.).

    bandwidth_billing_info

    String

    • Specifies the EIP bandwidth order information. This parameter is available only for yearly/monthly EIPs.
    • The value is in the format of order_id:product_id:region_id:project_id, for example:

      CS22********LIBIV:00301-******-0--0:br-iaas-odin1:0605768a************c006c7e484aa

    share_type

    String

    • Specifies the bandwidth type.
    • Value range:

      PER: dedicated bandwidth

    Table 6 VpnResourceTag

    Parameter

    Type

    Description

    key

    String

    • Specifies a tag key.
    • The value is a string of 1 to 128 characters, which can contain letters, digits, spaces, and the following special characters: _ . : = + - @. However, the value cannot start or end with a space or start with _sys_.

    value

    String

    • Specifies a tag value.
    • The value is a string of 0 to 255 characters, which can contain letters, digits, spaces, and the following special characters: _ . : / = + - @.
    Table 7 PageInfo

    Parameter

    Type

    Description

    next_marker

    String

    Specifies the marker of the next page. The value is the time when the last resource in the last query response was created.

    current_count

    Integer

    Specifies the number of resources in the list.

  • Example response
    {
        "p2c_vpn_gateways": [
            {
                "id": "6d526e5f-a0c6-44b6-a785-7e0ef7c9eb76",
                "name": "p2c-vpngw-0001",
                "status": "ACTIVE",
                "vpc_id": "05b9d7de-9acd-4a05-b497-1a3c75afaa0a",
                "connect_subnet": "1948ce22-ddc5-4fb6-87b8-dfcc9b176b51",
                "flavor": "Professional1",
                "availability_zone_ids": [
                    "cn-south-1f",            
    				"cn-south-1e"
                ],
                "eip": {
                    "id": "f0bac06a-88a7-4d37-8e2e-c37691ee4ba2",
                    "ip_version": 4,
                    "ip_billing_info": "CS*********JWT1O:OFFI*************5078:cn-south-1:47190474************98781092d16c",
                    "type": "5_youxuanbgp",
                    "ip_address": "215.***.***.120",
                    "charge_mode": "bandwidth",
                    "bandwidth_id": "3456471c-9dac-40f6-8344-daca14fbd81e",
                    "bandwidth_size": 20,
                    "bandwidth_name": "p2c-vpngw-bandwidth-bd61",
                    "bandwidth_billing_info": "CS*********JWT1O:OFFI*************5078:cn-south-1:47190474************98781092d16c",
                    "share_type": "PER"
                },
                "max_connection_number": 10,
                "current_connection_number": 0,
                "enterprise_project_id": "0",
                "tags": [],
                "order_id": "CS2406141822JWT1O",
                "admin_state_up": true,
                "frozen_effect": 0,
                "created_at": "2024-06-14T10:24:12.147Z",
                "updated_at": "2024-06-14T10:24:12.147Z"
            },
            {
                "id": "10d176c7-aed8-4766-9180-a47e536c64d0",
                "name": "p2c-vpngw-0002",
                "status": "ACTIVE",
                "vpc_id": "01ffa178-9be5-4457-ba5b-874c01cfc872",
                "connect_subnet": "be0d53dd-55a1-4e73-9002-54297e1a4c43",
                "flavor": "Professional1",
                "availability_zone_ids": [
                    "cn-south-1f",            
    				"cn-south-1e"
                ],
                "eip": {
                    "id": "106a269c-c8c1-425e-9f92-f6abcb4dc7b1",
                    "ip_version": 4,
                    "ip_billing_info": null,
                    "type": "5_bgp",
                    "ip_address": "10.83.51.162",
                    "charge_mode": "bandwidth",
                    "bandwidth_id": "beeababf-57aa-469e-8fc8-e6f01554711c",
                    "bandwidth_size": 20,
                    "bandwidth_name": "p2c-vpngw-bandwidth-4455",
                    "bandwidth_billing_info": null,
                    "share_type": "PER"
                },
                "max_connection_number": 10,
                "current_connection_number": 0,
                "enterprise_project_id": "0",
                "tags": [],
                "order_id": "CS**********JWT1O",
                "admin_state_up": true,
                "frozen_effect": 0,
                "created_at": "2024-06-14T10:01:39.654Z",
                "updated_at": "2024-06-15T01:59:40.39Z"
            }
        ],
        "total_count": 2,
        "page_info": {
            "next_marker": null,
            "current_count": 2
        },
        "request_id": "6a88ffb594cdb382ac2c321bc6cbbe13"
    }

Status Codes

For details, see Status Codes.