Modifies the name and description of a VSwitch.

Make the API call

You can use OpenAPI Explorer to make API calls, search for API calls, perform debugging, and generate SDK example code.

Request parameters

Parameter Type Required? Example value Description
Action String Yes ModifyVSwitchAttribute

The name of this action. Value: ModifyVSwitchAttribute

VSwitchId String Yes vsw-25nacdfvue4****

The ID of the VSwitch.

VSwitchName String No VSwitch-1

The name of the VSwitch after the modification.

The name must be 2 to 128 characters in length. It must start with a letter and can contain numbers, periods (.), underscores (_), or hyphens (-). It cannot start with http:// or https://.

RegionId String Yes cn-hangzhou

The ID of the region to which the VSwitch belongs. To query the region ID, call DescribeRegions.

Description String No This is my vswitch.

The description of the VSwitch after the modification.

The description must be 2 to 256 characters in length. It must start with a letter and cannot start with http:// or https://.

Ipv6CidrBlock Integer No 10

The last 8 bits of the IPv6 CIDR block of the VSwitch. Value range: 0~255.

This parameter can be configured only when IPv6 is enabled for the VPC to which the VSwitch belongs.

Response parameters

Parameter Type Example value Description
RequestId String 0ED8D006-F706-4D23-88ED-E11ED28DCAC0

The ID of the request.

Examples

Request example

http(s)://vpc.aliyuncs.com/? Action=ModifyVSwitchAttribute
&VSwitchId=vsw-25ncdfvaue4****
&Name=test
&<CommonParameters>

Response example

XML format

<ModifyVSwitchAttributeResponse>
      <RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
</ModifyVSwitchAttributeResponse>

JSON format

{ 
    "RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0" 
}

Errors

HTTP status code Error code Error message Description
404 InvalidVSwitchId.NotFound The specified virtual switch does not exists. The specified VSwitch does not exist.
400 InvalidVSwitchName.Malformed Specified virtual switch name is not valid. The format of the name of the specified VSwitch is invalid.
400 InvalidVSwitchDiscription.Malformed Specified virtual switch description is not valid. The description of the VSwitch is invalid.
400 InvalidVSwitchDiscription.Malformed Specified virtual switch description is not valid. The description of the VSwitch is invalid.

For a list of error codes, visit the API Error Center.