Change the Name of a VPC

Last updated: 2019-12-02 11:18:37

PDF

1. API Description

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

Currently, only changing the name in VPC attributes is supported.

2. Input Parameters

Below is a list of API request parameters. You need to add common request parameters to your request when calling this API. For more information, see the Common Request Parameters page. The Action field for this API is ModifyVpcAttribute.

Parameter name Required Type Description
vpcId Yes String VPC ID assigned by the system. Both the vpcId before upgrade and the upgraded unVpcId are supported.
vpcName Yes String VPC name, which is up to 60 characters.

3. Output Parameters

Parameter name Type Description
code Int Common error code. 0: Successful; other values: Failed. For more information, see Common Error Codes on the “Error Codes” page.
message String Module error message description depending on API

4. Error Codes

Below is a list of API request parameters. You need to add common request parameters to your request when calling this API. For more information, see the Common Request Parameters page. The Action field for this API is ModifyVpcPeeringConnectionEx.

Error code Description
InvalidVpcName Invalid VPC name, which is up to 60 characters.
InvalidVpc.NotFound Invalid VPC. This error code indicates that the VPC resource does not exist. In this case, verify whether the resource information that you entered is correct.

5. Sample

Input


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

Output


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