Modifies the configuration of a specified vSwitch.
Operation description
- ModifyVSwitchAttribute is an asynchronous operation. After you call this operation, the system returns a request ID, but the vSwitch configuration has not been modified yet. The modification task is still running in the background. You can call DescribeVSwitchAttributes to query the modification status of the vSwitch:
If the vSwitch is in the Pending state, the configuration is being modified.
If the vSwitch is in the Available state, the vSwitch is available.
ModifyVSwitchAttribute does not support concurrent modifications to the same vSwitch.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:ModifyVSwitchAttribute |
update |
*VSwitch
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| VSwitchId |
string |
Yes |
The ID of the vSwitch. |
vsw-25nacdfvue4**** |
| VSwitchName |
string |
No |
The new name of the vSwitch. The name must be 1 to 128 characters in length and cannot start with |
VSwitch-1 |
| RegionId |
string |
No |
The region ID of the vSwitch. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| Description |
string |
No |
The new description of the vSwitch. The description must be 1 to 256 characters in length and cannot start with |
This is my vswitch. |
| Ipv6CidrBlock |
integer |
No |
The last 8 bits of the IPv6 CIDR block of the vSwitch. Valid values: 0 to 255. You can set this parameter only when IPv6 is enabled for the VPC to which the vSwitch belongs. This parameter allows you to allocate an IPv6 CIDR block to the vSwitch. After the IPv6 CIDR block is allocated, it cannot be changed to another CIDR block. Make sure that the CIDR block does not overlap with those of other vSwitches in the same VPC. |
10 |
| Ipv6CidrMask |
integer |
No |
The IPv6 CIDR block mask of the vSwitch. You can set this parameter only when IPv6 is enabled for the VPC to which the vSwitch belongs. Note
Only 64 is supported. |
64 |
| EnableIPv6 |
boolean |
No |
Specifies whether to enable IPv6 for the vSwitch. Valid values:
|
false |
| VpcIpv6CidrBlock |
string |
No |
The IPv6 CIDR block of the VPC to which the vSwitch belongs. If the VPC has multiple IPv6 CIDR blocks, you can specify this parameter to indicate the IPv6 CIDR block range for the vSwitch. If you do not specify this parameter, the IPv6 CIDR block assigned when IPv6 was enabled for the VPC is used. |
2408:XXXX:312:3e00::/56 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
Examples
Success response
JSON format
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidVSwitchName.Malformed | Specified virtual switch name is not valid. | The format of the specified vSwitch name is invalid. Specify the name in the valid format. |
| 400 | InvalidVSwitchDiscription.Malformed | Specified virtual switch description is not valid. | The format of the vSwitch description is invalid. |
| 400 | Forbidden.VRouterNotFound | specified virtual switch is not found during access authentication. | The specified vSwitch is not found during access authentication. |
| 400 | UnsupportedFeature.CloudBoxIpv6 | The IPv6 feature is not supported by cloud box. | You cannot create an IPv6 address for a CloudBox instance. |
| 400 | OperationFailed.Ipv6InstanceExist | Operation failed because vswitch has ipv6 instance. | IPv6 instances exist in the vSwitch. |
| 400 | IncorrectStatus.VpcRouteEntry | The status of the specified routeEntry is invalid. | The status of the VPC route entry is invalid. |
| 400 | OperationFailed.IPv6Disabled | Operation failed because IPv6 is not enabled for the vSwitch. | The IPv6 feature is disabled. |
| 400 | ParamExclusive.DisableIpv6AndIpv6CidrBlock | DisableIpv6 and Ipv6Cidr are mutually exclusive. | You cannot modify Ipv6Cidr and DisableIpv6 at the same time. |
| 400 | IncorrectStatus.cbnStatus | Current CBN status does not support this operation. | The status of the CEN instance is invalid. |
| 400 | DependencyViolation.IPv6CidrReservation | The specified resource of [%s] depends on [%s], so the operation cannot be completed. | The specified resource of [%s] depends on [%s], so the operation cannot be completed. |
| 400 | IllegalParam.VpcIpv6CidrBlock | The parameter of VpcIPv6CidrBlock is illegal. | The VpcIPv6CidrBlock parameter is invalid. |
| 400 | OperationFailed.Ipv6AlreadyEnabled | Operation failed because the IPv6 is enabled already. | The operation failed because IPv6 is already enabled. |
| 400 | OperationFailed.Ipv6CidrBlockExisted | Operation failed because the specified IPv6 CIDR block is used already. | The operation failed because the specified IPv6 CIDR block is already in use. |
| 400 | IllegalParam.Ipv6CidrBlock | The parameter of Ipv6CidrBlock is illegal. | The IPv6 CIDR block is invalid. |
| 400 | InvalidDescription.Malformed | The specified Description is wrongly formed. | The error message returned because the Description parameter is set to an invalid value. |
| 400 | OperationFailed.VpcIpv6Disabled | Operation failed because the VPC has not enabled IPv6. | The current operation is not supported because IPv6 is not enabled for the VPC. |
| 400 | IncorrectStatus.VSwitch | The specified vSwitch status is invalid. | The virtual switch status is abnormal. |
| 400 | OperationFailed.Ipv6CidrBlockUsed | Operation failed because the specified IPv6 CIDR block is used already. | The operation failed because the specified IPv6 CIDR block is already in use. |
| 400 | TaskConflict | The operation is too frequent. Please wait a moment and try again. | The system is unavailable. Try again later. |
| 400 | OperationDenied.HasSecondaryZone | The operation is not allowed because the VSwitch has a secondary zone. | The operation is not allowed because the VSwitch has a secondary zone. |
| 400 | OperationDenied.VpcIpv6CidrBlockNotExist | The specified VpcIpv6CidrBlock does not exist in the VPC. | The specified VpcIpv6CidrBlock does not exist in the VPC. |
| 400 | OperationDenied.AvailableCidrInsufficient | Insufficient available CIDR blocks for allocation. This is either because the VPC has no remaining address space, or because the candidate CIDR contains destination networks of active non-system routes in the VPC. | Insufficient available CIDR blocks for allocation. This is either because the VPC has no remaining address space, or because the candidate CIDR contains destination networks of active non-system routes in the VPC. |
| 400 | OperationDenied.Ipv6CidrMaskInvalid | The specified Ipv6CidrMask is invalid, only %s is allowed. | The specified Ipv6CidrMask is invalid, only %s is allowed. |
| 400 | MissingParam.Ipv6CidrBlockOrIpv6CidrMask | Ipv6CidrBlock or Ipv6CidrMask must be specified. | Ipv6CidrBlock or Ipv6CidrMask must be specified. |
| 500 | SystemBusy | The system is busy. Please try again later. | The system is busy. Please try again later. |
| 404 | InvalidVSwitchId.NotFound | The specified virtual switch does not exists. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.