SIM2 API

AvailabilityZones

availabilityZonesGet

Get a list the supported availability zones.

A successful response will return a list with the supported availability zones. Zones will be grouped by Regions.


/availability_zones

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/availability_zones"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AvailabilityZonesApi;

import java.io.File;
import java.util.*;

public class AvailabilityZonesApiExample {

    public static void main(String[] args) {
        
        AvailabilityZonesApi apiInstance = new AvailabilityZonesApi();
        try {
            array[AvailabilityZones] result = apiInstance.availabilityZonesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AvailabilityZonesApi#availabilityZonesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AvailabilityZonesApi;

public class AvailabilityZonesApiExample {

    public static void main(String[] args) {
        AvailabilityZonesApi apiInstance = new AvailabilityZonesApi();
        try {
            array[AvailabilityZones] result = apiInstance.availabilityZonesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AvailabilityZonesApi#availabilityZonesGet");
            e.printStackTrace();
        }
    }
}

AvailabilityZonesApi *apiInstance = [[AvailabilityZonesApi alloc] init];

// Get a list the supported availability zones.
[apiInstance availabilityZonesGetWithCompletionHandler: 
              ^(array[AvailabilityZones] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.AvailabilityZonesApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.availabilityZonesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class availabilityZonesGetExample
    {
        public void main()
        {

            var apiInstance = new AvailabilityZonesApi();

            try
            {
                // Get a list the supported availability zones.
                array[AvailabilityZones] result = apiInstance.availabilityZonesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AvailabilityZonesApi.availabilityZonesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAvailabilityZonesApi();

try {
    $result = $api_instance->availabilityZonesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AvailabilityZonesApi->availabilityZonesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AvailabilityZonesApi;

my $api_instance = WWW::SwaggerClient::AvailabilityZonesApi->new();

eval { 
    my $result = $api_instance->availabilityZonesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AvailabilityZonesApi->availabilityZonesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AvailabilityZonesApi()

try: 
    # Get a list the supported availability zones.
    api_response = api_instance.availability_zones_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AvailabilityZonesApi->availabilityZonesGet: %s\n" % e)

Parameters

Responses

Status: 201 - list of the availability zones

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Clusters

clustersClusterIdAllocatePublicIpsNumberOfIpsPut

Allocate public IPs for an existing AWS Cluster.

Allocate Public IPs for an existing AWS Cluster.


/clusters/{cluster_id}/allocate_public_ips/{number_of_ips}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/allocate_public_ips/{number_of_ips}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long numberOfIps = 789; // Long | Number of IPs to allocate.
        try {
            array['String'] result = apiInstance.clustersClusterIdAllocatePublicIpsNumberOfIpsPut(clusterId, numberOfIps);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdAllocatePublicIpsNumberOfIpsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long numberOfIps = 789; // Long | Number of IPs to allocate.
        try {
            array['String'] result = apiInstance.clustersClusterIdAllocatePublicIpsNumberOfIpsPut(clusterId, numberOfIps);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdAllocatePublicIpsNumberOfIpsPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *numberOfIps = 789; // Number of IPs to allocate.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Allocate public IPs for an existing AWS Cluster.
[apiInstance clustersClusterIdAllocatePublicIpsNumberOfIpsPutWith:clusterId
    numberOfIps:numberOfIps
              completionHandler: ^(array['String'] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var numberOfIps = 789; // {{Long}} Number of IPs to allocate.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdAllocatePublicIpsNumberOfIpsPut(clusterId, numberOfIps, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdAllocatePublicIpsNumberOfIpsPutExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var numberOfIps = 789;  // Long | Number of IPs to allocate.

            try
            {
                // Allocate public IPs for an existing AWS Cluster.
                array['String'] result = apiInstance.clustersClusterIdAllocatePublicIpsNumberOfIpsPut(clusterId, numberOfIps);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdAllocatePublicIpsNumberOfIpsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$numberOfIps = 789; // Long | Number of IPs to allocate.

try {
    $result = $api_instance->clustersClusterIdAllocatePublicIpsNumberOfIpsPut($clusterId, $numberOfIps);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdAllocatePublicIpsNumberOfIpsPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $numberOfIps = 789; # Long | Number of IPs to allocate.

eval { 
    my $result = $api_instance->clustersClusterIdAllocatePublicIpsNumberOfIpsPut(clusterId => $clusterId, numberOfIps => $numberOfIps);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdAllocatePublicIpsNumberOfIpsPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
numberOfIps = 789 # Long | Number of IPs to allocate.

try: 
    # Allocate public IPs for an existing AWS Cluster.
    api_response = api_instance.clusters_cluster_id_allocate_public_ips_number_of_ips_put(clusterId, numberOfIps)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdAllocatePublicIpsNumberOfIpsPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
number_of_ips*
Long (int64)
Number of IPs to allocate.
Required

Responses

Status: 200 - Successfully allocated the requested public IPs to the cluster. A list of IPs is returned.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdCoresGet

Get a cluster's cores

A successful response will return a list of cluster's cores.


/clusters/{cluster_id}/cores

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/cores"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Core] result = apiInstance.clustersClusterIdCoresGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdCoresGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Core] result = apiInstance.clustersClusterIdCoresGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdCoresGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a cluster's cores
[apiInstance clustersClusterIdCoresGetWith:clusterId
              completionHandler: ^(array[Core] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdCoresGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdCoresGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a cluster's cores
                array[Core] result = apiInstance.clustersClusterIdCoresGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdCoresGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdCoresGet($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdCoresGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdCoresGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdCoresGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a cluster's cores
    api_response = api_instance.clusters_cluster_id_cores_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdCoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Cluster's cores

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDelete

Delete cluster with specific ID

Given a cluster ID, the API will delete it from its DB. If the host is AWS the cluster will be also deleted from AWS. If the cluster is a sunlight hosted cluster it will be disconnected from the SIM. A cluster cannot be deleted if it has ongoing moves (to or from this cluster) or backups. Action can be performed only by users with `admin` role.


/clusters/{cluster_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdDelete(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdDelete(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Delete cluster with specific ID
[apiInstance clustersClusterIdDeleteWith:clusterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdDelete(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Delete cluster with specific ID
                apiInstance.clustersClusterIdDelete(clusterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

try {
    $api_instance->clustersClusterIdDelete($clusterId);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    $api_instance->clustersClusterIdDelete(clusterId => $clusterId);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Delete cluster with specific ID
    api_instance.clusters_cluster_id_delete(clusterId)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 204 - Cluster successfully deleted.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdDisksGet

Get a cluster's disks

A successful response will return a list of only initialised cluster's disks.


/clusters/{cluster_id}/disks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/disks?include_uninitialized_disks="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Boolean includeUninitializedDisks = true; // Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned.
        try {
            array[Disk] result = apiInstance.clustersClusterIdDisksGet(clusterId, includeUninitializedDisks);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdDisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Boolean includeUninitializedDisks = true; // Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned.
        try {
            array[Disk] result = apiInstance.clustersClusterIdDisksGet(clusterId, includeUninitializedDisks);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdDisksGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Boolean *includeUninitializedDisks = true; // When this parameter is true, all disks ( initialised and un -initialised ) are returned. (optional)

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a cluster's disks
[apiInstance clustersClusterIdDisksGetWith:clusterId
    includeUninitializedDisks:includeUninitializedDisks
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'includeUninitializedDisks': true // {{Boolean}} When this parameter is true, all disks ( initialised and un -initialised ) are returned.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDisksGet(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDisksGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var includeUninitializedDisks = true;  // Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned. (optional) 

            try
            {
                // Get a cluster's disks
                array[Disk] result = apiInstance.clustersClusterIdDisksGet(clusterId, includeUninitializedDisks);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdDisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$includeUninitializedDisks = true; // Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned.

try {
    $result = $api_instance->clustersClusterIdDisksGet($clusterId, $includeUninitializedDisks);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdDisksGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $includeUninitializedDisks = true; # Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned.

eval { 
    my $result = $api_instance->clustersClusterIdDisksGet(clusterId => $clusterId, includeUninitializedDisks => $includeUninitializedDisks);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdDisksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
includeUninitializedDisks = true # Boolean | When this parameter is true, all disks ( initialised and un -initialised ) are returned. (optional)

try: 
    # Get a cluster's disks
    api_response = api_instance.clusters_cluster_id_disks_get(clusterId, includeUninitializedDisks=includeUninitializedDisks)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdDisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Query parameters
Name Description
include_uninitialized_disks
Boolean
When this parameter is true, all disks ( initialised and un -initialised ) are returned.

Responses

Status: 200 - Cluster's disks

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdGet

Get a cluster with specific ID.

A successful response will return a cluster's details with specific ID. Action can be performed only by users with `admin` role.


/clusters/{cluster_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            Cluster result = apiInstance.clustersClusterIdGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            Cluster result = apiInstance.clustersClusterIdGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a cluster with specific ID.
[apiInstance clustersClusterIdGetWith:clusterId
              completionHandler: ^(Cluster output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a cluster with specific ID.
                Cluster result = apiInstance.clustersClusterIdGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdGet($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a cluster with specific ID.
    api_response = api_instance.clusters_cluster_id_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Cluster with specific ID.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdImagesGet

Get all available images of a cluster on enabled or disabled state.

A successful response will return all the available images within the specified cluster that are either enabled or disabled, with the use of a filter in the api call after the /images , images?state=enabled or images?state=disabled.


/clusters/{cluster_id}/images

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images?state="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String state = state_example; // String | The state of images.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesGet(clusterId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String state = state_example; // String | The state of images.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesGet(clusterId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
String *state = state_example; // The state of images. (optional)

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get all available images of a cluster on enabled or disabled state.
[apiInstance clustersClusterIdImagesGetWith:clusterId
    state:state
              completionHandler: ^(array[Image] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'state': state_example // {{String}} The state of images.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdImagesGet(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdImagesGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var state = state_example;  // String | The state of images. (optional) 

            try
            {
                // Get all available images of a cluster on enabled or disabled state.
                array[Image] result = apiInstance.clustersClusterIdImagesGet(clusterId, state);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdImagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$state = state_example; // String | The state of images.

try {
    $result = $api_instance->clustersClusterIdImagesGet($clusterId, $state);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdImagesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $state = state_example; # String | The state of images.

eval { 
    my $result = $api_instance->clustersClusterIdImagesGet(clusterId => $clusterId, state => $state);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdImagesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
state = state_example # String | The state of images. (optional)

try: 
    # Get all available images of a cluster on enabled or disabled state.
    api_response = api_instance.clusters_cluster_id_images_get(clusterId, state=state)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdImagesGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Query parameters
Name Description
state
String
The state of images.

Responses

Status: 200 - A list of images.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdImagesImageIdDelete

Delete the image of a cluster with the specified image ID.

A successful response will delete the image within the specified cluster with the specified image ID.


/clusters/{cluster_id}/images/{image_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images/{image_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDelete(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDelete(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *imageId = 789; // The image id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Delete the image of a cluster with the specified image ID.
[apiInstance clustersClusterIdImagesImageIdDeleteWith:clusterId
    imageId:imageId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var imageId = 789; // {{Long}} The image id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdImagesImageIdDelete(clusterId, imageId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdImagesImageIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var imageId = 789;  // Long | The image id.

            try
            {
                // Delete the image of a cluster with the specified image ID.
                apiInstance.clustersClusterIdImagesImageIdDelete(clusterId, imageId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdImagesImageIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$imageId = 789; // Long | The image id.

try {
    $api_instance->clustersClusterIdImagesImageIdDelete($clusterId, $imageId);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdImagesImageIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $imageId = 789; # Long | The image id.

eval { 
    $api_instance->clustersClusterIdImagesImageIdDelete(clusterId => $clusterId, imageId => $imageId);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdImagesImageIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
imageId = 789 # Long | The image id.

try: 
    # Delete the image of a cluster with the specified image ID.
    api_instance.clusters_cluster_id_images_image_id_delete(clusterId, imageId)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdImagesImageIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
image_id*
Long (int64)
The image id.
Required

Responses

Status: 204 - Successfully deleted the specified image.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdImagesImageIdDownloadPut

Download the image of a CLuster with the specified image ID from the Virtupian.

A successful response will download the specified image locally.


/clusters/{cluster_id}/images/{image_id}/download

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images/{image_id}/download"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDownloadPut(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDownloadPut(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *imageId = 789; // The image id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Download the image of a CLuster with the specified image ID from the Virtupian.
[apiInstance clustersClusterIdImagesImageIdDownloadPutWith:clusterId
    imageId:imageId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var imageId = 789; // {{Long}} The image id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdImagesImageIdDownloadPut(clusterId, imageId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdImagesImageIdDownloadPutExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var imageId = 789;  // Long | The image id.

            try
            {
                // Download the image of a CLuster with the specified image ID from the Virtupian.
                apiInstance.clustersClusterIdImagesImageIdDownloadPut(clusterId, imageId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdImagesImageIdDownloadPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$imageId = 789; // Long | The image id.

try {
    $api_instance->clustersClusterIdImagesImageIdDownloadPut($clusterId, $imageId);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdImagesImageIdDownloadPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $imageId = 789; # Long | The image id.

eval { 
    $api_instance->clustersClusterIdImagesImageIdDownloadPut(clusterId => $clusterId, imageId => $imageId);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdImagesImageIdDownloadPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
imageId = 789 # Long | The image id.

try: 
    # Download the image of a CLuster with the specified image ID from the Virtupian.
    api_instance.clusters_cluster_id_images_image_id_download_put(clusterId, imageId)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdImagesImageIdDownloadPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
image_id*
Long (int64)
The image id.
Required

Responses

Status: 202 - Status accepted. The image will be downloaded.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdImagesImageIdGet

Get the image with the specified image id of the specified cluster..

A successful response will return the image within the specified cluster.


/clusters/{cluster_id}/images/{image_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images/{image_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesImageIdGet(clusterId, imageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long imageId = 789; // Long | The image id.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesImageIdGet(clusterId, imageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdImagesImageIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *imageId = 789; // The image id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get the image with the specified image id of the specified cluster..
[apiInstance clustersClusterIdImagesImageIdGetWith:clusterId
    imageId:imageId
              completionHandler: ^(array[Image] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var imageId = 789; // {{Long}} The image id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdImagesImageIdGet(clusterId, imageId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdImagesImageIdGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var imageId = 789;  // Long | The image id.

            try
            {
                // Get the image with the specified image id of the specified cluster..
                array[Image] result = apiInstance.clustersClusterIdImagesImageIdGet(clusterId, imageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdImagesImageIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$imageId = 789; // Long | The image id.

try {
    $result = $api_instance->clustersClusterIdImagesImageIdGet($clusterId, $imageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdImagesImageIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $imageId = 789; # Long | The image id.

eval { 
    my $result = $api_instance->clustersClusterIdImagesImageIdGet(clusterId => $clusterId, imageId => $imageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdImagesImageIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
imageId = 789 # Long | The image id.

try: 
    # Get the image with the specified image id of the specified cluster..
    api_response = api_instance.clusters_cluster_id_images_image_id_get(clusterId, imageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdImagesImageIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
image_id*
Long (int64)
The image id.
Required

Responses

Status: 200 - The image with the specified id.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesGet

Get a cluster's nodes

A successful response will return a list of cluster's nodes.


/clusters/{cluster_id}/nodes

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Node] result = apiInstance.clustersClusterIdNodesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Node] result = apiInstance.clustersClusterIdNodesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a cluster's nodes
[apiInstance clustersClusterIdNodesGetWith:clusterId
              completionHandler: ^(array[Node] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNodesGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a cluster's nodes
                array[Node] result = apiInstance.clustersClusterIdNodesGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdNodesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdNodesGet($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdNodesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdNodesGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdNodesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a cluster's nodes
    api_response = api_instance.clusters_cluster_id_nodes_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdNodesGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Cluster's nodes

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut

Initialise an unconfigured disk.

A successful response will return Initialised disk infos.


/clusters/{cluster_id}/nodes/{node_id}/unconfigured_disks/{disk_id}/initialise

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes/{node_id}/unconfigured_disks/{disk_id}/initialise"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String nodeId = nodeId_example; // String | The node id.
        Long diskId = 789; // Long | The disk id.
        try {
            Disk result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut(clusterId, nodeId, diskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String nodeId = nodeId_example; // String | The node id.
        Long diskId = 789; // Long | The disk id.
        try {
            Disk result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut(clusterId, nodeId, diskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
String *nodeId = nodeId_example; // The node id.
Long *diskId = 789; // The disk id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Initialise an unconfigured disk.
[apiInstance clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePutWith:clusterId
    nodeId:nodeId
    diskId:diskId
              completionHandler: ^(Disk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var nodeId = nodeId_example; // {{String}} The node id.
var diskId = 789; // {{Long}} The disk id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut(clusterId, nodeId, diskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePutExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var nodeId = nodeId_example;  // String | The node id.
            var diskId = 789;  // Long | The disk id.

            try
            {
                // Initialise an unconfigured disk.
                Disk result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut(clusterId, nodeId, diskId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$nodeId = nodeId_example; // String | The node id.
$diskId = 789; // Long | The disk id.

try {
    $result = $api_instance->clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut($clusterId, $nodeId, $diskId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $nodeId = nodeId_example; # String | The node id.
my $diskId = 789; # Long | The disk id.

eval { 
    my $result = $api_instance->clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut(clusterId => $clusterId, nodeId => $nodeId, diskId => $diskId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
nodeId = nodeId_example # String | The node id.
diskId = 789 # Long | The disk id.

try: 
    # Initialise an unconfigured disk.
    api_response = api_instance.clusters_cluster_id_nodes_node_id_unconfigured_disks_disk_id_initialise_put(clusterId, nodeId, diskId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksDiskIdInitialisePut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
node_id*
String
The node id.
Required
disk_id*
Long (int64)
The disk id.
Required

Responses

Status: 200 - Initialised disk information.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNodesNodeIdUnconfiguredDisksGet

Get a nodes' unconfigured disks.

A successful response will return a list of node's unconfigured disks.


/clusters/{cluster_id}/nodes/{node_id}/unconfigured_disks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/nodes/{node_id}/unconfigured_disks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String nodeId = nodeId_example; // String | The node id.
        try {
            array[Disk] result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksGet(clusterId, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesNodeIdUnconfiguredDisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        String nodeId = nodeId_example; // String | The node id.
        try {
            array[Disk] result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksGet(clusterId, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdNodesNodeIdUnconfiguredDisksGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
String *nodeId = nodeId_example; // The node id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a nodes' unconfigured disks.
[apiInstance clustersClusterIdNodesNodeIdUnconfiguredDisksGetWith:clusterId
    nodeId:nodeId
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var nodeId = nodeId_example; // {{String}} The node id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNodesNodeIdUnconfiguredDisksGet(clusterId, nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNodesNodeIdUnconfiguredDisksGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var nodeId = nodeId_example;  // String | The node id.

            try
            {
                // Get a nodes' unconfigured disks.
                array[Disk] result = apiInstance.clustersClusterIdNodesNodeIdUnconfiguredDisksGet(clusterId, nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdNodesNodeIdUnconfiguredDisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$nodeId = nodeId_example; // String | The node id.

try {
    $result = $api_instance->clustersClusterIdNodesNodeIdUnconfiguredDisksGet($clusterId, $nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $nodeId = nodeId_example; # String | The node id.

eval { 
    my $result = $api_instance->clustersClusterIdNodesNodeIdUnconfiguredDisksGet(clusterId => $clusterId, nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
nodeId = nodeId_example # String | The node id.

try: 
    # Get a nodes' unconfigured disks.
    api_response = api_instance.clusters_cluster_id_nodes_node_id_unconfigured_disks_get(clusterId, nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdNodesNodeIdUnconfiguredDisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
node_id*
String
The node id.
Required

Responses

Status: 200 - Node's unconfigured disks

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdReleasePublicIpsPut

Release all allocated public IPs for an existing AWS Cluster.

Release all allocated public IPs for an existing AWS Cluster.


/clusters/{cluster_id}/release_public_ips

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/release_public_ips"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdReleasePublicIpsPut(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdReleasePublicIpsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            apiInstance.clustersClusterIdReleasePublicIpsPut(clusterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdReleasePublicIpsPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Release all allocated public IPs for an existing AWS Cluster.
[apiInstance clustersClusterIdReleasePublicIpsPutWith:clusterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdReleasePublicIpsPut(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdReleasePublicIpsPutExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Release all allocated public IPs for an existing AWS Cluster.
                apiInstance.clustersClusterIdReleasePublicIpsPut(clusterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdReleasePublicIpsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

try {
    $api_instance->clustersClusterIdReleasePublicIpsPut($clusterId);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdReleasePublicIpsPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    $api_instance->clustersClusterIdReleasePublicIpsPut(clusterId => $clusterId);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdReleasePublicIpsPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Release all allocated public IPs for an existing AWS Cluster.
    api_instance.clusters_cluster_id_release_public_ips_put(clusterId)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdReleasePublicIpsPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Successfully released public IPs from the cluster.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdResourceGroupsGet

Get resource groups of a cluster.

A successful response will return a list of the resource groups of the specified cluster.


/clusters/{cluster_id}/resource_groups

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/resource_groups"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[ResourceGroup] result = apiInstance.clustersClusterIdResourceGroupsGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdResourceGroupsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[ResourceGroup] result = apiInstance.clustersClusterIdResourceGroupsGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdResourceGroupsGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get resource groups of a cluster.
[apiInstance clustersClusterIdResourceGroupsGetWith:clusterId
              completionHandler: ^(array[ResourceGroup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdResourceGroupsGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdResourceGroupsGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get resource groups of a cluster.
                array[ResourceGroup] result = apiInstance.clustersClusterIdResourceGroupsGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdResourceGroupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdResourceGroupsGet($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdResourceGroupsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdResourceGroupsGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdResourceGroupsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get resource groups of a cluster.
    api_response = api_instance.clusters_cluster_id_resource_groups_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdResourceGroupsGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - A list of resource groups.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdResourceGroupsResourceGroupIdGet

Get a resource group of a cluster.

A successful response will return the specified resource group of the specified cluster.


/clusters/{cluster_id}/resource_groups/{resource_group_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/resource_groups/{resource_group_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsResourceGroupIdGet(clusterId, resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdResourceGroupsResourceGroupIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsResourceGroupIdGet(clusterId, resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdResourceGroupsResourceGroupIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *resourceGroupId = 789; // The resource group id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a resource group of a cluster.
[apiInstance clustersClusterIdResourceGroupsResourceGroupIdGetWith:clusterId
    resourceGroupId:resourceGroupId
              completionHandler: ^(ResourceGroup output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.
var resourceGroupId = 789; // {{Long}} The resource group id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdResourceGroupsResourceGroupIdGet(clusterId, resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdResourceGroupsResourceGroupIdGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get a resource group of a cluster.
                ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsResourceGroupIdGet(clusterId, resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdResourceGroupsResourceGroupIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.
$resourceGroupId = 789; // Long | The resource group id.

try {
    $result = $api_instance->clustersClusterIdResourceGroupsResourceGroupIdGet($clusterId, $resourceGroupId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdResourceGroupsResourceGroupIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.
my $resourceGroupId = 789; # Long | The resource group id.

eval { 
    my $result = $api_instance->clustersClusterIdResourceGroupsResourceGroupIdGet(clusterId => $clusterId, resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdResourceGroupsResourceGroupIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get a resource group of a cluster.
    api_response = api_instance.clusters_cluster_id_resource_groups_resource_group_id_get(clusterId, resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdResourceGroupsResourceGroupIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - The resource group of the cluster.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdUnconfiguredDisksGet

Get a cluster's unconfigured disks

A successful response will return a list of cluster's unconfigured disks.


/clusters/{cluster_id}/unconfigured_disks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/unconfigured_disks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Disk] result = apiInstance.clustersClusterIdUnconfiguredDisksGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdUnconfiguredDisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Disk] result = apiInstance.clustersClusterIdUnconfiguredDisksGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersClusterIdUnconfiguredDisksGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get a cluster's unconfigured disks
[apiInstance clustersClusterIdUnconfiguredDisksGetWith:clusterId
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var clusterId = 789; // {{Long}} The cluster id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdUnconfiguredDisksGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdUnconfiguredDisksGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a cluster's unconfigured disks
                array[Disk] result = apiInstance.clustersClusterIdUnconfiguredDisksGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersClusterIdUnconfiguredDisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdUnconfiguredDisksGet($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersClusterIdUnconfiguredDisksGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdUnconfiguredDisksGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersClusterIdUnconfiguredDisksGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a cluster's unconfigured disks
    api_response = api_instance.clusters_cluster_id_unconfigured_disks_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersClusterIdUnconfiguredDisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - Cluster's unconfigured disks

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersCreatePost

Create A new AWS hosted cluster.

Create an new AWS cluster. Connect to the newly created cluster.


/clusters/create

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/create"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        CreateCluster body = ; // CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)

        try {
            Cluster result = apiInstance.clustersCreatePost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersCreatePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        CreateCluster body = ; // CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)

        try {
            Cluster result = apiInstance.clustersCreatePost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersCreatePost");
            e.printStackTrace();
        }
    }
}
CreateCluster *body = ; // The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)
 (optional)

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Create A new AWS hosted cluster.
[apiInstance clustersCreatePostWith:body
              completionHandler: ^(Cluster output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var opts = { 
  'body':  // {{CreateCluster}} The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersCreatePost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersCreatePostExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var body = new CreateCluster(); // CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)
 (optional) 

            try
            {
                // Create A new AWS hosted cluster.
                Cluster result = apiInstance.clustersCreatePost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersCreatePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$body = ; // CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)


try {
    $result = $api_instance->clustersCreatePost($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersCreatePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $body = WWW::SwaggerClient::Object::CreateCluster->new(); # CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)


eval { 
    my $result = $api_instance->clustersCreatePost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersCreatePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
body =  # CreateCluster | The cluster parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port is in use (422)
 (optional)

try: 
    # Create A new AWS hosted cluster.
    api_response = api_instance.clusters_create_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersCreatePost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully cluster creation.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersGet

Get all available clusters.

A successful response will return a list with all the available clusters. Action can be performed only by users with `admin` role.


/clusters

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        try {
            array[Cluster] result = apiInstance.clustersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        try {
            array[Cluster] result = apiInstance.clustersGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersGet");
            e.printStackTrace();
        }
    }
}

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get all available clusters.
[apiInstance clustersGetWithCompletionHandler: 
              ^(array[Cluster] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();

            try
            {
                // Get all available clusters.
                array[Cluster] result = apiInstance.clustersGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();

try {
    $result = $api_instance->clustersGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();

eval { 
    my $result = $api_instance->clustersGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()

try: 
    # Get all available clusters.
    api_response = api_instance.clusters_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of clusters.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersHostInfoGet

Get Cluster's host info (ip and port).

A successful response will return an available random cluster port between 7000 and 8000 and the SIMs IP. Action can be performed only by users with `admin` role.


/clusters/host_info

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/host_info"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        try {
            ClusterHostInfo result = apiInstance.clustersHostInfoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersHostInfoGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        try {
            ClusterHostInfo result = apiInstance.clustersHostInfoGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersHostInfoGet");
            e.printStackTrace();
        }
    }
}

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Get Cluster's host info (ip and port).
[apiInstance clustersHostInfoGetWithCompletionHandler: 
              ^(ClusterHostInfo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersHostInfoGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersHostInfoGetExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();

            try
            {
                // Get Cluster's host info (ip and port).
                ClusterHostInfo result = apiInstance.clustersHostInfoGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersHostInfoGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();

try {
    $result = $api_instance->clustersHostInfoGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersHostInfoGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();

eval { 
    my $result = $api_instance->clustersHostInfoGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersHostInfoGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()

try: 
    # Get Cluster's host info (ip and port).
    api_response = api_instance.clusters_host_info_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersHostInfoGet: %s\n" % e)

Parameters

Responses

Status: 200 - An available random port and SIM's IP.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersPost

Create connection with an existing Cluster.

Connect with an existing cluster. It is advised to use GET `/clusters/host_info` in order to retrieve an available port and the SIM's public IP address. Action can be performed only by users with `admin` role.


/clusters

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClustersApi;

import java.io.File;
import java.util.*;

public class ClustersApiExample {

    public static void main(String[] args) {
        
        ClustersApi apiInstance = new ClustersApi();
        AddCluster body = ; // AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)

        try {
            Cluster result = apiInstance.clustersPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

    public static void main(String[] args) {
        ClustersApi apiInstance = new ClustersApi();
        AddCluster body = ; // AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)

        try {
            Cluster result = apiInstance.clustersPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#clustersPost");
            e.printStackTrace();
        }
    }
}
AddCluster *body = ; // The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)
 (optional)

ClustersApi *apiInstance = [[ClustersApi alloc] init];

// Create connection with an existing Cluster.
[apiInstance clustersPostWith:body
              completionHandler: ^(Cluster output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ClustersApi()
var opts = { 
  'body':  // {{AddCluster}} The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersPostExample
    {
        public void main()
        {

            var apiInstance = new ClustersApi();
            var body = new AddCluster(); // AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)
 (optional) 

            try
            {
                // Create connection with an existing Cluster.
                Cluster result = apiInstance.clustersPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.clustersPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiClustersApi();
$body = ; // AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)


try {
    $result = $api_instance->clustersPost($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClustersApi->clustersPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClustersApi;

my $api_instance = WWW::SwaggerClient::ClustersApi->new();
my $body = WWW::SwaggerClient::Object::AddCluster->new(); # AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)


eval { 
    my $result = $api_instance->clustersPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->clustersPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClustersApi()
body =  # AddCluster | The cluster connection parameters.
The following validations apply:
  * The Name should not be empty (422)
  * The Name should not start with non-letter character (422)
  * The Port should not be in use (422)
 (optional)

try: 
    # Create connection with an existing Cluster.
    api_response = api_instance.clusters_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->clustersPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully cluster addition.

Status: 400 - Cluster could not be created.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Datastores

clustersClusterIdDatastoresDatastoreIdDelete

Delete a datastore from a cluster.

The endpoint deletes a datastore. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/datastores/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatastoresApi;

import java.io.File;
import java.util.*;

public class DatastoresApiExample {

    public static void main(String[] args) {
        
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.clustersClusterIdDatastoresDatastoreIdDelete(clusterId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatastoresApi;

public class DatastoresApiExample {

    public static void main(String[] args) {
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.clustersClusterIdDatastoresDatastoreIdDelete(clusterId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *datastoreId = 789; // The datastore id.

DatastoresApi *apiInstance = [[DatastoresApi alloc] init];

// Delete a datastore from a cluster.
[apiInstance clustersClusterIdDatastoresDatastoreIdDeleteWith:clusterId
    datastoreId:datastoreId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DatastoresApi()
var clusterId = 789; // {{Long}} The cluster id.
var datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdDatastoresDatastoreIdDelete(clusterId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdDatastoresDatastoreIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new DatastoresApi();
            var clusterId = 789;  // Long | The cluster id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Delete a datastore from a cluster.
                apiInstance.clustersClusterIdDatastoresDatastoreIdDelete(clusterId, datastoreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresDatastoreIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDatastoresApi();
$clusterId = 789; // Long | The cluster id.
$datastoreId = 789; // Long | The datastore id.

try {
    $api_instance->clustersClusterIdDatastoresDatastoreIdDelete($clusterId, $datastoreId);
} catch (Exception $e) {
    echo 'Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DatastoresApi;

my $api_instance = WWW::SwaggerClient::DatastoresApi->new();
my $clusterId = 789; # Long | The cluster id.
my $datastoreId = 789; # Long | The datastore id.

eval { 
    $api_instance->clustersClusterIdDatastoresDatastoreIdDelete(clusterId => $clusterId, datastoreId => $datastoreId);
};
if ($@) {
    warn "Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DatastoresApi()
clusterId = 789 # Long | The cluster id.
datastoreId = 789 # Long | The datastore id.

try: 
    # Delete a datastore from a cluster.
    api_instance.clusters_cluster_id_datastores_datastore_id_delete(clusterId, datastoreId)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 204 - Datastore deleted successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.