Updating a Custom Line
Function
This API is used to update a custom line.
Calling Method
For details, see Calling APIs.
URI
PUT /v2.1/customlines/{line_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
line_id |
Yes |
String |
Resolution line ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Custom line name |
ip_segments |
No |
Array of strings |
IP address range. The start IP address is separated from the end IP address with a hyphen (-). The IP address ranges cannot overlap. If the start and end IP addresses are the same, there is only one IP address in the range. Set the value to IP1-IP1. Currently, only IPv4 addresses are supported. |
description |
No |
String |
Custom line description. A maximum of 255 characters are allowed. |
Response Parameters
Status code: 200
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 |
Time when the custom line was created |
updated_at |
String |
Time when the custom line was updated |
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: 200
Response to the request for updating a custom line
{ "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 |
---|---|
200 |
Response to the request for updating a custom line |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.