Modifying a Custom Line

Updated on 2025-08-19 GMT+08:00

Function

This API is used to modify a custom line.

Calling Method

For details, see Calling APIs.

URI

PUT /v2.1/customlines/{line_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

line_id

Yes

String

Custom line ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

The user token.

The token can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

For details about how to obtain a user token, seeObtaining a User Token.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

Custom line name.

ip_segments

No

Array of strings

IP address range. Use hyphens (-) to separate IP addresses. The smaller IP address is placed before the larger IP address. IP address ranges cannot overlap. If there is only one IP address, set this parameter to IP1-IP1. Only IPv4 addresses are supported.

description

No

String

Custom line description. The value can contain a maximum of 255 characters.

Response Parameters

Status code: 202

Table 4 Response body parameters

Parameter

Type

Description

line_id

String

Resolution line ID.

name

String

Custom line name.

ip_segments

Array of strings

IP address range.

created_at

String

The creation time.

Format: yyyy-MM-dd'T'HH:mm:ss.SSS

updated_at

String

The update time.

Format: yyyy-MM-dd'T'HH:mm:ss.SSS

status

String

Resource status.

description

String

Custom line.

Example Requests

Modifying the name and description of a custom line and setting the IP address range to 1.1.1.1-1.1.1.1 and 1.1.1.2-1.1.1.3

PUT https://{endpoint}/v2.1/customlines/{line_id}

{
  "name" : "customline",
  "ip_segments" : [ "1.1.1.1-1.1.1.1", "1.1.1.2-1.1.1.3" ],
  "description" : "1234"
}

Example Responses

Status code: 202

Request accepted

{
  "line_id" : "custom_2ce45ef669fc87870169fcbada7a0007",
  "name" : "customline",
  "ip_segments" : [ "1.1.1.1-1.1.1.1", "1.1.1.2-1.1.1.3" ],
  "status" : "PENDING_UPDATE",
  "created_at" : "2019-04-10T12:03:17.827",
  "updated_at" : "2019-04-10T12:03:17.827",
  "description" : "1234"
}

Status Codes

Status Code

Description

202

Request accepted

Error Codes

See Error Codes.

Feedback
咨询盘古Doer

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback