curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/{gateway_id}/{action_type}/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/{gateway_id}/{action_type}/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"},)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/{gateway_id}/{action_type}/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>" },});console.log(await response.json());Starts or stops a Load Balancer, depending on action_type. stop sets the status to Stopped and stops billing; start sets it to Running and starts billing again. stop works on a Load Balancer that is Running or Initializing, start only on one that is Stopped. The Load Balancer needs the Update permission.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Load Balancer ID
start or stop.
Query Parameters
Section titled “Query Parameters”Project ID
Active IAM ID (To access contact person account) Find your Active IAM ID here
Location
Responses
Section titled “Responses”The action was applied
object
object
The action that was applied.
object
Example
{ "code": 200, "message": "Success", "data": { "action": "start" }, "errors": {}}action_type is not start or stop; start was sent when the status is not Stopped; or stop was sent when the status is not Running or Initializing. A missing or invalid project ID also gives 400 with errors “Project ID is missing or invalid”.
object
object
Example
{ "code": 400, "message": "Bad Request", "data": {}, "errors": "Gateway should be in stopped to start."}No Load Balancer with that ID in the project and region.
object
object
Example
{ "code": 404, "message": "Bad Request", "data": {}, "errors": "Gateway not found"}