Updated on 2022-01-25 GMT+08:00

Querying Bandwidths

Function

This API is used to query bandwidths using search criteria.

URI

GET /v1/{project_id}/bandwidths

Table 1 describes the parameters.
Table 1 Parameter description

Name

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

marker

No

String

Specifies the start resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried.

limit

No

Integer

  • Specifies the number of records returned on each page.
  • The value ranges from 0 to intmax.

Request Message

  • Request parameter

    None

  • Example request
    GET https://{Endpoint}/v1/{project_id}/bandwidths?limit={limit}&marker={marker}

Response Message

  • Response parameter
    Table 2 Response parameter

    Name

    Type

    Description

    bandwidths

    Array of bandwidths objects

    Specifies the bandwidth objects. For details, see Table 3.

    Table 3 Description of the bandwidths field

    Name

    Type

    Description

    name

    String

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

    size

    Integer

    • Specifies the bandwidth size in Mbit/s.
    • The value ranges from 1 Mbit/s to 2000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the available bandwidth range on the management console.)

    id

    String

    Specifies the bandwidth ID, which uniquely identifies the bandwidth.

    share_type

    String

    • The value is PER, indicating that the bandwidth is dedicated.

    If this parameter is not set, the list of all bandwidths will be returned by default.

    publicip_info

    Array of publicip_info objects

    • Specifies the bandwidth information. For details, see Table 4.

    tenant_id

    String

    Specifies the project ID.

    bandwidth_type

    String

    • Specifies the bandwidth type.
    • The value is bgp.

    charge_mode

    String

    • Specifies whether the bandwidth is billed by traffic or by bandwidth size.
    • Possible values can be bandwidth (billed by bandwidth) and traffic (billed by traffic). If the value is an empty character string or no value is specified, value bandwidth is used.

    status

    String

    • Specifies the bandwidth status.
    • Possible values are as follows:
      • FREEZED (Frozen)
      • NORMAL (Normal)

    Table 4 publicip_info object

    Name

    Type

    Description

    publicip_id

    String

    Specifies the ID of the EIP that uses the bandwidth.

    publicip_address

    String

    Specifies the obtained EIP if only IPv4 EIPs are available.

    publicip_type

    String

    • Specifies the EIP type.
    • The value can be 5_bgp.
    • The configured value must be supported by the system.
  • Example response
    {
      "bandwidths": [
        {
          "id": "09b99c91-da7c-449f-94e2-f4934c5b2a71",
          "name": "vpngw-f632a7b0-ef50-4ac5-97e9-ddc56b3d5977",
          "size": 2000,
          "share_type": "PER",
          "publicip_info": [
            {
              "publicip_id": "2a65923c-7133-415d-ae3b-cf9635a942c5",
              "publicip_address": "10.xx.xx.3",
              "ip_version": 4,
              "publicip_type": "5_bgp"
            }
          ],
          "tenant_id": "26ae5181a416420998eb2093aaed84d9",
          "bandwidth_type": "bgp",
          "status": "NORMAL"
        },
        {
          "id": "0a583ff1-b43e-4000-ade3-e7af0097f832",
          "name": "vpngw-7e880d5b-f458-40ad-a7e5-735c44cd8b7d",
          "size": 300,
          "share_type": "PER",
          "publicip_info": [
            {
              "publicip_id": "c754bc9a-16d5-4763-9674-d7561917aa80",
              "publicip_address": "10.xx.xx.9",
              "ip_version": 4,
              "publicip_type": "5_bgp"
            }
          ],
          "tenant_id": "26ae5181a416420998eb2093aaed84d9",
          "bandwidth_type": "bgp",
          "status": "NORMAL"
        },
        {
          "id": "0a673f00-3640-4a13-949e-7049b2916baf",
          "name": "bandwidth123",
          "size": 10,
          "share_type": "PER",
          "publicip_info": [
            {
              "publicip_id": "cec7fb70-2f82-4561-bd83-2121fb642fdc",
              "publicip_address": "10.xx.xx.184",
              "ip_version": 4,
              "publicip_type": "5_bgp"
            }
          ],
          "tenant_id": "26ae5181a416420998eb2093aaed84d9",
          "bandwidth_type": "bgp",
          "status": "NORMAL"
        },
        {
          "id": "0dde1eae-1783-46dc-998c-930fbe261ff9",
          "name": "bandwidth123",
          "size": 100,
          "share_type": "PER",
          "publicip_info": [
            {
              "publicip_id": "24232038-e178-40ad-80e4-5abb75db84be",
              "publicip_address": "10.xx.xx.101",
              "ip_version": 4,
              "publicip_type": "5_bgp"
            }
          ],
          "tenant_id": "26ae5181a416420998eb2093aaed84d9",
          "bandwidth_type": "bgp",
          "status": "NORMAL"
        }
      ]
    }

Status Code

See Status Codes.

Error Code

See Error Codes.