调用DescribeCommonBandwidthPackages接口查询指定地域中共享带宽实例列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeCommonBandwidthPackages

系统规定参数。取值:DescribeCommonBandwidthPackages

IncludeReservationData Boolean false

是否包含未生效的订购数据。取值:

  • false(默认值):不包含。
  • true:包含。
RegionId String cn-hangzhou

共享带宽所在的地域ID。

您可以通过调用DescribeRegions接口获取地域ID。

BandwidthPackageId String cbwp-2ze2ic1xd2qeqk145****

共享带宽实例的ID。

ResourceGroupId String rg-acfmxazb4ph****

资源组ID。

Name String test123

共享带宽实例名称。

PageNumber Integer 1

列表的页码。默认值:1

PageSize Integer 10

分页查询时每页的行数。最大值:50。默认值:10

DryRun Boolean false

是否只预检此次请求。取值:

  • true:发送检查请求,不会查询实例信息。检查项包括是否填写了必需参数、请求格式、实例状态。如果检查不通过,则返回对应错误。如果检查通过,则返回DryRunOperation
  • false(默认值):发送正常请求,通过检查后返回HTTP 2xx状态码并直接进行操作。
SecurityProtectionEnabled Boolean false

是否开启DDoS防护(增强版)。取值:

  • false(默认值):不开启。
  • true:开启。

返回数据

名称 类型 示例值 描述
PageSize Integer 10

分页查询时每页的行数。

RequestId String 20E6FD1C-7321-4DAD-BDFD-EC8769E4AA33

请求ID。

PageNumber Integer 1

列表的页码。

TotalCount Integer 1

列表条目数。

CommonBandwidthPackages Array of CommonBandwidthPackage

共享带宽的详细信息。

CommonBandwidthPackage
ReservationActiveTime String 2018-08-30T16:00:00Z

续费生效时间,格式为YYYY-MM-DDThh:mm:ssZ

Status String Available

共享带宽实例的状态。

  • Available:可用。
  • Modifying:修改中。
CreationTime String 2017-06-28T06:39:20Z

共享带宽实例创建的时间,格式为YYYY-MM-DDThh:mm:ssZ

ReservationOrderType String RENEWCHANGE

续费变配方式。

  • RENEWCHANGE:续费变配。
  • TEMP_UPGRADE:短时升配。
  • UPGRADE:升级。
DeletionProtection Boolean true

是否开启删除保护。

  • true:开启。
  • false:关闭。
ReservationInternetChargeType String PayByBandwidth

变配之后的计费方式。

PayByTraffic:按流量计费。

Ratio Integer 20

共享带宽的保底百分比,仅返回:20

说明 仅中国站支持该参数。
InstanceChargeType String PostPaid

共享带宽实例的计费类型。

PostPaid:按量计费。

RegionId String cn-hangzhou

共享带宽实例所在的地域ID。

BandwidthPackageId String cbwp-bp1t3sm1ffzmshdki****

共享带宽的ID。

ServiceManaged Integer 1

是否为服务账号创建的资源。

  • 0:非服务账号创建。
  • 1:服务账号创建。
Bandwidth String 20

共享带宽的带宽峰值, 单位:Mbps。

Description String none

共享带宽的描述信息。

ExpiredTime String 2019-01-15T03:08:37Z

共享带宽实例的过期时间,格式为YYYY-MM-DDThh:mm:ssZ

ReservationBandwidth String 1000

变配之后的带宽值, 单位:Mbps。

ResourceGroupId String rg-acfmxazb4ph****

资源组ID。

InternetChargeType String PayByBandwidth

共享带宽的计费方式。

PayByTraffic:按流量计费。

BusinessStatus String Normal

共享带宽实例的业务状态。

  • Normal:正常状态。
  • FinancialLocked:欠费。
  • Unactivated:未激活。
Name String abc

共享带宽的名称。

ISP String BGP

线路类型。

  • BGP:BGP(多线)线路。目前全部地域都支持BGP(多线)线路。
  • BGP_PRO:BGP(多线)_精品线路。目前仅中国香港、新加坡、菲律宾(马尼拉)、马来西亚(吉隆坡)、印度尼西亚(雅加达)和泰国(曼谷)地域支持BGP(多线)_精品线路共享带宽。

如果您是单线带宽的白名单用户,返回类型还可能为:

  • ChinaTelecom:中国电信
  • ChinaUnicom:中国联通
  • ChinaMobile:中国移动
  • ChinaTelecom_L2:中国电信L2
  • ChinaUnicom_L2:中国联通L2
  • ChinaMobile_L2:中国移动L2

如果您是杭州金融云用户,返回BGP_FinanceCloud

HasReservationData String false

是否有待生效的订单。

  • false:没有待生效的订单。
  • true:有待生效的订单。
PublicIpAddresses Array of PublicIpAddresse

共享带宽实例中的公网IP地址。

PublicIpAddresse
IpAddress String 47.95.XX.XX

公网IP地址。

AllocationId String eip-bp13e9i2qst4g6jzi****

