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.
This API (ModifySubnetAttribute) is used to modify subnet attribute.
Domain for API request:vpc.api.qcloud.com
Currently you can only modify names in the subnet attributes.
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 ModifySubnetAttribute.
Parameter Name | Required | Type | Description |
---|---|---|---|
vpcId | Yes | String | VPC ID of the subnet, which can be vpcId or unVpcId. unVpcId is recommended. You can query this through API DescribeVpcEx. |
subnetId | Yes | String | ID of the subnet to be modified. Both subnetId and unSubnetId are supported. unSubnetId is recommended. You can query this through the API DescribeSubnetEx. |
subnetName | Yes | String | Subnet name. You can specify any name you like, but its length should be limited to 60 characters. |
Parameter Name | Type | Description |
---|---|---|
code | Int | Common error code; 0: Succeeded; other values: Failed. For more information, please refer to Common Error Codes on the Error Code page. |
message | String | Module error message description depending on API. |
The following error code list only provides the business logic error codes for this API. For additional common error codes, refer to VPC Error Codes.
Error Code | Description |
---|---|
InvalidVpc.NotFound | Invalid VPC. VPC resource does not exist. Please verify that the resource information you entered is correct. You can query the VPC via the API DescribeVpcEx. |
InvalidSubnet.NotFound | Invalid subnet. Subnet resource does not exist. Please verify that the resource information you entered is correct. You can query subnets via the API DescribeSubnetEx. |
InvalidSubnetName | Subnet name is invalid or is already used by another subnet under the VPC. You can specify any name you like, but its length should be limited to 60 characters. |
Input
https://vpc.api.qcloud.com/v2/index.php?Action=ModifySubnetAttribute &<Common request parameters> &vpcId=vpc-2ari9m7h &subnetId=subnet-5gu2jxf4 &subnetName=wikitttt
Output
{
"code": 0,
"message": ""
}
Was this page helpful?