You need to enable JavaScript to run this app.
文档中心
复制全文
下载 pdf
共享带宽包
CreateBandwidthPackage - 创建共享带宽包
复制全文
下载 pdf
CreateBandwidthPackage - 创建共享带宽包
调用 CreateBandwidthPackage 接口,创建一个共享带宽包实例。​
使用说明​
  • 请确保您账户的 可用余额 和可用于共享带宽包的代金券二者总值不小于100.00元人民币,且可用余额不小于0,具体操作请参见 充值操作指引 。​
  • 单个账号在单个地域可创建的共享带宽包为5个。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
Action String 必选 示例值:CreateBandwidthPackage​
要执行的操作,取值:CreateBandwidthPackage。​
​
Version String 必选 示例值:2020-04-01​
API的版本信息,当前版本为 2020-04-01。​
​
BandwidthPackageName String 可选 示例值:bwp-01​
共享带宽包的名称。​
  • 长度限制为1 ~ 128个字符。​
  • 需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。​
  • 不填默认是共享带宽包的ID。​
​
Description String 可选 示例值:This is a bandwidthpackage​
共享带宽包的描述。​
  • 长度限制为0~ 255个字符。​
  • 不填默认为空字符串。​
  • 需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。​
​
ISP String 可选 示例值:BGP​
线路类型,默认为BGP。​
  • BGP:BGP(多线)。​
  • 若您的账号已申请并开通了静态单线权限,则可传入如下取值:​
  • ChinaMobile:中国移动静态单线。​
  • ChinaTelecom:中国电信静态单线。​
  • ChinaUnicom:中国联通静态单线。​
  • 若您的账号已申请并开通了BGP单线权限,则可传入SingleLine_BGP。​
  • 若您的账号已申请并开通了精品BGP权限,则可传入Premium_BGP。​
  • 若您的账号已申请并开通了融合BGP权限,则可传入Fusion_BGP。​
  • 若您的账号已申请并开通了惠选型静态单线权限,则可传入如下取值:​
  • ChinaMobile_Value:中国移动惠选型静态单线。​
  • ChinaUnicom_Value:中国联通惠选型静态单线。​
  • ChinaTelecom_Value:中国电信惠选型静态单线。​
​
BillingType Integer 可选 示例值:4​
共享带宽包的计费方式,取值如下:​
  • 1:包年包月。​
  • 2 : 按带宽上限计费(默认值)。​
  • 3:按主流量计费。​
  • 4 : 按传统95计费(保底比例默认20%)。​
​
Protocol String 可选 示例值:IPv4​
共享带宽包的IP协议,取值如下:​
  • Dual-stack:双栈协议类型。​
  • IPv4:IPv4协议类型协议(默认值)。​
