Help Center/ Cloud Connect/ API Reference/ API/ Specifications/ Querying the Specifications of Bandwidth Packages for Cross-Geographic-Region Communication
Updated on 2025-10-16 GMT+08:00

Querying the Specifications of Bandwidth Packages for Cross-Geographic-Region Communication

Function

This API is used to query the specifications of bandwidth packages for communications across geographic regions.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v3/{domain_id}/ccaas/bandwidth-packages/area-specifications

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

domain_id

Yes

String

Account ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Number of records returned on each page.

The value ranges from 1 to 2000.

offset

No

Integer

The index offset. The query starts from the next piece of data indexed by this parameter. This parameter is not required when you query the resources on the first page. The value in the response returned for querying the resources on the previous page will be included in this parameter for querying the resources on subsequent pages. This parameter is not available when action is set to count. If action is set to filter, the value must be a positive integer, and the default value is 0.

local_area_id

No

Array of strings

ID of a geographic region for querying the list of bandwidth package specifications.

remote_area_id

No

Array of strings

ID of another geographic region for querying the list of bandwidth package specifications.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

User token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

request_id

String

Request ID.

page_info

PageInfo object

Pagination query information.

area_specifications

Array of AreaBandwidthPackageSpecification objects

List of bandwidth package specifications in a geographic region.

Table 5 PageInfo

Parameter

Type

Description

next_marker

String

Backward pagination identifier.

previous_marker

String

Forward pagination identifier.

current_count

Integer

Number of the resources in the current list.

Table 6 AreaBandwidthPackageSpecification

Parameter

Type

Description

local_area_id

String

Local geographic region. Cloud Connect is available in the following geographic regions:

  • Chinese-Mainland: Chinese mainland

  • Asia-Pacific: Asia Pacific

  • Africa: Africa

  • Western-Latin-America: Western Latin America

  • Eastern-Latin-America: Eastern Latin America

  • Northern-Latin-America: Northern Latin America

remote_area_id

String

Remote geographic region. Cloud Connect is available in the following geographic regions:

  • Chinese-Mainland: Chinese mainland

  • Asia-Pacific: Asia Pacific

  • Africa: Africa

  • Western-Latin-America: Western Latin America

  • Eastern-Latin-America: Eastern Latin America

  • Northern-Latin-America: Northern Latin America

id

String

Bandwidth package specification ID.

spec_codes

Array of SpecificationCodeInfo objects

Bandwidth package specifications.

Table 7 SpecificationCodeInfo

Parameter

Type

Description

spec_code

String

Specification code of the bandwidth package.

billing_mode

Integer

Billing mode of the bandwidth package on the Chinese mainland website or the International website.

  • 1: yearly/monthly on the Chinese mainland website

  • 2: yearly/monthly on the International website

  • 3: pay-per-use on the Chinese mainland website

  • 4: pay-per-use on the International website

  • 5: 95th percentile bandwidth billing on the Chinese mainland website

  • 6: 95th percentile bandwidth billing on the International website

  • 7: daily 95th percentile bandwidth billing on the Chinese mainland website

  • 8: daily 95th percentile bandwidth billing on the International website

max_bandwidth

Long

Maximum bandwidth.

mim_bandwidth

Long

Minimum bandwidth.

Example Requests

Querying the specifications of bandwidth packages

GET https://{cc_endpoint}/v3/{domain_id}/ccaas/bandwidth-package/area-specifications

Example Responses

Status code: 200

Bandwidth package specifications queried.

{
  "request_id" : "XXX",
  "area_specifications" : [ {
    "id" : "XXX",
    "local_area_id" : "area-abc",
    "remote_area_id" : "area-abc",
    "spec_codes" : [ {
      "billing_mode" : 1,
      "spec_code" : "bandwidth.abctoabc",
      "max_bandwidth" : 100,
      "mim_bandwidth" : 0
    } ]
  } ],
  "page_info" : {
    "next_marker" : "XXX",
    "previous_marker" : "XXX",
    "current_count" : 1
  }
}

SDK Sample Code

The SDK sample code is as follows.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.huaweicloud.sdk.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.GlobalCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.cc.v3.region.CcRegion;
import com.huaweicloud.sdk.cc.v3.*;
import com.huaweicloud.sdk.cc.v3.model.*;


public class ListAreaBandwidthPackageSpecificationsSolution {

    public static void main(String[] args) {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        String ak = System.getenv("CLOUD_SDK_AK");
        String sk = System.getenv("CLOUD_SDK_SK");

        ICredential auth = new GlobalCredentials()
                .withAk(ak)
                .withSk(sk);

        CcClient client = CcClient.newBuilder()
                .withCredential(auth)
                .withRegion(CcRegion.valueOf("<YOUR REGION>"))
                .build();
        ListAreaBandwidthPackageSpecificationsRequest request = new ListAreaBandwidthPackageSpecificationsRequest();
        try {
            ListAreaBandwidthPackageSpecificationsResponse response = client.listAreaBandwidthPackageSpecifications(request);
            System.out.println(response.toString());
        } catch (ConnectionException e) {
            e.printStackTrace();
        } catch (RequestTimeoutException e) {
            e.printStackTrace();
        } catch (ServiceResponseException e) {
            e.printStackTrace();
            System.out.println(e.getHttpStatusCode());
            System.out.println(e.getRequestId());
            System.out.println(e.getErrorCode());
            System.out.println(e.getErrorMsg());
        }
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import GlobalCredentials
from huaweicloudsdkcc.v3.region.cc_region import CcRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcc.v3 import *

if __name__ == "__main__":
    # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak = os.environ["CLOUD_SDK_AK"]
    sk = os.environ["CLOUD_SDK_SK"]

    credentials = GlobalCredentials(ak, sk)

    client = CcClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(CcRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = ListAreaBandwidthPackageSpecificationsRequest()
        response = client.list_area_bandwidth_package_specifications(request)
        print(response)
    except exceptions.ClientRequestException as e:
        print(e.status_code)
        print(e.request_id)
        print(e.error_code)
        print(e.error_msg)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/global"
    cc "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cc/v3"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cc/v3/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/cc/v3/region"
)

func main() {
    // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak := os.Getenv("CLOUD_SDK_AK")
    sk := os.Getenv("CLOUD_SDK_SK")

    auth := global.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        Build()

    client := cc.NewCcClient(
        cc.CcClientBuilder().
            WithRegion(region.ValueOf("<YOUR REGION>")).
            WithCredential(auth).
            Build())

    request := &model.ListAreaBandwidthPackageSpecificationsRequest{}
	response, err := client.ListAreaBandwidthPackageSpecifications(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.

Status Codes

Status Code

Description

200

Bandwidth package specifications queried.

Error Codes

See Error Codes.