For the complete documentation index, see llms.txt. This page is also available as Markdown.

CreateEips

1. API Description

This API (CreateEips) is used to create one or more elastic IPs.

Prerequisites

Note

  • eipV4Type and cidrId cannot be passed together or left empty.

  • Passing cidrId means the public IP is generated from a CIDR block.

  • If assigning to an instance, ensure that the primary private IP on the instance’s primary vNIC can still be assigned an elastic IP.

  • The size of the guaranteed traffic package is only valid for billing periods of one month.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

regionId

Yes

String

Region ID.

name

Yes

String

Name of the elastic IP.

This parameter must start with a number or a letter, containing 2 to 63 characters. Only letters, numbers, - and periods (.) are supported.

internetChargeType

Yes

Network billing methods .

amount

No

Integer

Quantity.

Value range: [1, +)

Default value: 1

eipV4Type [Deprecated]

No

Network types of public IPv4.

Deprecated. Please use networkLineType instead.

networkLineType

No

Network types of public IPv4.

primaryIsp [Deprecated]

No

If the eipV4Type field is set to ThreeLine , this field is required and must include:

CHINA_TELECOM CHINA_UNICOM CHINA_MOBILE

bandwidth

No

Integer

Public outbound bandwidth cap.

Unit: Mbps .

Bandwidth cap varies by instance size.

Value range: [1, +)

cidrId

No

String

CIDR ID.

If this parameter is specified, eipV4Type must be empty.

publicIp

No

String

The starting public IP address from which elastic IPs.

resourceGroupId

No

String

Resource group ID for the elastic public IP. If not specified, the IP will be placed in the default resource group.

flowPackage

No

Float

Traffic package size (TB).

The parameter is valid only when internetChargeType is ByTrafficPackage .

Default value: 0 .

The value supports up to one decimal place.

Value range: [0.0, +)

clusterId

No

String

Bandwidth cluster ID for the public IPv6 address.

This parameter must be specified when the subnet's stack type includes public IPv6, and the network billing model is BandwidthCluster.

peerRegionId

No

String

Remote region ID.

marketingOptions

No

Information on marketing campaigns.

tags

No

Bound tags when creating the elastic IP.

Tag keys must be unique.

instanceIds

No

Array of String

IDs of instances to be attached.

The number of IDs should be the same as diskAmount .

bindType

No

Elastic IP mode when binding to resources.

Effective when specific instanceIds are specified.

Defaults to standard NAT mode.

rateLimitMode

No

Rate limit mode.

Default value: LOOSE

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.

eipIds

Array of String

ID list of elastic IPs.

orderNumber

String

Order No.

4. Code Example

Create one or more elastic IPs.

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs,to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

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

HTTP Status Code
Error Code
Description

404

INVALID_CIDR_NOT_FOUND

CIDR block not found.

400

INVALID_PARAMETER_BANDWIDTH_ERROR

Bandwidth size is below the minimum limit.

400

INVALID_RATE_LIMIT_MODE_REQUIRES_BANDWIDTH

Bandwidth must be specified when the rate limit mode is STRICT.

400

OPERATION_DENIED_CIDR_CREATE_SOURCE

This operation is not supported by the CIDR source.

400

INVALID_PARAMETER_BANDWIDTH_EXCEED

Bandwidth size exceeds the upper limit.

404

INVALID_REGION_NOT_FOUND

Specified availability zone does not exist.

400

OPERATION_DENIED_CIDR_IP_INSUFFICIENT

Insufficient remaining IPs in the CIDR block.

400

OPERATION_DENIED_CIDR_STATUS

The specified CIDR state does not support this operation.

400

OPERATION_DENIED_EIP_UNSUPPORTED_CUSTOMIZE

The manually specified IP address is invalid.

400

OPERATION_DENIED_EIP_UNSUPPORTED_NETWORK_TYPE

The EIP network billing method is not supported.

400

OPERATION_DENIED_EIP_UNSUPPORTED_REMOTE_IPT

This customer is temporarily not supported to configure Remote IPT.

400

OPERATION_DENIED_INTERNET_CHARGE_TYPE_NOT_SUPPORT

IP network billing type is not supported.

400

INVALID_REGION_MISMATCH

Region mismatch.

400

OPERATION_DENIED_EIP_INSTANCE_NOT_ADAPTER

Specified instance count does not match the number of elastic IPs to be created.

404

INVALID_INSTANCE_NOT_FOUND

Instance not found.

400

INVALID_NIC_STATUS

Current vNIC state does not allow this operation.

400

OPERATION_DENIED_EIP_ASSIGNED_LIMIT_EXCEEDED

Elastic IP binding exceeds the allowed limit.

400

OPERATION_DENIED_FLOW_PACKAGE_NOT_SUPPORTED_HOUR_PERIOD

The current product cycle is based on hourly billing and does not support setting a minimum data package size.

400

INVALID_PARAMETER_FLOW_PACKAGE_NOT_SUPPORTED_FOR_PATH_BASED

PathBasedBandwidthIP does not support custom traffic package sizes. Pass 0 or omit this parameter.

400

OPERATION_DENIED_FIXED_BANDWIDTH_NOT_SUPPORTED_FOR_PATH_BASED

PathBasedBandwidthIP does not support fixed bandwidth billing.

Last updated