仅BillingType传2或4时,本参数支持传入Dual-stack。​
​
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,且创建后不支持转换安全防护类型,请谨慎选择。​
​
ProjectName String 可选 示例值:Project_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。​
​
​
​
返回参数​
RequestId String 示例值:2021062415303301022514515207C4****​
请求ID。​
​
BandwidthPackageId String 示例值:bwp-2zeo05qre24nhrqpy****​
新建的共享带宽包实例的ID。​
​
​
​
请求示例​
​
GET /?Action=CreateBandwidthPackage&Version=2020-04-01&BandwidthPackageName=bwp-01&ISP=BGP&Bandwidth=10 HTTP/1.1​
Host: vpc.cn-beijing.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****"​
}​
}​
​
错误码​
公共错误码请参见公共错误码。​
​
状态码​
错误码​
错误信息​
说明​
400​
DryRunOperation​
Exception raised to indicate a successfully authorized action when the DryRun flag is set to true.​
该请求设置为DryRun操作,操作授权已获得许可,但未被实际执行。​
400​
InsufficientIspBandwidthPackage​
The specified ISP does not contain enough free bandwidth package to fulfill your request.​
指定ISP下的共享带宽包资源不足。​
400​
InvalidBandwidth.Malformed​
The specified bandwidth is malformed. Ensure that bandwidth is not smaller than the limit.​
指定的带宽不合法。请确保带宽不小于限制。​
400​
InvalidBillingType.Malformed​
The specified billing type is malformed.​
指定的计费类型不合法。​
400​
InvalidDescription.Malformed​
The specified description is malformed.​
指定的描述格式不合法。请修复描述格式后重试。​
400​
InvalidDescription.Malformed​
The specified description is malformed. Ensure the maximum length of description is 255.​
指定的描述格式不合法。描述长度不能超过255个字符。​
400​
InvalidDualStackSpecificEgress.Malformed​
The specified bandwidth package with specific egress does not support dual-stack.​
指定出口的共享带宽包不支持开启双栈。​
400​
InvalidISP.NotSupport​
Dual-stack bandwidth package does not support specified isp.​
双栈共享带宽包不支持指定的线路类型。​
400​
InvalidMonthPeriod.Malformed​
The specified monthly period is malformed. Monthly period only supports 1~9, 12, 24, 36.​
指定的预付费按月购买时长不合法。预付费按月购买时长只支持1~9, 12, 24, 36月。​
400​
InvalidName.Malformed​
The specified name is malformed.​
指定的名称格式不合法。请修复名称格式后重试。​
400​
InvalidName.Malformed​
The specified name is malformed. Ensure the maximum length of name is 128.​
指定的名称格式不合法。名称长度不能超过128个字符。​
400​
InvalidPeriodUnit.Malformed​
The specified period unit is malformed. Pre billing period unit can only be Month or Year.​
指定的预付费类型时长单位不合法。预付费类型时长单位只能为月或年。​
400​
InvalidProtocol.Malformed​
The specified protocol is malformed.​
指定的协议类型不合法。​
400​
InvalidProtocol.Malformed​
The specified protocol is malformed. AntiDDoS enhanced bandwidth package only supports IPv4.​
指定的协议类型不支持。增强防护共享带宽包仅支持IPv4。​
400​
InvalidRenewType.Malformed​
The specified renew type is malformed. Renew type must be 1, 2, or 3.​
指定的续费类型不合法。续费类型只允许为1, 2 或 3。​
400​
InvalidSecurityProtectionTypes.Malformed​
The specified security protection type is malformed. Security protection type only support AntiDDoS_Enhanced.​
指定的安全防护级别不支持。安全防护级别当前仅支持AntiDDoS_Enhanced。​
400​
InvalidTag.Disorder​
The specified index order of tag is malformed.​
指定标签的索引顺序参数格式不合法。​
400​
InvalidTagKey.Malformed​
The specified parameter tag key is invalid.​
标签键不合法。​
400​
InvalidTagValue.Malformed​
The specified parameter tag value is invalid.​
标签值不合法。​
400​
InvalidYearPeriod.Malformed​
The specified yearly period is malformed. Yearly period only supports 1~3.​
指定的预付费按年购买时长不合法。预付费按年购买时长只支持1~3年。​
400​
LimitExceeded.Bandwidth​
You've reached the limit on the bandwidth that you can create.​
已达到带宽上限。​
400​
LimitExceeded.SecurityProtectionTypes​
You've reached the limit on the number of security protection types.​
已达到安全防护类型的上限。​
400​
LimitExceeded.Tags​
You've reached the limit on the number of tags that you can operate at one time.​
已达到单次可操作标签数量的上限。​
400​
OrderError​
Failed to create an order in one step.​
创建订单并支付失败。​
400​
PreOrderError​
Failed to create pre order.​
创建配置单失败。​
400​
QuotaExceeded.BandwidthPackage​
You've reached the limit on the number of bandwidth package that you can create.​
已到达可创建共享带宽包的数量上限。​
400​
QuotaExceeded.DualStackBandwidthPackage​
You've reached the limit on the number of dual-stack bandwidth package that you can create.​
已到达可创建双栈共享带宽包的数量上限。​
400​
QuotaExceeded.PremiumBGPBandwidthPackage​
You've reached the limit on the number of premium BGP bandwidth package that you can create.​
已到达可创建精品BGP类型共享带宽包的数量上限。​
400​
UnsupportedOperation​
The request on the specified instance is denied due to the account balance and available vouchers are less than 100 yuan in total.​
因账户余额及可用代金券共不足100元,对于该实例的操作请求被拒绝。​
400​
UnsupportedOperation​
The request on the specified instance is denied due to the account in arrears status.​
因账户处于欠费状态,对于该实例的操作请求被拒绝。​
403​
Forbidden.Ipv6IspType​
You are not authorized to create this type IPv6 CIDR.​
无权限创建该ISP类型的IPv6网段。​
403​
Forbidden​
The premium BGP line specific egress function is not support.​
精品BGP线路指定出口功能暂不支持。​
403​
Forbidden​
You are not authorized to create Anti DDos bandwidth package.​
无权限创建增强防护类型共享带宽包。​
403​
Forbidden​
You are not authorized to create BGP SingleLine elastic IP address.​
无权限创建BGP单线类型EIP地址。​
403​
Forbidden​
You are not authorized to create Static BGP elastic IP address.​
无权限创建静态BGP类型EIP地址。​
403​
Forbidden​
You are not authorized to create Unet elastic IP address.​
无权限创建融合骨干网类型EIP地址。​
403​
Forbidden​
You are not authorized to create bandwidth package.​
无权限创建共享带宽包。​
403​
Forbidden​
You are not authorized to create fusion BGP elastic IP address.​
无权限创建融合BGP类型EIP地址。​
403​
Forbidden​
You are not authorized to create premium BGP elastic IP address.​
无权限创建精品BGP类型EIP地址。​
403​
Forbidden​
You are not authorized to create single-line elastic IP address.​
无权限创建静态单线类型EIP地址。​
403​
Forbidden​
You are not authorized to create single-line value elastic IP address.​
无权限创建静态单线惠选型类型EIP地址。​
403​
Forbidden​
You are not authorized to perform operations on create IPv6 gateway.​
无权限创建IPv6网关。​
403​
Forbidden​
You are not authorized to use specific egress.​
无权限使用IP指定出口功能。​
404​
InvalidISP.NotFound​
The specified ISP does not exist.​
指定的ISP不存在。​
404​
InvalidProject.NotFound​
The specified Project does not exist.​
指定的项目不存在。​
404​
InvalidSpecificEgress.NotFound​
The specific egress does not exist.​
指定出口不存在。​
404​
InvalidZoneId.NotFound​
The specified zone does not exist.​
指定的可用区不存在。​
​
​
最近更新时间:2026.08.06 10:29:22
这个页面对您有帮助吗?
有用
有用
无用
无用