Domain name for API request: vpc.intl.tencentcloudapi.com.
This API is used to apply for one or more Elastic IP Addresses (EIPs for short).
A maximum of 10 requests can be initiated per second for this API.
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: AllocateAddresses. |
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. |
AddressCount | No | Integer | The number of EIPs. Default: 1. |
InternetServiceProvider | No | String | The EIP line type. Default: BGP.
|
InternetChargeType | No | String | The EIP billing method.
|
InternetMaxBandwidthOut | No | Integer | The EIP outbound bandwidth cap, in Mbps.
|
AddressChargePrepaid | No | AddressChargePrepaid | A required billing parameter for an EIP billed by monthly bandwidth subscription. For EIPs using other billing modes, it can be ignored. |
AddressType | No | String | EIP type. Default value: EIP.
AnycastEIP : an AIA IP address. For more information, see Anycast Internet Acceleration.Note: Anycast EIPs are supported only in partial regions.
|
AnycastZone | No | String | Anycast publishing region
|
VipCluster.N | No | Array of String | |
ApplicableForCLB | No | Boolean | [Disused] Whether the Anycast EIP can be bound to CLB instances.
|
Tags.N | No | Array of Tag | List of tags to be bound. |
BandwidthPackageId | No | String | The unique ID of a BGP bandwidth package. If you configure this parameter and set InternetChargeType as BANDWIDTH_PACKAGE, the new EIP is added to this package and billed by the bandwidth package mode. |
AddressName | No | String | EIP name, which is the custom EIP name given by the user when applying for the EIP. Default: not named |
DedicatedClusterId | No | String | |
Egress | No | String | Network egress. It defaults to center_egress1 . |
AntiDDoSPackageId | No | String | Anti-DDoS service package ID. This is required when you want to request an Anti-DDoS IP. |
ClientToken | No | String | A string used to ensure the idempotency of the request. Generate a value based on your client. This can ensure that the value is unique for different requests. It only supports ASCII characters and can contain up to 64 characters. |
Parameter Name | Type | Description |
---|---|---|
AddressSet | Array of String | List of the unique IDs of the requested EIPs. |
TaskId | String | The Async task ID. You can use the DescribeTaskResult API to query the task status. |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to create an Anycast Internet Acceleration (AIA) IP. This is only available to beta users.
POST / HTTP/1.1
Host: vpc.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: AllocateAddresses
<Common request parameters>
{
"AddressCount": "1",
"AddressType": "AnycastEIP"
}
{
"Response": {
"AddressSet": [
"eip-m44ku5d2"
],
"TaskId": "61531428",
"RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7"
}
}
This example shows you how to create a regular IP.
POST / HTTP/1.1
Host: vpc.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: AllocateAddresses
<Common request parameters>
{
"AddressCount": "1"
}
{
"Response": {
"AddressSet": [
"eip-m44ku5d2"
],
"TaskId": "61531421",
"RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7"
}
}
This example shows you how to create a static single-line IP, provided that you are a static single-line IP beta user.
POST / HTTP/1.1
Host: vpc.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: AllocateAddresses
<Common request parameters>
{
"AddressCount": "1",
"InternetServiceProvider": "CTCC"
}
{
"Response": {
"AddressSet": [
"eip-m44ku5d2"
],
"TaskId": "61531429",
"RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7"
}
}
幂等请求失败,更新幂等参数。
POST / HTTP/1.1
Host: vpc.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: AllocateAddresses
<common request parameters>
{
"ClientToken": "b8fcdf80-248a-4095-bfa3-7f59df1aec"
}
{
"Response": {
"Error": {
"Code": "UnsupportedOperation.DeliveryFailed",
"Message": "发货失败,请更新`ClientToken`并重试。"
},
"RequestId": "8e176c15-f087-4816-a270-306cf87229a6"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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. |
FailedOperation.BalanceInsufficient | Insufficient account balance. |
FailedOperation.InvalidRegion | Unsupported region. |
InvalidAccount.NotSupported | This account is not supported. |
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. |
InvalidParameterConflict | The two parameters cannot be specified at the same time, nor exist concurrently. EIP can only be bound to the instances or the specified private IPs of the specified ENIs. |
InvalidParameterValue.AddressAttacked | Attacked IP address. |
InvalidParameterValue.AddressIpNotAvailable | The IP address is not available now. |
InvalidParameterValue.BandwidthOutOfRange | The bandwidth exceeds the limit. |
InvalidParameterValue.BandwidthPackageIdMalformed | Incorrect bandwidth package ID. |
InvalidParameterValue.BandwidthPackageNotFound | Failed to query the bandwidth package |
InvalidParameterValue.BandwidthTooSmall | The selected bandwidth is smaller than the minimum permissible range. |
InvalidParameterValue.Combination | Invalid input parameters |
InvalidParameterValue.InstanceIdMalformed | Incorrect instance ID. |
InvalidParameterValue.InvalidDedicatedClusterId | Invalid DedicatedClusterId. |
InvalidParameterValue.InvalidTag | This Tag is invalid. |
InvalidParameterValue.MixedAddressIpSetType | A request cannot contain IP addresses with different cluster types. |
InvalidParameterValue.Range | The parameter value is not in the specified range. |
InvalidParameterValue.ResourceIdMalformed | The resource ID is incorrect. |
InvalidParameterValue.ResourceNotSupport | The resource does not support this operation. |
InvalidParameterValue.TagNotExisted | The tag and value do not exist. |
InvalidParameterValue.UnavailableZone | This availability zone is unavailable. |
LimitExceeded.BandwidthPackageQuota | Exceeded the upper limit of the bandwidth package quota. |
LimitExceeded.BandwidthPackageResourceQuota | Number of resources added to this bandwidth package reached the upper limit. |
LimitExceeded.MonthlyAddressRecoveryQuota | Ran out of the monthly quota of chances to retrieve IPs. |
LimitExceeded.TagQuota | Exceeded the tag quota. Unable to create resources. |
ResourceInsufficient | Insufficient resources. |
UnauthorizedOperation.AnycastEip | No permission to apply for AnycastEip resources. |
UnauthorizedOperation.InvalidAccount | Unauthorized user. |
UnsupportedOperation.AccountNotSupported | This account is not supported. |
UnsupportedOperation.ActionNotFound | The port does not exist. |
UnsupportedOperation.BandwidthPackageIdNotSupported | This bandwidth package does not support this operation. |
UnsupportedOperation.DeliveryFailed | |
UnsupportedOperation.InstanceStateNotSupported | This operation is not supported by the status of the instance bound with the IP address. |
UnsupportedOperation.InvalidAction | Unsupported operation. |
UnsupportedOperation.NotSupportedPurchaseCenterEgressResource | |
UnsupportedOperation.OfflineChargeType | This billing mode is disused. Please try another billing mode. |
UnsupportedOperation.UnsupportedRegion | The service is not available in this country/region. |
문제 해결에 도움이 되었나요?