Help Center/ ModelArts/ API Reference/ Lite Server Management/ Binding an EIP to a Lite Server
Updated on 2026-01-30 GMT+08:00

Binding an EIP to a Lite Server

Function

This API is used to bind an EIP to a Lite Server. It is used when you need to assign a fixed public IP address to a Lite Server so that the Lite Server can be accessed from the external network. Before using this API, ensure that the Lite Server has been created and is running, you have the permission to bind an EIP, and the specified EIP exists and is not used by other resources. After the binding, the EIP is bound to the Lite Server and the Lite Server can be accessed from the external network through the EIP. If the Lite Server does not exist, the Lite Server is stopped, the specified EIP does not exist or is in use, or you do not have the required permission, the API returns an error message.

Constraints

Only for A3.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v1/{project_id}/dev-servers/{id}/publicips

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Definition: Lite Server ID.

Constraints: Mandatory.

Range: 1 to 64 characters.

Default Value: N/A

project_id

Yes

String

Definition: Project ID. For details, see Obtaining a Project ID and Name.

Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

public_ip_id

No

String

Definition: EIP ID.

Constraints: Mandatory

Range: 1 to 64 characters

Default Value: N/A

Response Parameters

Status code: 200

Table 3 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Link trace ID.

Table 4 Response body parameters

Parameter

Type

Description

public_ips

Array of ServerPublicIp objects

Definition: Array of EIP information.

Table 5 ServerPublicIp

Parameter

Type

Description

id

String

Definition: EIP ID.

Constraints: Mandatory

Range: 1 to 64 characters

Default Value: N/A

address

String

Definition: EIP IP address.

Constraints: Mandatory

Range: 1 to 64 characters in standard IPv4 format.

Default Value: N/A

Example Requests

POST https://{endpoint}/v1/{project_id}/dev-servers/{id}/publicips

Example Responses

None

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.