curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/appliances/load-balancers/{lb_id}/actions/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "type": "power_off", "plan_name": "E2E-LB-3", "name": "new-name"}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/appliances/load-balancers/{lb_id}/actions/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "type": "power_off", "plan_name": "E2E-LB-3", "name": "new-name", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/appliances/load-balancers/{lb_id}/actions/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "type": "power_off", "plan_name": "E2E-LB-3", "name": "new-name" }),});console.log(await response.json());Performs a lifecycle or management action on a single load balancer. The action is selected by the type field in the request body. Two actions require an extra field: upgrade_plan requires plan_name, and rename requires name. All other actions need only type.
Supported actions: power_on, power_off, upgrade_plan, rename. Any other value is rejected with Invalid Action!.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the load balancer, as returned by the List Load Balancers endpoint.
Example
12345Query Parameters
Section titled “Query Parameters”Identifier of the project to scope the request to. Required integer project ID.
Example
<PROJECT_ID>API key used to authenticate the request
Example
<API_KEY>Region of the target load balancer.
Example
<LOCATION>Request Body
Section titled “Request Body”object
Action to perform. upgrade_plan additionally requires plan_name; rename additionally requires name. power_on and power_off need only type.
Example
power_offTarget plan SKU. Required when type is upgrade_plan. Must be a larger plan than the current one.
Example
E2E-LB-3New display name. Required when type is rename.
Example
new-nameResponses
Section titled “Responses”Successful response
object
Human-readable result of the action.
object
Example
{ "code": 200, "data": "Appliance Powering Off", "message": "Success"}