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.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 500 - An unexpected error occurred.

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

instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut

Associate a private IP to an allocated public IP.

Associate the Network interface with the specified private IP to an allocated public IP.


/instances/{instance_id}/instances/{private_ip}/associate_ip/{public_ip}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/instances/{private_ip}/associate_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 privateIp = privateIp_example; // String | The instance's private IP to associate to.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut(instanceId, privateIp, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut");
            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 privateIp = privateIp_example; // String | The instance's private IP to associate to.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut(instanceId, privateIp, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
String *privateIp = privateIp_example; // The instance's private IP to associate to.
String *publicIp = publicIp_example; // The public IP to associate.

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

// Associate a private IP to an allocated public IP.
[apiInstance instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPutWith:instanceId
    privateIp:privateIp
    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 privateIp = privateIp_example; // {{String}} The instance's private IP to associate to.
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.instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut(instanceId, privateIp, publicIp, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Associate a private IP to an allocated public IP.
                apiInstance.instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut(instanceId, privateIp, publicIp);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

try {
    $api_instance->instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut($instanceId, $privateIp, $publicIp);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut: ', $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 $privateIp = privateIp_example; # String | The instance's private IP to associate to.
my $publicIp = publicIp_example; # String | The public IP to associate.

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

try: 
    # Associate a private IP to an allocated public IP.
    api_instance.instances_instance_id_instances_private_ip_associate_ip_public_ip_put(instanceId, privateIp, publicIp)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdInstancesPrivateIpAssociateIpPublicIpPut: %s\n" % e)

Parameters

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

Responses

Status: 200 - Public IP associated to private IP successfully.

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

instancesInstanceIdMovePut

Move the specified instance to another Cluster.

Initiate a backup move for the specified instance. The move is specified by the new cluster, the new resource group, the new datastore and networks. Instance should be in ACTIVE or SHUTOFF status.


/instances/{instance_id}/move

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/instances/{instance_id}/move"
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.
        MoveInstance body = ; // MoveInstance | The parameters of instance move
        try {
            apiInstance.instancesInstanceIdMovePut(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMovePut");
            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.
        MoveInstance body = ; // MoveInstance | The parameters of instance move
        try {
            apiInstance.instancesInstanceIdMovePut(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdMovePut");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
MoveInstance *body = ; // The parameters of instance move (optional)

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

// Move the specified instance to another Cluster.
[apiInstance instancesInstanceIdMovePutWith:instanceId
    body:body
              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 opts = { 
  'body':  // {{MoveInstance}} The parameters of instance move
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdMovePut(instanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var body = new MoveInstance(); // MoveInstance | The parameters of instance move (optional) 

            try
            {
                // Move the specified instance to another Cluster.
                apiInstance.instancesInstanceIdMovePut(instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdMovePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

try {
    $api_instance->instancesInstanceIdMovePut($instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdMovePut: ', $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 $body = WWW::SwaggerClient::Object::MoveInstance->new(); # MoveInstance | The parameters of instance move

eval { 
    $api_instance->instancesInstanceIdMovePut(instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdMovePut: $@\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.
body =  # MoveInstance | The parameters of instance move (optional)

try: 
    # Move the specified instance to another Cluster.
    api_instance.instances_instance_id_move_put(instanceId, body=body)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdMovePut: %s\n" % e)

Parameters

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

Responses

Status: 202 - A move of the instance initiated.

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: 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."}

instancesInstanceIdVncDelete

Stop an instance's VNC

Stop an instance's VNC by concealing from Cluster.


/instances/{instance_id}/vnc

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/instances/{instance_id}/vnc"
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.instancesInstanceIdVncDelete(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncDelete");
            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.instancesInstanceIdVncDelete(instanceId);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncDelete");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.

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

// Stop an instance's VNC
[apiInstance instancesInstanceIdVncDeleteWith: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.instancesInstanceIdVncDelete(instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Stop an instance's VNC
                apiInstance.instancesInstanceIdVncDelete(instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdVncDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

try {
    $api_instance->instancesInstanceIdVncDelete($instanceId);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdVncDelete: ', $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->instancesInstanceIdVncDelete(instanceId => $instanceId);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdVncDelete: $@\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: 
    # Stop an instance's VNC
    api_instance.instances_instance_id_vnc_delete(instanceId)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdVncDelete: %s\n" % e)

Parameters

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

Responses

Status: 204 - Successfully stopped instance's VNC

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

instancesInstanceIdVncPost

Start an instance's VNC

Start an instance's VNC by exposing access from Cluster. Instance should be in ACTIVE status. The VNC can be accessed through the websocket at '/ws/instances/{instance_id}/vnc'.


/instances/{instance_id}/vnc

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/instances/{instance_id}/vnc"
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.
        VNCOpts body = ; // VNCOpts | The expose instance's VNC parameters
        try {
            apiInstance.instancesInstanceIdVncPost(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncPost");
            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.
        VNCOpts body = ; // VNCOpts | The expose instance's VNC parameters
        try {
            apiInstance.instancesInstanceIdVncPost(instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstancesApi#instancesInstanceIdVncPost");
            e.printStackTrace();
        }
    }
}
Long *instanceId = 789; // The instance id.
VNCOpts *body = ; // The expose instance's VNC parameters (optional)

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

// Start an instance's VNC
[apiInstance instancesInstanceIdVncPostWith:instanceId
    body:body
              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 opts = { 
  'body':  // {{VNCOpts}} The expose instance's VNC parameters
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.instancesInstanceIdVncPost(instanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new InstancesApi();
            var instanceId = 789;  // Long | The instance id.
            var body = new VNCOpts(); // VNCOpts | The expose instance's VNC parameters (optional) 

            try
            {
                // Start an instance's VNC
                apiInstance.instancesInstanceIdVncPost(instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InstancesApi.instancesInstanceIdVncPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInstancesApi();
$instanceId = 789; // Long | The instance id.
$body = ; // VNCOpts | The expose instance's VNC parameters

try {
    $api_instance->instancesInstanceIdVncPost($instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesInstanceIdVncPost: ', $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 $body = WWW::SwaggerClient::Object::VNCOpts->new(); # VNCOpts | The expose instance's VNC parameters

eval { 
    $api_instance->instancesInstanceIdVncPost(instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling InstancesApi->instancesInstanceIdVncPost: $@\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.
body =  # VNCOpts | The expose instance's VNC parameters (optional)

try: 
    # Start an instance's VNC
    api_instance.instances_instance_id_vnc_post(instanceId, body=body)
except ApiException as e:
    print("Exception when calling InstancesApi->instancesInstanceIdVncPost: %s\n" % e)

Parameters

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

Responses

Status: 200 - Successfully initiated instance VNC

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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

License

clustersClusterIdLicenseDelete

Delete the latest active license of a cluster.

A successful response will delete the cluster's license.


/clusters/{cluster_id}/license

Usage and SDK Samples

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

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

public class LicenseApiExample {

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

public class LicenseApiExample {

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

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

// Delete the latest active license of a cluster.
[apiInstance clustersClusterIdLicenseDeleteWith:clusterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.LicenseApi()
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.clustersClusterIdLicenseDelete(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Delete the latest active license of a cluster.
                apiInstance.clustersClusterIdLicenseDelete(clusterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseApi.clustersClusterIdLicenseDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Delete the latest active license of a cluster.
    api_instance.clusters_cluster_id_license_delete(clusterId)
except ApiException as e:
    print("Exception when calling LicenseApi->clustersClusterIdLicenseDelete: %s\n" % e)

Parameters

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

Responses

Status: 200 - The license of the cluster removed.

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

clustersClusterIdLicenseGet

Get the latest active license of a cluster.

A successful response will return the cluster's license information. In case of no license an empty response will be given


/clusters/{cluster_id}/license

Usage and SDK Samples

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

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

public class LicenseApiExample {

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

public class LicenseApiExample {

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

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

// Get the latest active license of a cluster.
[apiInstance clustersClusterIdLicenseGetWith:clusterId
              completionHandler: ^(ClusterLicense output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.LicenseApi()
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.clustersClusterIdLicenseGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Get the latest active license of a cluster.
                ClusterLicense result = apiInstance.clustersClusterIdLicenseGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseApi.clustersClusterIdLicenseGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get the latest active license of a cluster.
    api_response = api_instance.clusters_cluster_id_license_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LicenseApi->clustersClusterIdLicenseGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - The license of 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"}

clustersClusterIdLicensePost

Add a new license to a cluster.

A successful response will add a new license to the cluster.


/clusters/{cluster_id}/license

Usage and SDK Samples

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

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

public class LicenseApiExample {

    public static void main(String[] args) {
        
        LicenseApi apiInstance = new LicenseApi();
        Long clusterId = 789; // Long | The cluster id.
        LicenseOpts body = ; // LicenseOpts | The license information encoded in pem format.
        try {
            apiInstance.clustersClusterIdLicensePost(clusterId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#clustersClusterIdLicensePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LicenseApi;

public class LicenseApiExample {

    public static void main(String[] args) {
        LicenseApi apiInstance = new LicenseApi();
        Long clusterId = 789; // Long | The cluster id.
        LicenseOpts body = ; // LicenseOpts | The license information encoded in pem format.
        try {
            apiInstance.clustersClusterIdLicensePost(clusterId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling LicenseApi#clustersClusterIdLicensePost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
LicenseOpts *body = ; // The license information encoded in pem format. (optional)

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

// Add a new license to a cluster.
[apiInstance clustersClusterIdLicensePostWith:clusterId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.LicenseApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{LicenseOpts}} The license information encoded in pem format.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdLicensePost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new LicenseApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new LicenseOpts(); // LicenseOpts | The license information encoded in pem format. (optional) 

            try
            {
                // Add a new license to a cluster.
                apiInstance.clustersClusterIdLicensePost(clusterId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LicenseApi.clustersClusterIdLicensePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLicenseApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // LicenseOpts | The license information encoded in pem format.

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

my $api_instance = WWW::SwaggerClient::LicenseApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::LicenseOpts->new(); # LicenseOpts | The license information encoded in pem format.

eval { 
    $api_instance->clustersClusterIdLicensePost(clusterId => $clusterId, body => $body);
};
if ($@) {
    warn "Exception when calling LicenseApi->clustersClusterIdLicensePost: $@\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.LicenseApi()
clusterId = 789 # Long | The cluster id.
body =  # LicenseOpts | The license information encoded in pem format. (optional)

try: 
    # Add a new license to a cluster.
    api_instance.clusters_cluster_id_license_post(clusterId, body=body)
except ApiException as e:
    print("Exception when calling LicenseApi->clustersClusterIdLicensePost: %s\n" % e)

Parameters

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

Responses

Status: 200 - License successfully added to 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"}

Login

loginPost

Authenticate a user to get a cookie and a JWT

Authenticate a user to get a cookie and a JWT. If username or password is not correct a 422 will be returned.


/login

Usage and SDK Samples

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

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

public class LoginApiExample {

    public static void main(String[] args) {
        
        LoginApi apiInstance = new LoginApi();
        Credentials body = ; // Credentials | The credentials to authenticate the user.
        try {
            AuthenticatedUser result = apiInstance.loginPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#loginPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LoginApi;

public class LoginApiExample {

    public static void main(String[] args) {
        LoginApi apiInstance = new LoginApi();
        Credentials body = ; // Credentials | The credentials to authenticate the user.
        try {
            AuthenticatedUser result = apiInstance.loginPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LoginApi#loginPost");
            e.printStackTrace();
        }
    }
}
Credentials *body = ; // The credentials to authenticate the user. (optional)

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

// Authenticate a user to get a cookie and a JWT
[apiInstance loginPostWith:body
              completionHandler: ^(AuthenticatedUser output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.LoginApi()
var opts = { 
  'body':  // {{Credentials}} The credentials to authenticate the user.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.loginPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new LoginApi();
            var body = new Credentials(); // Credentials | The credentials to authenticate the user. (optional) 

            try
            {
                // Authenticate a user to get a cookie and a JWT
                AuthenticatedUser result = apiInstance.loginPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoginApi.loginPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiLoginApi();
$body = ; // Credentials | The credentials to authenticate the user.

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

my $api_instance = WWW::SwaggerClient::LoginApi->new();
my $body = WWW::SwaggerClient::Object::Credentials->new(); # Credentials | The credentials to authenticate the user.

eval { 
    my $result = $api_instance->loginPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LoginApi->loginPost: $@\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.LoginApi()
body =  # Credentials | The credentials to authenticate the user. (optional)

try: 
    # Authenticate a user to get a cookie and a JWT
    api_response = api_instance.login_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoginApi->loginPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - User authorized successfully. Use the token for all further api calls.

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: 500 - An unexpected error occurred.

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

logoutPost

Logout the user by removing the user's cookie.


/logout

Usage and SDK Samples

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

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

public class LoginApiExample {

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

public class LoginApiExample {

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

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

// Logout the user by removing the user's cookie.
[apiInstance logoutPostWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new LoginApi();

            try
            {
                // Logout the user by removing the user's cookie.
                apiInstance.logoutPost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LoginApi.logoutPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Logout the user by removing the user's cookie.
    api_instance.logout_post()
except ApiException as e:
    print("Exception when calling LoginApi->logoutPost: %s\n" % e)

Parameters

Responses

Status: 200 - The user successfully logout.

Status: 500 - An unexpected error occurred.

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

Maintenance

maintenanceDelete

Change SIM's mode back to normal mode.

Change SIM to normal mode. A HTTP OK (200) will be returned in case of successful change. A 503 will be returned otherwise.


/maintenance

Usage and SDK Samples

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

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

public class MaintenanceApiExample {

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

public class MaintenanceApiExample {

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

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

// Change SIM's mode back to normal mode.
[apiInstance maintenanceDeleteWithCompletionHandler: 
              ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new MaintenanceApi();

            try
            {
                // Change SIM's mode back to normal mode.
                'String' result = apiInstance.maintenanceDelete();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MaintenanceApi.maintenanceDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Change SIM's mode back to normal mode.
    api_response = api_instance.maintenance_delete()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MaintenanceApi->maintenanceDelete: %s\n" % e)

Parameters

Responses

Status: 200 - A string indicating SIM's mode.

Status: 401 - Status unauthorized.

{"code":401}

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."}

maintenancePut

Change SIM's mode to maintenance mode.

Change SIM to maintenance mode in order to be able to upgrade the SIM to a newer version. A HTTP OK (200) will be returned in case of successful change. A 503 will be returned otherwise.


/maintenance

Usage and SDK Samples

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

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

public class MaintenanceApiExample {

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

public class MaintenanceApiExample {

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

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

// Change SIM's mode to maintenance mode.
[apiInstance maintenancePutWithCompletionHandler: 
              ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new MaintenanceApi();

            try
            {
                // Change SIM's mode to maintenance mode.
                'String' result = apiInstance.maintenancePut();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MaintenanceApi.maintenancePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Change SIM's mode to maintenance mode.
    api_response = api_instance.maintenance_put()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MaintenanceApi->maintenancePut: %s\n" % e)

Parameters

Responses

Status: 200 - A string indicating SIM's mode.

Status: 401 - Status unauthorized.

{"code":401}

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."}

Permissions

permissionsGet

Get a list of permissions.

A successful response will return a list of the available permissions. A permission is a connection between a role and the allowed resource group. Action can be performed only by users with `admin` role.


/permissions

Usage and SDK Samples

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

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

public class PermissionsApiExample {

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

public class PermissionsApiExample {

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

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

// Get a list of permissions.
[apiInstance permissionsGetWithCompletionHandler: 
              ^(array[Permission] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new PermissionsApi();

            try
            {
                // Get a list of permissions.
                array[Permission] result = apiInstance.permissionsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PermissionsApi.permissionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get a list of permissions.
    api_response = api_instance.permissions_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PermissionsApi->permissionsGet: %s\n" % e)

Parameters

Responses

Status: 200 - List of available permissions

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

permissionsResourceGroupsResourceGroupIdGet

Get a list of permissions for a specific resource group.

A successful response will return a list of the available roles permitted to operate on the specified resource group.


/permissions/resource_groups/{resource_group_id}

Usage and SDK Samples

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

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

public class PermissionsApiExample {

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

public class PermissionsApiExample {

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

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

// Get a list of permissions for a specific resource group.
[apiInstance permissionsResourceGroupsResourceGroupIdGetWith:resourceGroupId
              completionHandler: ^(array[Permission] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.PermissionsApi()
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.permissionsResourceGroupsResourceGroupIdGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Get a list of permissions for a specific resource group.
                array[Permission] result = apiInstance.permissionsResourceGroupsResourceGroupIdGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PermissionsApi.permissionsResourceGroupsResourceGroupIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get a list of permissions for a specific resource group.
    api_response = api_instance.permissions_resource_groups_resource_group_id_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - List of available permissions pf resource group

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

permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete

Revoke a role access from a resource group

Revoke a given role to the specified resource group Action can be performed only by users with `admin` role.


/permissions/resource_groups/{resource_group_id}/roles/{role_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/permissions/resource_groups/{resource_group_id}/roles/{role_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PermissionsApi;

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

public class PermissionsApiExample {

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

public class PermissionsApiExample {

    public static void main(String[] args) {
        PermissionsApi apiInstance = new PermissionsApi();
        Long roleId = 789; // Long | The role id.
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            apiInstance.permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete(roleId, resourceGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.
Long *resourceGroupId = 789; // The resource group id.

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

// Revoke a role access from a resource group
[apiInstance permissionsResourceGroupsResourceGroupIdRolesRoleIdDeleteWith:roleId
    resourceGroupId:resourceGroupId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.PermissionsApi()
var roleId = 789; // {{Long}} The role 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.');
  }
};
api.permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete(roleId, resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Revoke a role access from a resource group
                apiInstance.permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete(roleId, resourceGroupId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PermissionsApi.permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    $api_instance->permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete(roleId => $roleId, resourceGroupId => $resourceGroupId);
};
if ($@) {
    warn "Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete: $@\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.PermissionsApi()
roleId = 789 # Long | The role id.
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Revoke a role access from a resource group
    api_instance.permissions_resource_groups_resource_group_id_roles_role_id_delete(roleId, resourceGroupId)
except ApiException as e:
    print("Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdDelete: %s\n" % e)

Parameters

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

Responses

Status: 204 - Successfully role revokement.

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

permissionsResourceGroupsResourceGroupIdRolesRoleIdPost

Assign a resource group to a specific role

Assign a given role to the specified resource group Action can be performed only by users with `admin` role.


/permissions/resource_groups/{resource_group_id}/roles/{role_id}

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/permissions/resource_groups/{resource_group_id}/roles/{role_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PermissionsApi;

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

public class PermissionsApiExample {

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

public class PermissionsApiExample {

    public static void main(String[] args) {
        PermissionsApi apiInstance = new PermissionsApi();
        Long roleId = 789; // Long | The role id.
        Long resourceGroupId = 789; // Long | The resource group id.
        try {
            apiInstance.permissionsResourceGroupsResourceGroupIdRolesRoleIdPost(roleId, resourceGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#permissionsResourceGroupsResourceGroupIdRolesRoleIdPost");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.
Long *resourceGroupId = 789; // The resource group id.

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

// Assign a resource group to a specific role
[apiInstance permissionsResourceGroupsResourceGroupIdRolesRoleIdPostWith:roleId
    resourceGroupId:resourceGroupId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.PermissionsApi()
var roleId = 789; // {{Long}} The role 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.');
  }
};
api.permissionsResourceGroupsResourceGroupIdRolesRoleIdPost(roleId, resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Assign a resource group to a specific role
                apiInstance.permissionsResourceGroupsResourceGroupIdRolesRoleIdPost(roleId, resourceGroupId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PermissionsApi.permissionsResourceGroupsResourceGroupIdRolesRoleIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    $api_instance->permissionsResourceGroupsResourceGroupIdRolesRoleIdPost(roleId => $roleId, resourceGroupId => $resourceGroupId);
};
if ($@) {
    warn "Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdPost: $@\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.PermissionsApi()
roleId = 789 # Long | The role id.
resourceGroupId = 789 # Long | The resource group id.

try: 
    # Assign a resource group to a specific role
    api_instance.permissions_resource_groups_resource_group_id_roles_role_id_post(roleId, resourceGroupId)
except ApiException as e:
    print("Exception when calling PermissionsApi->permissionsResourceGroupsResourceGroupIdRolesRoleIdPost: %s\n" % e)

Parameters

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

Responses

Status: 200 - Successfully role assignment.

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

Provider

providersGet

Get a list of the available providers.

A successful response will return a list of the available providers. Results can be filtered using the `mode` and `type` of the providers.


/providers

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/providers?mode=&type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProviderApi;

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

public class ProviderApiExample {

    public static void main(String[] args) {
        
        ProviderApi apiInstance = new ProviderApi();
        String mode = mode_example; // String | The mode of providers.
        String type = type_example; // String | The type of providers.
        try {
            array[Provider] result = apiInstance.providersGet(mode, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProviderApi#providersGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProviderApi;

public class ProviderApiExample {

    public static void main(String[] args) {
        ProviderApi apiInstance = new ProviderApi();
        String mode = mode_example; // String | The mode of providers.
        String type = type_example; // String | The type of providers.
        try {
            array[Provider] result = apiInstance.providersGet(mode, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProviderApi#providersGet");
            e.printStackTrace();
        }
    }
}
String *mode = mode_example; // The mode of providers. (optional)
String *type = type_example; // The type of providers. (optional)

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

// Get a list of the available providers.
[apiInstance providersGetWith:mode
    type:type
              completionHandler: ^(array[Provider] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProviderApi()
var opts = { 
  'mode': mode_example, // {{String}} The mode of providers.
  'type': type_example // {{String}} The type of providers.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.providersGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ProviderApi();
            var mode = mode_example;  // String | The mode of providers. (optional) 
            var type = type_example;  // String | The type of providers. (optional) 

            try
            {
                // Get a list of the available providers.
                array[Provider] result = apiInstance.providersGet(mode, type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProviderApi.providersGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProviderApi();
$mode = mode_example; // String | The mode of providers.
$type = type_example; // String | The type of providers.

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

my $api_instance = WWW::SwaggerClient::ProviderApi->new();
my $mode = mode_example; # String | The mode of providers.
my $type = type_example; # String | The type of providers.

eval { 
    my $result = $api_instance->providersGet(mode => $mode, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProviderApi->providersGet: $@\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.ProviderApi()
mode = mode_example # String | The mode of providers. (optional)
type = type_example # String | The type of providers. (optional)

try: 
    # Get a list of the available providers.
    api_response = api_instance.providers_get(mode=mode, type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProviderApi->providersGet: %s\n" % e)

Parameters

Query parameters
Name Description
mode
String
The mode of providers.
type
String
The type of providers.

Responses

Status: 200 - The resource group.

Status: 401 - Status unauthorized.

{"code":401}

Status: 500 - An unexpected error occurred.

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

providersModesAvailabilityGet

Get provider's availability per mode.

A successful response will return the availability of providers per mode.


/providers/modes_availability

Usage and SDK Samples

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

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

public class ProviderApiExample {

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

public class ProviderApiExample {

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

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

// Get provider's availability per mode.
[apiInstance providersModesAvailabilityGetWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new ProviderApi();

            try
            {
                // Get provider's availability per mode.
                apiInstance.providersModesAvailabilityGet();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProviderApi.providersModesAvailabilityGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get provider's availability per mode.
    api_instance.providers_modes_availability_get()
except ApiException as e:
    print("Exception when calling ProviderApi->providersModesAvailabilityGet: %s\n" % e)

Parameters

Responses

Status: 200 -

Status: 401 - Status unauthorized.

{"code":401}

Status: 500 - An unexpected error occurred.

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

providersPost

Create a new provider.

A successful response will create a new provider. Field `region` and is required for `S3` providers. Fields `access_key_id` and `secret_access_key` are required for S3 and EC2 providers. Fields `nfs_server_ip` and `nfs_server_path` are required for NFS providers.


/providers

Usage and SDK Samples

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

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

public class ProviderApiExample {

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

public class ProviderApiExample {

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

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

// Create a new provider.
[apiInstance providersPostWithCompletionHandler: 
              ^(array[Provider] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new ProviderApi();

            try
            {
                // Create a new provider.
                array[Provider] result = apiInstance.providersPost();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProviderApi.providersPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Create a new provider.
    api_response = api_instance.providers_post()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProviderApi->providersPost: %s\n" % e)

Parameters

Responses

Status: 201 - The created provider.

Status: 401 - Status unauthorized.

{"code":401}

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

providersProviderIdDelete

Delete a provider.

A successful response will delete the requested provider.


/providers/{provider_id}

Usage and SDK Samples

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

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

public class ProviderApiExample {

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

public class ProviderApiExample {

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

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

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

var api = new Sim2Api.ProviderApi()
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.providersProviderIdDelete(providerId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Delete a provider.
                apiInstance.providersProviderIdDelete(providerId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProviderApi.providersProviderIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Delete a provider.
    api_instance.providers_provider_id_delete(providerId)
except ApiException as e:
    print("Exception when calling ProviderApi->providersProviderIdDelete: %s\n" % e)

Parameters

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

Responses

Status: 204 - Provider deleted successfully

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

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long."},{"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"}

providersProviderIdGet

Get a provider.

A successful response will return the requested provider.


/providers/{provider_id}

Usage and SDK Samples

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

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

public class ProviderApiExample {

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

public class ProviderApiExample {

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

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

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

var api = new Sim2Api.ProviderApi()
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.providersProviderIdGet(providerId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Get a provider.
                apiInstance.providersProviderIdGet(providerId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProviderApi.providersProviderIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get a provider.
    api_instance.providers_provider_id_get(providerId)
except ApiException as e:
    print("Exception when calling ProviderApi->providersProviderIdGet: %s\n" % e)

Parameters

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

Responses

Status: 200 -

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

Recipes

recipesInstalledGet

Get all installed recipe template's.

A successful response will return a list with the installed recipe recipe templates.


/recipes/installed

Usage and SDK Samples

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

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

public class RecipesApiExample {

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

public class RecipesApiExample {

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

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

// Get all installed recipe template's.
[apiInstance recipesInstalledGetWithCompletionHandler: 
              ^(array[Recipe] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new RecipesApi();

            try
            {
                // Get all installed recipe template's.
                array[Recipe] result = apiInstance.recipesInstalledGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesInstalledGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get all installed recipe template's.
    api_response = api_instance.recipes_installed_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesInstalledGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of the installed recipe templates.

Status: 401 - Status unauthorized.

{"code":401}

Status: 500 - An unexpected error occurred.

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

recipesInstalledRecipeTemplateIdAnsibleLogsGet

Retrieves the ansible playbook's log of the installed recipe.

A successful response will fetch the latest lines to retrieve from recipe's ansible playbook.


/recipes/installed/{recipe_template_id}/ansible_logs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/installed/{recipe_template_id}/ansible_logs?lines="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer lines = 56; // Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them.
        try {
            RecipeTemplateAnsibleLogs result = apiInstance.recipesInstalledRecipeTemplateIdAnsibleLogsGet(recipeTemplateId, lines);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledRecipeTemplateIdAnsibleLogsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Integer lines = 56; // Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them.
        try {
            RecipeTemplateAnsibleLogs result = apiInstance.recipesInstalledRecipeTemplateIdAnsibleLogsGet(recipeTemplateId, lines);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledRecipeTemplateIdAnsibleLogsGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Integer *lines = 56; // The amount of latest lines to fetch. If not provided or 0 retrieves all of them. (optional)

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

// Retrieves the ansible playbook's log of the installed recipe.
[apiInstance recipesInstalledRecipeTemplateIdAnsibleLogsGetWith:recipeTemplateId
    lines:lines
              completionHandler: ^(RecipeTemplateAnsibleLogs output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'lines': 56 // {{Integer}} The amount of latest lines to fetch. If not provided or 0 retrieves all of them.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesInstalledRecipeTemplateIdAnsibleLogsGet(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var lines = 56;  // Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them. (optional) 

            try
            {
                // Retrieves the ansible playbook's log of the installed recipe.
                RecipeTemplateAnsibleLogs result = apiInstance.recipesInstalledRecipeTemplateIdAnsibleLogsGet(recipeTemplateId, lines);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesInstalledRecipeTemplateIdAnsibleLogsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$lines = 56; // Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them.

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $lines = 56; # Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them.

eval { 
    my $result = $api_instance->recipesInstalledRecipeTemplateIdAnsibleLogsGet(recipeTemplateId => $recipeTemplateId, lines => $lines);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdAnsibleLogsGet: $@\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.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
lines = 56 # Integer | The amount of latest lines to fetch. If not provided or 0 retrieves all of them. (optional)

try: 
    # Retrieves the ansible playbook's log of the installed recipe.
    api_response = api_instance.recipes_installed_recipe_template_id_ansible_logs_get(recipeTemplateId, lines=lines)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdAnsibleLogsGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Query parameters
Name Description
lines
Integer
The amount of latest lines to fetch. If not provided or 0 retrieves all of them.

Responses

Status: 200 - The retrieved ansible playbook's logs.

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: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

recipesInstalledRecipeTemplateIdDelete

Delete the specified installed recipe template.

A successful response will delete the specified recipe template instance. Action can be performed only by users with `admin` role.


/recipes/installed/{recipe_template_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/recipes/installed/{recipe_template_id}?cleanup="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Boolean cleanup = true; // Boolean | Whether or not we want to cleanup all the generated resources with this recipe.
        try {
            apiInstance.recipesInstalledRecipeTemplateIdDelete(recipeTemplateId, cleanup);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledRecipeTemplateIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        Boolean cleanup = true; // Boolean | Whether or not we want to cleanup all the generated resources with this recipe.
        try {
            apiInstance.recipesInstalledRecipeTemplateIdDelete(recipeTemplateId, cleanup);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesInstalledRecipeTemplateIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
Boolean *cleanup = true; // Whether or not we want to cleanup all the generated resources with this recipe. (optional)

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

// Delete the specified installed recipe template.
[apiInstance recipesInstalledRecipeTemplateIdDeleteWith:recipeTemplateId
    cleanup:cleanup
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'cleanup': true // {{Boolean}} Whether or not we want to cleanup all the generated resources with this recipe.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesInstalledRecipeTemplateIdDelete(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var cleanup = true;  // Boolean | Whether or not we want to cleanup all the generated resources with this recipe. (optional) 

            try
            {
                // Delete the specified installed recipe template.
                apiInstance.recipesInstalledRecipeTemplateIdDelete(recipeTemplateId, cleanup);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesInstalledRecipeTemplateIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$cleanup = true; // Boolean | Whether or not we want to cleanup all the generated resources with this recipe.

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $cleanup = true; # Boolean | Whether or not we want to cleanup all the generated resources with this recipe.

eval { 
    $api_instance->recipesInstalledRecipeTemplateIdDelete(recipeTemplateId => $recipeTemplateId, cleanup => $cleanup);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdDelete: $@\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.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
cleanup = true # Boolean | Whether or not we want to cleanup all the generated resources with this recipe. (optional)

try: 
    # Delete the specified installed recipe template.
    api_instance.recipes_installed_recipe_template_id_delete(recipeTemplateId, cleanup=cleanup)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesInstalledRecipeTemplateIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Query parameters
Name Description
cleanup
Boolean
Whether or not we want to cleanup all the generated resources with this recipe.

Responses

Status: 204 - Recipe template instance has been 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"}

recipesTemplatesGet

Get all available recipe templates.

A successful response will return a list of the available recipe templates.


/recipes/templates

Usage and SDK Samples

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

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

public class RecipesApiExample {

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

public class RecipesApiExample {

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

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

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

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

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

            var apiInstance = new RecipesApi();

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

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

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

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

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

try: 
    # Get all available recipe templates.
    api_response = api_instance.recipes_templates_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of the recipe templates.

Status: 401 - Status unauthorized.

{"code":401}

Status: 500 - An unexpected error occurred.

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

recipesTemplatesRecipeTemplateIdClusterRgPost

Create a cluster and resource group for a specific recipe template.

A successful response will create a resource group and cluster based on the resources required for the specified recipe template. Action can be performed only by users with `admin` role.


/recipes/templates/{recipe_template_id}/cluster_rg

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/{recipe_template_id}/cluster_rg"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        NewFromRecipeTemplate body = ; // NewFromRecipeTemplate | The parameters for creating the new instance(s).
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdClusterRgPost(recipeTemplateId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdClusterRgPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        NewFromRecipeTemplate body = ; // NewFromRecipeTemplate | The parameters for creating the new instance(s).
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdClusterRgPost(recipeTemplateId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdClusterRgPost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
NewFromRecipeTemplate *body = ; // The parameters for creating the new instance(s). (optional)

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

// Create a cluster and resource group for a specific recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdClusterRgPostWith:recipeTemplateId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'body':  // {{NewFromRecipeTemplate}} The parameters for creating the new instance(s).
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdClusterRgPost(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var body = new NewFromRecipeTemplate(); // NewFromRecipeTemplate | The parameters for creating the new instance(s). (optional) 

            try
            {
                // Create a cluster and resource group for a specific recipe template.
                apiInstance.recipesTemplatesRecipeTemplateIdClusterRgPost(recipeTemplateId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdClusterRgPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$body = ; // NewFromRecipeTemplate | The parameters for creating the new instance(s).

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $body = WWW::SwaggerClient::Object::NewFromRecipeTemplate->new(); # NewFromRecipeTemplate | The parameters for creating the new instance(s).

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdClusterRgPost(recipeTemplateId => $recipeTemplateId, body => $body);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdClusterRgPost: $@\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.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
body =  # NewFromRecipeTemplate | The parameters for creating the new instance(s). (optional)

try: 
    # Create a cluster and resource group for a specific recipe template.
    api_instance.recipes_templates_recipe_template_id_cluster_rg_post(recipeTemplateId, body=body)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdClusterRgPost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Body parameters
Name Description
body

Responses

Status: 202 - The requested cluster and resource group are preparing.

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

recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost

Create a resource group within the specified cluster for a specific recipe template.

A successful response will just create a resource group at the specified cluster based on the resources required for the specified recipe template.


/recipes/templates/{recipe_template_id}/clusters/{cluster_id}/resource_groups

Usage and SDK Samples

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

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

public class RecipesApiExample {

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

public class RecipesApiExample {

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

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

// Create a resource group within the specified cluster for a specific recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPostWith:recipeTemplateId
    clusterId:clusterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
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.recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost(recipeTemplateId, clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Create a resource group within the specified cluster for a specific recipe template.
                apiInstance.recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost(recipeTemplateId, clusterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$clusterId = 789; // Long | The cluster id.

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $clusterId = 789; # Long | The cluster id.

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost(recipeTemplateId => $recipeTemplateId, clusterId => $clusterId);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost: $@\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.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
clusterId = 789 # Long | The cluster id.

try: 
    # Create a resource group within the specified cluster for a specific recipe template.
    api_instance.recipes_templates_recipe_template_id_clusters_cluster_id_resource_groups_post(recipeTemplateId, clusterId)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdClustersClusterIdResourceGroupsPost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The resource group created successfully.

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

recipesTemplatesRecipeTemplateIdCompatibleAssetsGet

Get a specific recipe template's compatible assets.

A successful response will return the resources required for the specified recipe template.


/recipes/templates/{recipe_template_id}/compatible_assets

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/compatible_assets"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplateCompatibleAssets result = apiInstance.recipesTemplatesRecipeTemplateIdCompatibleAssetsGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdCompatibleAssetsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplateCompatibleAssets result = apiInstance.recipesTemplatesRecipeTemplateIdCompatibleAssetsGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdCompatibleAssetsGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

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

// Get a specific recipe template's compatible assets.
[apiInstance recipesTemplatesRecipeTemplateIdCompatibleAssetsGetWith:recipeTemplateId
              completionHandler: ^(RecipeTemplateCompatibleAssets output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

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

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

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Get a specific recipe template's compatible assets.
                RecipeTemplateCompatibleAssets result = apiInstance.recipesTemplatesRecipeTemplateIdCompatibleAssetsGet(recipeTemplateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdCompatibleAssetsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdCompatibleAssetsGet(recipeTemplateId => $recipeTemplateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdCompatibleAssetsGet: $@\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.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Get a specific recipe template's compatible assets.
    api_response = api_instance.recipes_templates_recipe_template_id_compatible_assets_get(recipeTemplateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdCompatibleAssetsGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - The required resources of the recipe template.

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

recipesTemplatesRecipeTemplateIdGet

Get a specific recipe template.

A successful response will return the details of the specified recipe template.


/recipes/templates/{recipe_template_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

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

// Get a specific recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdGetWith:recipeTemplateId
              completionHandler: ^(RecipeTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

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

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

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Get a specific recipe template.
                RecipeTemplate result = apiInstance.recipesTemplatesRecipeTemplateIdGet(recipeTemplateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdGet(recipeTemplateId => $recipeTemplateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdGet: $@\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.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Get a specific recipe template.
    api_response = api_instance.recipes_templates_recipe_template_id_get(recipeTemplateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - The details of the recipe template.

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

recipesTemplatesRecipeTemplateIdPost

Create new instance(s) based on the specific recipe template.

A successful response will spawn new instance(s) based on the specified recipe template. There are 3 cases according to the parameters: 1. Create an instance from recipe based on an existing cluster and an existing resource group. 2. Create an instance from recipe based on an existing cluster, but a new resource group. 3. Create an instance from recipe based on a new AWS cluster and a resource group on it.


/recipes/templates/{recipe_template_id}

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/{recipe_template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        NewFromRecipeTemplate body = ; // NewFromRecipeTemplate | The parameters for creating the new instance(s).
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        NewFromRecipeTemplate body = ; // NewFromRecipeTemplate | The parameters for creating the new instance(s).
        try {
            apiInstance.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdPost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
NewFromRecipeTemplate *body = ; // The parameters for creating the new instance(s). (optional)

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

// Create new instance(s) based on the specific recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdPostWith:recipeTemplateId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'body':  // {{NewFromRecipeTemplate}} The parameters for creating the new instance(s).
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var body = new NewFromRecipeTemplate(); // NewFromRecipeTemplate | The parameters for creating the new instance(s). (optional) 

            try
            {
                // Create new instance(s) based on the specific recipe template.
                apiInstance.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$body = ; // NewFromRecipeTemplate | The parameters for creating the new instance(s).

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $body = WWW::SwaggerClient::Object::NewFromRecipeTemplate->new(); # NewFromRecipeTemplate | The parameters for creating the new instance(s).

eval { 
    $api_instance->recipesTemplatesRecipeTemplateIdPost(recipeTemplateId => $recipeTemplateId, body => $body);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdPost: $@\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.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
body =  # NewFromRecipeTemplate | The parameters for creating the new instance(s). (optional)

try: 
    # Create new instance(s) based on the specific recipe template.
    api_instance.recipes_templates_recipe_template_id_post(recipeTemplateId, body=body)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdPost: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Instance(s) creation spawned 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.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 500 - An unexpected error occurred.

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

recipesTemplatesRecipeTemplateIdResourcesGet

Get a specific recipe template's required resources.

A successful response will return the resources required for the specified recipe template.


/recipes/templates/{recipe_template_id}/resources

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/recipes/templates/{recipe_template_id}/resources"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdResourcesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        try {
            RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesGet(recipeTemplateId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdResourcesGet");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.

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

// Get a specific recipe template's required resources.
[apiInstance recipesTemplatesRecipeTemplateIdResourcesGetWith:recipeTemplateId
              completionHandler: ^(RecipeTemplateResources output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.

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

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

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.

            try
            {
                // Get a specific recipe template's required resources.
                RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesGet(recipeTemplateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdResourcesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdResourcesGet(recipeTemplateId => $recipeTemplateId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdResourcesGet: $@\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.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.

try: 
    # Get a specific recipe template's required resources.
    api_response = api_instance.recipes_templates_recipe_template_id_resources_get(recipeTemplateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdResourcesGet: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required

Responses

Status: 200 - The required resourced of the recipe template.

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

recipesTemplatesRecipeTemplateIdResourcesPut

Update a specific recipe template's required resources.

A successful response will update the resources required for the specified recipe template.


/recipes/templates/{recipe_template_id}/resources

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/recipes/templates/{recipe_template_id}/resources"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RecipesApi;

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

public class RecipesApiExample {

    public static void main(String[] args) {
        
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        RecipeTemplateResources body = ; // RecipeTemplateResources | The parameters for updating the new resources required of the recipe template.
        try {
            RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesPut(recipeTemplateId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdResourcesPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        Integer recipeTemplateId = 56; // Integer | The template id.
        RecipeTemplateResources body = ; // RecipeTemplateResources | The parameters for updating the new resources required of the recipe template.
        try {
            RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesPut(recipeTemplateId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdResourcesPut");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
RecipeTemplateResources *body = ; // The parameters for updating the new resources required of the recipe template. (optional)

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

// Update a specific recipe template's required resources.
[apiInstance recipesTemplatesRecipeTemplateIdResourcesPutWith:recipeTemplateId
    body:body
              completionHandler: ^(RecipeTemplateResources output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var recipeTemplateId = 56; // {{Integer}} The template id.
var opts = { 
  'body':  // {{RecipeTemplateResources}} The parameters for updating the new resources required of the recipe template.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recipesTemplatesRecipeTemplateIdResourcesPut(recipeTemplateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new RecipesApi();
            var recipeTemplateId = 56;  // Integer | The template id.
            var body = new RecipeTemplateResources(); // RecipeTemplateResources | The parameters for updating the new resources required of the recipe template. (optional) 

            try
            {
                // Update a specific recipe template's required resources.
                RecipeTemplateResources result = apiInstance.recipesTemplatesRecipeTemplateIdResourcesPut(recipeTemplateId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.recipesTemplatesRecipeTemplateIdResourcesPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$recipeTemplateId = 56; // Integer | The template id.
$body = ; // RecipeTemplateResources | The parameters for updating the new resources required of the recipe template.

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

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $recipeTemplateId = 56; # Integer | The template id.
my $body = WWW::SwaggerClient::Object::RecipeTemplateResources->new(); # RecipeTemplateResources | The parameters for updating the new resources required of the recipe template.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdResourcesPut(recipeTemplateId => $recipeTemplateId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdResourcesPut: $@\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.RecipesApi()
recipeTemplateId = 56 # Integer | The template id.
body =  # RecipeTemplateResources | The parameters for updating the new resources required of the recipe template. (optional)

try: 
    # Update a specific recipe template's required resources.
    api_response = api_instance.recipes_templates_recipe_template_id_resources_put(recipeTemplateId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->recipesTemplatesRecipeTemplateIdResourcesPut: %s\n" % e)

Parameters

Path parameters
Name Description
recipe_template_id*
Integer (uint)
The template id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - The required resourced of the recipe template.

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

ResourceGroups

instancesInstanceIdActionPut

Apply action to specific instance.

Apply an action to a specific instance. Action can be on of: stop|start|restart|destroy.


/instances/{instance_id}/{action}

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

// Apply action to specific instance.
[apiInstance instancesInstanceIdActionPutWith:instanceId
    action:action
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var instanceId = 789; // {{Long}} The instance id.
var action = action_example; // {{String}} The action to apply.

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

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

            var apiInstance = new ResourceGroupsApi();
            var instanceId = 789;  // Long | The instance id.
            var action = action_example;  // String | The action to apply.

            try
            {
                // Apply action to specific instance.
                Instance result = apiInstance.instancesInstanceIdActionPut(instanceId, action);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.instancesInstanceIdActionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$instanceId = 789; // Long | The instance id.
$action = action_example; // String | The action to apply.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $instanceId = 789; # Long | The instance id.
my $action = action_example; # String | The action to apply.

eval { 
    my $result = $api_instance->instancesInstanceIdActionPut(instanceId => $instanceId, action => $action);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->instancesInstanceIdActionPut: $@\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.ResourceGroupsApi()
instanceId = 789 # Long | The instance id.
action = action_example # String | The action to apply.

try: 
    # Apply action to specific instance.
    api_response = api_instance.instances_instance_id_action_put(instanceId, action)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->instancesInstanceIdActionPut: %s\n" % e)

Parameters

Path parameters
Name Description
instance_id*
Long (int64)
The instance id.
Required
action*
String
The action to apply.
Required

Responses

Status: 200 - Successfully applied action from instance.

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: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

resourceGroupsGet

Get a list of the available resource groups.

A successful response will return a list of the available resource groups. Only the resource groups that te user's role has access will be retrieved.


/resource_groups

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

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

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

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

            var apiInstance = new ResourceGroupsApi();

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

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

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

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

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

try: 
    # Get a list of the available resource groups.
    api_response = api_instance.resource_groups_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsGet: %s\n" % e)

Parameters

Responses

Status: 200 - The resource group.

Status: 401 - Status unauthorized.

{"code":401}

Status: 500 - An unexpected error occurred.

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

resourceGroupsResourceGroupIdGet

Get the specified resource group.

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


/resource_groups/{resource_group_id}

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

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

var api = new Sim2Api.ResourceGroupsApi()
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.resourceGroupsResourceGroupIdGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Get the specified resource group.
                ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get the specified resource group.
    api_response = api_instance.resource_groups_resource_group_id_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - The resource group.

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

resourceGroupsResourceGroupIdImagesGet

Get all available images of a resource group.

A successful response will return all the available images within the specified resource group.


/resource_groups/{resource_group_id}/images

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

// Get all available images of a resource group.
[apiInstance resourceGroupsResourceGroupIdImagesGetWith:resourceGroupId
              completionHandler: ^(array[Image] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
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.resourceGroupsResourceGroupIdImagesGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Get all available images of a resource group.
                array[Image] result = apiInstance.resourceGroupsResourceGroupIdImagesGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdImagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get all available images of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_images_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdImagesGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - A list of images.

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

resourceGroupsResourceGroupIdInstancemovesGet

Get the ongoing moves within a resource group.

A successful response will return a list with the ongoing move operations within the specified resource group.


/resource_groups/{resource_group_id}/instancemoves

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

// Get the ongoing moves within a resource group.
[apiInstance resourceGroupsResourceGroupIdInstancemovesGetWith:resourceGroupId
              completionHandler: ^(array[MoveStatus] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
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.resourceGroupsResourceGroupIdInstancemovesGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Get the ongoing moves within a resource group.
                array[MoveStatus] result = apiInstance.resourceGroupsResourceGroupIdInstancemovesGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancemovesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get the ongoing moves within a resource group.
    api_response = api_instance.resource_groups_resource_group_id_instancemoves_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesGet: %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 ongoing moves

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

resourceGroupsResourceGroupIdInstancemovesMoveIdDelete

Delete a move of an instance.

Delete a move os an instance. If a move is ongoing operation will fail.


/resource_groups/{resource_group_id}/instancemoves/{move_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instancemoves/{move_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long moveId = 789; // Long | The move's operation id.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancemovesMoveIdDelete(resourceGroupId, moveId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancemovesMoveIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long moveId = 789; // Long | The move's operation id.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancemovesMoveIdDelete(resourceGroupId, moveId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancemovesMoveIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *moveId = 789; // The move's operation id.

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

// Delete a move of an instance.
[apiInstance resourceGroupsResourceGroupIdInstancemovesMoveIdDeleteWith:resourceGroupId
    moveId:moveId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var moveId = 789; // {{Long}} The move's operation id.

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

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

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var moveId = 789;  // Long | The move's operation id.

            try
            {
                // Delete a move of an instance.
                apiInstance.resourceGroupsResourceGroupIdInstancemovesMoveIdDelete(resourceGroupId, moveId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancemovesMoveIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$moveId = 789; // Long | The move's operation id.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $moveId = 789; # Long | The move's operation id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancemovesMoveIdDelete(resourceGroupId => $resourceGroupId, moveId => $moveId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesMoveIdDelete: $@\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.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
moveId = 789 # Long | The move's operation id.

try: 
    # Delete a move of an instance.
    api_instance.resource_groups_resource_group_id_instancemoves_move_id_delete(resourceGroupId, moveId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancemovesMoveIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
move_id*
Long (int64)
The move's operation id.
Required

Responses

Status: 200 - Move deleted successfully

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

resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut

Disassociate a public IP from associated the Network Interface.

Disassociate an allocated public IP from the associated Network interface.


/resource_groups/{resource_group_id}/instances/disassociate_ip/{public_ip}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_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.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

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

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group 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.resourceGroupsResourceGroupIdInstancesDisassociateIpPublicIpPut(resourceGroupId, publicIp, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var publicIp = publicIp_example;  // String | The public IP to associate.

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

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$publicIp = publicIp_example; // String | The public IP to associate.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $publicIp = publicIp_example; # String | The public IP to associate.

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

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

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group 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.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 500 - An unexpected error occurred.

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

resourceGroupsResourceGroupIdInstancesGet

Get all available instances of a resource group.

A successful response will return all the available instances of the specified resource group.


/resource_groups/{resource_group_id}/instances

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

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

var api = new Sim2Api.ResourceGroupsApi()
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.resourceGroupsResourceGroupIdInstancesGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

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

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

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

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

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

try: 
    # Get all available instances of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_instances_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesGet: %s\n" % e)

Parameters

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

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

resourceGroupsResourceGroupIdInstancesInstanceIdActionPut

Apply action to specific instance.

Apply an action to a specific instance. Action can be on of: stop|start|restart|destroy.


/resource_groups/{resource_group_id}/instances/{instance_id}/{action}

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        String action = action_example; // String | The action to apply.
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdActionPut(resourceGroupId, instanceId, action);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdActionPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        String action = action_example; // String | The action to apply.
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdActionPut(resourceGroupId, instanceId, action);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdActionPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
String *action = action_example; // The action to apply.

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

// Apply action to specific instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdActionPutWith:resourceGroupId
    instanceId:instanceId
    action:action
              completionHandler: ^(Instance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var action = action_example; // {{String}} The action to apply.

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

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

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var action = action_example;  // String | The action to apply.

            try
            {
                // Apply action to specific instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdActionPut(resourceGroupId, instanceId, action);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdActionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$action = action_example; // String | The action to apply.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $action = action_example; # String | The action to apply.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdActionPut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, action => $action);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdActionPut: $@\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.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
action = action_example # String | The action to apply.

try: 
    # Apply action to specific instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_action_put(resourceGroupId, instanceId, action)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdActionPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
instance_id*
Long (int64)
The instance id.
Required
action*
String
The action to apply.
Required

Responses

Status: 200 - Successfully applied action from instance.

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: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut

Initiate a backup creation for the specified instance.

Initiate a backup creation for the specified instance in the resource group. 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.


/resource_groups/{resource_group_id}/instances/{instance_id}/create_backup

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

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

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
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.resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

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

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

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

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

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

try: 
    # Initiate a backup creation for the specified instance.
    api_instance.resource_groups_resource_group_id_instances_instance_id_create_backup_put(resourceGroupId, instanceId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
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."}

resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet

Get the credentials of the specified instance of a resource group.

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


/resource_groups/{resource_group_id}/instances/{instance_id}/credentials

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

// Get the credentials of the specified instance of a resource group.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGetWith:resourceGroupId
    instanceId: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.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
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.resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

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

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

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

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

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

try: 
    # Get the credentials of the specified instance of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_credentials_get(resourceGroupId, instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdCredentialsGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
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"}

resourceGroupsResourceGroupIdInstancesInstanceIdDelete

Delete a specified instance.

A successful response will delete the specified instance of the resource group.


/resource_groups/{resource_group_id}/instances/{instance_id}

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

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

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
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.resourceGroupsResourceGroupIdInstancesInstanceIdDelete(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

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

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

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

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

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

try: 
    # Delete a specified instance.
    api_instance.resource_groups_resource_group_id_instances_instance_id_delete(resourceGroupId, instanceId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdDelete: %s\n" % e)

Parameters

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

Responses

Status: 200 - Successfully deleted the instance of the resource group.

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

resourceGroupsResourceGroupIdInstancesInstanceIdGet

Get a specific instance's details of a resource group.

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


/resource_groups/{resource_group_id}/instances/{instance_id}

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

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

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
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.resourceGroupsResourceGroupIdInstancesInstanceIdGet(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

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

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

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

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

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

try: 
    # Get a specific instance's details of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_get(resourceGroupId, instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - Get an instance details from the resource group.

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

resourceGroupsResourceGroupIdInstancesInstanceIdMovePut

Move the specified instance to another Cluster.

Initiate a backup move for the specified instance. The move is specified by the new cluster, the new resource group, the new datastore and networks. Instance should be in ACTIVE or SHUTOFF status.


/resource_groups/{resource_group_id}/instances/{instance_id}/move

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/move"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        MoveInstance body = ; // MoveInstance | The parameters of instance move
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdMovePut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdMovePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        MoveInstance body = ; // MoveInstance | The parameters of instance move
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdMovePut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdMovePut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
MoveInstance *body = ; // The parameters of instance move (optional)

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

// Move the specified instance to another Cluster.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdMovePutWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{MoveInstance}} The parameters of instance move
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdMovePut(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new MoveInstance(); // MoveInstance | The parameters of instance move (optional) 

            try
            {
                // Move the specified instance to another Cluster.
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdMovePut(resourceGroupId, instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdMovePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // MoveInstance | The parameters of instance move

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::MoveInstance->new(); # MoveInstance | The parameters of instance move

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdMovePut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdMovePut: $@\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.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # MoveInstance | The parameters of instance move (optional)

try: 
    # Move the specified instance to another Cluster.
    api_instance.resource_groups_resource_group_id_instances_instance_id_move_put(resourceGroupId, instanceId, body=body)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdMovePut: %s\n" % e)

Parameters

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

Responses

Status: 202 - A move of the instance initiated.

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: 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."}

resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete

Stop an instance's VNC

Stop an instance's VNC by concealing from Cluster.


/resource_groups/{resource_group_id}/instances/{instance_id}/vnc

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

// Stop an instance's VNC
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdVncDeleteWith:resourceGroupId
    instanceId:instanceId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
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.resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Stop an instance's VNC
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete(resourceGroupId, instanceId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Stop an instance's VNC
    api_instance.resource_groups_resource_group_id_instances_instance_id_vnc_delete(resourceGroupId, instanceId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdVncDelete: %s\n" % e)

Parameters

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

Responses

Status: 204 - Successfully stopped instance's VNC

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

resourceGroupsResourceGroupIdInstancesInstanceIdVncPost

Start an instance's VNC

Start an instance's VNC by exposing access from Cluster. Instance should be in ACTIVE status. The VNC can be accessed through the websocket at '/ws/resource_groups/{resource_group_id}/instances/{instance_id}/vnc'.


/resource_groups/{resource_group_id}/instances/{instance_id}/vnc

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/vnc"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        VNCOpts body = ; // VNCOpts | The expose instance's VNC parameters
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdVncPost(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdVncPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long instanceId = 789; // Long | The instance id.
        VNCOpts body = ; // VNCOpts | The expose instance's VNC parameters
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdVncPost(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdVncPost");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
VNCOpts *body = ; // The expose instance's VNC parameters (optional)

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

// Start an instance's VNC
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdVncPostWith:resourceGroupId
    instanceId:instanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var instanceId = 789; // {{Long}} The instance id.
var opts = { 
  'body':  // {{VNCOpts}} The expose instance's VNC parameters
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdVncPost(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.
            var body = new VNCOpts(); // VNCOpts | The expose instance's VNC parameters (optional) 

            try
            {
                // Start an instance's VNC
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdVncPost(resourceGroupId, instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdVncPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$instanceId = 789; // Long | The instance id.
$body = ; // VNCOpts | The expose instance's VNC parameters

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $instanceId = 789; # Long | The instance id.
my $body = WWW::SwaggerClient::Object::VNCOpts->new(); # VNCOpts | The expose instance's VNC parameters

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdVncPost(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdVncPost: $@\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.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
instanceId = 789 # Long | The instance id.
body =  # VNCOpts | The expose instance's VNC parameters (optional)

try: 
    # Start an instance's VNC
    api_instance.resource_groups_resource_group_id_instances_instance_id_vnc_post(resourceGroupId, instanceId, body=body)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdVncPost: %s\n" % e)

Parameters

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

Responses

Status: 200 - Successfully initiated instance VNC

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

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

resourceGroupsResourceGroupIdInstancesPost

Create a new instance in a resource group.

Add a new instance in a resource group.


/resource_groups/{resource_group_id}/instances

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        NewInstance body = ; // NewInstance | The instance parameters
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesPost(resourceGroupId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        NewInstance body = ; // NewInstance | The instance parameters
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesPost(resourceGroupId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesPost");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
NewInstance *body = ; // The instance parameters (optional)

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

// Create a new instance in a resource group.
[apiInstance resourceGroupsResourceGroupIdInstancesPostWith:resourceGroupId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var opts = { 
  'body':  // {{NewInstance}} The instance parameters
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesPost(resourceGroupId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var body = new NewInstance(); // NewInstance | The instance parameters (optional) 

            try
            {
                // Create a new instance in a resource group.
                apiInstance.resourceGroupsResourceGroupIdInstancesPost(resourceGroupId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$body = ; // NewInstance | The instance parameters

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $body = WWW::SwaggerClient::Object::NewInstance->new(); # NewInstance | The instance parameters

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesPost(resourceGroupId => $resourceGroupId, body => $body);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesPost: $@\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.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
body =  # NewInstance | The instance parameters (optional)

try: 
    # Create a new instance in a resource group.
    api_instance.resource_groups_resource_group_id_instances_post(resourceGroupId, body=body)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesPost: %s\n" % e)

Parameters

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

Responses

Status: 200 - Successfully created instance in resource group

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: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut

Associate a private IP to an allocated public IP.

Associate the Network interface with the specified private IP to an allocated public IP.


/resource_groups/{resource_group_id}/instances/{private_ip}/associate_ip/{public_ip}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{private_ip}/associate_ip/{public_ip}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        String privateIp = privateIp_example; // String | The instance's private IP to associate to.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut(resourceGroupId, privateIp, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        String privateIp = privateIp_example; // String | The instance's private IP to associate to.
        String publicIp = publicIp_example; // String | The public IP to associate.
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut(resourceGroupId, privateIp, publicIp);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
String *privateIp = privateIp_example; // The instance's private IP to associate to.
String *publicIp = publicIp_example; // The public IP to associate.

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

// Associate a private IP to an allocated public IP.
[apiInstance resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPutWith:resourceGroupId
    privateIp:privateIp
    publicIp:publicIp
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var privateIp = privateIp_example; // {{String}} The instance's private IP to associate to.
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.resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut(resourceGroupId, privateIp, publicIp, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var privateIp = privateIp_example;  // String | The instance's private IP to associate to.
            var publicIp = publicIp_example;  // String | The public IP to associate.

            try
            {
                // Associate a private IP to an allocated public IP.
                apiInstance.resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut(resourceGroupId, privateIp, publicIp);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$privateIp = privateIp_example; // String | The instance's private IP to associate to.
$publicIp = publicIp_example; // String | The public IP to associate.

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

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $resourceGroupId = 789; # Long | The resource group id.
my $privateIp = privateIp_example; # String | The instance's private IP to associate to.
my $publicIp = publicIp_example; # String | The public IP to associate.

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut(resourceGroupId => $resourceGroupId, privateIp => $privateIp, publicIp => $publicIp);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut: $@\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.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
privateIp = privateIp_example # String | The instance's private IP to associate to.
publicIp = publicIp_example # String | The public IP to associate.

try: 
    # Associate a private IP to an allocated public IP.
    api_instance.resource_groups_resource_group_id_instances_private_ip_associate_ip_public_ip_put(resourceGroupId, privateIp, publicIp)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesPrivateIpAssociateIpPublicIpPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
private_ip*
String
The instance's private IP to associate to.
Required
public_ip*
String
The public IP to associate.
Required

Responses

Status: 200 - Public IP associated to private IP successfully.

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

resourceGroupsResourceGroupIdTemplatesGet

Get the templates of the specified resource group.

A successful response will return a list of the templates of the specified resource group.


/resource_groups/{resource_group_id}/templates

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

// Get the templates of the specified resource group.
[apiInstance resourceGroupsResourceGroupIdTemplatesGetWith:resourceGroupId
              completionHandler: ^(array[Template] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
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.resourceGroupsResourceGroupIdTemplatesGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

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

            try
            {
                // Get the templates of the specified resource group.
                array[Template] result = apiInstance.resourceGroupsResourceGroupIdTemplatesGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdTemplatesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get the templates of the specified resource group.
    api_response = api_instance.resource_groups_resource_group_id_templates_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - The templates list of the resource group.

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

resourceGroupsResourceGroupIdTemplatesTemplateIdDelete

Delete a template of a specified resource group.

A successful response will delete the specified template of the specified resource group.


/resource_groups/{resource_group_id}/templates/{template_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/templates/{template_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ResourceGroupsApi;

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long resourceGroupId = 789; // Long | The resource group id.
        Long templateId = 789; // Long | The template id.
        try {
            apiInstance.resourceGroupsResourceGroupIdTemplatesTemplateIdDelete(resourceGroupId, templateId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdTemplatesTemplateIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *templateId = 789; // The template id.

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

// Delete a template of a specified resource group.
[apiInstance resourceGroupsResourceGroupIdTemplatesTemplateIdDeleteWith:resourceGroupId
    templateId:templateId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var templateId = 789; // {{Long}} The template id.

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

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

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

            try
            {
                // Delete a template of a specified resource group.
                apiInstance.resourceGroupsResourceGroupIdTemplatesTemplateIdDelete(resourceGroupId, templateId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdTemplatesTemplateIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    $api_instance->resourceGroupsResourceGroupIdTemplatesTemplateIdDelete(resourceGroupId => $resourceGroupId, templateId => $templateId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesTemplateIdDelete: $@\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.ResourceGroupsApi()
resourceGroupId = 789 # Long | The resource group id.
templateId = 789 # Long | The template id.

try: 
    # Delete a template of a specified resource group.
    api_instance.resource_groups_resource_group_id_templates_template_id_delete(resourceGroupId, templateId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesTemplateIdDelete: %s\n" % e)

Parameters

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

Responses

Status: 200 - Successfully deleted the specified template.

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

resourceGroupsResourceGroupIdTemplatesTemplateIdGet

Get the specified template's details of a specified resource group.

A successful response will return the details of the specified template of the specified resource group.


/resource_groups/{resource_group_id}/templates/{template_id}

Usage and SDK Samples

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

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

public class ResourceGroupsApiExample {

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

public class ResourceGroupsApiExample {

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

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

// Get the specified template's details of a specified resource group.
[apiInstance resourceGroupsResourceGroupIdTemplatesTemplateIdGetWith:resourceGroupId
    templateId:templateId
              completionHandler: ^(Template output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ResourceGroupsApi()
var resourceGroupId = 789; // {{Long}} The resource group id.
var templateId = 789; // {{Long}} The template id.

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

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

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

            try
            {
                // Get the specified template's details of a specified resource group.
                Template result = apiInstance.resourceGroupsResourceGroupIdTemplatesTemplateIdGet(resourceGroupId, templateId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdTemplatesTemplateIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get the specified template's details of a specified resource group.
    api_response = api_instance.resource_groups_resource_group_id_templates_template_id_get(resourceGroupId, templateId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdTemplatesTemplateIdGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - The templates details of the resource group.

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

Roles

rolesGet

Get all available roles.

Get a list with all the available roles. Action can be performed only by users with `admin` role.


/roles

Usage and SDK Samples

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

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

public class RolesApiExample {

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

public class RolesApiExample {

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

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

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

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

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

            var apiInstance = new RolesApi();

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

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

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

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

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

try: 
    # Get all available roles.
    api_response = api_instance.roles_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->rolesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of all the available roles.

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

rolesPost

Create a new Role.

Create a new role. The following validations apply: * Name should not be empty (422) Action can be performed only by users with `admin` role.


/roles

Usage and SDK Samples

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

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        NewRole body = ; // NewRole | The new role details.
        try {
            Role result = apiInstance.rolesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        NewRole body = ; // NewRole | The new role details.
        try {
            Role result = apiInstance.rolesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesPost");
            e.printStackTrace();
        }
    }
}
NewRole *body = ; // The new role details. (optional)

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

// Create a new Role.
[apiInstance rolesPostWith:body
              completionHandler: ^(Role output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var opts = { 
  'body':  // {{NewRole}} The new role details.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.rolesPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new RolesApi();
            var body = new NewRole(); // NewRole | The new role details. (optional) 

            try
            {
                // Create a new Role.
                Role result = apiInstance.rolesPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$body = ; // NewRole | The new role details.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $body = WWW::SwaggerClient::Object::NewRole->new(); # NewRole | The new role details.

eval { 
    my $result = $api_instance->rolesPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesPost: $@\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.RolesApi()
body =  # NewRole | The new role details. (optional)

try: 
    # Create a new Role.
    api_response = api_instance.roles_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->rolesPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Role created 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.

{"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"}

rolesRoleIdAvailableUsersAssignGet

Get users available to assign a role.

Get a list of users that can be assigned to the specific role


/roles/{role_id}/available_users/assign

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/available_users/assign"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

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

public class RolesApiExample {

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

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

// Get users available to assign a role.
[apiInstance rolesRoleIdAvailableUsersAssignGetWith:roleId
              completionHandler: ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

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

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

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Get users available to assign a role.
                array[User] result = apiInstance.rolesRoleIdAvailableUsersAssignGet(roleId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdAvailableUsersAssignGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

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

try: 
    # Get users available to assign a role.
    api_response = api_instance.roles_role_id_available_users_assign_get(roleId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdAvailableUsersAssignGet: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - A list of the users

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

rolesRoleIdAvailableUsersDeassignGet

Get users available to deassign from a role.

Get a list of users that can be deassigned from the specific role


/roles/{role_id}/available_users/deassign

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/available_users/deassign"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

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

public class RolesApiExample {

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

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

// Get users available to deassign from a role.
[apiInstance rolesRoleIdAvailableUsersDeassignGetWith:roleId
              completionHandler: ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

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

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

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Get users available to deassign from a role.
                array[User] result = apiInstance.rolesRoleIdAvailableUsersDeassignGet(roleId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdAvailableUsersDeassignGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

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

try: 
    # Get users available to deassign from a role.
    api_response = api_instance.roles_role_id_available_users_deassign_get(roleId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdAvailableUsersDeassignGet: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - A list of the users

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

rolesRoleIdDelete

Delete a role with specific ID.

Delete the role with the specified ID. Action can be performed only by users with `admin` role.


/roles/{role_id}

Usage and SDK Samples

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

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

public class RolesApiExample {

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

public class RolesApiExample {

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

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

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

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

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

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

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Delete a role with specific ID.
                apiInstance.rolesRoleIdDelete(roleId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

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

try: 
    # Delete a role with specific ID.
    api_instance.roles_role_id_delete(roleId)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - Role 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"}

rolesRoleIdDisablePut

Disable the role

Disable the Role with the specific ID by changing its status. Action can be performed only by users with `admin` role.


/roles/{role_id}/disable

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/disable"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

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

public class RolesApiExample {

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

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

// Disable the role
[apiInstance rolesRoleIdDisablePutWith:roleId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

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

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

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Disable the role
                apiInstance.rolesRoleIdDisablePut(roleId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdDisablePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

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

try: 
    # Disable the role
    api_instance.roles_role_id_disable_put(roleId)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdDisablePut: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - Role disabled successfully.

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

rolesRoleIdEnablePut

Enable the role

Enable the Role with the specific ID by changing its status. Action can be performed only by users with `admin` role.


/roles/{role_id}/enable

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/enable"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

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

public class RolesApiExample {

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

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

// Enable the role
[apiInstance rolesRoleIdEnablePutWith:roleId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

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

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

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Enable the role
                apiInstance.rolesRoleIdEnablePut(roleId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdEnablePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

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

try: 
    # Enable the role
    api_instance.roles_role_id_enable_put(roleId)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdEnablePut: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - Role enabled successfully.

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

rolesRoleIdGet

Get role with specific ID.

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


/roles/{role_id}

Usage and SDK Samples

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

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

public class RolesApiExample {

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

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        try {
            Role result = apiInstance.rolesRoleIdGet(roleId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdGet");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.

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

// Get role with specific ID.
[apiInstance rolesRoleIdGetWith:roleId
              completionHandler: ^(Role output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.

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

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

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.

            try
            {
                // Get role with specific ID.
                Role result = apiInstance.rolesRoleIdGet(roleId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.

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

try: 
    # Get role with specific ID.
    api_response = api_instance.roles_role_id_get(roleId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required

Responses

Status: 200 - Details of the role 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"}

rolesRoleIdUserUserIdAssignPut

Assign a specific role to a specific user.

Assign a specific role with role_id to a specific user with user_id. Action can be performed only by users with `admin` role.


/roles/{role_id}/user/{user_id}/assign

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/user/{user_id}/assign"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        Long userId = 789; // Long | The user id.
        try {
            apiInstance.rolesRoleIdUserUserIdAssignPut(roleId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdUserUserIdAssignPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        Long userId = 789; // Long | The user id.
        try {
            apiInstance.rolesRoleIdUserUserIdAssignPut(roleId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdUserUserIdAssignPut");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.
Long *userId = 789; // The user id.

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

// Assign a specific role to a specific user.
[apiInstance rolesRoleIdUserUserIdAssignPutWith:roleId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.
var userId = 789; // {{Long}} The user id.

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

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

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.
            var userId = 789;  // Long | The user id.

            try
            {
                // Assign a specific role to a specific user.
                apiInstance.rolesRoleIdUserUserIdAssignPut(roleId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdUserUserIdAssignPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.
$userId = 789; // Long | The user id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.
my $userId = 789; # Long | The user id.

eval { 
    $api_instance->rolesRoleIdUserUserIdAssignPut(roleId => $roleId, userId => $userId);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesRoleIdUserUserIdAssignPut: $@\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.RolesApi()
roleId = 789 # Long | The role id.
userId = 789 # Long | The user id.

try: 
    # Assign a specific role to a specific user.
    api_instance.roles_role_id_user_user_id_assign_put(roleId, userId)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdUserUserIdAssignPut: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required
user_id*
Long (int64)
The user id.
Required

Responses

Status: 200 - Role assigned to user successfully.

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

rolesRoleIdUserUserIdDeassignPut

De-assign a specific role from a specific user.

De-assign a specific role with role_id to a specific user with user_id. Action can be performed only by users with `admin` role.


/roles/{role_id}/user/{user_id}/deassign

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/roles/{role_id}/user/{user_id}/deassign"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RolesApi;

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

public class RolesApiExample {

    public static void main(String[] args) {
        
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        Long userId = 789; // Long | The user id.
        try {
            apiInstance.rolesRoleIdUserUserIdDeassignPut(roleId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdUserUserIdDeassignPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RolesApi;

public class RolesApiExample {

    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        Long roleId = 789; // Long | The role id.
        Long userId = 789; // Long | The user id.
        try {
            apiInstance.rolesRoleIdUserUserIdDeassignPut(roleId, userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#rolesRoleIdUserUserIdDeassignPut");
            e.printStackTrace();
        }
    }
}
Long *roleId = 789; // The role id.
Long *userId = 789; // The user id.

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

// De-assign a specific role from a specific user.
[apiInstance rolesRoleIdUserUserIdDeassignPutWith:roleId
    userId:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RolesApi()
var roleId = 789; // {{Long}} The role id.
var userId = 789; // {{Long}} The user id.

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

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

            var apiInstance = new RolesApi();
            var roleId = 789;  // Long | The role id.
            var userId = 789;  // Long | The user id.

            try
            {
                // De-assign a specific role from a specific user.
                apiInstance.rolesRoleIdUserUserIdDeassignPut(roleId, userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RolesApi.rolesRoleIdUserUserIdDeassignPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRolesApi();
$roleId = 789; // Long | The role id.
$userId = 789; // Long | The user id.

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

my $api_instance = WWW::SwaggerClient::RolesApi->new();
my $roleId = 789; # Long | The role id.
my $userId = 789; # Long | The user id.

eval { 
    $api_instance->rolesRoleIdUserUserIdDeassignPut(roleId => $roleId, userId => $userId);
};
if ($@) {
    warn "Exception when calling RolesApi->rolesRoleIdUserUserIdDeassignPut: $@\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.RolesApi()
roleId = 789 # Long | The role id.
userId = 789 # Long | The user id.

try: 
    # De-assign a specific role from a specific user.
    api_instance.roles_role_id_user_user_id_deassign_put(roleId, userId)
except ApiException as e:
    print("Exception when calling RolesApi->rolesRoleIdUserUserIdDeassignPut: %s\n" % e)

Parameters

Path parameters
Name Description
role_id*
Long (int64)
The role id.
Required
user_id*
Long (int64)
The user id.
Required

Responses

Status: 200 - Role de-assigned from a user successfully.

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

ScheduledSnapshots

scheduledSnapshotsGet

Get all available scheduled tasks for snapshots.

A successful response will return all the available scheduled snapshots.


/scheduled_snapshots

Usage and SDK Samples

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

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

public class ScheduledSnapshotsApiExample {

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

public class ScheduledSnapshotsApiExample {

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

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

// Get all available scheduled tasks for snapshots.
[apiInstance scheduledSnapshotsGetWithCompletionHandler: 
              ^(array[ScheduledSnapshot] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new ScheduledSnapshotsApi();

            try
            {
                // Get all available scheduled tasks for snapshots.
                array[ScheduledSnapshot] result = apiInstance.scheduledSnapshotsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledSnapshotsApi.scheduledSnapshotsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get all available scheduled tasks for snapshots.
    api_response = api_instance.scheduled_snapshots_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of the scheduled snapshots.

Status: 401 - Status unauthorized.

{"code":401}

Status: 500 - An unexpected error occurred.

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

scheduledSnapshotsPost

Create a new scheduled task of the snapshot.

A successful response will create and return the new scheduled snapshot. A Conflict error (409) will be returned in case too many jobs exist for the same instance. Configuration: `max_sched_snaps_per_vm` (default = 5).


/scheduled_snapshots

Usage and SDK Samples

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

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

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        NewScheduledSnapshot body = ; // NewScheduledSnapshot | The scheduled snapshot parameters.
        try {
            ScheduledSnapshot result = apiInstance.scheduledSnapshotsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledSnapshotsApi;

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        NewScheduledSnapshot body = ; // NewScheduledSnapshot | The scheduled snapshot parameters.
        try {
            ScheduledSnapshot result = apiInstance.scheduledSnapshotsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsPost");
            e.printStackTrace();
        }
    }
}
NewScheduledSnapshot *body = ; // The scheduled snapshot parameters. (optional)

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

// Create a new scheduled task of the snapshot.
[apiInstance scheduledSnapshotsPostWith:body
              completionHandler: ^(ScheduledSnapshot output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ScheduledSnapshotsApi()
var opts = { 
  'body':  // {{NewScheduledSnapshot}} The scheduled snapshot parameters.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.scheduledSnapshotsPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ScheduledSnapshotsApi();
            var body = new NewScheduledSnapshot(); // NewScheduledSnapshot | The scheduled snapshot parameters. (optional) 

            try
            {
                // Create a new scheduled task of the snapshot.
                ScheduledSnapshot result = apiInstance.scheduledSnapshotsPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledSnapshotsApi.scheduledSnapshotsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiScheduledSnapshotsApi();
$body = ; // NewScheduledSnapshot | The scheduled snapshot parameters.

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

my $api_instance = WWW::SwaggerClient::ScheduledSnapshotsApi->new();
my $body = WWW::SwaggerClient::Object::NewScheduledSnapshot->new(); # NewScheduledSnapshot | The scheduled snapshot parameters.

eval { 
    my $result = $api_instance->scheduledSnapshotsPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsPost: $@\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.ScheduledSnapshotsApi()
body =  # NewScheduledSnapshot | The scheduled snapshot parameters. (optional)

try: 
    # Create a new scheduled task of the snapshot.
    api_response = api_instance.scheduled_snapshots_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 201 - A new scheduled snapshots created.

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: 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"}

scheduledSnapshotsSchedsnapIdDelete

Delete the given scheduled task of the snapshot.

A successful response will stop the cron job of the scheduled task.


/scheduled_snapshots/{schedsnap_id}

Usage and SDK Samples

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

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

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        Integer schedsnapId = 56; // Integer | The scheduled snapshot id.
        try {
            apiInstance.scheduledSnapshotsSchedsnapIdDelete(schedsnapId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsSchedsnapIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledSnapshotsApi;

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        Integer schedsnapId = 56; // Integer | The scheduled snapshot id.
        try {
            apiInstance.scheduledSnapshotsSchedsnapIdDelete(schedsnapId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsSchedsnapIdDelete");
            e.printStackTrace();
        }
    }
}
Integer *schedsnapId = 56; // The scheduled snapshot id.

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

// Delete the given scheduled task of the snapshot.
[apiInstance scheduledSnapshotsSchedsnapIdDeleteWith:schedsnapId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ScheduledSnapshotsApi()
var schedsnapId = 56; // {{Integer}} The scheduled snapshot id.

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

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

            var apiInstance = new ScheduledSnapshotsApi();
            var schedsnapId = 56;  // Integer | The scheduled snapshot id.

            try
            {
                // Delete the given scheduled task of the snapshot.
                apiInstance.scheduledSnapshotsSchedsnapIdDelete(schedsnapId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledSnapshotsApi.scheduledSnapshotsSchedsnapIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiScheduledSnapshotsApi();
$schedsnapId = 56; // Integer | The scheduled snapshot id.

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

my $api_instance = WWW::SwaggerClient::ScheduledSnapshotsApi->new();
my $schedsnapId = 56; # Integer | The scheduled snapshot id.

eval { 
    $api_instance->scheduledSnapshotsSchedsnapIdDelete(schedsnapId => $schedsnapId);
};
if ($@) {
    warn "Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsSchedsnapIdDelete: $@\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.ScheduledSnapshotsApi()
schedsnapId = 56 # Integer | The scheduled snapshot id.

try: 
    # Delete the given scheduled task of the snapshot.
    api_instance.scheduled_snapshots_schedsnap_id_delete(schedsnapId)
except ApiException as e:
    print("Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsSchedsnapIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
schedsnap_id*
Integer (uint)
The scheduled snapshot id.
Required

Responses

Status: 204 - Scheduled snapshot deleted successfully.

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

scheduledSnapshotsSchedsnapIdGet

Get the given scheduled jobs's details.

A successful response will get the scheduled snapshot job's details.


/scheduled_snapshots/{schedsnap_id}

Usage and SDK Samples

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

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

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        Integer schedsnapId = 56; // Integer | The scheduled snapshot id.
        try {
            ScheduledSnapshot result = apiInstance.scheduledSnapshotsSchedsnapIdGet(schedsnapId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsSchedsnapIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ScheduledSnapshotsApi;

public class ScheduledSnapshotsApiExample {

    public static void main(String[] args) {
        ScheduledSnapshotsApi apiInstance = new ScheduledSnapshotsApi();
        Integer schedsnapId = 56; // Integer | The scheduled snapshot id.
        try {
            ScheduledSnapshot result = apiInstance.scheduledSnapshotsSchedsnapIdGet(schedsnapId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ScheduledSnapshotsApi#scheduledSnapshotsSchedsnapIdGet");
            e.printStackTrace();
        }
    }
}
Integer *schedsnapId = 56; // The scheduled snapshot id.

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

// Get the given scheduled jobs's details.
[apiInstance scheduledSnapshotsSchedsnapIdGetWith:schedsnapId
              completionHandler: ^(ScheduledSnapshot output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ScheduledSnapshotsApi()
var schedsnapId = 56; // {{Integer}} The scheduled snapshot id.

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

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

            var apiInstance = new ScheduledSnapshotsApi();
            var schedsnapId = 56;  // Integer | The scheduled snapshot id.

            try
            {
                // Get the given scheduled jobs's details.
                ScheduledSnapshot result = apiInstance.scheduledSnapshotsSchedsnapIdGet(schedsnapId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ScheduledSnapshotsApi.scheduledSnapshotsSchedsnapIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiScheduledSnapshotsApi();
$schedsnapId = 56; // Integer | The scheduled snapshot id.

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

my $api_instance = WWW::SwaggerClient::ScheduledSnapshotsApi->new();
my $schedsnapId = 56; # Integer | The scheduled snapshot id.

eval { 
    my $result = $api_instance->scheduledSnapshotsSchedsnapIdGet(schedsnapId => $schedsnapId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsSchedsnapIdGet: $@\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.ScheduledSnapshotsApi()
schedsnapId = 56 # Integer | The scheduled snapshot id.

try: 
    # Get the given scheduled jobs's details.
    api_response = api_instance.scheduled_snapshots_schedsnap_id_get(schedsnapId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ScheduledSnapshotsApi->scheduledSnapshotsSchedsnapIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
schedsnap_id*
Integer (uint)
The scheduled snapshot id.
Required

Responses

Status: 200 - A scheduled snapshot object.

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: 404 - Resource not found.

{"code":404}

Status: 500 - An unexpected error occurred.

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

Stats

getAlertsGet

Get alerts from the connected clusters

A successful response will return a list of alerts of the connected clusters.


/get_alerts

Usage and SDK Samples

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

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

public class StatsApiExample {

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

public class StatsApiExample {

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

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

// Get alerts from the connected clusters
[apiInstance getAlertsGetWithCompletionHandler: 
              ^(array[Alert] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new StatsApi();

            try
            {
                // Get alerts from the connected clusters
                array[Alert] result = apiInstance.getAlertsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StatsApi.getAlertsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get alerts from the connected clusters
    api_response = api_instance.get_alerts_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StatsApi->getAlertsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of available alerts

Status: 401 - Status unauthorized.

{"code":401}

Status: 500 - An unexpected error occurred.

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

getStatsGet

Get stats from the connected clusters

A successful response will return a list of stats aggregated from the connected clusters.


/get_stats

Usage and SDK Samples

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

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

public class StatsApiExample {

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

public class StatsApiExample {

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

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

// Get stats from the connected clusters
[apiInstance getStatsGetWithCompletionHandler: 
              ^(array[Stat] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

            var apiInstance = new StatsApi();

            try
            {
                // Get stats from the connected clusters
                array[Stat] result = apiInstance.getStatsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling StatsApi.getStatsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get stats from the connected clusters
    api_response = api_instance.get_stats_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling StatsApi->getStatsGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of available stats

Status: 401 - Status unauthorized.

{"code":401}

Status: 500 - An unexpected error occurred.

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

Templates

templatesGet

Get templates of instances filtered by the UUID of the VM.

A successful response will a list of instances with the available templates of each one.


/templates

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/templates?vm_uuid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TemplatesApi;

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

public class TemplatesApiExample {

    public static void main(String[] args) {
        
        TemplatesApi apiInstance = new TemplatesApi();
        String vmUuid = vmUuid_example; // String | The UUID of the VM.
        try {
            array[InstanceTemplates] result = apiInstance.templatesGet(vmUuid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#templatesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TemplatesApi;

public class TemplatesApiExample {

    public static void main(String[] args) {
        TemplatesApi apiInstance = new TemplatesApi();
        String vmUuid = vmUuid_example; // String | The UUID of the VM.
        try {
            array[InstanceTemplates] result = apiInstance.templatesGet(vmUuid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TemplatesApi#templatesGet");
            e.printStackTrace();
        }
    }
}
String *vmUuid = vmUuid_example; // The UUID of the VM.

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

// Get templates of instances filtered by the UUID of the VM.
[apiInstance templatesGetWith:vmUuid
              completionHandler: ^(array[InstanceTemplates] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.TemplatesApi()
var vmUuid = vmUuid_example; // {{String}} The UUID of the VM.

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

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

            var apiInstance = new TemplatesApi();
            var vmUuid = vmUuid_example;  // String | The UUID of the VM.

            try
            {
                // Get templates of instances filtered by the UUID of the VM.
                array[InstanceTemplates] result = apiInstance.templatesGet(vmUuid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TemplatesApi.templatesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTemplatesApi();
$vmUuid = vmUuid_example; // String | The UUID of the VM.

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

my $api_instance = WWW::SwaggerClient::TemplatesApi->new();
my $vmUuid = vmUuid_example; # String | The UUID of the VM.

eval { 
    my $result = $api_instance->templatesGet(vmUuid => $vmUuid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TemplatesApi->templatesGet: $@\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.TemplatesApi()
vmUuid = vmUuid_example # String | The UUID of the VM.

try: 
    # Get templates of instances filtered by the UUID of the VM.
    api_response = api_instance.templates_get(vmUuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TemplatesApi->templatesGet: %s\n" % e)

Parameters

Query parameters
Name Description
vm_uuid*
String
The UUID of the VM.
Required

Responses

Status: 200 - A list of instances with the available templates.

Status: 401 - Status unauthorized.

{"code":401}

Status: 500 - An unexpected error occurred.

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

Users

usersGet

Get all available users.

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


/users

Usage and SDK Samples

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

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

public class UsersApiExample {

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

public class UsersApiExample {

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

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

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

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

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

            var apiInstance = new UsersApi();

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

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

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

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

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

try: 
    # Get all available users.
    api_response = api_instance.users_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->usersGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of available users.

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

usersPost

Create a new SIM2 User.

Create a new SIM2 user. The following validations apply: * Username needs to start from a character (422) * Username needs to have at least 2 characters (422) * Password needs to have at least 6 characters (422) * Company needs to have at least 2 characters (422) * Username and email should not already exist (422) Action can be performed only by users with `admin` role.


/users

Usage and SDK Samples

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

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

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        CreateUserCredentials body = ; // CreateUserCredentials | The credentials for a user creation.
        try {
            User result = apiInstance.usersPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        CreateUserCredentials body = ; // CreateUserCredentials | The credentials for a user creation.
        try {
            User result = apiInstance.usersPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersPost");
            e.printStackTrace();
        }
    }
}
CreateUserCredentials *body = ; // The credentials for a user creation. (optional)

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

// Create a new SIM2 User.
[apiInstance usersPostWith:body
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var opts = { 
  'body':  // {{CreateUserCredentials}} The credentials for a user creation.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.usersPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new UsersApi();
            var body = new CreateUserCredentials(); // CreateUserCredentials | The credentials for a user creation. (optional) 

            try
            {
                // Create a new SIM2 User.
                User result = apiInstance.usersPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$body = ; // CreateUserCredentials | The credentials for a user creation.

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $body = WWW::SwaggerClient::Object::CreateUserCredentials->new(); # CreateUserCredentials | The credentials for a user creation.

eval { 
    my $result = $api_instance->usersPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->usersPost: $@\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.UsersApi()
body =  # CreateUserCredentials | The credentials for a user creation. (optional)

try: 
    # Create a new SIM2 User.
    api_response = api_instance.users_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->usersPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 201 - User successfully created.

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

usersUserIdDelete

Delete a user with specific userID.

Delete the user with the provided ID. Action can be performed only by users with `admin` role.


/users/{user_id}

Usage and SDK Samples

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

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

public class UsersApiExample {

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

public class UsersApiExample {

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

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

// Delete a user with specific userID.
[apiInstance usersUserIdDeleteWith:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var userId = 789; // {{Long}} The user id.

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

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

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | The user id.

            try
            {
                // Delete a user with specific userID.
                apiInstance.usersUserIdDelete(userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersUserIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$userId = 789; // Long | The user id.

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | The user id.

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

try: 
    # Delete a user with specific userID.
    api_instance.users_user_id_delete(userId)
except ApiException as e:
    print("Exception when calling UsersApi->usersUserIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
The user id.
Required

Responses

Status: 200 - User 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"}

usersUserIdGet

Get user with specific ID.

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


/users/{user_id}

Usage and SDK Samples

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

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

public class UsersApiExample {

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

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        try {
            User result = apiInstance.usersUserIdGet(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdGet");
            e.printStackTrace();
        }
    }
}
Long *userId = 789; // The user id.

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

// Get user with specific ID.
[apiInstance usersUserIdGetWith:userId
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var userId = 789; // {{Long}} The user id.

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

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

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | The user id.

            try
            {
                // Get user with specific ID.
                User result = apiInstance.usersUserIdGet(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersUserIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$userId = 789; // Long | The user id.

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | The user id.

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

try: 
    # Get user with specific ID.
    api_response = api_instance.users_user_id_get(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->usersUserIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
The user id.
Required

Responses

Status: 200 - Details of th user 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"}

usersUserIdPasswordPut

Update the password of the user with specific ID.

Change the User's password with specific ID. The following validations apply: * Username must match the users username (422) * Old password must match the users current password (422) * New Password needs to have at least 6 characters (422) A successful response will change the user's password. Action can be performed only by the user himself.


/users/{user_id}/password

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/users/{user_id}/password"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        EditPassword body = ; // EditPassword | The credentials for changing password.
        try {
            apiInstance.usersUserIdPasswordPut(userId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdPasswordPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        EditPassword body = ; // EditPassword | The credentials for changing password.
        try {
            apiInstance.usersUserIdPasswordPut(userId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdPasswordPut");
            e.printStackTrace();
        }
    }
}
Long *userId = 789; // The user id.
EditPassword *body = ; // The credentials for changing password. (optional)

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

// Update the password of the user with specific ID.
[apiInstance usersUserIdPasswordPutWith:userId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var userId = 789; // {{Long}} The user id.
var opts = { 
  'body':  // {{EditPassword}} The credentials for changing password.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.usersUserIdPasswordPut(userId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | The user id.
            var body = new EditPassword(); // EditPassword | The credentials for changing password. (optional) 

            try
            {
                // Update the password of the user with specific ID.
                apiInstance.usersUserIdPasswordPut(userId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersUserIdPasswordPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$userId = 789; // Long | The user id.
$body = ; // EditPassword | The credentials for changing password.

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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | The user id.
my $body = WWW::SwaggerClient::Object::EditPassword->new(); # EditPassword | The credentials for changing password.

eval { 
    $api_instance->usersUserIdPasswordPut(userId => $userId, body => $body);
};
if ($@) {
    warn "Exception when calling UsersApi->usersUserIdPasswordPut: $@\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.UsersApi()
userId = 789 # Long | The user id.
body =  # EditPassword | The credentials for changing password. (optional)

try: 
    # Update the password of the user with specific ID.
    api_instance.users_user_id_password_put(userId, body=body)
except ApiException as e:
    print("Exception when calling UsersApi->usersUserIdPasswordPut: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
The user id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Password changed 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"}

usersUserIdPut

Edit the user

Edit the User with specific ID. The following validations apply: * Password needs to have at least 6 characters (422) Action can be performed only by users with `admin` role or by the same user itself.


/users/{user_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/users/{user_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

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

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        EditUser body = ; // EditUser | The user details to update. Providing a blank old_password
does not update the password.

        try {
            apiInstance.usersUserIdPut(userId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Long userId = 789; // Long | The user id.
        EditUser body = ; // EditUser | The user details to update. Providing a blank old_password
does not update the password.

        try {
            apiInstance.usersUserIdPut(userId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#usersUserIdPut");
            e.printStackTrace();
        }
    }
}
Long *userId = 789; // The user id.
EditUser *body = ; // The user details to update. Providing a blank old_password
does not update the password.
 (optional)

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

// Edit the user
[apiInstance usersUserIdPutWith:userId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.UsersApi()
var userId = 789; // {{Long}} The user id.
var opts = { 
  'body':  // {{EditUser}} The user details to update. Providing a blank old_password
does not update the password.

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

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

            var apiInstance = new UsersApi();
            var userId = 789;  // Long | The user id.
            var body = new EditUser(); // EditUser | The user details to update. Providing a blank old_password
does not update the password.
 (optional) 

            try
            {
                // Edit the user
                apiInstance.usersUserIdPut(userId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.usersUserIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUsersApi();
$userId = 789; // Long | The user id.
$body = ; // EditUser | The user details to update. Providing a blank old_password
does not update the password.


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

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = 789; # Long | The user id.
my $body = WWW::SwaggerClient::Object::EditUser->new(); # EditUser | The user details to update. Providing a blank old_password
does not update the password.


eval { 
    $api_instance->usersUserIdPut(userId => $userId, body => $body);
};
if ($@) {
    warn "Exception when calling UsersApi->usersUserIdPut: $@\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.UsersApi()
userId = 789 # Long | The user id.
body =  # EditUser | The user details to update. Providing a blank old_password
does not update the password.
 (optional)

try: 
    # Edit the user
    api_instance.users_user_id_put(userId, body=body)
except ApiException as e:
    print("Exception when calling UsersApi->usersUserIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
user_id*
Long (int64)
The user id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - User Edited successfully.

Status: 401 - Status unauthorized.

{"code":401}

Status: 403 - Status forbidden.

{"code":403}

Status: 404 - Resource not found.

{"code":404}

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