AllocateAddresses

Last updated: 2021-05-12 10:21:34

1. API Description

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

This API is used to apply for one or more Elastic IP Addresses (EIPs for short).

  • An EIP is a static IP address that is dedicated for dynamic cloud computing. You can quickly re-map an EIP to another instance under your account to protect against instance failures.
  • Your EIP is associated with your Tencent Cloud account rather than an instance. It remains associated with your Tencent Cloud account until you choose to explicitly release it or your account is in arrears for more than 24 hours.
  • The maximum number of EIPs that can be applied for a Tencent Cloud account in each region is restricted. For more information, see EIP Product Introduction. You can get the quota information through the DescribeAddressQuota API.

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

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: vpc.ap-shanghai-fsi.tencentcloudapi.com

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 parameter. The value used for this API: AllocateAddresses.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. 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.
  • For a user who has activated the static single-line IP allowlist, possible values are:
    • CMCC: China Mobile
    • CTCC: China Telecom
    • CUCC: China Unicom
    Note: Only certain regions support static single-line IP addresses.
InternetChargeType No String The EIP billing method.
  • For bill-by-IP account beta users, valid values:
    • BANDWIDTH_PACKAGE: paid by the bandwidth package(who must also be bandwidth package beta users)
    • BANDWIDTH_POSTPAID_BY_HOUR: billed by hourly bandwidth on a pay-as-you-go basis
    • BANDWIDTH_PREPAID_BY_MONTH: monthly bandwidth subscription
    • TRAFFIC_POSTPAID_BY_HOUR: billed by hourly traffic on a pay-as-you-go basis
    Default value: TRAFFIC_POSTPAID_BY_HOUR
  • If you are not a bill-by-IP account beta user, the EIP billing is the same as that for the instance bound to the EIP. Therefore, you do not need to pass in this parameter.
InternetMaxBandwidthOut No Integer The EIP outbound bandwidth cap, in Mbps.
  • For bill-by-IP account beta users, valid values:
    • BANDWIDTH_PACKAGE: 1 Mbps to 1000 Mbps
    • BANDWIDTH_POSTPAID_BY_HOUR: 1 Mbps to 100 Mbps
    • BANDWIDTH_PREPAID_BY_MONTH: 1 Mbps to 200 Mbps
    • TRAFFIC_POSTPAID_BY_HOUR: 1 Mbps to 100 Mbps
    Default value: 1 Mbps
  • If you are not a bill-by-IP account beta user, the EIP outbound bandwidth cap is subject to that of the instance bound to the EIP. Therefore, you do not need to pass in this parameter.
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 The EIP type. Default: EIP.
  • For AIA beta users, the value should be:Note: Anycast EIPs are only supported in some of the regions.

  • For high-quality IP beta users, the value should be:
    • HighQualityEIP: high-quality IP
    Note: High-quality IPs are only supported in some of the regions.
AnycastZone No String Anycast publishing region
  • Valid for users who have activated AIA. Values:
    • ANYCAST_ZONE_GLOBAL: global publishing region
    • ANYCAST_ZONE_OVERSEAS: overseas publishing region
    • [Disused] ANYCAST_ZONE_A: publishing region A (updated to ANYCAST_ZONE_GLOBAL)
    • [Disused] ANYCAST_ZONE_B: publishing region B (updated to ANYCAST_ZONE_GLOBAL)
    Default: ANYCAST_ZONE_OVERSEAS.
ApplicableForCLB No Boolean [Disused]
Whether the Anycast EIP can be bound to CLB instances.
  • Valid for users who have activated the AIA. Values:
    • TRUE: the Anycast EIP can be bound to CLB instances.
    • FALSE: the Anycast EIP can be bound to CVMs, NAT gateways, and HAVIPs.
    Default: FALSE.
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

3. Output Parameters

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 reque