Change the Name of a VPC

Last updated: 2020-06-04 17:05:46

    Note:

    This is a legacy API which has been hidden and will no longer be updated. We recommend using the new VPC API 3.0 which is standardized and faster.

    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": ""
    }
    

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help