CreateVSwitch
This API has been deprecated. We recommend migrating to Vpc(2016-04-28) - CreateVSwitch for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:CreateVSwitch |
create |
*All Resource
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ZoneId |
string |
Yes |
||
| CidrBlock |
string |
Yes |
||
| VpcId |
string |
Yes |
||
| RegionId |
string |
No |
||
| VSwitchName |
string |
No |
||
| Description |
string |
No |
||
| ClientToken |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| VSwitchId |
string |
||
| RequestId |
string |
Examples
Success response
JSON format
{
"VSwitchId": "",
"RequestId": ""
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationFailed.IdempotentTokenProcessing | Action is processing. | |
| 400 | InvalidDescription.Malformed | Invalid description. | |
| 400 | InvalidVSwitchName.Malformed | Specified virtual switch name is not valid. | The vSwitch name is invalid. |
| 400 | InvalidVSwitchDiscription.Malformed | Specified virtual switch description is not valid. | The specified vSwitch description is invalid. |
| 400 | ResourceNotAvailable | Resource you requested is not available in this region or zone. | |
| 400 | InvalidParameter | Specified CIDR block is not valid in VPC. | The specified CIDR block is invalid. |
| 400 | InvalidCidrBlock.Overlapped | Specified CIDR block overlapped with other subnets. | The vSwitch CIDR block overlaps with another vSwitch CIDR block or with the destination CIDR block of a custom route entry. Try a different CIDR block that is not in use. |
| 400 | QuotaExceeded.VSwitch | Virtual switch quota exceeded. | The maximum number of vSwitches has been reached. |
| 400 | IncorrectRouteEntryStatus | Some route entry status blocked this operation. | The operation is not supported while the route table contains routes that are in the Pending or Modifying state. |
| 400 | IncorrectVSwitchStatus | Some virtual switch is modifying within the same VPC. | Multiple vSwitches in the VPC are being modified. Try again later. |
| 400 | InvalidCirdrBlock.MaskLength | Specified CIDR block is not valid . | The specified CIDR block is invalid. |
| 400 | IncorrectVpcStatus | Current VPC status does not support this operation. | The VPC is in a state that does not support the current operation. |
| 400 | InvalidCidrBlock.Malformed | Specified CIDR block is not valid. | The specified CIDR block is invalid. |
| 400 | MissingParameter | Miss mandatory parameter. | Required parameters must be specified. |
| 400 | TaskConflict | The operation is too frequent, TaskConflict. | The operation is too frequent. Wait a moment and try again. |
| 400 | RouteConflict.AlreadyExist | Route conflict exists in routing table. | |
| 400 | OperationFailed.CidrAcross | Classic link instance cidr must not across. | |
| 400 | VPC.SWITCH.RULE.QUOTA.NOT.EXISTS | vSwitch quota rule not exists. | |
| 400 | CreateVSwitch.IncorrectStatus.cbnStatus | Current CBN status does not support this operation. | |
| 400 | OperationFailed.NotifyCenCreate | Failed to notify cen when create vswitch. | |
| 400 | Forbidden.VpcNotFound | Specified VPC can not found. | |
| 400 | Duplicated.ClientToken | %s | |
| 400 | OperationFailed.DistibuteLock | Distibute lock fail. | |
| 400 | IllegalParam.CidrBlock | The param of CidrBlock [%s] is illegal. | The param of CidrBlock [%s] is illegal. |
| 400 | OperationDenied.ZoneIsDisabled | The specified zone is disabled. You cannot create a vSwitch in a disabled zone. | The specified zone is disabled. You cannot create a vSwitch in a disabled zone. |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 404 | Invalid.NotExist | witch mask rule not exists. | |
| 404 | InvalidStatus.RouteEntry | RouteEntry status error. | |
| 404 | InvalidZoneId.NotFound | Specified zone does not exist. | The specified zone ID does not exist. |
| 404 | InvalidVpcId.NotFound | Specified VPC does not exist. | The specified VPC ID does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.