Help Center> Elastic IP > API Reference> APIs> Bandwidth Add-On Packages> Querying Bandwidth Add-On Packages
Updated on 2023-12-25 GMT+08:00

Querying Bandwidth Add-On Packages

Function

This API is used to query bandwidth add-on packages.

URI

GET /v2/{project_id}/bandwidthpkgs

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

bandwidthpkgs

Array of BandwidthPkgResp objects

List of bandwidth add-on packages

bandwidthpkgs_links

Array of BandwidthPkgPage objects

Page turning display

Table 3 BandwidthPkgResp

Parameter

Type

Description

resourceId

String

  • Bandwidth add-on package ID
  • The value can contain 1 to 64 characters, including digits, letters, underscores (_), and hyphens (-).

resourceName

String

  • Bandwidth add-on package name

processedTime

String

  • Time (UTC) when the bandwidth add-on package is created. The value is in the format of 2016-03-28T00:00:00Z.

bandwidthId

String

  • ID of the bandwidth that uses the bandwidth add-on package

pkgSize

Integer

  • Bandwidth add-on package size
  • Value range: > 1 Mbit/s; Bandwidth add-on package size + Bandwidth size < Bandwidth upper limit defined by cloud service bandwidth API

tenantId

String

  • Tenant ID

billingInfo

String

  • Information about the bandwidht add-on package order. If this parameter is not empty, the value is in the format of orderId:productId.

startTime

String

  • Start time (UTC) when the bandwidth add-on package takes effect. The value is in the format of 2016-03-28T00:00:00Z.
  • Value range: startTime must be later than or the same as processedTime.

endTime

String

  • End time (UTC) when the bandwidth add-on package takes effect. The value is in the format of 2016-03-28T00:00:00Z.
  • Value range: endTime must be later than startTime.

status

String

  • Status of the bandwidth add-on package. Only administrators can change the status.
  • Value range: pending, active, completed, and error
Table 4 BandwidthPkgPage

Parameter

Type

Description

href

String

  • Link

rel

String

  • Page turning mark

Example Request

GET /v2/{project_id}/bandwidthpkgs

Example Response

Status code: 200

Normal response to the GET operation

{
  "bandwidthpkgs" : [ {
    "resourceId" : "0003cb59-eaa4-4c05-85bd-4b4cc806992c",
    "resourceName" : "bandwidthpkg-test",
    "pkgSize" : "5",
    "processedTime" : "2018-10-13 20:21:17.465126",
    "bandwidthId" : "6c50f312-2eab-4f08-9da2-b41b0801d8be",
    "tenantId" : "e136ddf186a84dff9c5d5364de79f4e4",
    "billingInfo" : "CS1810091953KI13V:edcb94a885a84ed3a3fdf8ea4d2741da",
    "startTime" : "2018-10-24 21:2:17.465126",
    "endTime" : "2018-10-28 21:2:17.465126",
    "status" : "pending"
  } ],
  "bandwidthpkgs_links" : [ {
    "href" : "https://vpc.br-iaas-odin1.ulanqab.huawei.com:443/v2/0605767f6f00d5762ff9c001c70e7359/bandwidthpkgs?limit=2000&marker=4fc74637-753f-46cb-af8c-b58528887a79&page_reverse=true",
    "rel" : "previous"
  } ]
}

Status Code

See Status Codes.

Error Code

See Error Codes.