You need to enable JavaScript to run this app.
导航

CreateBandwidthPackage

最近更新时间2024.04.18 17:03:26

首次发布时间2022.03.01 09:32:28

调用 CreateBandwidthPackage 接口,创建一个共享带宽包实例。

调用说明

调试

请求参数

参数名称
类型
是否必选
示例值
描述
ActionStringCreateBandwidthPackage要执行的操作,取值:CreateBandwidthPackage。
VersionString2020-04-01API的版本信息,当前版本为2020-04-01。

BandwidthPackageName

String

bwp-01

共享带宽包的名称。

  • 长度限制为1 ~ 128个字符。
  • 需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。
  • 不填默认是共享带宽包的ID。

Description

String

This is a bandwithpackage

共享带宽包的描述。

  • 长度限制为0~ 255个字符。
  • 不填默认为空字符串。
  • 需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。

ISP

String

BGP

线路类型,默认为BGP。

  • BGP:BGP(多线)。
  • 若您的账号已申请并开通了静态单线权限,则可传入如下取值:
    • ChinaMobile:中国移动静态单线。
    • ChinaTelecom:中国电信静态单线。
    • ChinaUnicom:中国联通静态单线。
  • 若您的账号已申请并开通了BGP单线权限,则可传入SingleLine_BGP。
  • 若您的账号已申请并开通了融合BGP权限,则可传入Fusion_BGP。
  • 若您的账号已申请并开通了惠选型静态单线权限,则可传入如下取值:
    • ChinaMobile_Value:中国移动惠选型静态单线。
    • ChinaUnicom_Value:中国联通惠选型静态单线。
    • ChinaTelecom_Value:中国电信惠选型静态单线。

BillingType

Integer

4

共享带宽包的计费方式,取值如下:

  • 1:包年包月。
  • 2 : 按带宽上限计费(默认值)。
  • 3:按主流量计费。
  • 4 : 按传统95计费。

Protocol

String

IPv4

共享带宽包的IP协议,取值如下:

  • IPv4:IPv4协议
  • IPv6:IPv6协议。

BillingType传2或4时,本参数支持传入IPv6。

Bandwidth

Integer

10

共享带宽包的带宽上限,单位:Mbps。

  • BillingType传入1:取值范围5 ~ 5000。
  • BillingType传入2:取值范围2 ~ 5000。
  • BillingType传入3:取值范围2 ~ 2000。
  • BillingType传入4:取值范围2 ~ 5000。

PeriodUnit

Integer

1

购买包年包月共享带宽包时长的单位,取值如下:

  • 1:月(默认值)。
  • 2 :年。

Period

Integer

1

购买包年包月共享带宽包的时长,默认“1”。

  • PeriodUnit传入1,Period取值范围:1~9、12、24、36。
  • PeriodUnit传入2,Period取值范围:1~3。

SecurityProtectionTypes.N

String

SecurityProtectionTypes.1=AntiDDoS_Enhanced

共享带宽包的的安全防护类型。

  • 参数 - N:表示安全防护类型的序号,当前仅支持取1。
  • 取值:
    • AntiDDoS_Enhanced:创建增强防护类型的共享带宽包,即创建支持添加基础防护类型公网IP的共享带宽包。
    • 不填则表示基础防护类型的共享带宽包,即创建支持添加增强防护类型公网IP的共享带宽包。

说明

共享带宽包仅支持添加和其安全防护类型相同的公网IP,且创建后不支持转换安全防护类型,请谨慎选择。

ProjectNameStringProject_1共享带宽包所属项目的名称。不填默认加入default项目。

Tags.N.Key

String

Tags.1.Key=key1&Tags.2.Key=key2

用户标签的标签键。

  • 参数 - N:表示标签键的序号,取值范围:1~50。
  • 多个标签键之间用&分隔。
  • 不能以 volc:sys:开头,包括任意大小写形式。
  • 长度取值范围为1~128字符,允许输入各国语言文字、数字、空格( )、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、中划线(-)和@(@)。
  • 若标签键开头或结尾存在空格,系统会自动为其去除。

说明

同一资源的标签键不允许重复。

Tags.N.Value

String

Tags.1.Value=value1&Tags.2.Value=value2

用户标签的标签值。

  • 参数 - N:表示标签值的序号,取值范围:1~50。
  • 多个标签值之间用&分隔。
  • 长度取值范围为0~256字符,不填默认为空。
  • 允许输入各国语言文字、数字、空格( )、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、中划线(-)和@(@)。
  • 大小写敏感。
  • 若标签值开头或结尾存在空格,系统会自动为其去除。

说明

若传入该参数,则必须先传入Tags.N.Key

返回数据

参数名称
类型
示例值
描述
RequestIdString2021062415303301022514515207C4****请求ID。
BandwidthPackageIdStringbwp-2zeo05qre24nhrqpy****新建的共享带宽包实例的ID。

请求示例

GET /?Action=CreateBandwidthPackage&Version=2020-04-01&BandwidthPackageName=bwp-01&ISP=BGP&Bandwidth=10 HTTP/1.1
Host: open.volcengineapi.com
Service: vpc
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "2021062415303301022514515207C4****",
        "Action": "CreateBandwidthPackage",
        "Version": "2020-04-01",
        "Service": "vpc",
        "Region": "cn-beijing"
    },
    "Result":{
        "RequestId": "2021062415303301022514515207C4****",
        "BandwidthPackageId": "bwp-2zeo05qre24nhrqpy****"
    }
}

