tencent cloud

Feedback

TransformAddress

Last updated: 2022-09-05 10:34:30

1. API Description

Domain name for API request: vpc.tencentcloudapi.com.

This API is used to convert a common public IP into an Elastic IP (EIP for short).

  • Tencent Cloud limits the number of times that a user can unbind EIPs and reassign public IPs in each region per day. For more information, see product introduction of Elastic IP. The preceding quota can be obtained through the API DescribeAddressQuota.

A maximum of 10 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: TransformAddress.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String The ID of the instance with a common public IP to be operated on, such as ins-11112222. You can query the instance ID by logging into the CVM console. You can also obtain the parameter value from the InstanceId field in the returned result of the API DescribeInstances.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Converting a public IP to an EIP

Input Example

POST / HTTP/1.1
Host: vpc.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: TransformAddress
<Common request parameters>

{
    "InstanceId": "ins-3ea0qeu6"
}

Output Example

{
    "Response": {
        "RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AddressQuotaLimitExceeded The account quota is reached. Each Tencent Cloud account can create up to 20 EIPs in each region.
AddressQuotaLimitExceeded.DailyAllocate The maximum number of requests is reached. The maximum number of requests made by a Tencent Cloud account per day in each region equals to two times the quota.
InvalidAddressId.Blocked The specified EIP is in blocked status. When the EIP is in blocked status, it cannot be bound. You must first unblock it.
InvalidInstance.NotSupported This instance is not supported.
InvalidInstanceId.AlreadyBindEip The specified instance has already been bound to an EIP. You must unbind the current EIP first before binding another EIP.
InvalidInstanceId.NotFound Invalid instance ID. The specified instance ID does not exist.
InvalidParameterValue.InstanceHasNoWanIP The instance does not have a public IP.
InvalidParameterValue.InstanceIdMalformed Incorrect instance ID.
InvalidParameterValue.InstanceNoWanIP Request failed: this instance does not have a WanIP (public IP).
InvalidParameterValue.InvalidInstanceState Operation failed: the status of the instance does not allow this operation.
LimitExceeded.MonthlyAddressRecoveryQuota Ran out of the monthly quota of chances to retrieve IPs.
OperationDenied.AddressInArrears The specified public IP is isolated.
OperationDenied.MutexTaskRunning Mutually exclusive tasks are executing.
UnsupportedOperation.AddressStatusNotPermit This operation is not supported by the IP address status.
UnsupportedOperation.InvalidAddressInternetChargeType This operation is not allowed under the network billing mode of the IP address.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support