CreateEips

CreateEips

1. API Description

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

Prerequisites

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

regionId

Yes

String

Region ID.

amount

No

Integer

Quantity.

name

Yes

String

Name of the elastic IP.

internetChargeType

Yes

String

eipV4Type

Yes

String

primaryIsp

No

String

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

  • CHINA_TELECOM

  • CHINA_UNICOM

  • CHINA_MOBILE

bandwidth

No

Integer

Bandwidth.

flowPackage

No

BigDecimal

Data transfer package.

resourceGroupId

No

String

Resource group.

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.

POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: CreateEips
<Common Request Params>

Request:
{
  "regionId": "asia-east-1",
  "amount": 1,
  "name": "xxx",
  "internetChargeType": "ByTrafficPackage",
  "eipV4Type": "BGPLine",
  "bandwidth": 50,
  "flowPackage": 2,
  "resourceGroupId": "xxxx"
}

Response:
{
  "requestId": "TBFC01FCF-6439-4530-ADBC-16809F0C3E8F",
  "response": {
    "requestId": "TBFC01FCF-6439-4530-ADBC-16809F0C3E8F",
    "eipIds": ["xxx","xxx"],
    "orderNumber": "xxx"
  }
}

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_REGION_NOT_FOUND

Region not found.

400

INVALID_PARAMETER_TYPE

Parameter error.

400

INVALID_PARAMETER_BANDWIDTH_EXCEED

The bandwidth exceeds the limit.

Last updated