UpdateTransitRouterVpcAttachmentZones - 修改专有网络VPC连接关联的可用区和交换机
调用UpdateTransitRouterVpcAttachmentZones接口修改专有网络VPC(Virtual Private Cloud)连接关联的可用区和交换机。
接口说明
-
在为 VPC 连接添加可用区和交换机时,请确保交换机中拥有一个空闲的 IP 地址,在修改过程中,企业版转发路由器将在交换机中创建一个弹性网卡 ENI(Elastic Network Interface)(该 ENI 将占用交换机下的一个 IP 地址),作为 VPC 实例与企业版转发路由器流量互通的接口。
-
UpdateTransitRouterVpcAttachmentZones 接口属于异步接口,即系统会先返回一个 RequestId,但该 VPC 连接并未修改完成,系统后台的修改任务仍在进行。您可以调用 ListTransitRouterVpcAttachments 接口查询 VPC 连接的状态。
当 VPC 连接处于 Modifying 状态时,表示 VPC 连接正在修改中,在该状态下,您只能对 VPC 连接执行查询操作,不能执行其他操作。
当 VPC 连接处于 Attached 状态时,表示 VPC 连接修改完成。
-
VPC 连接 ID下至少有一个 VPC 连接的可用区和交换机不能全部删除。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
cen:UpdateTransitRouterVpcAttachmentZones |
update |
*TransitRouterVpcAttachment
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
123e4567-e89b-12d3-a456-42665544**** |
DryRun |
boolean |
否 |
是否只预检此次请求。取值:
|
false |
TransitRouterAttachmentId |
string |
是 |
VPC 连接 ID。 |
tr-attach-9bbqyygouv4cpn**** |
AddZoneMappings |
array |
否 |
待为 VPC 连接添加的可用区和交换机列表。 |
|
object |
否 |
待 VPC 连接添加的交换机 ID。 一次最多支持添加 10 个交换机。 |
||
VSwitchId |
string |
否 |
待为 VPC 连接添加的交换机 ID。 一次最多支持添加 10 个交换机。
当填写 VSwitchId 后 ZoneId 为必填。 |
vsw-wz988dda8ldm4uvmx**** |
ZoneId |
string |
否 |
待为 VPC 连接添加的交换机所属的可用区 ID。 一次最多支持添加 10 个交换机。 当填写 ZoneId 后 VSwitchId 为必填。 |
cn-hangzhou-h |
RemoveZoneMappings |
array |
否 |
待为 VPC 连接删除的可用区和交换机列表。 |
|
object |
否 |
待为 VPC 连接删除的可用区和交换机列表。 一次最多支持输入 10 组可用区和交换机信息。 |
||
VSwitchId |
string |
否 |
待为 VPC 连接删除的交换机 ID。 一次最多支持删除 10 个交换机。 当填写 VSwitchId 后 ZoneId 为必填。 |
vsw-wz9f5izl6wshndmta**** |
ZoneId |
string |
否 |
待为 VPC 连接删除的交换机所属的可用区 ID。 一次最多支持删除 10 个交换机。 当填写 ZoneId 后 VSwitchId 为必填。 |
cn-hangzhou-i |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
返回结果。 |
||
RequestId |
string |
请求 ID。 |
595AE52F-49FF-5788-A677-0DD1467941A1 |
示例
正常返回示例
JSON
格式
{
"RequestId": "595AE52F-49FF-5788-A677-0DD1467941A1"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | IllegalParam.ZoneId | The specified ZoneId is illegal. | 传入的可用区非法 |
400 | IncorrectStatus.TransitRouterAttachment | The status of TransitRouterAttachment is incorrect. | 当前TransitRouterAttachment的状态不支持该操作,请稍后重试。 |
400 | IllegalParam.VSwitchId | VSwitchId is illegal. | 参数中指定的VSwitchId不合法。 |
400 | InvalidTransitRouterAttachmentId.NotFound | TransitRouterAttachmentId is not found. | 网络连接实例ID不存在。 |
400 | OperationUnsupported.ServiceMode | The specified TransitRouter does not support the operation. | 当前转发路由器模式不支持该操作。 |
400 | IllegalParam.AddOrRemoveZoneMappings | The specified AddZoneMappings or RemoveZoneMappings are illegal. | 参数中指定的AddZoneMappings或RemoveZoneMappings不合法。 |
400 | IncorrectStatus.Vpc | The resource is not in a valid state for the attachment operation. | 当前VPC的状态不支持该操作,请稍后重试。 |
400 | OperationDenied.RouteEntryOnEni | Operation is failed because there is at least one route entry which next hop is the specified eni. | 存在路由指向eni,无法支持该操作。 |
400 | IncorrectStatus.VpcRouteEntry | The resource is not in a valid state for the attachment operation. | 当前VpcRouteEntry的状态不支持该操作,请稍后重试。 |
400 | IncorrectStatus.VpcSwitch | The resource is not in a valid state for the attachment operation. | 当前Vswitch的状态不支持该操作,请稍后重试。 |
400 | OperationUnsupported.TransitRouterType | The specified TransitRouterType does not support the operation. | 当前TransitRouter类型不支持该操作。 |
400 | InsufficientIpAddr.vsw | Insufficient available IP addresses in the vSwitch. | 虚拟交换机中的可用IP数目不足 |
400 | OperationFailed.VSwitchIpv6CidrNotAllocated | The specified vswitch does not have IPv6 address allocated. | 指定的VSwitch未开通Ipv6,请开通Ipv6后再进行该操作。 |
400 | InvalidTransitRouterMode.NeedUpgrade | TransitRouter need to upgrade. | 当前转发路由器模式不支持。 |
400 | OperationInvalid.EniReferencedIPv6RouteEntryExisted | Operation is failed because there is at least one route entry(IPv6) which next hop is network interface that the specified attachment referenced. | VPC中存在IPv6路由条目指向attachment相关的eni,无法支持该操作。请先清除此路由条目,再执行该操作。 |
400 | InvalidParameter | Invalid parameter. | 参数不合法。 |
400 | Unauthorized | The AccessKeyId is unauthorized. | 账号无权限操作。 |
404 | IllegalParam.ZoneId | The specified ZoneId is illegal. | |
404 | InvalidVSwitchId.NotFound | The specified VSwitchId is not found. | 指定的VSwitchId不存在。 |
409 | IncorrectStatus.VpcSwitch | The resource is not in a valid state for the attachment operation. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。