错误码

公共错误码,请参见 公共错误码 。

HttpCode
错误码
错误信息
描述
400InsufficientIspBandwidthPackageThe specified ISP does not contain enough free bandwidth package to fulfill your request.指定ISP下的共享带宽包资源不足。
400InvalidBandwidth.MalformedThe specified bandwidth is malformed. Ensure that bandwidth is not smaller than the limit.指定的带宽不合法。请确保带宽不小于限制。
400InvalidDescription.MalformedThe specified description is malformed. Ensure the maximum length of description is 255.指定的描述格式不合法。描述长度不能超过255个字符。
400InvalidDescription.MalformedThe specified description is malformed.指定的描述格式不合法。请修复描述格式后重试。
400InvalidISP.NotSupportIPv6 bandwidth package does not support specified isp.IPv6共享带宽包不支持指定的线路类型。
400InvalidMonthPeriod.MalformedThe specified monthly period is malformed. Monthly period only supports 1~9, 12, 24, 36.指定的预付费按月购买时长不合法。预付费按月购买时长只支持1~9, 12, 24, 36月。
400InvalidName.MalformedThe specified name is malformed. Ensure the maximum length of name is 128.指定的名称格式不合法。名称长度不能超过128个字符。
400InvalidName.MalformedThe specified name is malformed.指定的名称格式不合法。请修复名称格式后重试。
400InvalidPeriodUnit.MalformedThe specified period unit is malformed. Pre billing period unit can only be Month or Year.指定的预付费类型时长单位不合法。预付费类型时长单位只能为月或年。
400InvalidProtocol.MalformedThe specified protocol is malformed.指定的协议类型不合法。
400InvalidProtocol.MalformedThe specified protocol is malformed. AntiDDoS enhanced bandwidth package only supports IPv4.指定的协议类型不支持。增强防护共享带宽包仅支持IPv4。
400InvalidRenewType.MalformedThe specified renew type is malformed. Renew type must be 1, 2, or 3.指定的续费类型不合法。续费类型只允许为1, 2 或 3。
400InvalidSecurityProtectionTypes.MalformedThe specified security protection type is malformed. Security protection type only support AntiDDoS_Enhanced.指定的安全防护级别不支持。安全防护级别当前仅支持AntiDDoS_Enhanced。
400InvalidTag.DisorderThe specified index order of tag is malformed.指定标签的索引顺序参数格式不合法。
400InvalidTagKey.MalformedThe specified parameter tag key is invalid.标签键不合法。
400InvalidTagValue.MalformedThe specified parameter tag value is invalid.标签值不合法。
400InvalidYearPeriod.MalformedThe specified yearly period is malformed. Yearly period only supports 1~3.指定的预付费按年购买时长不合法。预付费按年购买时长只支持1~3年。
400LimitExceeded.BandwidthYou've reached the limit on the bandwidth that you can create.已达到带宽上限。
400LimitExceeded.SecurityProtectionTypesYou've reached the limit on the number of security protection types.已达到安全防护类型的上限。
400LimitExceeded.TagsYou've reached the limit on the number of tags that you can operate at one time.已达到单次可操作标签数量的上限。
400OrderErrorFailed to create an order in one step.创建订单并支付失败。
400PreOrderErrorFailed to create pre order.创建配置单失败。
400QuotaExceeded.BandwidthPackageYou've reached the limit on the number of bandwidth package that you can create.已到达可创建共享带宽包的数量上限。
400QuotaExceeded.IPv6BandwidthPackageYou've reached the limit on the number of IPv6 bandwidth package that you can create.已到达可创建IPv6共享带宽包的数量上限。
400UnsupportedOperationThe request on the specified instance is denied due to the account balance and available vouchers are less than 100 yuan in total.因账户余额及可用代金券共不足100元,对于该实例的操作请求被拒绝。
400UnsupportedOperationThe request on the specified instance is denied due to the account in arrears status.因账户处于欠费状态,对于该实例的操作请求被拒绝。
403ForbiddenYou are not authorized to create bandwidth package.无权限创建共享带宽包。
403ForbiddenYou are not authorized to create fusion BGP elastic IP address.无权限创建融合BGP类型EIP地址。
403ForbiddenYou are not authorized to create single-line value elastic IP address.无权限创建静态单线惠选型类型EIP地址。
403ForbiddenYou are not authorized to create Anti DDos bandwidth package.无权限创建增强防护类型共享带宽包。
403ForbiddenYou are not authorized to perform operations on create IPv6 gateway.无权限创建IPv6网关。
403ForbiddenYou are not authorized to create Static BGP elastic IP address.无权限创建静态BGP类型EIP地址。
403ForbiddenYou are not authorized to create single-line elastic IP address.无权限创建静态单线类型公网IP地址。
403ForbiddenYou are not authorized to create BGP SingleLine elastic IP address.无权限创建BGP单线类型EIP地址。
404InvalidISP.NotFoundThe specified ISP does not exist.指定的ISP不存在。
404InvalidProject.NotFoundThe specified Project does not exist.指定的项目不存在。