Rename VPCs

Last updated: 2017-12-05 15:06:07

1. API Description

This API (ModifyVpcAttribute) is used to modify VPCs.
Domain for API request: vpc.api.qcloud.com

Currently, only modification to the name in the VPC attributes is supported.

2. Input Parameters

The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is ModifyVpcAttribute.

Parameter Name Required Type Description
vpcId Yes String VPC ID assigned by the system. Support both vpcId before the upgrade and unVpcId after the upgrade.
vpcName Yes String VPC name. It should be within 60 characters.

3. Output Parameters

Parameter Name Type Description
code Int Common error code. 0: success; other values: failed. For more information, please see Common Error Codes.
message String Module error message description depending on API.

4. Error Codes

The following error code list only provides the error codes for this API. For common error codes, please see VPC Error Codes.

Error Code Description
InvalidVpcName Invalid VPC name. It should be within 60 characters.
InvalidVpc.NotFound The VPC does not exist. Please check the information you entered.

5. Example

Input


  https://vpc.api.qcloud.com/v2/index.php?Action=ModifyVpcAttribute
  &<Common request parameters>
  &vpcId=vpc-2ari9m7h
  &vpcName=vpcName1

Output


{
    "code": 0,
    "message": ""
}