Skip to content

Latest commit

 

History

History
78 lines (57 loc) · 2.2 KB

ScaleApi.md

File metadata and controls

78 lines (57 loc) · 2.2 KB

ScaleApi

All URIs are relative to http://localhost:9000

Method HTTP request Description
triggerScale POST /scale

triggerScale

Queue triggerScale(scale)

Triggers a new scaling action

Example

// Import classes:
import io.github.cloudiator.rest.ApiClient;
import io.github.cloudiator.rest.ApiException;
import io.github.cloudiator.rest.Configuration;
import io.github.cloudiator.rest.auth.*;
import io.github.cloudiator.rest.models.*;
import io.github.cloudiator.rest.api.ScaleApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost:9000");
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    ScaleApi apiInstance = new ScaleApi(defaultClient);
    Scale scale = new Scale(); // Scale | Scaling action to be executed 
    try {
      Queue result = apiInstance.triggerScale(scale);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ScaleApi#triggerScale");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
scale Scale Scaling action to be executed

Return type

Queue

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 ACCEPTED -