You need to enable JavaScript to run this app.
文档中心
私有网络

私有网络

复制全文
下载 pdf
子网
ModifySubnetAttributes - 修改子网信息
复制全文
下载 pdf
ModifySubnetAttributes - 修改子网信息
调用 ModifySubnetAttributes 接口,修改指定子网的信息。​
使用说明​
  • 以下可选参数如不配置,则保持原有配置。​
  • ModifySubnetAttributes 为异步接口,即返回请求ID时,系统后台仍在配置。您可调用 DescribeSubnetAttributes 查看子网的状态,Pending表示配置中,Available 表示配置完成。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:ModifySubnetAttributes​
接口名称。当前 API 的名称为ModifySubnetAttributes。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为 2020-04-01。​
​
SubnetId String 必选 示例值:subnet-bp1qtch57ywecf****​
待修改信息的子网的ID。​
您可以调用 DescribeSubnets 接口,查询子网的ID。​
​
SubnetName String 可选 示例值:test​
子网的名称。​
  • 长度限制为1 ~ 128个字符。​
  • 需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短横线(-)。​
​
Description String 可选 示例值:This is my subnet.​
子网的描述信息。​
  • 长度限制为0~ 255个字符。​
  • 需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。​
​
EnableIpv6 Boolean 可选 示例值:false​
开启/关闭IPv6功能。仅当子网所属的VPC开通IPv6功能时,可配置此参数。​
请严格按照以下枚举值的大小写输入,不要传入其他取值。​
  • true:开启。​
  • false:关闭。仅当子网内没有分配IPv6地址的云资源时,可配置此取值。​
说明​
IPv6功能正在邀测中,暂仅支持完成 企业认证 的账号申请试用,如需试用,请联系客户经理。​
​
Ipv6CidrBlock Integer 可选 示例值:99​
子网IPv6网段的最后8比特位(子网的掩码固定为/64)。​
  • 取值范围:0~255。掩码固定为/64。​
  • 该参数仅当EnableIpv6设置为true时支持配置。​
说明​
传入参数VpcIpv6CidrBlock后,此参数不生效。​
​
VpcIpv6CidrBlock String 可选 示例值:2408:XXXX:0:a600::/64​
子网的的IPv6网段。掩码固定为/64。​
说明​
传入本参数后,参数Ipv6CidrBlock不生效。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId String 示例值:2021062415303301022514515207C4****​
请求ID。​
​
​
​
请求示例​
​
GET /?Action=ModifySubnetAttributes&Version=2020-04-01&SubnetId=subnet-bp15qtc7ywecf****&Description=This is my subnet&SubnetName=subnet-1 HTTP/1.1​
Host: vpc.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/vpc/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "ModifySubnetAttributes",​
"Version": "2020-04-01",​
"Service": "vpc",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "2021062415303301022514515207C4****"​
}​
}​
​
错误码​
​
状态码​
错误码​
错误信息​
说明​
400​
DryRunOperation​
Exception raised to indicate a successfully authorized action when the DryRun flag is set to true.​
该请求设置为DryRun操作,操作授权已获得许可,但未被实际执行。​
400​
InvalidCidr.Malformed​
The specified cidr block 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​
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​
InvalidParameter.EnableIpv6​
Operation failed because IPv6 for the subnet is enabled already.​
子网已经开启IPv6。​
400​
InvalidParameter.EnableIpv6​
Operation failed because IPv6 for the vpc of this subnet is not enabled.​
子网所属的VPC尚未开启IPv6。​
400​
InvalidParameter.EnableIpv6​
Operation failed because IPv6 is not enabled for the subnet.​
子网未开启IPv6。​
400​
InvalidParameter.Ipv6CidrBlock​
Specified subnet IPv6CidrBlock is invalid.​
子网IPv6网段不合法。​
400​
InvalidSpecificEgress.Mismatch​
The specific egress of the IPv6 does not match with the zone if subnet.​
子网的可用区与公网IPv6的指定出口不匹配。​
400​
InvalidSubnet.EnableIPv6​
Operation failed because disabling IPv6 is not allowed for the IPv6 only subnet.​
不允许关闭IPv6Only类型子网的IPv6功能。​
400​
InvalidSubnet.InUse​
The specified subnet has dependent resource of an elastic network interface.​
指定的子网包含网卡,无法删除。​
400​
InvalidSubnet.InvalidStatus​
The specified subnet is not in the correct status for the request.​
指定的子网所处的状态无法响应该请求。​
400​
InvalidSubnetCidr.Malformed​
The specified subnet cidr is malformed. If you are specifying a subnet cidr, ensure the CIDR of the subnet must fall into the range of the CIDR of the VPC to which the subnet belongs to.​
指定的子网网段不合法。请确保子网网段必须从属于所在VPC的网段。​
400​
InvalidVpc.InvalidStatus​
The specified VPC is not in the correct status for the request.​
指定的VPC所处状态无法响应该请求。​
400​
InvalidVpcIPv6Cidr.Malformed​
The specified vpc IPv6 cidr is malformed. If you are specifying a vpc IPv6 cidr, ensure the CIDR must fall into the range of the CIDR of the VPC to which the subnet belongs to.​
指定的VPC IPv6网段不合法。请确保该网段必须从属于所在VPC的网段。​
404​
InvalidSubnet.NotFound​
The specified subnet does not exist.​
指定的子网不存在。​
409​
InvalidRouteCidr.Conflict​
The specified CIDR block conflicts with that of another route in your route table.​
指定的CIDR地址块与所属路由表中另一个规则CIDR地址块冲突。​
409​
InvalidSubnetCidr.Conflict​
The specified CIDR block conflicts with that of another subnet in your VPC.​
指定的CIDR地址块与所属VPC中另一个子网CIDR地址块冲突。​
409​
InvalidSubnetCidr.IPv6Conflict​
The specified IPv6 CIDR block conflicts with that of another subnet in your VPC.​
指定的IPv6 CIDR地址块与所属VPC中另一个子网IPv6 CIDR地址块冲突。​
​
​
最近更新时间:2026.09.23 11:10:24
这个页面对您有帮助吗?
有用
有用
无用
无用