Modifies the name and description of a vSwitch.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyVSwitchAttribute |
The operation that you want to perform. Set the value to ModifyVSwitchAttribute. |
VSwitchId | String | Yes | vsw-25nacdfvue4**** |
The ID of the vSwitch. |
VSwitchName | String | No | VSwitch-1 |
The new name for the vSwitch. The name must be 2 to 128 characters in length, and can contain letters, digits, periods
(.), underscores (_), and hyphens (-). The name must start with a letter. It cannot
start with |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where the vSwitch is deployed. You can call the DescribeRegions operation to query the most recent region list. |
Description | String | No | This is my vswitch. |
The new description for the vSwitch. The description must be 2 to 256 characters in length. It must start with a letter
but cannot start with |
Ipv6CidrBlock | Integer | No | 10 |
The last eight bits of the IPv6 CIDR block of the vSwitch. Valid values: 0 to 255. You can set this parameter only when the IPv6 feature is enabled for the virtual private cloud (VPC) to which the vSwitch belongs. |
EnableIPv6 | Boolean | No | true |
Specifies whether to enable the IPv6 feature for the vSwitch. Valid values:
|
VpcIpv6CidrBlock | String | No | 2408:XXXX:312:3e00::/56 |
The IPv6 CIDR block of the VPC to which the vSwitch belongs. You can set this parameter only when the IPv6 feature is enabled for the VPC. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ModifyVSwitchAttribute
&VSwitchId=vsw-25nacdfvue4****
&<Common request parameters>
Sample success responses
XML
format
<ModifyVSwitchAttributeResponse>
<RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
</ModifyVSwitchAttributeResponse>
JSON
format
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
404 | InvalidVSwitchId.NotFound | The specified virtual switch does not exists. | The error message returned because the specified vSwitch does not exist. Check whether the specified ID is valid. |
400 | InvalidVSwitchName.Malformed | Specified virtual switch name is not valid. | The error message returned because the format of the name is invalid. Check whether the specified name is valid. |
400 | InvalidVSwitchDiscription.Malformed | Specified virtual switch description is not valid. | The error message returned because the format of the description is invalid. Check whether the specified description is valid. |
400 | InvalidVSwitchDiscription.Malformed | Specified virtual switch description is not valid. | The error message returned because the description of the vSwitch is invalid. |
400 | UnsupportedFeature.CloudBoxIpv6 | The IPv6 feature is not supported by cloud box. | The error message returned because cloud boxes do not support creating IPv6 addresses. |
For a list of error codes, visit the API Error Center.