SIM2 API

AvailabilityZones

availabilityZonesGet

Get a list the supported availability zones.

A successful response will return a list with the supported availability zones. Zoned 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}

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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 404 - Resource not found.

{"code":404}

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 of 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}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

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}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 404 - Resource not found.

{"code":404}

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}

Status: 404 - Resource not found.

{"code":404}

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}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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."},{"field":"units","message":"Units cannot be negative."}]}

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}

Status: 403 - Status forbidden.

{"code":403}

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}

Status: 403 - Status forbidden.

{"code":403}

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}

Status: 403 - Status forbidden.

{"code":403}

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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 500 - An unexpected error occurred.

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

resourceGroupsResourceGroupIdPublicIpsGet

Get a the allocated public IPs of a resource group.

A successful response will return all the allocated public IPS of the specified resource group.


/resource_groups/{resource_group_id}/public_ips

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/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 resourceGroupId = 789; // Long | The resource group id.
        try {
            array['String'] result = apiInstance.resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClustersApi#resourceGroupsResourceGroupIdPublicIpsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ClustersApi;

public class ClustersApiExample {

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

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

// Get a the allocated public IPs of a resource group.
[apiInstance resourceGroupsResourceGroupIdPublicIpsGetWith:resourceGroupId
              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 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.resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Get a the allocated public IPs of a resource group.
                array['String'] result = apiInstance.resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ClustersApi.resourceGroupsResourceGroupIdPublicIpsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPublicIpsGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ClustersApi->resourceGroupsResourceGroupIdPublicIpsGet: $@\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()
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Get a the allocated public IPs of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_public_ips_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClustersApi->resourceGroupsResourceGroupIdPublicIpsGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - A list of the allocated public IPs.

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

DbBackup

dbBackupsBackupNamePut

Restore SIM's DB from an existing backup

A successful response will return 204 and provide instructions on how to restore the DB from the specified backup. Action can be performed only by users with `admin` role.


/db_backups/{backup_name}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/db_backups/{backup_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DbBackupApi;

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

public class DbBackupApiExample {

    public static void main(String[] args) {
        
        DbBackupApi apiInstance = new DbBackupApi();
        String backupName = backupName_example; // String | The backup's name.
        try {
            DBRestoreUsage result = apiInstance.dbBackupsBackupNamePut(backupName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupApi#dbBackupsBackupNamePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DbBackupApi;

public class DbBackupApiExample {

    public static void main(String[] args) {
        DbBackupApi apiInstance = new DbBackupApi();
        String backupName = backupName_example; // String | The backup's name.
        try {
            DBRestoreUsage result = apiInstance.dbBackupsBackupNamePut(backupName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DbBackupApi#dbBackupsBackupNamePut");
            e.printStackTrace();
        }
    }
}
String *backupName = backupName_example; // The backup's name.

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

// Restore SIM's DB from an existing backup
[apiInstance dbBackupsBackupNamePutWith:backupName
              completionHandler: ^(DBRestoreUsage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DbBackupApi()
var backupName = backupName_example; // {{String}} The backup's name.

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

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

            var apiInstance = new DbBackupApi();
            var backupName = backupName_example;  // String | The backup's name.

            try
            {
                // Restore SIM's DB from an existing backup
                DBRestoreUsage result = apiInstance.dbBackupsBackupNamePut(backupName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupApi.dbBackupsBackupNamePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDbBackupApi();
$backupName = backupName_example; // String | The backup's name.

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

my $api_instance = WWW::SwaggerClient::DbBackupApi->new();
my $backupName = backupName_example; # String | The backup's name.

eval { 
    my $result = $api_instance->dbBackupsBackupNamePut(backupName => $backupName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DbBackupApi->dbBackupsBackupNamePut: $@\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.DbBackupApi()
backupName = backupName_example # String | The backup's name.

try: 
    # Restore SIM's DB from an existing backup
    api_response = api_instance.db_backups_backup_name_put(backupName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DbBackupApi->dbBackupsBackupNamePut: %s\n" % e)

Parameters

Path parameters
Name Description
backup_name*
String
The backup's name.
Required

Responses

Status: 202 - DB Restore can be initiated with the manual procedure described in the response.

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

dbBackupsGet

Get a list of available backups of the SIM DB

A successful response will return a list of available SIM's DB backups. Action can be performed only by users with `admin` role.


/db_backups

Usage and SDK Samples

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

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

public class DbBackupApiExample {

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

public class DbBackupApiExample {

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

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

// Get a list of available backups of the SIM DB
[apiInstance dbBackupsGetWithCompletionHandler: 
              ^(array[DBBackup] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new DbBackupApi();

            try
            {
                // Get a list of available backups of the SIM DB
                array[DBBackup] result = apiInstance.dbBackupsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupApi.dbBackupsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    my $result = $api_instance->dbBackupsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DbBackupApi->dbBackupsGet: $@\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.DbBackupApi()

try: 
    # Get a list of available backups of the SIM DB
    api_response = api_instance.db_backups_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DbBackupApi->dbBackupsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of available SIM's DB backups

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 500 - An unexpected error occurred.

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

dbBackupsPost

Create a new backup of the SIM DB

A successful response will make a SIM's DB backup. A backup is copied to AWS S3 is SIM is deployed on AWS. Action can be performed only by users with `admin` role.


/db_backups

Usage and SDK Samples

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

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

public class DbBackupApiExample {

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

public class DbBackupApiExample {

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

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

// Create a new backup of the SIM DB
[apiInstance dbBackupsPostWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new DbBackupApi();

            try
            {
                // Create a new backup of the SIM DB
                apiInstance.dbBackupsPost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DbBackupApi.dbBackupsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    $api_instance->dbBackupsPost();
};
if ($@) {
    warn "Exception when calling DbBackupApi->dbBackupsPost: $@\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.DbBackupApi()

try: 
    # Create a new backup of the SIM DB
    api_instance.db_backups_post()
except ApiException as e:
    print("Exception when calling DbBackupApi->dbBackupsPost: %s\n" % e)

Parameters

Responses

Status: 200 - Backup created successfully

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 500 - An unexpected error occurred.

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

Status: 503 - Service or operation is currently not available.

{"code":503,"message":"Operation cannot proceed as it is currently unavailable."}

Default

clustersClusterIdProvidersProviderIdAssignPut

Assign a provider to a cluster.

A successful response will assign the given provider to the given cluster. Only providers of mode GENERAL_STORAGE_PROVIDER can be assigned to clusters with no assigned provider.


/clusters/{cluster_id}/providers/{provider_id}/assign

Usage and SDK Samples

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

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

public class DefaultApiExample {

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

public class DefaultApiExample {

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

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

// Assign a provider to a cluster.
[apiInstance clustersClusterIdProvidersProviderIdAssignPutWith:clusterId
    providerId:providerId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

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

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

            try
            {
                // Assign a provider to a cluster.
                apiInstance.clustersClusterIdProvidersProviderIdAssignPut(clusterId, providerId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clustersClusterIdProvidersProviderIdAssignPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    $api_instance->clustersClusterIdProvidersProviderIdAssignPut(clusterId => $clusterId, providerId => $providerId);
};
if ($@) {
    warn "Exception when calling DefaultApi->clustersClusterIdProvidersProviderIdAssignPut: $@\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.DefaultApi()
clusterId = 789 # Long | The cluster id.
providerId = 789 # Long | The provider id.

try: 
    # Assign a provider to a cluster.
    api_instance.clusters_cluster_id_providers_provider_id_assign_put(clusterId, providerId)
except ApiException as e:
    print("Exception when calling DefaultApi->clustersClusterIdProvidersProviderIdAssignPut: %s\n" % e)

Parameters

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

Responses

Status: 204 - Successfully assigned provider to 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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 404 - Resource not found.

{"code":404}

Status: 409 - Status forbidden.

{"code":403}

Status: 500 - An unexpected error occurred.

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

clustersClusterIdProvidersProviderIdDeassignPut

Deassign a provider to a cluster.

A successful response will deassign the given provider to the given cluster. Only clusters with no assigned-attached provider can be deassigned.


/clusters/{cluster_id}/providers/{provider_id}/deassign

Usage and SDK Samples

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

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

public class DefaultApiExample {

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

public class DefaultApiExample {

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

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

// Deassign a provider to a cluster.
[apiInstance clustersClusterIdProvidersProviderIdDeassignPutWith:clusterId
    providerId:providerId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

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

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

            try
            {
                // Deassign a provider to a cluster.
                apiInstance.clustersClusterIdProvidersProviderIdDeassignPut(clusterId, providerId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clustersClusterIdProvidersProviderIdDeassignPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    $api_instance->clustersClusterIdProvidersProviderIdDeassignPut(clusterId => $clusterId, providerId => $providerId);
};
if ($@) {
    warn "Exception when calling DefaultApi->clustersClusterIdProvidersProviderIdDeassignPut: $@\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.DefaultApi()
clusterId = 789 # Long | The cluster id.
providerId = 789 # Long | The provider id.

try: 
    # Deassign a provider to a cluster.
    api_instance.clusters_cluster_id_providers_provider_id_deassign_put(clusterId, providerId)
except ApiException as e:
    print("Exception when calling DefaultApi->clustersClusterIdProvidersProviderIdDeassignPut: %s\n" % e)

Parameters

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

Responses

Status: 204 - Successfully deassigned provider from 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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 404 - Resource not found.

{"code":404}

Status: 409 - Status forbidden.

{"code":403}

Status: 500 - An unexpected error occurred.

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

Domain

domainDelete

Remove an existing secure domain access of SIM UI and API

Remove the secure domain access of SIM UI through https. Action can be performed only by users with `admin` role.


/domain

Usage and SDK Samples

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

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

public class DomainApiExample {

    public static void main(String[] args) {
        
        DomainApi apiInstance = new DomainApi();
        RemoveDomain body = ; // RemoveDomain | The domain info (domain name)
        try {
            apiInstance.domainDelete(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomainApi#domainDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DomainApi;

public class DomainApiExample {

    public static void main(String[] args) {
        DomainApi apiInstance = new DomainApi();
        RemoveDomain body = ; // RemoveDomain | The domain info (domain name)
        try {
            apiInstance.domainDelete(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomainApi#domainDelete");
            e.printStackTrace();
        }
    }
}
RemoveDomain *body = ; // The domain info (domain name) (optional)

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

// Remove an existing secure domain access of SIM UI and API
[apiInstance domainDeleteWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DomainApi()
var opts = { 
  'body':  // {{RemoveDomain}} The domain info (domain name)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.domainDelete(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DomainApi();
            var body = new RemoveDomain(); // RemoveDomain | The domain info (domain name) (optional) 

            try
            {
                // Remove an existing secure domain access of SIM UI and API
                apiInstance.domainDelete(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DomainApi.domainDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDomainApi();
$body = ; // RemoveDomain | The domain info (domain name)

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

my $api_instance = WWW::SwaggerClient::DomainApi->new();
my $body = WWW::SwaggerClient::Object::RemoveDomain->new(); # RemoveDomain | The domain info (domain name)

eval { 
    $api_instance->domainDelete(body => $body);
};
if ($@) {
    warn "Exception when calling DomainApi->domainDelete: $@\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.DomainApi()
body =  # RemoveDomain | The domain info (domain name) (optional)

try: 
    # Remove an existing secure domain access of SIM UI and API
    api_instance.domain_delete(body=body)
except ApiException as e:
    print("Exception when calling DomainApi->domainDelete: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 202 - Request accepted. Secure domain will be removed soon.

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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 500 - An unexpected error occurred.

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

domainPost

Create a secure domain access of SIM UI and API through https

Create a secure domain access of SIM UI and API through https. Email is required in order to inform in case of SSL renew error. Action can be performed only by users with `admin` role.


/domain

Usage and SDK Samples

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

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

public class DomainApiExample {

    public static void main(String[] args) {
        
        DomainApi apiInstance = new DomainApi();
        CreateDomain body = ; // CreateDomain | The domain info (domain name and email)
        try {
            apiInstance.domainPost(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomainApi#domainPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DomainApi;

public class DomainApiExample {

    public static void main(String[] args) {
        DomainApi apiInstance = new DomainApi();
        CreateDomain body = ; // CreateDomain | The domain info (domain name and email)
        try {
            apiInstance.domainPost(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomainApi#domainPost");
            e.printStackTrace();
        }
    }
}
CreateDomain *body = ; // The domain info (domain name and email) (optional)

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

// Create a secure domain access of SIM UI and API through https
[apiInstance domainPostWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DomainApi()
var opts = { 
  'body':  // {{CreateDomain}} The domain info (domain name and email)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.domainPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DomainApi();
            var body = new CreateDomain(); // CreateDomain | The domain info (domain name and email) (optional) 

            try
            {
                // Create a secure domain access of SIM UI and API through https
                apiInstance.domainPost(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DomainApi.domainPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDomainApi();
$body = ; // CreateDomain | The domain info (domain name and email)

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

my $api_instance = WWW::SwaggerClient::DomainApi->new();
my $body = WWW::SwaggerClient::Object::CreateDomain->new(); # CreateDomain | The domain info (domain name and email)

eval { 
    $api_instance->domainPost(body => $body);
};
if ($@) {
    warn "Exception when calling DomainApi->domainPost: $@\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.DomainApi()
body =  # CreateDomain | The domain info (domain name and email) (optional)

try: 
    # Create a secure domain access of SIM UI and API through https
    api_instance.domain_post(body=body)
except ApiException as e:
    print("Exception when calling DomainApi->domainPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 202 - Request accepted. Domain will be secured in a couple of minutes.

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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 500 - An unexpected error occurred.

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

InstanceTypes

instanceTypesProviderGet

Get a list of the supported instance types of the provider.

A successful response will return a list of the supported instance types of the provider. Provider could be "aws" or "sunlight" and currently only "aws" has supported instance types.


/instance_types/{provider}

Usage and SDK Samples

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

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

public class InstanceTypesApiExample {

    public static void main(String[] args) {
        
        InstanceTypesApi apiInstance = new InstanceTypesApi();
        String provider = provider_example; // String | The cluster's provider.
        try {
            array['String'] result = apiInstance.instanceTypesProviderGet(provider);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceTypesApi#instanceTypesProviderGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstanceTypesApi;

public class InstanceTypesApiExample {

    public static void main(String[] args) {
        InstanceTypesApi apiInstance = new InstanceTypesApi();
        String provider = provider_example; // String | The cluster's provider.
        try {
            array['String'] result = apiInstance.instanceTypesProviderGet(provider);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstanceTypesApi#instanceTypesProviderGet");
            e.printStackTrace();
        }
    }
}
String *provider = provider_example; // The cluster's provider.

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

// Get a list of the supported instance types of the provider.
[apiInstance instanceTypesProviderGetWith:provider
              completionHandler: ^(array['String'] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstanceTypesApi()
var provider = provider_example; // {{String}} The cluster's provider.

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

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

            var apiInstance = new InstanceTypesApi();
            var provider = provider_example;  // String | The cluster's provider.

            try
            {
                // Get a list of the supported instance types of the provider.
                array['String'] result = apiInstance.instanceTypesProviderGet(provider);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstanceTypesApi.instanceTypesProviderGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstanceTypesApi();
$provider = provider_example; // String | The cluster's provider.

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

my $api_instance = WWW::SwaggerClient::InstanceTypesApi->new();
my $provider = provider_example; # String | The cluster's provider.

eval { 
    my $result = $api_instance->instanceTypesProviderGet(provider => $provider);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstanceTypesApi->instanceTypesProviderGet: $@\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.InstanceTypesApi()
provider = provider_example # String | The cluster's provider.

try: 
    # Get a list of the supported instance types of the provider.
    api_response = api_instance.instance_types_provider_get(provider)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstanceTypesApi->instanceTypesProviderGet: %s\n" % e)

Parameters

Path parameters
Name Description
provider*
String
The cluster's provider.
Required

Responses

Status: 201 - list of the instance types

Status: 401 - Status unauthorized.

{"code":401}

Status: 500 - An unexpected error occurred.

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

Instances

instancesGet

Get all available instances.

A successful response will return all the available instances that current role has access to.


/instances

Usage and SDK Samples

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

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

public class InstancesApiExample {

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

public class InstancesApiExample {

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

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

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

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

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

            var apiInstance = new InstancesApi();

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

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

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

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

eval { 
    my $result = $api_instance->instancesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesGet: $@\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.InstancesApi()

try: 
    # Get all available instances.
    api_response = api_instance.instances_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of instances.

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

instancesInstanceIdCreateBackupPut

Initiate a backup creation for the specified instance.

Initiate a backup creation for the specified instance. Only available for SIM hosted in AWS. Process will fail if Instance is in Moving or another Backup for the same instance is in progress. It will also fail if there are more than `max_parallel_backups_per_cluster` backups running on the same cluster.


/instances/{instance_id}/create_backup

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/create_backup"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

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

public class InstancesApiExample {

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

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

// Initiate a backup creation for the specified instance.
[apiInstance instancesInstanceIdCreateBackupPutWith:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

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

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

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Initiate a backup creation for the specified instance.
                apiInstance.instancesInstanceIdCreateBackupPut(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdCreateBackupPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    $api_instance->instancesInstanceIdCreateBackupPut(instanceId => $instanceId);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdCreateBackupPut: $@\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.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Initiate a backup creation for the specified instance.
    api_instance.instances_instance_id_create_backup_put(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdCreateBackupPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 202 -

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

Status: 409 - Status conflict.

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

Status: 500 - An unexpected error occurred.

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

Status: 501 - An unexpected error occurred.

{"code":501,"message":"Operation cannot proceed as it is not implemented or supported."}

Status: 503 - Service or operation is currently not available.

{"code":503,"message":"Operation cannot proceed as it is currently unavailable."}

instancesInstanceIdCredentialsGet

Get the credentials of the specified instance.

A successful response will return the credentials to login to the specified instance.


/instances/{instance_id}/credentials

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/credentials"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

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

public class InstancesApiExample {

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

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

// Get the credentials of the specified instance.
[apiInstance instancesInstanceIdCredentialsGetWith:instanceId
              completionHandler: ^(array[InstanceCredentials] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

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

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

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Get the credentials of the specified instance.
                array[InstanceCredentials] result = apiInstance.instancesInstanceIdCredentialsGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdCredentialsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->instancesInstanceIdCredentialsGet(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdCredentialsGet: $@\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.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Get the credentials of the specified instance.
    api_response = api_instance.instances_instance_id_credentials_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdCredentialsGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - The credentials to connect to to the instance.

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

instancesInstanceIdDelete

Delete a specified instance.

A successful response will delete the specified instance.


/instances/{instance_id}

Usage and SDK Samples

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

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

public class InstancesApiExample {

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

public class InstancesApiExample {

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

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

// Delete a specified instance.
[apiInstance instancesInstanceIdDeleteWith:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

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

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

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Delete a specified instance.
                apiInstance.instancesInstanceIdDelete(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    $api_instance->instancesInstanceIdDelete(instanceId => $instanceId);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdDelete: $@\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.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Delete a specified instance.
    api_instance.instances_instance_id_delete(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - Successfully deleted the instance.

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

instancesInstanceIdGet

Get a specific instance's details.

A successful response will return the specified instance's details.


/instances/{instance_id}

Usage and SDK Samples

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

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

public class InstancesApiExample {

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

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        try {
            Instance result = apiInstance.instancesInstanceIdGet(instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdGet");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

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

// Get a specific instance's details.
[apiInstance instancesInstanceIdGetWith:instanceId
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.

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

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

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Get a specific instance's details.
                Instance result = apiInstance.instancesInstanceIdGet(instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.

eval { 
    my $result = $api_instance->instancesInstanceIdGet(instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdGet: $@\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.InstancesApi()
instanceId = 789 # Long | The instance id.

try: 
    # Get a specific instance's details.
    api_response = api_instance.instances_instance_id_get(instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required

Responses

Status: 200 - Get an instance details.

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

instancesInstanceIdInstancesDisassociateIpPublicIpPut

Disassociate a public IP from associated the Network Interface.

Disassociate an allocated public IP from the associated Network interface.


/instances/{instance_id}/instances/disassociate_ip/{public_ip}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/instances/disassociate_ip/{public_ip}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InstancesApi;

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

public class InstancesApiExample {

    public static void main(String[] args) {
        
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.instancesInstanceIdInstancesDisassociateIpPublicIpPut(instanceId, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInstancesDisassociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InstancesApi;

public class InstancesApiExample {

    public static void main(String[] args) {
        InstancesApi apiInstance = new InstancesApi();
        Long instanceId = 789; // Long | The instance id.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.instancesInstanceIdInstancesDisassociateIpPublicIpPut(instanceId, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInstancesDisassociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
String *publicIp = publicIp_example; // The public IP to associate.

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

// Disassociate a public IP from associated the Network Interface.
[apiInstance instancesInstanceIdInstancesDisassociateIpPublicIpPutWith:instanceId
    publicIp:publicIp
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.InstancesApi()
var instanceId = 789; // {{Long}} The instance id.
var publicIp = publicIp_example; // {{String}} The public IP to associate.

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

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

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var publicIp = publicIp_example;  // String | The public IP to associate.

            try
            {
                // Disassociate a public IP from associated the Network Interface.
                apiInstance.instancesInstanceIdInstancesDisassociateIpPublicIpPut(instanceId, publicIp);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInstancesDisassociateIpPublicIpPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$publicIp = publicIp_example; // String | The public IP to associate.

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

my $api_instance = WWW::SwaggerClient::InstancesApi->new();
my $instanceId = 789; # Long | The instance id.
my $publicIp = publicIp_example; # String | The public IP to associate.

eval { 
    $api_instance->instancesInstanceIdInstancesDisassociateIpPublicIpPut(instanceId => $instanceId, publicIp => $publicIp);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdInstancesDisassociateIpPublicIpPut: $@\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.InstancesApi()
instanceId = 789 # Long | The instance id.
publicIp = publicIp_example # String | The public IP to associate.

try: 
    # Disassociate a public IP from associated the Network Interface.
    api_instance.instances_instance_id_instances_disassociate_ip_public_ip_put(instanceId, publicIp)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInstancesDisassociateIpPublicIpPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
public_ip*
String
The public IP to associate.
Required

Responses

Status: 200 - Public IP Disassociate 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."},{"field":"units","message":"Units cannot be negative."}]}

Status: 401 - Status unauthorized.