All URIs are relative to https://api.upcloud.com/1.2
Method | HTTP request | Description |
---|---|---|
listPlans | GET /plan | List available plans |
AvailablePlanListResponse listPlans()
List available plans
Returns a list of available plans.
// Import classes:
//import com.upcloud.client.ApiClient;
//import com.upcloud.client.ApiException;
//import com.upcloud.client.Configuration;
//import com.upcloud.client.auth.*;
//import com.upcloud.client.api.PlanApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: baseAuth
HttpBasicAuth baseAuth = (HttpBasicAuth) defaultClient.getAuthentication("baseAuth");
baseAuth.setUsername("YOUR USERNAME");
baseAuth.setPassword("YOUR PASSWORD");
PlanApi apiInstance = new PlanApi();
try {
AvailablePlanListResponse result = apiInstance.listPlans();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PlanApi#listPlans");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json