curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/appliances/load-balancers/log-migrate/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "appliance_id": "7972", "access_key": "access-key", "secret_key": "secret-key", "bucket": "bucket-name", "disable": true}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/appliances/load-balancers/log-migrate/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "appliance_id": "7972", "access_key": "access-key", "secret_key": "secret-key", "bucket": "bucket-name", "disable": True, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/appliances/load-balancers/log-migrate/");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({ "appliance_id": "7972", "access_key": "access-key", "secret_key": "secret-key", "bucket": "bucket-name", "disable": true }),});console.log(await response.json());Enables or disables shipping of the load balancer’s HAProxy access logs to an object-storage (EOS) bucket. The behaviour is controlled by the is_enabled query parameter together with the request body:
-
Enable: call with
?is_enabled=trueand a body containingappliance_id,access_key,secret_key, andbucket- the credentials for the destination object-storage bucket. -
Disable: call with a body of
{ "appliance_id": "<id>", "disable": true }.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Used only when enabling access-log shipping - send is_enabled=true together with the bucket-credentials body. For the disable flow this parameter is discarded; send the { "appliance_id": "<id>", "disable": true } body instead.
Example
trueIdentifier 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 load balancer.
Example
<LOCATION>Request Body
Section titled “Request Body”Body for enabling or disabling access-log shipping. To enable, call with ?is_enabled=true and supply the object-storage access_key, secret_key, and bucket. To disable, send { "appliance_id": "<id>", "disable": true }.
object
ID of the load balancer (appliance) whose access logs are being configured.
Example
7972Access key for the destination object-storage (EOS) bucket. Required when enabling.
Example
access-keySecret key for the destination object-storage bucket. Required when enabling.
Example
secret-keyName of the destination object-storage bucket. Required when enabling.
Example
bucket-nameSend true (with appliance_id) to disable access-log shipping.
Example
trueResponses
Section titled “Responses”Successful response
object
object
object
Example
{ "code": 200, "data": { "appliance_id": "7972" }, "message": "Success"}