公网IP的实例ID。

BandwidthPackageIpRelationStatus String BINDED

共享带宽和EIP的关联状态。

  • BINDED:EIP与共享带宽关联完成。
  • BINDING:关联中。
SecurityProtectionTypes Array of String AntiDDoS_Enhanced

安全防护级别。

  • 返回为空时,表示默认的DDoS防护(基础版)。
  • 返回AntiDDoS_Enhanced时,表示DDoS防护(增强版)。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeCommonBandwidthPackages
&IncludeReservationData=false
&RegionId=cn-hangzhou
&BandwidthPackageId=cbwp-2ze2ic1xd2qeqk145****
&ResourceGroupId=rg-acfmxazb4ph****
&Name=test123
&PageNumber=1
&PageSize=10
&DryRun=false
&SecurityProtectionEnabled=false
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeCommonBandwidthPackagesResponse>
    <PageSize>10</PageSize>
    <RequestId>20E6FD1C-7321-4DAD-BDFD-EC8769E4AA33</RequestId>
    <PageNumber>1</PageNumber>
    <TotalCount>1</TotalCount>
    <CommonBandwidthPackages>
        <ReservationActiveTime>2018-08-30T16:00:00Z</ReservationActiveTime>
        <Status>Available</Status>
        <CreationTime>2017-06-28T06:39:20Z</CreationTime>
        <ReservationOrderType>RENEWCHANGE</ReservationOrderType>
        <DeletionProtection>true</DeletionProtection>
        <ReservationInternetChargeType>PayByBandwidth</ReservationInternetChargeType>
        <Ratio>20</Ratio>
        <InstanceChargeType>PostPaid</InstanceChargeType>
        <RegionId>cn-hangzhou</RegionId>
        <BandwidthPackageId>cbwp-bp1t3sm1ffzmshdki****</BandwidthPackageId>
        <ServiceManaged>1</ServiceManaged>
        <Bandwidth>20</Bandwidth>
        <Description>none</Description>
        <ExpiredTime>2019-01-15T03:08:37Z</ExpiredTime>
        <ReservationBandwidth>1000</ReservationBandwidth>
        <ResourceGroupId>rg-acfmxazb4ph****</ResourceGroupId>
        <InternetChargeType>PayByBandwidth</InternetChargeType>
        <BusinessStatus>Normal</BusinessStatus>
        <Name>abc</Name>
        <ISP>BGP</ISP>
        <HasReservationData>false</HasReservationData>
        <PublicIpAddresses>
            <IpAddress>47.95.XX.XX</IpAddress>
            <AllocationId>eip-bp13e9i2qst4g6jzi****</AllocationId>
            <BandwidthPackageIpRelationStatus>BINDED</BandwidthPackageIpRelationStatus>
        </PublicIpAddresses>
        <SecurityProtectionTypes>AntiDDoS_Enhanced</SecurityProtectionTypes>
    </CommonBandwidthPackages>
</DescribeCommonBandwidthPackagesResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 10,
  "RequestId" : "20E6FD1C-7321-4DAD-BDFD-EC8769E4AA33",
  "PageNumber" : 1,
  "TotalCount" : 1,
  "CommonBandwidthPackages" : [ {
    "ReservationActiveTime" : "2018-08-30T16:00:00Z",
    "Status" : "Available",
    "CreationTime" : "2017-06-28T06:39:20Z",
    "ReservationOrderType" : "RENEWCHANGE",
    "DeletionProtection" : true,
    "ReservationInternetChargeType" : "PayByBandwidth",
    "Ratio" : 20,
    "InstanceChargeType" : "PostPaid",
    "RegionId" : "cn-hangzhou",
    "BandwidthPackageId" : "cbwp-bp1t3sm1ffzmshdki****",
    "ServiceManaged" : 1,
    "Bandwidth" : "20",
    "Description" : "none",
    "ExpiredTime" : "2019-01-15T03:08:37Z",
    "ReservationBandwidth" : "1000",
    "ResourceGroupId" : "rg-acfmxazb4ph****",
    "InternetChargeType" : "PayByBandwidth",
    "BusinessStatus" : "Normal",
    "Name" : "abc",
    "ISP" : "BGP",
    "HasReservationData" : "false",
    "PublicIpAddresses" : [ {
      "IpAddress" : "47.95.XX.XX",
      "AllocationId" : "eip-bp13e9i2qst4g6jzi****",
      "BandwidthPackageIpRelationStatus" : "BINDED"
    } ],
    "SecurityProtectionTypes" : [ "AntiDDoS_Enhanced" ]
  } ]
}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidBandwidthPackageIdNumber.NotSupported The number of BandwidthPackageIds exceeds the limit. 共享带宽包的数量超过Quota限制。
400 InvalidResourceGroupId The specified ResourceGroupId does not exist. 资源组ID不存在。
400 OperationUnsupported.ResourceGroupId ResourceGroup is not supported in this region. 资源组功能未打开。
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. 指定的RegionId不存在。

访问错误中心查看更多错误码。