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,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

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

Clusters

clustersClusterIdAllocatePublicIpsNumberOfIpsPut

Allocate public IPs for an existing AWS Cluster.

Allocate Public IPs for an existing AWS Cluster.


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

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

public class ClustersApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

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

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdCoresGet

Get a cluster's cores

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


/clusters/{cluster_id}/cores

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

public class ClustersApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 200 - Cluster's cores

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdDelete

Delete cluster with specific ID

Given a cluster ID, the API will delete it from its DB. If the host is AWS the cluster will be also deleted from AWS. If the cluster is a sunlight hosted cluster it will be disconnected from the SIM. A cluster cannot be deleted 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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdDisksGet

Get a cluster's disks

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


/clusters/{cluster_id}/disks

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

public class ClustersApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 200 - Cluster's disks

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdGet

Get a cluster with specific ID.

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


/clusters/{cluster_id}

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

public class ClustersApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 200 - cluster with specific ID.

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdNodesGet

Get a cluste's nodes

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


/clusters/{cluster_id}/nodes

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

public class ClustersApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 200 - Cluster's nodes

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdReleasePublicIpsPut

Release all allocated public IPs for an existing AWS Cluster.

Release all allocated public IPs for an existing AWS Cluster.


/clusters/{cluster_id}/release_public_ips

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

public class ClustersApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

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

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdResourceGroupsGet

Get resource groups of a cluster.

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


/clusters/{cluster_id}/resource_groups

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

public class ClustersApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 200 - A list of resource groups.

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdResourceGroupsResourceGroupIdGet

Get a resource group of a cluster.

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


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

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

public class ClustersApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 200 - The resource group of the cluster.

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersCreatePost

Create A new AWS hosted cluster.

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


/clusters/create

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

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

public class ClustersApiExample {

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

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

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

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

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

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

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

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

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

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


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

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


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

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

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

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully cluster creation.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

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

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

Status: 500 - An unexpected error occurred.

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

clustersGet

Get all available clusters.

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


/clusters

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

public class ClustersApiExample {

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

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

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

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

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

            var apiInstance = new ClustersApi();

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

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

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

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

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

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

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

Parameters

Responses

Status: 200 - A list of clusters.

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 500 - An unexpected error occurred.

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

clustersHostInfoGet

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

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


/clusters/host_info

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

public class ClustersApiExample {

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

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

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

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

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

            var apiInstance = new ClustersApi();

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

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

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

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

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

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

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

Parameters

Responses

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 500 - An unexpected error occurred.

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

clustersPost

Create connection with an existing Cluster.

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


/clusters

Usage and SDK Samples

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

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

public class ClustersApiExample {

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

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

public class ClustersApiExample {

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

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

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

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

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

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

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

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

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

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


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

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


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

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

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

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully cluster addition.

Status: 400 - Cluster could not be created.

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 409 - Status conflict.

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

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

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

Status: 500 - An unexpected error occurred.

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

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

Datastores

clustersClusterIdDatastoresDatastoreIdDelete

Delete a datastore from a cluster.

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


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

Usage and SDK Samples

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

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters

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

Responses

Status: 204 - Datastore deleted succesfully.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 409 - Status conflict.

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

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

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdDatastoresDatastoreIdDisksGet

Get the disks of a specific datastore.


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

Usage and SDK Samples

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

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Get the disks of a specific datastore.
[apiInstance clustersClusterIdDatastoresDatastoreIdDisksGetWith:clusterId
    datastoreId:datastoreId
              completionHandler: ^(array[Disk] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

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

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

            try
            {
                // Get the disks of a specific datastore.
                array[Disk] result = apiInstance.clustersClusterIdDatastoresDatastoreIdDisksGet(clusterId, datastoreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresDatastoreIdDisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Get the disks of a specific datastore.
    api_response = api_instance.clusters_cluster_id_datastores_datastore_id_disks_get(clusterId, datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdDisksGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - A list of datastore's disks.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdDatastoresDatastoreIdGet

Get a datastore of a cluster.

The endpoint gets the datastore based on the ID and the cluster ID.


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

Usage and SDK Samples

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

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

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

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

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

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

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

            try
            {
                // Get a datastore of a cluster.
                Datastore result = apiInstance.clustersClusterIdDatastoresDatastoreIdGet(clusterId, datastoreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresDatastoreIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Get a datastore of a cluster.
    api_response = api_instance.clusters_cluster_id_datastores_datastore_id_get(clusterId, datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - Datastore retrieved succesfully.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdDatastoresDatastoreIdPut

Edit a datastore.

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


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

Usage and SDK Samples

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

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Edit a datastore.
[apiInstance clustersClusterIdDatastoresDatastoreIdPutWith:clusterId
    datastoreId:datastoreId
    body:body
              completionHandler: ^(Datastore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DatastoresApi()
var clusterId = 789; // {{Long}} The cluster id.
var datastoreId = 789; // {{Long}} The datastore id.
var opts = { 
  'body':  // {{EditDatastore}} The datastore to edit.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDatastoresDatastoreIdPut(clusterIddatastoreId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DatastoresApi();
            var clusterId = 789;  // Long | The cluster id.
            var datastoreId = 789;  // Long | The datastore id.
            var body = new EditDatastore(); // EditDatastore | The datastore to edit. (optional) 

            try
            {
                // Edit a datastore.
                Datastore result = apiInstance.clustersClusterIdDatastoresDatastoreIdPut(clusterId, datastoreId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresDatastoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Edit a datastore.
    api_response = api_instance.clusters_cluster_id_datastores_datastore_id_put(clusterId, datastoreId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresDatastoreIdPut: %s\n" % e)

Parameters

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

Responses

Status: 200 - Datastore edited successfully.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

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

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdDatastoresGet

Get the list the cluster's datastores


/clusters/{cluster_id}/datastores%27

Usage and SDK Samples

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

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

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

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

// Get the list the cluster's datastores
[apiInstance clustersClusterIdDatastoresGetWith:clusterId
              completionHandler: ^(array[Datastore] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

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

            try
            {
                // Get the list the cluster's datastores
                array[Datastore] result = apiInstance.clustersClusterIdDatastoresGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Get the list the cluster's datastores
    api_response = api_instance.clusters_cluster_id_datastores_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - List of datastores.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdDatastoresPost

Create new datastore in a cluster.

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


/clusters/{cluster_id}/datastores%27

Usage and SDK Samples

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

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

public class DatastoresApiExample {

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

public class DatastoresApiExample {

    public static void main(String[] args) {
        DatastoresApi apiInstance = new DatastoresApi();
        Long clusterId = 789; // Long | The cluster id.
        NewDatastore body = ; // NewDatastore | The datastore to create.
        try {
            Datastore result = apiInstance.clustersClusterIdDatastoresPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatastoresApi#clustersClusterIdDatastoresPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
NewDatastore *body = ; // The datastore to create. (optional)

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

// Create new datastore in a cluster.
[apiInstance clustersClusterIdDatastoresPostWith:clusterId
    body:body
              completionHandler: ^(Datastore output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DatastoresApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{NewDatastore}} The datastore to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdDatastoresPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DatastoresApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new NewDatastore(); // NewDatastore | The datastore to create. (optional) 

            try
            {
                // Create new datastore in a cluster.
                Datastore result = apiInstance.clustersClusterIdDatastoresPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatastoresApi.clustersClusterIdDatastoresPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

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

try: 
    # Create new datastore in a cluster.
    api_response = api_instance.clusters_cluster_id_datastores_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatastoresApi->clustersClusterIdDatastoresPost: %s\n" % e)

Parameters

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

Responses

Status: 200 - Datastore 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

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

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

Status: 500 - An unexpected error occurred.

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

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

Status: 500 - An unexpected error occurred.

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

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

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

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

Status: 500 - An unexpected error occurred.

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

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

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

Default

clustersClusterIdImagesGet

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

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


/clusters/{cluster_id}/images

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images?state="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.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.
        String state = state_example; // String | The state of images.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesGet(clusterId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdImagesGet");
            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.
        String state = state_example; // String | The state of images.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesGet(clusterId, state);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdImagesGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
String *state = state_example; // The state of images. (optional)

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

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

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

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

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

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

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

try {
    $result = $api_instance->clustersClusterIdImagesGet($clusterId, $state);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->clustersClusterIdImagesGet: ', $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 $state = state_example; # String | The state of images.

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

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

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

Parameters

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

Responses

Status: 200 - A list of images.

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdImagesImageIdDelete

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

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


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

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images/{image_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.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 imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDelete(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdImagesImageIdDelete");
            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 imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDelete(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdImagesImageIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *imageId = 789; // The image id.

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

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

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

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

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

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

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

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

try {
    $api_instance->clustersClusterIdImagesImageIdDelete($clusterId, $imageId);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->clustersClusterIdImagesImageIdDelete: ', $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 $imageId = 789; # Long | The image id.

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

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

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

Parameters

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

Responses

Status: 204 - Successfully deleted the specified image.

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdImagesImageIdDownloadPut

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

A successful response will download the specified image localy.


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

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images/{image_id}/download"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.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 imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDownloadPut(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdImagesImageIdDownloadPut");
            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 imageId = 789; // Long | The image id.
        try {
            apiInstance.clustersClusterIdImagesImageIdDownloadPut(clusterId, imageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdImagesImageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *imageId = 789; // The image id.

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

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

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

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

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

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

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

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

try {
    $api_instance->clustersClusterIdImagesImageIdDownloadPut($clusterId, $imageId);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->clustersClusterIdImagesImageIdDownloadPut: ', $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 $imageId = 789; # Long | The image id.

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

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

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

Parameters

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

Responses

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdImagesImageIdGet

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

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


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

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/images/{image_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.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 imageId = 789; // Long | The image id.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesImageIdGet(clusterId, imageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdImagesImageIdGet");
            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 imageId = 789; // Long | The image id.
        try {
            array[Image] result = apiInstance.clustersClusterIdImagesImageIdGet(clusterId, imageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdImagesImageIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *imageId = 789; // The image id.

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

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

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

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

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

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

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

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

try {
    $result = $api_instance->clustersClusterIdImagesImageIdGet($clusterId, $imageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->clustersClusterIdImagesImageIdGet: ', $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 $imageId = 789; # Long | The image id.

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

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

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

Parameters

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

Responses

Status: 200 - The image with the specified id.

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 409 - Status forbidden.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 409 - Status forbidden.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdSausMessagesGet

Get all available SAUS messages for a specified cluster.

A successful response will returm a list with all the available SAUS messages for the cluster.


/clusters/{cluster_id}/saus/messages

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/saus/messages"
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.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdSausMessagesGet");
            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.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdSausMessagesGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

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

// Get all available SAUS messages for a specified cluster.
[apiInstance clustersClusterIdSausMessagesGetWith:clusterId
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

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

            try
            {
                // Get all available SAUS messages for a specified cluster.
                array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clustersClusterIdSausMessagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

try {
    $result = $api_instance->clustersClusterIdSausMessagesGet($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->clustersClusterIdSausMessagesGet: ', $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.

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

try: 
    # Get all available SAUS messages for a specified cluster.
    api_response = api_instance.clusters_cluster_id_saus_messages_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->clustersClusterIdSausMessagesGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - A list of SAUS messages.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdSausMessagesMessageIdDownloadPut

Download the specified SAUS message.

A successful response will download the SAUS message.


/clusters/{cluster_id}/saus/messages/{message_id}/download

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/saus/messages/{message_id}/download"
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 messageId = 789; // Long | The SAUS message id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdDownloadPut(clusterId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdSausMessagesMessageIdDownloadPut");
            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 messageId = 789; // Long | The SAUS message id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdDownloadPut(clusterId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdSausMessagesMessageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *messageId = 789; // The SAUS message id.

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

// Download the specified SAUS message.
[apiInstance clustersClusterIdSausMessagesMessageIdDownloadPutWith:clusterId
    messageId:messageId
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DefaultApi()
var clusterId = 789; // {{Long}} The cluster id.
var messageId = 789; // {{Long}} The SAUS message id.

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

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

            var apiInstance = new DefaultApi();
            var clusterId = 789;  // Long | The cluster id.
            var messageId = 789;  // Long | The SAUS message id.

            try
            {
                // Download the specified SAUS message.
                array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdDownloadPut(clusterId, messageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clustersClusterIdSausMessagesMessageIdDownloadPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

try {
    $result = $api_instance->clustersClusterIdSausMessagesMessageIdDownloadPut($clusterId, $messageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->clustersClusterIdSausMessagesMessageIdDownloadPut: ', $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 $messageId = 789; # Long | The SAUS message id.

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

try: 
    # Download the specified SAUS message.
    api_response = api_instance.clusters_cluster_id_saus_messages_message_id_download_put(clusterId, messageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->clustersClusterIdSausMessagesMessageIdDownloadPut: %s\n" % e)

Parameters

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

Responses

Status: 200 - Status accepted. The SAUS message will be downloaded.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdSausMessagesMessageIdInstallPut

Install the specified SAUS message.

This action will install the SAUS message.


/clusters/{cluster_id}/saus/messages/{message_id}/install

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/saus/messages/{message_id}/install"
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 messageId = 789; // Long | The SAUS message id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdInstallPut(clusterId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdSausMessagesMessageIdInstallPut");
            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 messageId = 789; // Long | The SAUS message id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdInstallPut(clusterId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdSausMessagesMessageIdInstallPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *messageId = 789; // The SAUS message id.

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

// Install the specified SAUS message.
[apiInstance clustersClusterIdSausMessagesMessageIdInstallPutWith:clusterId
    messageId:messageId
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DefaultApi()
var clusterId = 789; // {{Long}} The cluster id.
var messageId = 789; // {{Long}} The SAUS message id.

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

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

            var apiInstance = new DefaultApi();
            var clusterId = 789;  // Long | The cluster id.
            var messageId = 789;  // Long | The SAUS message id.

            try
            {
                // Install the specified SAUS message.
                array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdInstallPut(clusterId, messageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clustersClusterIdSausMessagesMessageIdInstallPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

try {
    $result = $api_instance->clustersClusterIdSausMessagesMessageIdInstallPut($clusterId, $messageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->clustersClusterIdSausMessagesMessageIdInstallPut: ', $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 $messageId = 789; # Long | The SAUS message id.

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

try: 
    # Install the specified SAUS message.
    api_response = api_instance.clusters_cluster_id_saus_messages_message_id_install_put(clusterId, messageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->clustersClusterIdSausMessagesMessageIdInstallPut: %s\n" % e)

Parameters

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

Responses

Status: 200 - Status accepted. The SAUS message will be installed.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdSausMessagesMessageIdPut

Change the read status of the specified SAUS message.

This action will change the read status of the message, and will return the updated SAUS message.


/clusters/{cluster_id}/saus/messages/{message_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/saus/messages/{message_id}"
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 messageId = 789; // Long | The SAUS message id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdPut(clusterId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdSausMessagesMessageIdPut");
            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 messageId = 789; // Long | The SAUS message id.
        try {
            array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdPut(clusterId, messageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersClusterIdSausMessagesMessageIdPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *messageId = 789; // The SAUS message id.

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

// Change the read status of the specified SAUS message.
[apiInstance clustersClusterIdSausMessagesMessageIdPutWith:clusterId
    messageId:messageId
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DefaultApi()
var clusterId = 789; // {{Long}} The cluster id.
var messageId = 789; // {{Long}} The SAUS message id.

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

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

            var apiInstance = new DefaultApi();
            var clusterId = 789;  // Long | The cluster id.
            var messageId = 789;  // Long | The SAUS message id.

            try
            {
                // Change the read status of the specified SAUS message.
                array[SausMessage] result = apiInstance.clustersClusterIdSausMessagesMessageIdPut(clusterId, messageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clustersClusterIdSausMessagesMessageIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

try {
    $result = $api_instance->clustersClusterIdSausMessagesMessageIdPut($clusterId, $messageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->clustersClusterIdSausMessagesMessageIdPut: ', $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 $messageId = 789; # Long | The SAUS message id.

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

try: 
    # Change the read status of the specified SAUS message.
    api_response = api_instance.clusters_cluster_id_saus_messages_message_id_put(clusterId, messageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->clustersClusterIdSausMessagesMessageIdPut: %s\n" % e)

Parameters

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

Responses

Status: 200 - Status accepted. The status of the SAUS message will be updated.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersSausMessagesGet

Get all available SAUS messages for multiple clusters.

A successful response will returm a list with all the available SAUS messages from all the clusters.


/clusters/saus/messages

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/saus/messages"
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();
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersSausMessagesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

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

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

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

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

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

            var apiInstance = new DefaultApi();

            try
            {
                // Get all available SAUS messages for multiple clusters.
                array[SausMessage] result = apiInstance.clustersSausMessagesGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clustersSausMessagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get all available SAUS messages for multiple clusters.
    api_response = api_instance.clusters_saus_messages_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->clustersSausMessagesGet: %s\n" % e)

Parameters

Responses

Status: 200 - A list of SAUS messages of multiple clusters.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersSausMessagesMessageIdDownloadPut

Download the specified SAUS messages.

A successful response will download the SAUS messages.


/clusters/saus/messages/{message_id}/download

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/saus/messages/{message_id}/download"
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 messageId = 789; // Long | The SAUS message id.
        SausMessagesIDs body = ; // SausMessagesIDs | The SAUS messages id's.
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdDownloadPut(messageId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersSausMessagesMessageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Long messageId = 789; // Long | The SAUS message id.
        SausMessagesIDs body = ; // SausMessagesIDs | The SAUS messages id's.
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdDownloadPut(messageId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersSausMessagesMessageIdDownloadPut");
            e.printStackTrace();
        }
    }
}
Long *messageId = 789; // The SAUS message id.
SausMessagesIDs *body = ; // The SAUS messages id's. (optional)

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

// Download the specified SAUS messages.
[apiInstance clustersSausMessagesMessageIdDownloadPutWith:messageId
    body:body
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DefaultApi()
var messageId = 789; // {{Long}} The SAUS message id.
var opts = { 
  'body':  // {{SausMessagesIDs}} The SAUS messages id's.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersSausMessagesMessageIdDownloadPut(messageId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var messageId = 789;  // Long | The SAUS message id.
            var body = new SausMessagesIDs(); // SausMessagesIDs | The SAUS messages id's. (optional) 

            try
            {
                // Download the specified SAUS messages.
                array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdDownloadPut(messageId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clustersSausMessagesMessageIdDownloadPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$messageId = 789; // Long | The SAUS message id.
$body = ; // SausMessagesIDs | The SAUS messages id's.

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $messageId = 789; # Long | The SAUS message id.
my $body = WWW::SwaggerClient::Object::SausMessagesIDs->new(); # SausMessagesIDs | The SAUS messages id's.

eval { 
    my $result = $api_instance->clustersSausMessagesMessageIdDownloadPut(messageId => $messageId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->clustersSausMessagesMessageIdDownloadPut: $@\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()
messageId = 789 # Long | The SAUS message id.
body =  # SausMessagesIDs | The SAUS messages id's. (optional)

try: 
    # Download the specified SAUS messages.
    api_response = api_instance.clusters_saus_messages_message_id_download_put(messageId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->clustersSausMessagesMessageIdDownloadPut: %s\n" % e)

Parameters

Path parameters
Name Description
message_id*
Long (int64)
The SAUS message id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Status accepted. The SAUS messages will be downloaded.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersSausMessagesMessageIdInstallPut

Install the specified SAUS messages.

A successful response will install the SAUS messages.


/clusters/saus/messages/{message_id}/install

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/saus/messages/{message_id}/install"
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 messageId = 789; // Long | The SAUS message id.
        SausMessagesIDs body = ; // SausMessagesIDs | The SAUS messages id's.
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdInstallPut(messageId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersSausMessagesMessageIdInstallPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Long messageId = 789; // Long | The SAUS message id.
        SausMessagesIDs body = ; // SausMessagesIDs | The SAUS messages id's.
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdInstallPut(messageId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersSausMessagesMessageIdInstallPut");
            e.printStackTrace();
        }
    }
}
Long *messageId = 789; // The SAUS message id.
SausMessagesIDs *body = ; // The SAUS messages id's. (optional)

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

// Install the specified SAUS messages.
[apiInstance clustersSausMessagesMessageIdInstallPutWith:messageId
    body:body
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DefaultApi()
var messageId = 789; // {{Long}} The SAUS message id.
var opts = { 
  'body':  // {{SausMessagesIDs}} The SAUS messages id's.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersSausMessagesMessageIdInstallPut(messageId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var messageId = 789;  // Long | The SAUS message id.
            var body = new SausMessagesIDs(); // SausMessagesIDs | The SAUS messages id's. (optional) 

            try
            {
                // Install the specified SAUS messages.
                array[SausMessage] result = apiInstance.clustersSausMessagesMessageIdInstallPut(messageId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clustersSausMessagesMessageIdInstallPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$messageId = 789; // Long | The SAUS message id.
$body = ; // SausMessagesIDs | The SAUS messages id's.

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $messageId = 789; # Long | The SAUS message id.
my $body = WWW::SwaggerClient::Object::SausMessagesIDs->new(); # SausMessagesIDs | The SAUS messages id's.

eval { 
    my $result = $api_instance->clustersSausMessagesMessageIdInstallPut(messageId => $messageId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->clustersSausMessagesMessageIdInstallPut: $@\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()
messageId = 789 # Long | The SAUS message id.
body =  # SausMessagesIDs | The SAUS messages id's. (optional)

try: 
    # Install the specified SAUS messages.
    api_response = api_instance.clusters_saus_messages_message_id_install_put(messageId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->clustersSausMessagesMessageIdInstallPut: %s\n" % e)

Parameters

Path parameters
Name Description
message_id*
Long (int64)
The SAUS message id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Status accepted. The SAUS messages will be installed.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersSausMessagesPut

Change the read status of multiple SAUS messages.

A successful response will change the read status of the specified SAUS messages.


/clusters/saus/messages

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/saus/messages"
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();
        SausMessagesUpdateIDs body = ; // SausMessagesUpdateIDs | The messages read action and  id's.
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesPut(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersSausMessagesPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        SausMessagesUpdateIDs body = ; // SausMessagesUpdateIDs | The messages read action and  id's.
        try {
            array[SausMessage] result = apiInstance.clustersSausMessagesPut(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#clustersSausMessagesPut");
            e.printStackTrace();
        }
    }
}
SausMessagesUpdateIDs *body = ; // The messages read action and  id's. (optional)

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

// Change the read status of multiple SAUS messages.
[apiInstance clustersSausMessagesPutWith:body
              completionHandler: ^(array[SausMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.DefaultApi()
var opts = { 
  'body':  // {{SausMessagesUpdateIDs}} The messages read action and  id's.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersSausMessagesPut(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new DefaultApi();
            var body = new SausMessagesUpdateIDs(); // SausMessagesUpdateIDs | The messages read action and  id's. (optional) 

            try
            {
                // Change the read status of multiple SAUS messages.
                array[SausMessage] result = apiInstance.clustersSausMessagesPut(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.clustersSausMessagesPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = ; // SausMessagesUpdateIDs | The messages read action and  id's.

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

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::SausMessagesUpdateIDs->new(); # SausMessagesUpdateIDs | The messages read action and  id's.

eval { 
    my $result = $api_instance->clustersSausMessagesPut(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->clustersSausMessagesPut: $@\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()
body =  # SausMessagesUpdateIDs | The messages read action and  id's. (optional)

try: 
    # Change the read status of multiple SAUS messages.
    api_response = api_instance.clusters_saus_messages_put(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->clustersSausMessagesPut: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Status accepted. The status of the SAUS messages will be updated.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

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

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

Status: 500 - An unexpected error occurred.

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

Flavors

clustersClusterIdFlavorsFlavorIdDelete

Add a new flavor to a cluster.

A successful response will add a new flavor to the cluster. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/flavors/{flavor_id}

Usage and SDK Samples

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

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

public class FlavorsApiExample {

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

public class FlavorsApiExample {

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

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

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

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

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

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

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

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

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

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

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

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

try: 
    # Add a new flavor to a cluster.
    api_instance.clusters_cluster_id_flavors_flavor_id_delete(clusterId, flavorId)
except ApiException as e:
    print("Exception when calling FlavorsApi->clustersClusterIdFlavorsFlavorIdDelete: %s\n" % e)

Parameters

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

Responses

Status: 204 - Flavor successfully deleted from the cluster.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

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

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdFlavorsGet

Get the cluster's flavors.

A successful response will return the cluster's flavors


/clusters/{cluster_id}/flavors

Usage and SDK Samples

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

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

public class FlavorsApiExample {

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

public class FlavorsApiExample {

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

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

// Get the cluster's flavors.
[apiInstance clustersClusterIdFlavorsGetWith:clusterId
              completionHandler: ^(array[Flavor] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

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

            try
            {
                // Get the cluster's flavors.
                array[Flavor] result = apiInstance.clustersClusterIdFlavorsGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlavorsApi.clustersClusterIdFlavorsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get the cluster's flavors.
    api_response = api_instance.clusters_cluster_id_flavors_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlavorsApi->clustersClusterIdFlavorsGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - List of flavors.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdFlavorsPost

Add a new flavor to a cluster.

A successful response will add a new flavor to the cluster. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/flavors

Usage and SDK Samples

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

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

public class FlavorsApiExample {

    public static void main(String[] args) {
        
        FlavorsApi apiInstance = new FlavorsApi();
        Long clusterId = 789; // Long | The cluster id.
        FlavorOpts body = ; // FlavorOpts | The flavor to create
        try {
            Flavor result = apiInstance.clustersClusterIdFlavorsPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#clustersClusterIdFlavorsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FlavorsApi;

public class FlavorsApiExample {

    public static void main(String[] args) {
        FlavorsApi apiInstance = new FlavorsApi();
        Long clusterId = 789; // Long | The cluster id.
        FlavorOpts body = ; // FlavorOpts | The flavor to create
        try {
            Flavor result = apiInstance.clustersClusterIdFlavorsPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FlavorsApi#clustersClusterIdFlavorsPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
FlavorOpts *body = ; // The flavor to create (optional)

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

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

var api = new Sim2Api.FlavorsApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{FlavorOpts}} The flavor to create
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdFlavorsPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new FlavorsApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new FlavorOpts(); // FlavorOpts | The flavor to create (optional) 

            try
            {
                // Add a new flavor to a cluster.
                Flavor result = apiInstance.clustersClusterIdFlavorsPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FlavorsApi.clustersClusterIdFlavorsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiFlavorsApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // FlavorOpts | The flavor to create

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

my $api_instance = WWW::SwaggerClient::FlavorsApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::FlavorOpts->new(); # FlavorOpts | The flavor to create

eval { 
    my $result = $api_instance->clustersClusterIdFlavorsPost(clusterId => $clusterId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FlavorsApi->clustersClusterIdFlavorsPost: $@\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.FlavorsApi()
clusterId = 789 # Long | The cluster id.
body =  # FlavorOpts | The flavor to create (optional)

try: 
    # Add a new flavor to a cluster.
    api_response = api_instance.clusters_cluster_id_flavors_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FlavorsApi->clustersClusterIdFlavorsPost: %s\n" % e)

Parameters

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

Responses

Status: 200 - Flavor 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

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

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

Status: 500 - An unexpected error occurred.

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

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

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 {
            Template result = apiInstance.instancesInstanceIdCreateBackupPut(instanceId);
            System.out.println(result);
        } 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 {
            Template result = apiInstance.instancesInstanceIdCreateBackupPut(instanceId);
            System.out.println(result);
        } 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: ^(Template 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.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.
                Template result = apiInstance.instancesInstanceIdCreateBackupPut(instanceId);
                Debug.WriteLine(result);
            }
            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 {
    $result = $api_instance->instancesInstanceIdCreateBackupPut($instanceId);
    print_r($result);
} 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 { 
    my $result = $api_instance->instancesInstanceIdCreateBackupPut(instanceId => $instanceId);
    print Dumper($result);
};
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_response = api_instance.instances_instance_id_create_backup_put(instanceId)
    pprint(api_response)
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 - The templates details.

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

Status: 500 - An unexpected error occurred.

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

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

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

Status: 401 - Status unauthorized.

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

Status: 404 - Resource not found.

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

Status: 409 - Status conflict.

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

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

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,"message":"Unauthorized access."}

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,"message":"Unauthorized access."}

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

Networks

clustersClusterIdNetworksGet

Get all the networks of a cluster.


/clusters/{cluster_id}/networks

Usage and SDK Samples

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

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

public class NetworksApiExample {

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

public class NetworksApiExample {

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

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

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

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

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

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

            try
            {
                // Get all the networks of a cluster.
                array[Network] result = apiInstance.clustersClusterIdNetworksGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get all the networks of a cluster.
    api_response = api_instance.clusters_cluster_id_networks_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - A list of networks.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdNetworksNetworkIdDelete

Delete a network of a cluster.

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


/clusters/{cluster_id}/networks/{network_id}

Usage and SDK Samples

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

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

public class NetworksApiExample {

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

public class NetworksApiExample {

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

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

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

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

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

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

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

            try
            {
                // Delete a network of a cluster.
                apiInstance.clustersClusterIdNetworksNetworkIdDelete(clusterId, networkId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksNetworkIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Delete a network of a cluster.
    api_instance.clusters_cluster_id_networks_network_id_delete(clusterId, networkId)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdDelete: %s\n" % e)

Parameters

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

Responses

Status: 204 - Network deleted succesfully.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 409 - Status conflict.

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

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

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdNetworksNetworkIdGet

Get a network of a cluster.

The endpoint gets the network based on the ID and the cluster ID.


/clusters/{cluster_id}/networks/{network_id}

Usage and SDK Samples

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

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

public class NetworksApiExample {

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

public class NetworksApiExample {

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

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

// Get a network of a cluster.
[apiInstance clustersClusterIdNetworksNetworkIdGetWith:clusterId
    networkId:networkId
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

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

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

            try
            {
                // Get a network of a cluster.
                Network result = apiInstance.clustersClusterIdNetworksNetworkIdGet(clusterId, networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksNetworkIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get a network of a cluster.
    api_response = api_instance.clusters_cluster_id_networks_network_id_get(clusterId, networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - Network retrieved succesfully.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdNetworksNetworkIdIpsGet

Get the list of free and taken IPs of the network based on the ID.


/clusters/{cluster_id}/networks/{network_id}/ips

Usage and SDK Samples

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

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

public class NetworksApiExample {

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

public class NetworksApiExample {

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

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

// Get the list of free and taken IPs of the network based on the ID.
[apiInstance clustersClusterIdNetworksNetworkIdIpsGetWith:clusterId
    networkId:networkId
              completionHandler: ^(NetworkIPs output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

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

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

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

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

            try
            {
                // Get the list of free and taken IPs of the network based on the ID.
                NetworkIPs result = apiInstance.clustersClusterIdNetworksNetworkIdIpsGet(clusterId, networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksNetworkIdIpsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

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

try: 
    # Get the list of free and taken IPs of the network based on the ID.
    api_response = api_instance.clusters_cluster_id_networks_network_id_ips_get(clusterId, networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdIpsGet: %s\n" % e)

Parameters

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

Responses

Status: 200 - Network IPs.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

Status: 500 - An unexpected error occurred.

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

clustersClusterIdNetworksNetworkIdPut

Edit a network.

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


/clusters/{cluster_id}/networks/{network_id}

Usage and SDK Samples

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

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

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        NewNetwork body = ; // NewNetwork | The network to edit.
        try {
            Network result = apiInstance.clustersClusterIdNetworksNetworkIdPut(clusterId, networkId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        NewNetwork body = ; // NewNetwork | The network to edit.
        try {
            Network result = apiInstance.clustersClusterIdNetworksNetworkIdPut(clusterId, networkId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *networkId = 789; // The network id.
NewNetwork *body = ; // The network to edit. (optional)

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

// Edit a network.
[apiInstance clustersClusterIdNetworksNetworkIdPutWith:clusterId
    networkId:networkId
    body:body
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NetworksApi()
var clusterId = 789; // {{Long}} The cluster id.
var networkId = 789; // {{Long}} The network id.
var opts = { 
  'body':  // {{NewNetwork}} The network to edit.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNetworksNetworkIdPut(clusterIdnetworkId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new NetworksApi();
            var clusterId = 789;  // Long | The cluster id.
            var networkId = 789;  // Long | The network id.
            var body = new NewNetwork(); // NewNetwork | The network to edit. (optional) 

            try
            {
                // Edit a network.
                Network result = apiInstance.clustersClusterIdNetworksNetworkIdPut(clusterId, networkId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksNetworkIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNetworksApi();
$clusterId = 789; // Long | The cluster id.
$networkId = 789; // Long | The network id.
$body = ; // NewNetwork | The network to edit.

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

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $networkId = 789; # Long | The network id.
my $body = WWW::SwaggerClient::Object::NewNetwork->new(); # NewNetwork | The network to edit.

eval { 
    my $result = $api_instance->clustersClusterIdNetworksNetworkIdPut(clusterId => $clusterId, networkId => $networkId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdPut: $@\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.NetworksApi()
clusterId = 789 # Long | The cluster id.
networkId = 789 # Long | The network id.
body =  # NewNetwork | The network to edit. (optional)

try: 
    # Edit a network.
    api_response = api_instance.clusters_cluster_id_networks_network_id_put(clusterId, networkId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdPut: %s\n" % e)

Parameters

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

Responses

Status: 200 - Network edited successfully.

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

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

Status: 401 - Status unauthorized.

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

Status: 403 - Status forbidden.

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

Status: 404 - Resource not found.

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

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

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNetworksNetworkIdVifsGet

Get the virtual network interfaces (VIFs) of a specific network.


/clusters/{cluster_id}/networks/{network_id}/vifs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/networks/{network_id}/vifs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

import java.io.File;
import java.util.*;

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        try {
            array[VirtualNetworkInterface] result = apiInstance.clustersClusterIdNetworksNetworkIdVifsGet(clusterId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdVifsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long networkId = 789; // Long | The network id.
        try {
            array[VirtualNetworkInterface] result = apiInstance.clustersClusterIdNetworksNetworkIdVifsGet(clusterId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksNetworkIdVifsGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *networkId = 789; // The network id.

NetworksApi *apiInstance = [[NetworksApi alloc] init];

// Get the virtual network interfaces (VIFs) of a specific network.
[apiInstance clustersClusterIdNetworksNetworkIdVifsGetWith:clusterId
    networkId:networkId
              completionHandler: ^(array[VirtualNetworkInterface] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NetworksApi()
var clusterId = 789; // {{Long}} The cluster id.
var networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNetworksNetworkIdVifsGet(clusterId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNetworksNetworkIdVifsGetExample
    {
        public void main()
        {

            var apiInstance = new NetworksApi();
            var clusterId = 789;  // Long | The cluster id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Get the virtual network interfaces (VIFs) of a specific network.
                array[VirtualNetworkInterface] result = apiInstance.clustersClusterIdNetworksNetworkIdVifsGet(clusterId, networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksNetworkIdVifsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNetworksApi();
$clusterId = 789; // Long | The cluster id.
$networkId = 789; // Long | The network id.

try {
    $result = $api_instance->clustersClusterIdNetworksNetworkIdVifsGet($clusterId, $networkId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdVifsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NetworksApi;

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $networkId = 789; # Long | The network id.

eval { 
    my $result = $api_instance->clustersClusterIdNetworksNetworkIdVifsGet(clusterId => $clusterId, networkId => $networkId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdVifsGet: $@\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.NetworksApi()
clusterId = 789 # Long | The cluster id.
networkId = 789 # Long | The network id.

try: 
    # Get the virtual network interfaces (VIFs) of a specific network.
    api_response = api_instance.clusters_cluster_id_networks_network_id_vifs_get(clusterId, networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksNetworkIdVifsGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 200 - A list of networks.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdNetworksPost

Create new network in a cluster.

The endpoint creates a new network. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/networks

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/networks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NetworksApi;

import java.io.File;
import java.util.*;

public class NetworksApiExample {

    public static void main(String[] args) {
        
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        NewNetwork body = ; // NewNetwork | The network to create.
        try {
            Network result = apiInstance.clustersClusterIdNetworksPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        Long clusterId = 789; // Long | The cluster id.
        NewNetwork body = ; // NewNetwork | The network to create.
        try {
            Network result = apiInstance.clustersClusterIdNetworksPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#clustersClusterIdNetworksPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
NewNetwork *body = ; // The network to create. (optional)

NetworksApi *apiInstance = [[NetworksApi alloc] init];

// Create new network in a cluster.
[apiInstance clustersClusterIdNetworksPostWith:clusterId
    body:body
              completionHandler: ^(Network output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.NetworksApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{NewNetwork}} The network to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdNetworksPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdNetworksPostExample
    {
        public void main()
        {

            var apiInstance = new NetworksApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new NewNetwork(); // NewNetwork | The network to create. (optional) 

            try
            {
                // Create new network in a cluster.
                Network result = apiInstance.clustersClusterIdNetworksPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.clustersClusterIdNetworksPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNetworksApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // NewNetwork | The network to create.

try {
    $result = $api_instance->clustersClusterIdNetworksPost($clusterId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NetworksApi->clustersClusterIdNetworksPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NetworksApi;

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::NewNetwork->new(); # NewNetwork | The network to create.

eval { 
    my $result = $api_instance->clustersClusterIdNetworksPost(clusterId => $clusterId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NetworksApi->clustersClusterIdNetworksPost: $@\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.NetworksApi()
clusterId = 789 # Long | The cluster id.
body =  # NewNetwork | The network to create. (optional)

try: 
    # Create new network in a cluster.
    api_response = api_instance.clusters_cluster_id_networks_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NetworksApi->clustersClusterIdNetworksPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Network 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

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 providers' details.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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 {
            ProvidersModeAvailability result = apiInstance.providersModesAvailabilityGet();
            System.out.println(result);
        } 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 {
            ProvidersModeAvailability result = apiInstance.providersModesAvailabilityGet();
            System.out.println(result);
        } 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: 
              ^(ProvidersModeAvailability 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.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.
                ProvidersModeAvailability result = apiInstance.providersModesAvailabilityGet();
                Debug.WriteLine(result);
            }
            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 {
    $result = $api_instance->providersModesAvailabilityGet();
    print_r($result);
} 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 { 
    my $result = $api_instance->providersModesAvailabilityGet();
    print Dumper($result);
};
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_response = api_instance.providers_modes_availability_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProviderApi->providersModesAvailabilityGet: %s\n" % e)

Parameters

Responses

Status: 200 - The providers' availability.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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's 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's id.
        try {
            apiInstance.providersProviderIdDelete(providerId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProviderApi#providersProviderIdDelete");
            e.printStackTrace();
        }
    }
}
Long *providerId = 789; // The provider's 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's 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's 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's 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's 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's 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's 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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's id.
        try {
            Provider result = apiInstance.providersProviderIdGet(providerId);
            System.out.println(result);
        } 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's id.
        try {
            Provider result = apiInstance.providersProviderIdGet(providerId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProviderApi#providersProviderIdGet");
            e.printStackTrace();
        }
    }
}
Long *providerId = 789; // The provider's id.

ProviderApi *apiInstance = [[ProviderApi alloc] init];

// Get a provider.
[apiInstance providersProviderIdGetWith:providerId
              completionHandler: ^(Provider output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProviderApi()
var providerId = 789; // {{Long}} The provider's id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
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's id.

            try
            {
                // Get a provider.
                Provider result = apiInstance.providersProviderIdGet(providerId);
                Debug.WriteLine(result);
            }
            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's id.

try {
    $result = $api_instance->providersProviderIdGet($providerId);
    print_r($result);
} 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's id.

eval { 
    my $result = $api_instance->providersProviderIdGet(providerId => $providerId);
    print Dumper($result);
};
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's id.

try: 
    # Get a provider.
    api_response = api_instance.providers_provider_id_get(providerId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProviderApi->providersProviderIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
provider_id*
Long (int64)
The provider's id.
Required

Responses

Status: 200 - The provider's details.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Providers

providersProviderIdRegionRegionInstanceTypesGet

Get a list of the supported instance types of the provider for the specified region.

A successful response will return a list of the supported instance types of the provider. Provider should be an existing execution provider.


/providers/{provider_id}/region/{region}/instance_types

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/providers/{provider_id}/region/{region}/instance_types"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvidersApi;

import java.io.File;
import java.util.*;

public class ProvidersApiExample {

    public static void main(String[] args) {
        
        ProvidersApi apiInstance = new ProvidersApi();
        Long providerId = 789; // Long | The provider's id.
        String region = region_example; // String | The region's name.
        try {
            array['String'] result = apiInstance.providersProviderIdRegionRegionInstanceTypesGet(providerId, region);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersProviderIdRegionRegionInstanceTypesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvidersApi;

public class ProvidersApiExample {

    public static void main(String[] args) {
        ProvidersApi apiInstance = new ProvidersApi();
        Long providerId = 789; // Long | The provider's id.
        String region = region_example; // String | The region's name.
        try {
            array['String'] result = apiInstance.providersProviderIdRegionRegionInstanceTypesGet(providerId, region);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvidersApi#providersProviderIdRegionRegionInstanceTypesGet");
            e.printStackTrace();
        }
    }
}
Long *providerId = 789; // The provider's id.
String *region = region_example; // The region's name.

ProvidersApi *apiInstance = [[ProvidersApi alloc] init];

// Get a list of the supported instance types of the provider for the specified region.
[apiInstance providersProviderIdRegionRegionInstanceTypesGetWith:providerId
    region:region
              completionHandler: ^(array['String'] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.ProvidersApi()
var providerId = 789; // {{Long}} The provider's id.
var region = region_example; // {{String}} The region's name.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.providersProviderIdRegionRegionInstanceTypesGet(providerId, region, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class providersProviderIdRegionRegionInstanceTypesGetExample
    {
        public void main()
        {

            var apiInstance = new ProvidersApi();
            var providerId = 789;  // Long | The provider's id.
            var region = region_example;  // String | The region's name.

            try
            {
                // Get a list of the supported instance types of the provider for the specified region.
                array['String'] result = apiInstance.providersProviderIdRegionRegionInstanceTypesGet(providerId, region);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvidersApi.providersProviderIdRegionRegionInstanceTypesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvidersApi();
$providerId = 789; // Long | The provider's id.
$region = region_example; // String | The region's name.

try {
    $result = $api_instance->providersProviderIdRegionRegionInstanceTypesGet($providerId, $region);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProvidersApi->providersProviderIdRegionRegionInstanceTypesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProvidersApi;

my $api_instance = WWW::SwaggerClient::ProvidersApi->new();
my $providerId = 789; # Long | The provider's id.
my $region = region_example; # String | The region's name.

eval { 
    my $result = $api_instance->providersProviderIdRegionRegionInstanceTypesGet(providerId => $providerId, region => $region);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProvidersApi->providersProviderIdRegionRegionInstanceTypesGet: $@\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.ProvidersApi()
providerId = 789 # Long | The provider's id.
region = region_example # String | The region's name.

try: 
    # Get a list of the supported instance types of the provider for the specified region.
    api_response = api_instance.providers_provider_id_region_region_instance_types_get(providerId, region)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProvidersApi->providersProviderIdRegionRegionInstanceTypesGet: %s\n" % e)

Parameters

Path parameters
Name Description
provider_id*
Long (int64)
The provider's id.
Required
region*
String
The region's name.
Required

Responses

Status: 201 - list of the instance types

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Recipes

clustersValidateCreationPost

Validate multiple new AWS cluster.

AWS resources are limited. Calling this endpoint, multiple new AWS cluster can be validate if they fit even before there creation.


/clusters/validate_creation

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/validate_creation"
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();
        MultipleAWSCreationParams body = ; // MultipleAWSCreationParams | New cluster(s')'s parameters.
        try {
            ValidateClusterCreation result = apiInstance.clustersValidateCreationPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#clustersValidateCreationPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RecipesApi;

public class RecipesApiExample {

    public static void main(String[] args) {
        RecipesApi apiInstance = new RecipesApi();
        MultipleAWSCreationParams body = ; // MultipleAWSCreationParams | New cluster(s')'s parameters.
        try {
            ValidateClusterCreation result = apiInstance.clustersValidateCreationPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#clustersValidateCreationPost");
            e.printStackTrace();
        }
    }
}
MultipleAWSCreationParams *body = ; // New cluster(s')'s parameters. (optional)

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Validate multiple new AWS cluster.
[apiInstance clustersValidateCreationPostWith:body
              completionHandler: ^(ValidateClusterCreation output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RecipesApi()
var opts = { 
  'body':  // {{MultipleAWSCreationParams}} New cluster(s')'s parameters.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersValidateCreationPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersValidateCreationPostExample
    {
        public void main()
        {

            var apiInstance = new RecipesApi();
            var body = new MultipleAWSCreationParams(); // MultipleAWSCreationParams | New cluster(s')'s parameters. (optional) 

            try
            {
                // Validate multiple new AWS cluster.
                ValidateClusterCreation result = apiInstance.clustersValidateCreationPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecipesApi.clustersValidateCreationPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRecipesApi();
$body = ; // MultipleAWSCreationParams | New cluster(s')'s parameters.

try {
    $result = $api_instance->clustersValidateCreationPost($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecipesApi->clustersValidateCreationPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RecipesApi;

my $api_instance = WWW::SwaggerClient::RecipesApi->new();
my $body = WWW::SwaggerClient::Object::MultipleAWSCreationParams->new(); # MultipleAWSCreationParams | New cluster(s')'s parameters.

eval { 
    my $result = $api_instance->clustersValidateCreationPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RecipesApi->clustersValidateCreationPost: $@\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()
body =  # MultipleAWSCreationParams | New cluster(s')'s parameters. (optional)

try: 
    # Validate multiple new AWS cluster.
    api_response = api_instance.clusters_validate_creation_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RecipesApi->clustersValidateCreationPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Successfully cluster creation.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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.

[{"id":29,"name":"MariaDB","description":"MariaDB Description.","version":"1.0.0","installed_recipes":[{"id":10,"cluster":{"id":32,"name":"Cluster32"},"status":"ACTIVE","error_description":"","vms":[{"id":304,"name":"mariaDB"}],"rg":{"id":101,"name":"resourrce group for mariaDB"},"support_assets_deletion":true}]}]

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

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.
        ClusterInstrastructure body = ; // ClusterInstrastructure | 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.
        ClusterInstrastructure body = ; // ClusterInstrastructure | 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.
ClusterInstrastructure *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':  // {{ClusterInstrastructure}} 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 ClusterInstrastructure(); // ClusterInstrastructure | 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 = ; // ClusterInstrastructure | 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::ClusterInstrastructure->new(); # ClusterInstrastructure | 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 =  # ClusterInstrastructure | 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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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 only resource group on an existing cluster 4. Create an instance from recipe based on a new AWS cluster and a resource group on it. 5. Create only resource group on a new AWS cluster Recipe template can be deployed at one or multiple clusters. Multiple on-Premise / AWS cluster can be affected on a single call of the this end-point.


/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.
        InputResources body = ; // InputResources | The parameters for creating the new instance(s) at one or multiple clusters.
        try {
            array[InputResourcesResponse] result = apiInstance.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, body);
            System.out.println(result);
        } 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.
        InputResources body = ; // InputResources | The parameters for creating the new instance(s) at one or multiple clusters.
        try {
            array[InputResourcesResponse] result = apiInstance.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecipesApi#recipesTemplatesRecipeTemplateIdPost");
            e.printStackTrace();
        }
    }
}
Integer *recipeTemplateId = 56; // The template id.
InputResources *body = ; // The parameters for creating the new instance(s) at one or multiple clusters. (optional)

RecipesApi *apiInstance = [[RecipesApi alloc] init];

// Create new instance(s) based on the specific recipe template.
[apiInstance recipesTemplatesRecipeTemplateIdPostWith:recipeTemplateId
    body:body
              completionHandler: ^(array[InputResourcesResponse] 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':  // {{InputResources}} The parameters for creating the new instance(s) at one or multiple clusters.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
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 InputResources(); // InputResources | The parameters for creating the new instance(s) at one or multiple clusters. (optional) 

            try
            {
                // Create new instance(s) based on the specific recipe template.
                array[InputResourcesResponse] result = apiInstance.recipesTemplatesRecipeTemplateIdPost(recipeTemplateId, body);
                Debug.WriteLine(result);
            }
            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 = ; // InputResources | The parameters for creating the new instance(s) at one or multiple clusters.

try {
    $result = $api_instance->recipesTemplatesRecipeTemplateIdPost($recipeTemplateId, $body);
    print_r($result);
} 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::InputResources->new(); # InputResources | The parameters for creating the new instance(s) at one or multiple clusters.

eval { 
    my $result = $api_instance->recipesTemplatesRecipeTemplateIdPost(recipeTemplateId => $recipeTemplateId, body => $body);
    print Dumper($result);
};
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 =  # InputResources | The parameters for creating the new instance(s) at one or multiple clusters. (optional)

try: 
    # Create new instance(s) based on the specific recipe template.
    api_response = api_instance.recipes_templates_recipe_template_id_post(recipeTemplateId, body=body)
    pprint(api_response)
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: 207 - Multi-Status response conveys information for Instance(s) creation

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 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,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Repositories

clustersClusterIdTemplatesReposGet

Get all the repositories of a cluster.


/clusters/{cluster_id}/templates_repos

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/templates_repos"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RepositoriesApi;

import java.io.File;
import java.util.*;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Repository] result = apiInstance.clustersClusterIdTemplatesReposGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RepositoriesApi;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[Repository] result = apiInstance.clustersClusterIdTemplatesReposGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

RepositoriesApi *apiInstance = [[RepositoriesApi alloc] init];

// Get all the repositories of a cluster.
[apiInstance clustersClusterIdTemplatesReposGetWith:clusterId
              completionHandler: ^(array[Repository] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RepositoriesApi()
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.clustersClusterIdTemplatesReposGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdTemplatesReposGetExample
    {
        public void main()
        {

            var apiInstance = new RepositoriesApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get all the repositories of a cluster.
                array[Repository] result = apiInstance.clustersClusterIdTemplatesReposGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RepositoriesApi.clustersClusterIdTemplatesReposGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRepositoriesApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdTemplatesReposGet($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RepositoriesApi;

my $api_instance = WWW::SwaggerClient::RepositoriesApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdTemplatesReposGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposGet: $@\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.RepositoriesApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get all the repositories of a cluster.
    api_response = api_instance.clusters_cluster_id_templates_repos_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - A list of repositories.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdTemplatesReposPost

Create new repository in a cluster.

The endpoint creates a new repository. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/templates_repos

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/templates_repos"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RepositoriesApi;

import java.io.File;
import java.util.*;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        NewRepository body = ; // NewRepository | The repository to create.
        try {
            Repository result = apiInstance.clustersClusterIdTemplatesReposPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RepositoriesApi;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        NewRepository body = ; // NewRepository | The repository to create.
        try {
            Repository result = apiInstance.clustersClusterIdTemplatesReposPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
NewRepository *body = ; // The repository to create. (optional)

RepositoriesApi *apiInstance = [[RepositoriesApi alloc] init];

// Create new repository in a cluster.
[apiInstance clustersClusterIdTemplatesReposPostWith:clusterId
    body:body
              completionHandler: ^(Repository output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RepositoriesApi()
var clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{NewRepository}} The repository to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdTemplatesReposPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdTemplatesReposPostExample
    {
        public void main()
        {

            var apiInstance = new RepositoriesApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new NewRepository(); // NewRepository | The repository to create. (optional) 

            try
            {
                // Create new repository in a cluster.
                Repository result = apiInstance.clustersClusterIdTemplatesReposPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RepositoriesApi.clustersClusterIdTemplatesReposPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRepositoriesApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // NewRepository | The repository to create.

try {
    $result = $api_instance->clustersClusterIdTemplatesReposPost($clusterId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RepositoriesApi;

my $api_instance = WWW::SwaggerClient::RepositoriesApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::NewRepository->new(); # NewRepository | The repository to create.

eval { 
    my $result = $api_instance->clustersClusterIdTemplatesReposPost(clusterId => $clusterId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposPost: $@\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.RepositoriesApi()
clusterId = 789 # Long | The cluster id.
body =  # NewRepository | The repository to create. (optional)

try: 
    # Create new repository in a cluster.
    api_response = api_instance.clusters_cluster_id_templates_repos_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Repository 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdTemplatesReposRepoIdDelete

Delete the specified repository from a cluster.


/clusters/{cluster_id}/templates_repos/{repo_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/templates_repos/{repo_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RepositoriesApi;

import java.io.File;
import java.util.*;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long repoId = 789; // Long | The repository id.
        try {
            apiInstance.clustersClusterIdTemplatesReposRepoIdDelete(clusterId, repoId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposRepoIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RepositoriesApi;

public class RepositoriesApiExample {

    public static void main(String[] args) {
        RepositoriesApi apiInstance = new RepositoriesApi();
        Long clusterId = 789; // Long | The cluster id.
        Long repoId = 789; // Long | The repository id.
        try {
            apiInstance.clustersClusterIdTemplatesReposRepoIdDelete(clusterId, repoId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RepositoriesApi#clustersClusterIdTemplatesReposRepoIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *repoId = 789; // The repository id.

RepositoriesApi *apiInstance = [[RepositoriesApi alloc] init];

// Delete the specified repository from a cluster.
[apiInstance clustersClusterIdTemplatesReposRepoIdDeleteWith:clusterId
    repoId:repoId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.RepositoriesApi()
var clusterId = 789; // {{Long}} The cluster id.
var repoId = 789; // {{Long}} The repository id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdTemplatesReposRepoIdDelete(clusterId, repoId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdTemplatesReposRepoIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new RepositoriesApi();
            var clusterId = 789;  // Long | The cluster id.
            var repoId = 789;  // Long | The repository id.

            try
            {
                // Delete the specified repository from a cluster.
                apiInstance.clustersClusterIdTemplatesReposRepoIdDelete(clusterId, repoId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RepositoriesApi.clustersClusterIdTemplatesReposRepoIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiRepositoriesApi();
$clusterId = 789; // Long | The cluster id.
$repoId = 789; // Long | The repository id.

try {
    $api_instance->clustersClusterIdTemplatesReposRepoIdDelete($clusterId, $repoId);
} catch (Exception $e) {
    echo 'Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposRepoIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RepositoriesApi;

my $api_instance = WWW::SwaggerClient::RepositoriesApi->new();
my $clusterId = 789; # Long | The cluster id.
my $repoId = 789; # Long | The repository id.

eval { 
    $api_instance->clustersClusterIdTemplatesReposRepoIdDelete(clusterId => $clusterId, repoId => $repoId);
};
if ($@) {
    warn "Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposRepoIdDelete: $@\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.RepositoriesApi()
clusterId = 789 # Long | The cluster id.
repoId = 789 # Long | The repository id.

try: 
    # Delete the specified repository from a cluster.
    api_instance.clusters_cluster_id_templates_repos_repo_id_delete(clusterId, repoId)
except ApiException as e:
    print("Exception when calling RepositoriesApi->clustersClusterIdTemplatesReposRepoIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
repo_id*
Long (int64)
The repository id.
Required

Responses

Status: 204 - Repository deleted succesfully

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

ResourceGroups

clustersClusterIdResourceGroupsPost

Create new resource group in a cluster.

The endpoint creates a new resource group. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/resource_groups

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/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.ResourceGroupsApi;

import java.io.File;
import java.util.*;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long clusterId = 789; // Long | The cluster id.
        NewResourceGroup body = ; // NewResourceGroup | The resource group to create.
        try {
            ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#clustersClusterIdResourceGroupsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ResourceGroupsApi;

public class ResourceGroupsApiExample {

    public static void main(String[] args) {
        ResourceGroupsApi apiInstance = new ResourceGroupsApi();
        Long clusterId = 789; // Long | The cluster id.
        NewResourceGroup body = ; // NewResourceGroup | The resource group to create.
        try {
            ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsPost(clusterId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#clustersClusterIdResourceGroupsPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
NewResourceGroup *body = ; // The resource group to create. (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Create new resource group in a cluster.
[apiInstance clustersClusterIdResourceGroupsPostWith:clusterId
    body:body
              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 clusterId = 789; // {{Long}} The cluster id.
var opts = { 
  'body':  // {{NewResourceGroup}} The resource group to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdResourceGroupsPost(clusterId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdResourceGroupsPostExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var clusterId = 789;  // Long | The cluster id.
            var body = new NewResourceGroup(); // NewResourceGroup | The resource group to create. (optional) 

            try
            {
                // Create new resource group in a cluster.
                ResourceGroup result = apiInstance.clustersClusterIdResourceGroupsPost(clusterId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.clustersClusterIdResourceGroupsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$clusterId = 789; // Long | The cluster id.
$body = ; // NewResourceGroup | The resource group to create.

try {
    $result = $api_instance->clustersClusterIdResourceGroupsPost($clusterId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->clustersClusterIdResourceGroupsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ResourceGroupsApi;

my $api_instance = WWW::SwaggerClient::ResourceGroupsApi->new();
my $clusterId = 789; # Long | The cluster id.
my $body = WWW::SwaggerClient::Object::NewResourceGroup->new(); # NewResourceGroup | The resource group to create.

eval { 
    my $result = $api_instance->clustersClusterIdResourceGroupsPost(clusterId => $clusterId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->clustersClusterIdResourceGroupsPost: $@\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()
clusterId = 789 # Long | The cluster id.
body =  # NewResourceGroup | The resource group to create. (optional)

try: 
    # Create new resource group in a cluster.
    api_response = api_instance.clusters_cluster_id_resource_groups_post(clusterId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->clustersClusterIdResourceGroupsPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Resource Group 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

instancesInstanceIdActionPut

Apply action to specific instance.

Apply an action to a specific instance. Action can be one of: stop|start|restart|destroy|factory_reset.


/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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdCoresCoreIdDelete

Remove a core from a resource group.


/resource_groups/{resource_group_id}/cores/{core_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/cores/{core_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 coreId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdDelete");
            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 coreId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *coreId = 789; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a core from a resource group.
[apiInstance resourceGroupsResourceGroupIdCoresCoreIdDeleteWith:resourceGroupId
    coreId:coreId
              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 coreId = 789; // {{Long}} The core id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdCoresCoreIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var coreId = 789;  // Long | The core id.

            try
            {
                // Remove a core from a resource group.
                apiInstance.resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId, coreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdCoresCoreIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$coreId = 789; // Long | The core id.

try {
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdDelete($resourceGroupId, $coreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdDelete: ', $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 $coreId = 789; # Long | The core id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdDelete(resourceGroupId => $resourceGroupId, coreId => $coreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdDelete: $@\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.
coreId = 789 # Long | The core id.

try: 
    # Remove a core from a resource group.
    api_instance.resource_groups_resource_group_id_cores_core_id_delete(resourceGroupId, coreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
core_id*
Long (int64)
The core id.
Required

Responses

Status: 204 - Core removed succesfully from the 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdCoresCoreIdGet

Get a core of a resource group.


/resource_groups/{resource_group_id}/cores/{core_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/cores/{core_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 coreId = 789; // Long | The core id.
        try {
            Core result = apiInstance.resourceGroupsResourceGroupIdCoresCoreIdGet(resourceGroupId, coreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdGet");
            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 coreId = 789; // Long | The core id.
        try {
            Core result = apiInstance.resourceGroupsResourceGroupIdCoresCoreIdGet(resourceGroupId, coreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *coreId = 789; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a core of a resource group.
[apiInstance resourceGroupsResourceGroupIdCoresCoreIdGetWith:resourceGroupId
    coreId:coreId
              completionHandler: ^(Core 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 coreId = 789; // {{Long}} The core id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdCoresCoreIdGet(resourceGroupId, coreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdCoresCoreIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var coreId = 789;  // Long | The core id.

            try
            {
                // Get a core of a resource group.
                Core result = apiInstance.resourceGroupsResourceGroupIdCoresCoreIdGet(resourceGroupId, coreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdCoresCoreIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$coreId = 789; // Long | The core id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdCoresCoreIdGet($resourceGroupId, $coreId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdGet: ', $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 $coreId = 789; # Long | The core id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdCoresCoreIdGet(resourceGroupId => $resourceGroupId, coreId => $coreId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdGet: $@\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.
coreId = 789 # Long | The core id.

try: 
    # Get a core of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_cores_core_id_get(resourceGroupId, coreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
core_id*
Long (int64)
The core id.
Required

Responses

Status: 200 - A core.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdCoresCoreIdPut

Add a core to a resource group.


/resource_groups/{resource_group_id}/cores/{core_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/cores/{core_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 coreId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdPut");
            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 coreId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresCoreIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *coreId = 789; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a core to a resource group.
[apiInstance resourceGroupsResourceGroupIdCoresCoreIdPutWith:resourceGroupId
    coreId:coreId
              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 coreId = 789; // {{Long}} The core id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdCoresCoreIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var coreId = 789;  // Long | The core id.

            try
            {
                // Add a core to a resource group.
                apiInstance.resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId, coreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdCoresCoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$coreId = 789; // Long | The core id.

try {
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdPut($resourceGroupId, $coreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdPut: ', $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 $coreId = 789; # Long | The core id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdCoresCoreIdPut(resourceGroupId => $resourceGroupId, coreId => $coreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdPut: $@\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.
coreId = 789 # Long | The core id.

try: 
    # Add a core to a resource group.
    api_instance.resource_groups_resource_group_id_cores_core_id_put(resourceGroupId, coreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresCoreIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
core_id*
Long (int64)
The core id.
Required

Responses

Status: 204 - Core added succesfully to the 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdCoresGet

Get all the cores of a resource group.


/resource_groups/{resource_group_id}/cores

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/cores"
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[Core] result = apiInstance.resourceGroupsResourceGroupIdCoresGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresGet");
            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[Core] result = apiInstance.resourceGroupsResourceGroupIdCoresGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdCoresGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all the cores of a resource group.
[apiInstance resourceGroupsResourceGroupIdCoresGetWith:resourceGroupId
              completionHandler: ^(array[Core] 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.resourceGroupsResourceGroupIdCoresGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdCoresGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get all the cores of a resource group.
                array[Core] result = apiInstance.resourceGroupsResourceGroupIdCoresGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdCoresGet: " + 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->resourceGroupsResourceGroupIdCoresGet($resourceGroupId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresGet: ', $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->resourceGroupsResourceGroupIdCoresGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresGet: $@\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 the cores of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_cores_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdCoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - A list of cores.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete

Remove a datastore from a resource group.


/resource_groups/{resource_group_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/datastores/{datastore_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 datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete");
            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 datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *datastoreId = 789; // The datastore id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a datastore from a resource group.
[apiInstance resourceGroupsResourceGroupIdDatastoresDatastoreIdDeleteWith:resourceGroupId
    datastoreId:datastoreId
              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 datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDatastoresDatastoreIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Remove a datastore from a resource group.
                apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId, datastoreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$datastoreId = 789; // Long | The datastore id.

try {
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete($resourceGroupId, $datastoreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: ', $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 $datastoreId = 789; # Long | The datastore id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete(resourceGroupId => $resourceGroupId, datastoreId => $datastoreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: $@\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.
datastoreId = 789 # Long | The datastore id.

try: 
    # Remove a datastore from a resource group.
    api_instance.resource_groups_resource_group_id_datastores_datastore_id_delete(resourceGroupId, datastoreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 204 - Datastore removed succesfully from the 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdDatastoresDatastoreIdGet

Get a datastore of a resource group.


/resource_groups/{resource_group_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/datastores/{datastore_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 datastoreId = 789; // Long | The datastore id.
        try {
            Datastore result = apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdGet(resourceGroupId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdGet");
            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 datastoreId = 789; // Long | The datastore id.
        try {
            Datastore result = apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdGet(resourceGroupId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *datastoreId = 789; // The datastore id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a datastore of a resource group.
[apiInstance resourceGroupsResourceGroupIdDatastoresDatastoreIdGetWith:resourceGroupId
    datastoreId:datastoreId
              completionHandler: ^(Datastore 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 datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdDatastoresDatastoreIdGet(resourceGroupId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDatastoresDatastoreIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Get a datastore of a resource group.
                Datastore result = apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdGet(resourceGroupId, datastoreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDatastoresDatastoreIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$datastoreId = 789; // Long | The datastore id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdGet($resourceGroupId, $datastoreId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdGet: ', $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 $datastoreId = 789; # Long | The datastore id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdGet(resourceGroupId => $resourceGroupId, datastoreId => $datastoreId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdGet: $@\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.
datastoreId = 789 # Long | The datastore id.

try: 
    # Get a datastore of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_datastores_datastore_id_get(resourceGroupId, datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 200 - A datastore.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdDatastoresDatastoreIdPut

Add a datastore to a resource group.


/resource_groups/{resource_group_id}/datastores/{datastore_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/datastores/{datastore_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 datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdPut");
            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 datastoreId = 789; // Long | The datastore id.
        try {
            apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *datastoreId = 789; // The datastore id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a datastore to a resource group.
[apiInstance resourceGroupsResourceGroupIdDatastoresDatastoreIdPutWith:resourceGroupId
    datastoreId:datastoreId
              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 datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDatastoresDatastoreIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Add a datastore to a resource group.
                apiInstance.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId, datastoreId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$datastoreId = 789; // Long | The datastore id.

try {
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut($resourceGroupId, $datastoreId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: ', $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 $datastoreId = 789; # Long | The datastore id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut(resourceGroupId => $resourceGroupId, datastoreId => $datastoreId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: $@\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.
datastoreId = 789 # Long | The datastore id.

try: 
    # Add a datastore to a resource group.
    api_instance.resource_groups_resource_group_id_datastores_datastore_id_put(resourceGroupId, datastoreId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresDatastoreIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 204 - Datastore added succesfully to the 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdDatastoresGet

Get all the datastores of a resource group.


/resource_groups/{resource_group_id}/datastores

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/datastores"
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[Datastore] result = apiInstance.resourceGroupsResourceGroupIdDatastoresGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresGet");
            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[Datastore] result = apiInstance.resourceGroupsResourceGroupIdDatastoresGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDatastoresGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all the datastores of a resource group.
[apiInstance resourceGroupsResourceGroupIdDatastoresGetWith:resourceGroupId
              completionHandler: ^(array[Datastore] 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.resourceGroupsResourceGroupIdDatastoresGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDatastoresGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get all the datastores of a resource group.
                array[Datastore] result = apiInstance.resourceGroupsResourceGroupIdDatastoresGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDatastoresGet: " + 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->resourceGroupsResourceGroupIdDatastoresGet($resourceGroupId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresGet: ', $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->resourceGroupsResourceGroupIdDatastoresGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresGet: $@\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 the datastores of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_datastores_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDatastoresGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - A list of datastores.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdDelete

Delete the specified resource group.

A successful response will delete the specified resource group.


/resource_groups/{resource_group_id}

Usage and SDK Samples

curl -X DELETE\
-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 {
            apiInstance.resourceGroupsResourceGroupIdDelete(resourceGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDelete");
            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 {
            apiInstance.resourceGroupsResourceGroupIdDelete(resourceGroupId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Delete the specified resource group.
[apiInstance resourceGroupsResourceGroupIdDeleteWith:resourceGroupId
              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 callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdDelete(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Delete the specified resource group.
                apiInstance.resourceGroupsResourceGroupIdDelete(resourceGroupId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.

try {
    $api_instance->resourceGroupsResourceGroupIdDelete($resourceGroupId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDelete: ', $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 { 
    $api_instance->resourceGroupsResourceGroupIdDelete(resourceGroupId => $resourceGroupId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDelete: $@\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: 
    # Delete the specified resource group.
    api_instance.resource_groups_resource_group_id_delete(resourceGroupId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 204 - The resource group deleted succesfully.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdActionPut

Apply action to specific instance.

Apply an action to a specific instance. Action can be one of: stop|start|restart|destroy|factory_reset.


/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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut

Attach a CD ROM to the specified instance.

Attaches a CD ROM image to the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/attach_cdrom

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}/attach_cdrom"
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.
        AttachCDROM body = ; // AttachCDROM | The parameters of instance attach CD ROM
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut");
            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.
        AttachCDROM body = ; // AttachCDROM | The parameters of instance attach CD ROM
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
AttachCDROM *body = ; // The parameters of instance attach CD ROM (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Attach a CD ROM to the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPutWith:resourceGroupId
    instanceId:instanceId
    body:body
              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 opts = { 
  'body':  // {{AttachCDROM}} The parameters of instance attach CD ROM
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPutExample
    {
        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 AttachCDROM(); // AttachCDROM | The parameters of instance attach CD ROM (optional) 

            try
            {
                // Attach a CD ROM to the specified instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut(resourceGroupId, instanceId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut: " + 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 = ; // AttachCDROM | The parameters of instance attach CD ROM

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut($resourceGroupId, $instanceId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut: ', $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::AttachCDROM->new(); # AttachCDROM | The parameters of instance attach CD ROM

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut: $@\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 =  # AttachCDROM | The parameters of instance attach CD ROM (optional)

try: 
    # Attach a CD ROM to the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_attach_cdrom_put(resourceGroupId, instanceId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdAttachCdromPut: %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 - The CD ROM image attachment operation accepted succesfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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 {
            Template result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut(resourceGroupId, instanceId);
            System.out.println(result);
        } 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 {
            Template result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut(resourceGroupId, instanceId);
            System.out.println(result);
        } 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: ^(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 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.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.
                Template result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut(resourceGroupId, instanceId);
                Debug.WriteLine(result);
            }
            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 {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut($resourceGroupId, $instanceId);
    print_r($result);
} 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 { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdCreateBackupPut(resourceGroupId => $resourceGroupId, instanceId => $instanceId);
    print Dumper($result);
};
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_response = api_instance.resource_groups_resource_group_id_instances_instance_id_create_backup_put(resourceGroupId, instanceId)
    pprint(api_response)
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 - The templates details.

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut

Detach a CD ROM from the specified instance.

Detaches the attached CD ROM image from the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/detach_cdrom

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/detach_cdrom"
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.resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut");
            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.resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut(resourceGroupId, instanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Detach a CD ROM from the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPutWith: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.resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut(resourceGroupId, instanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var instanceId = 789;  // Long | The instance id.

            try
            {
                // Detach a CD ROM from the specified instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut(resourceGroupId, instanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut: " + 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->resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut($resourceGroupId, $instanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut: ', $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->resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut(resourceGroupId => $resourceGroupId, instanceId => $instanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut: $@\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: 
    # Detach a CD ROM from the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_detach_cdrom_put(resourceGroupId, instanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdDetachCdromPut: %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 CD ROM image detachment operation accepted succesfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

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."}

resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete

Detach PCI devices from the specified instance.

Detaches PCI device(s) from the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/pcidevs

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/resource_groups/{resource_group_id}/instances/{instance_id}/pcidevs"
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.
        PCIDevicesIDs body = ; // PCIDevicesIDs | The parameters of instance Detach PCI devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete");
            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.
        PCIDevicesIDs body = ; // PCIDevicesIDs | The parameters of instance Detach PCI devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
PCIDevicesIDs *body = ; // The parameters of instance Detach PCI devices (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Detach PCI devices from the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDeleteWith:resourceGroupId
    instanceId:instanceId
    body:body
              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 opts = { 
  'body':  // {{PCIDevicesIDs}} The parameters of instance Detach PCI devices
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDeleteExample
    {
        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 PCIDevicesIDs(); // PCIDevicesIDs | The parameters of instance Detach PCI devices (optional) 

            try
            {
                // Detach PCI devices from the specified instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete(resourceGroupId, instanceId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete: " + 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 = ; // PCIDevicesIDs | The parameters of instance Detach PCI devices

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete($resourceGroupId, $instanceId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete: ', $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::PCIDevicesIDs->new(); # PCIDevicesIDs | The parameters of instance Detach PCI devices

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete: $@\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 =  # PCIDevicesIDs | The parameters of instance Detach PCI devices (optional)

try: 
    # Detach PCI devices from the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_pcidevs_delete(resourceGroupId, instanceId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsDelete: %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 - The PCI devices detached succesfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost

Attach PCI devices to the specified instance.

Attaches PCI device(s) to the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/pcidevs

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}/pcidevs"
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.
        PCIDevicesIDs body = ; // PCIDevicesIDs | The parameters of instance attach PCI devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost");
            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.
        PCIDevicesIDs body = ; // PCIDevicesIDs | The parameters of instance attach PCI devices
        try {
            Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost(resourceGroupId, instanceId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
PCIDevicesIDs *body = ; // The parameters of instance attach PCI devices (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Attach PCI devices to the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPostWith:resourceGroupId
    instanceId:instanceId
    body:body
              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 opts = { 
  'body':  // {{PCIDevicesIDs}} The parameters of instance attach PCI devices
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPostExample
    {
        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 PCIDevicesIDs(); // PCIDevicesIDs | The parameters of instance attach PCI devices (optional) 

            try
            {
                // Attach PCI devices to the specified instance.
                Instance result = apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost(resourceGroupId, instanceId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost: " + 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 = ; // PCIDevicesIDs | The parameters of instance attach PCI devices

try {
    $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost($resourceGroupId, $instanceId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost: ', $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::PCIDevicesIDs->new(); # PCIDevicesIDs | The parameters of instance attach PCI devices

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost: $@\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 =  # PCIDevicesIDs | The parameters of instance attach PCI devices (optional)

try: 
    # Attach PCI devices to the specified instance.
    api_response = api_instance.resource_groups_resource_group_id_instances_instance_id_pcidevs_post(resourceGroupId, instanceId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdPcidevsPost: %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 - The PCI devices attached succesfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut

Rename the specified instance.

Renames the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/rename

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}/rename"
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.
        RenameInstance body = ; // RenameInstance | The parameters of instance rename
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut");
            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.
        RenameInstance body = ; // RenameInstance | The parameters of instance rename
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
RenameInstance *body = ; // The parameters of instance rename (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Rename the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdRenamePutWith: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':  // {{RenameInstance}} The parameters of instance rename
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdRenamePutExample
    {
        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 RenameInstance(); // RenameInstance | The parameters of instance rename (optional) 

            try
            {
                // Rename the specified instance.
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut(resourceGroupId, instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut: " + 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 = ; // RenameInstance | The parameters of instance rename

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut($resourceGroupId, $instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut: ', $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::RenameInstance->new(); # RenameInstance | The parameters of instance rename

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut: $@\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 =  # RenameInstance | The parameters of instance rename (optional)

try: 
    # Rename the specified instance.
    api_instance.resource_groups_resource_group_id_instances_instance_id_rename_put(resourceGroupId, instanceId, body=body)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdRenamePut: %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: 204 - The instance renamed succesfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdInstancesInstanceIdResizePut

Resize the specified instance.

Initiates a resize operation at the specified instance. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}/instances/{instance_id}/resize

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}/resize"
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.
        ResizeInstance body = ; // ResizeInstance | The parameters of instance resize
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdResizePut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdResizePut");
            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.
        ResizeInstance body = ; // ResizeInstance | The parameters of instance resize
        try {
            apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdResizePut(resourceGroupId, instanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdInstancesInstanceIdResizePut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *instanceId = 789; // The instance id.
ResizeInstance *body = ; // The parameters of instance resize (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Resize the specified instance.
[apiInstance resourceGroupsResourceGroupIdInstancesInstanceIdResizePutWith: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':  // {{ResizeInstance}} The parameters of instance resize
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdInstancesInstanceIdResizePut(resourceGroupIdinstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdInstancesInstanceIdResizePutExample
    {
        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 ResizeInstance(); // ResizeInstance | The parameters of instance resize (optional) 

            try
            {
                // Resize the specified instance.
                apiInstance.resourceGroupsResourceGroupIdInstancesInstanceIdResizePut(resourceGroupId, instanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdInstancesInstanceIdResizePut: " + 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 = ; // ResizeInstance | The parameters of instance resize

try {
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdResizePut($resourceGroupId, $instanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdResizePut: ', $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::ResizeInstance->new(); # ResizeInstance | The parameters of instance resize

eval { 
    $api_instance->resourceGroupsResourceGroupIdInstancesInstanceIdResizePut(resourceGroupId => $resourceGroupId, instanceId => $instanceId, body => $body);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdResizePut: $@\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 =  # ResizeInstance | The parameters of instance resize (optional)

try: 
    # Resize the specified instance.
    api_instance.resource_groups_resource_group_id_instances_instance_id_resize_put(resourceGroupId, instanceId, body=body)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdInstancesInstanceIdResizePut: %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: 204 - The resize initiated succesfully.'

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdNetworksGet

Get all the networks of a resource group.


/resource_groups/{resource_group_id}/networks

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/networks"
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[Network] result = apiInstance.resourceGroupsResourceGroupIdNetworksGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksGet");
            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[Network] result = apiInstance.resourceGroupsResourceGroupIdNetworksGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all the networks of a resource group.
[apiInstance resourceGroupsResourceGroupIdNetworksGetWith:resourceGroupId
              completionHandler: ^(array[Network] 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.resourceGroupsResourceGroupIdNetworksGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdNetworksGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get all the networks of a resource group.
                array[Network] result = apiInstance.resourceGroupsResourceGroupIdNetworksGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdNetworksGet: " + 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->resourceGroupsResourceGroupIdNetworksGet($resourceGroupId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksGet: ', $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->resourceGroupsResourceGroupIdNetworksGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksGet: $@\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 the networks of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_networks_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - A list of networks.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdNetworksNetworkIdDelete

Remove a network from a resource group.


/resource_groups/{resource_group_id}/networks/{network_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/networks/{network_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 networkId = 789; // Long | The network id.
        try {
            apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdDelete");
            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 networkId = 789; // Long | The network id.
        try {
            apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *networkId = 789; // The network id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a network from a resource group.
[apiInstance resourceGroupsResourceGroupIdNetworksNetworkIdDeleteWith:resourceGroupId
    networkId:networkId
              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 networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdNetworksNetworkIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Remove a network from a resource group.
                apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId, networkId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdNetworksNetworkIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$networkId = 789; // Long | The network id.

try {
    $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdDelete($resourceGroupId, $networkId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdDelete: ', $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 $networkId = 789; # Long | The network id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdDelete(resourceGroupId => $resourceGroupId, networkId => $networkId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdDelete: $@\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.
networkId = 789 # Long | The network id.

try: 
    # Remove a network from a resource group.
    api_instance.resource_groups_resource_group_id_networks_network_id_delete(resourceGroupId, networkId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 204 - Network removed succesfully from the 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdNetworksNetworkIdGet

Get a network of a resource group.


/resource_groups/{resource_group_id}/networks/{network_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/networks/{network_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 networkId = 789; // Long | The network id.
        try {
            Network result = apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdGet(resourceGroupId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdGet");
            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 networkId = 789; // Long | The network id.
        try {
            Network result = apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdGet(resourceGroupId, networkId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *networkId = 789; // The network id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a network of a resource group.
[apiInstance resourceGroupsResourceGroupIdNetworksNetworkIdGetWith:resourceGroupId
    networkId:networkId
              completionHandler: ^(Network 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 networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdNetworksNetworkIdGet(resourceGroupId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdNetworksNetworkIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Get a network of a resource group.
                Network result = apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdGet(resourceGroupId, networkId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdNetworksNetworkIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$networkId = 789; // Long | The network id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdGet($resourceGroupId, $networkId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdGet: ', $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 $networkId = 789; # Long | The network id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdGet(resourceGroupId => $resourceGroupId, networkId => $networkId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdGet: $@\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.
networkId = 789 # Long | The network id.

try: 
    # Get a network of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_networks_network_id_get(resourceGroupId, networkId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 200 - A network.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdNetworksNetworkIdPut

Add a network to a resource group.


/resource_groups/{resource_group_id}/networks/{network_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/networks/{network_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 networkId = 789; // Long | The network id.
        try {
            apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdPut");
            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 networkId = 789; // Long | The network id.
        try {
            apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdNetworksNetworkIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *networkId = 789; // The network id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a network to a resource group.
[apiInstance resourceGroupsResourceGroupIdNetworksNetworkIdPutWith:resourceGroupId
    networkId:networkId
              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 networkId = 789; // {{Long}} The network id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdNetworksNetworkIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var networkId = 789;  // Long | The network id.

            try
            {
                // Add a network to a resource group.
                apiInstance.resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId, networkId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdNetworksNetworkIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$networkId = 789; // Long | The network id.

try {
    $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdPut($resourceGroupId, $networkId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdPut: ', $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 $networkId = 789; # Long | The network id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdNetworksNetworkIdPut(resourceGroupId => $resourceGroupId, networkId => $networkId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdPut: $@\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.
networkId = 789 # Long | The network id.

try: 
    # Add a network to a resource group.
    api_instance.resource_groups_resource_group_id_networks_network_id_put(resourceGroupId, networkId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdNetworksNetworkIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
network_id*
Long (int64)
The network id.
Required

Responses

Status: 204 - Network added succesfully to the 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPcidevsGet

Get all the PCI devices of a resource group.


/resource_groups/{resource_group_id}/pcidevs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pcidevs"
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[PCIDev] result = apiInstance.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsGet");
            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[PCIDev] result = apiInstance.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get all the PCI devices of a resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsGetWith:resourceGroupId
              completionHandler: ^(array[PCIDev] 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.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.

            try
            {
                // Get all the PCI devices of a resource group.
                array[PCIDev] result = apiInstance.resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsGet: " + 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->resourceGroupsResourceGroupIdPcidevsGet($resourceGroupId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsGet: ', $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->resourceGroupsResourceGroupIdPcidevsGet(resourceGroupId => $resourceGroupId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsGet: $@\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 the PCI devices of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_pcidevs_get(resourceGroupId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required

Responses

Status: 200 - A list of PCI devices.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPcidevsPcidevIdDelete

Remove a PCI device from a resource group.


/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pcidevs/{pcidev_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 pcidevId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdDelete");
            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 pcidevId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdDelete");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *pcidevId = 789; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Remove a PCI device from a resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsPcidevIdDeleteWith:resourceGroupId
    pcidevId:pcidevId
              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 pcidevId = 789; // {{Long}} The core id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsPcidevIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var pcidevId = 789;  // Long | The core id.

            try
            {
                // Remove a PCI device from a resource group.
                apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId, pcidevId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$pcidevId = 789; // Long | The core id.

try {
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete($resourceGroupId, $pcidevId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: ', $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 $pcidevId = 789; # Long | The core id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete(resourceGroupId => $resourceGroupId, pcidevId => $pcidevId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: $@\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.
pcidevId = 789 # Long | The core id.

try: 
    # Remove a PCI device from a resource group.
    api_instance.resource_groups_resource_group_id_pcidevs_pcidev_id_delete(resourceGroupId, pcidevId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
pcidev_id*
Long (int64)
The core id.
Required

Responses

Status: 204 - PCI device removed succesfully from the 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPcidevsPcidevIdGet

Get a PCI device of a resource group.


/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pcidevs/{pcidev_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 pcidevId = 789; // Long | The core id.
        try {
            PCIDev result = apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdGet(resourceGroupId, pcidevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdGet");
            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 pcidevId = 789; // Long | The core id.
        try {
            PCIDev result = apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdGet(resourceGroupId, pcidevId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdGet");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *pcidevId = 789; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Get a PCI device of a resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsPcidevIdGetWith:resourceGroupId
    pcidevId:pcidevId
              completionHandler: ^(PCIDev 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 pcidevId = 789; // {{Long}} The core id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdPcidevsPcidevIdGet(resourceGroupId, pcidevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsPcidevIdGetExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var pcidevId = 789;  // Long | The core id.

            try
            {
                // Get a PCI device of a resource group.
                PCIDev result = apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdGet(resourceGroupId, pcidevId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsPcidevIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$pcidevId = 789; // Long | The core id.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdGet($resourceGroupId, $pcidevId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdGet: ', $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 $pcidevId = 789; # Long | The core id.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdGet(resourceGroupId => $resourceGroupId, pcidevId => $pcidevId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdGet: $@\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.
pcidevId = 789 # Long | The core id.

try: 
    # Get a PCI device of a resource group.
    api_response = api_instance.resource_groups_resource_group_id_pcidevs_pcidev_id_get(resourceGroupId, pcidevId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
pcidev_id*
Long (int64)
The core id.
Required

Responses

Status: 200 - A PCI device.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPcidevsPcidevIdPut

Add a PCI device to a resource group.


/resource_groups/{resource_group_id}/pcidevs/{pcidev_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/resource_groups/{resource_group_id}/pcidevs/{pcidev_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 pcidevId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdPut");
            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 pcidevId = 789; // Long | The core id.
        try {
            apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPcidevsPcidevIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
Long *pcidevId = 789; // The core id.

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Add a PCI device to a resource group.
[apiInstance resourceGroupsResourceGroupIdPcidevsPcidevIdPutWith:resourceGroupId
    pcidevId:pcidevId
              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 pcidevId = 789; // {{Long}} The core id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPcidevsPcidevIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var pcidevId = 789;  // Long | The core id.

            try
            {
                // Add a PCI device to a resource group.
                apiInstance.resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId, pcidevId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPcidevsPcidevIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$pcidevId = 789; // Long | The core id.

try {
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdPut($resourceGroupId, $pcidevId);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdPut: ', $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 $pcidevId = 789; # Long | The core id.

eval { 
    $api_instance->resourceGroupsResourceGroupIdPcidevsPcidevIdPut(resourceGroupId => $resourceGroupId, pcidevId => $pcidevId);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdPut: $@\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.
pcidevId = 789 # Long | The core id.

try: 
    # Add a PCI device to a resource group.
    api_instance.resource_groups_resource_group_id_pcidevs_pcidev_id_put(resourceGroupId, pcidevId)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPcidevsPcidevIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
resource_group_id*
Long (int64)
The resource group id.
Required
pcidev_id*
Long (int64)
The core id.
Required

Responses

Status: 204 - PCI device added succesfully to the 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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

resourceGroupsResourceGroupIdPut

Edit an existingresource group.

The endpoint edits a new resource group. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/resource_groups/{resource_group_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/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.
        NewResourceGroup body = ; // NewResourceGroup | The resource group to create.
        try {
            ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdPut(resourceGroupId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPut");
            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.
        NewResourceGroup body = ; // NewResourceGroup | The resource group to create.
        try {
            ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdPut(resourceGroupId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ResourceGroupsApi#resourceGroupsResourceGroupIdPut");
            e.printStackTrace();
        }
    }
}
Long *resourceGroupId = 789; // The resource group id.
NewResourceGroup *body = ; // The resource group to create. (optional)

ResourceGroupsApi *apiInstance = [[ResourceGroupsApi alloc] init];

// Edit an existingresource group.
[apiInstance resourceGroupsResourceGroupIdPutWith:resourceGroupId
    body:body
              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 opts = { 
  'body':  // {{NewResourceGroup}} The resource group to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resourceGroupsResourceGroupIdPut(resourceGroupId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resourceGroupsResourceGroupIdPutExample
    {
        public void main()
        {

            var apiInstance = new ResourceGroupsApi();
            var resourceGroupId = 789;  // Long | The resource group id.
            var body = new NewResourceGroup(); // NewResourceGroup | The resource group to create. (optional) 

            try
            {
                // Edit an existingresource group.
                ResourceGroup result = apiInstance.resourceGroupsResourceGroupIdPut(resourceGroupId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ResourceGroupsApi.resourceGroupsResourceGroupIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiResourceGroupsApi();
$resourceGroupId = 789; // Long | The resource group id.
$body = ; // NewResourceGroup | The resource group to create.

try {
    $result = $api_instance->resourceGroupsResourceGroupIdPut($resourceGroupId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPut: ', $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::NewResourceGroup->new(); # NewResourceGroup | The resource group to create.

eval { 
    my $result = $api_instance->resourceGroupsResourceGroupIdPut(resourceGroupId => $resourceGroupId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPut: $@\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 =  # NewResourceGroup | The resource group to create. (optional)

try: 
    # Edit an existingresource group.
    api_response = api_instance.resource_groups_resource_group_id_put(resourceGroupId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ResourceGroupsApi->resourceGroupsResourceGroupIdPut: %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 - Resource Group updated.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

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,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

SupportSession

clustersClusterIdSupportSessionDelete

Delete a cluster's support session

A successful response will delete the support session of a custer.


/clusters/{cluster_id}/support_session

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionDelete(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionDelete(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Delete a cluster's support session
[apiInstance clustersClusterIdSupportSessionDeleteWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
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.clustersClusterIdSupportSessionDelete(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionDeleteExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Delete a cluster's support session
                SupportSession result = apiInstance.clustersClusterIdSupportSessionDelete(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdSupportSessionDelete($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->clustersClusterIdSupportSessionDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionDelete(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionDelete: $@\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.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Delete a cluster's support session
    api_response = api_instance.clusters_cluster_id_support_session_delete(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSupportSessionGet

Get a cluster's support session

A successful response will return the support session of a custer.


/clusters/{cluster_id}/support_session

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Get a cluster's support session
[apiInstance clustersClusterIdSupportSessionGetWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
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.clustersClusterIdSupportSessionGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionGetExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get a cluster's support session
                SupportSession result = apiInstance.clustersClusterIdSupportSessionGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdSupportSessionGet($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->clustersClusterIdSupportSessionGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionGet: $@\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.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get a cluster's support session
    api_response = api_instance.clusters_cluster_id_support_session_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSupportSessionIptOutDelete

Disable the opt-out of the support session of a cluster.

A successful response will disable the opt-out of the support session of a cluster.


/clusters/{cluster_id}/support_session/ipt_out

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session/ipt_out"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionIptOutDelete(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionIptOutDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionIptOutDelete(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionIptOutDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Disable the opt-out of the support session of a cluster.
[apiInstance clustersClusterIdSupportSessionIptOutDeleteWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
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.clustersClusterIdSupportSessionIptOutDelete(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionIptOutDeleteExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Disable the opt-out of the support session of a cluster.
                SupportSession result = apiInstance.clustersClusterIdSupportSessionIptOutDelete(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionIptOutDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdSupportSessionIptOutDelete($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->clustersClusterIdSupportSessionIptOutDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionIptOutDelete(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionIptOutDelete: $@\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.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Disable the opt-out of the support session of a cluster.
    api_response = api_instance.clusters_cluster_id_support_session_ipt_out_delete(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionIptOutDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSupportSessionIptOutPost

Enable the opt-out of the support session of a cluster.

A successful response will enable the opt-out of the support session of a cluster.


/clusters/{cluster_id}/support_session/ipt_out

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session/ipt_out"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionIptOutPost(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionIptOutPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionIptOutPost(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionIptOutPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Enable the opt-out of the support session of a cluster.
[apiInstance clustersClusterIdSupportSessionIptOutPostWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
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.clustersClusterIdSupportSessionIptOutPost(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionIptOutPostExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Enable the opt-out of the support session of a cluster.
                SupportSession result = apiInstance.clustersClusterIdSupportSessionIptOutPost(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionIptOutPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdSupportSessionIptOutPost($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->clustersClusterIdSupportSessionIptOutPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionIptOutPost(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionIptOutPost: $@\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.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Enable the opt-out of the support session of a cluster.
    api_response = api_instance.clusters_cluster_id_support_session_ipt_out_post(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionIptOutPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSupportSessionPost

Create a cluster's support session

A successful response will create the support session of a custer.


/clusters/{cluster_id}/support_session

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionPost(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionPost(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionPost");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Create a cluster's support session
[apiInstance clustersClusterIdSupportSessionPostWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
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.clustersClusterIdSupportSessionPost(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionPostExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Create a cluster's support session
                SupportSession result = apiInstance.clustersClusterIdSupportSessionPost(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdSupportSessionPost($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->clustersClusterIdSupportSessionPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionPost(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionPost: $@\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.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Create a cluster's support session
    api_response = api_instance.clusters_cluster_id_support_session_post(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionPost: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdSupportSessionPut

Update a cluster's support session

A successful response will update the support session of a custer.


/clusters/{cluster_id}/support_session

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/support_session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SupportSessionApi;

import java.io.File;
import java.util.*;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionPut(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SupportSessionApi;

public class SupportSessionApiExample {

    public static void main(String[] args) {
        SupportSessionApi apiInstance = new SupportSessionApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            SupportSession result = apiInstance.clustersClusterIdSupportSessionPut(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SupportSessionApi#clustersClusterIdSupportSessionPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

SupportSessionApi *apiInstance = [[SupportSessionApi alloc] init];

// Update a cluster's support session
[apiInstance clustersClusterIdSupportSessionPutWith:clusterId
              completionHandler: ^(SupportSession output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.SupportSessionApi()
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.clustersClusterIdSupportSessionPut(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdSupportSessionPutExample
    {
        public void main()
        {

            var apiInstance = new SupportSessionApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Update a cluster's support session
                SupportSession result = apiInstance.clustersClusterIdSupportSessionPut(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SupportSessionApi.clustersClusterIdSupportSessionPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSupportSessionApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdSupportSessionPut($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SupportSessionApi->clustersClusterIdSupportSessionPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SupportSessionApi;

my $api_instance = WWW::SwaggerClient::SupportSessionApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdSupportSessionPut(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SupportSessionApi->clustersClusterIdSupportSessionPut: $@\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.SupportSessionApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Update a cluster's support session
    api_response = api_instance.clusters_cluster_id_support_session_put(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SupportSessionApi->clustersClusterIdSupportSessionPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - The support session's details.

Status: 400 - Resource not found.

{"code":404,"message":"Not found."}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

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,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

Vdisks

clustersClusterIdVdisksGet

Get the list the cluster's vdisks


/clusters/{cluster_id}/vdisks%27

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/vdisks%27"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[VDisks] result = apiInstance.clustersClusterIdVdisksGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        try {
            array[VDisks] result = apiInstance.clustersClusterIdVdisksGet(clusterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Get the list the cluster's vdisks
[apiInstance clustersClusterIdVdisksGetWith:clusterId
              completionHandler: ^(array[VDisks] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
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.clustersClusterIdVdisksGet(clusterId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksGetExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.

            try
            {
                // Get the list the cluster's vdisks
                array[VDisks] result = apiInstance.clustersClusterIdVdisksGet(clusterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.

try {
    $result = $api_instance->clustersClusterIdVdisksGet($clusterId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.

eval { 
    my $result = $api_instance->clustersClusterIdVdisksGet(clusterId => $clusterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksGet: $@\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.VdisksApi()
clusterId = 789 # Long | The cluster id.

try: 
    # Get the list the cluster's vdisks
    api_response = api_instance.clusters_cluster_id_vdisks_get(clusterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required

Responses

Status: 200 - List of vdisks.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 401 - Status unauthorized.

{"code":401,"message":"Unauthorized access."}

Status: 403 - Status forbidden.

{"code":403,"message":"Unauthorized access."}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdVdisksVdiskIdDelete

Delete a vdisk from a cluster.

The endpoint deletes a vdisk. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/vdisks/{vdisk_id}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/vdisks/{vdisk_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        try {
            apiInstance.clustersClusterIdVdisksVdiskIdDelete(clusterId, vdiskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        try {
            apiInstance.clustersClusterIdVdisksVdiskIdDelete(clusterId, vdiskId);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdDelete");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *vdiskId = 789; // The vdisk id.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Delete a vdisk from a cluster.
[apiInstance clustersClusterIdVdisksVdiskIdDeleteWith:clusterId
    vdiskId:vdiskId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var vdiskId = 789; // {{Long}} The vdisk id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.clustersClusterIdVdisksVdiskIdDelete(clusterId, vdiskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksVdiskIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var vdiskId = 789;  // Long | The vdisk id.

            try
            {
                // Delete a vdisk from a cluster.
                apiInstance.clustersClusterIdVdisksVdiskIdDelete(clusterId, vdiskId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksVdiskIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.
$vdiskId = 789; // Long | The vdisk id.

try {
    $api_instance->clustersClusterIdVdisksVdiskIdDelete($clusterId, $vdiskId);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $vdiskId = 789; # Long | The vdisk id.

eval { 
    $api_instance->clustersClusterIdVdisksVdiskIdDelete(clusterId => $clusterId, vdiskId => $vdiskId);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdDelete: $@\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.VdisksApi()
clusterId = 789 # Long | The cluster id.
vdiskId = 789 # Long | The vdisk id.

try: 
    # Delete a vdisk from a cluster.
    api_instance.clusters_cluster_id_vdisks_vdisk_id_delete(clusterId, vdiskId)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
vdisk_id*
Long (int64)
The vdisk id.
Required

Responses

Status: 204 - Vdisk deleted succesfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 409 - Status conflict.

{"code":409,"message":"Already exists"}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdVdisksVdiskIdGet

Get a vdisk of a cluster.

The endpoint gets the vdisk based on the ID and the cluster ID.


/clusters/{cluster_id}/vdisks/{vdisk_id}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/vdisks/{vdisk_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdGet(clusterId, vdiskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdGet(clusterId, vdiskId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdGet");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *vdiskId = 789; // The vdisk id.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Get a vdisk of a cluster.
[apiInstance clustersClusterIdVdisksVdiskIdGetWith:clusterId
    vdiskId:vdiskId
              completionHandler: ^(VDisk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var vdiskId = 789; // {{Long}} The vdisk id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdVdisksVdiskIdGet(clusterId, vdiskId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksVdiskIdGetExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var vdiskId = 789;  // Long | The vdisk id.

            try
            {
                // Get a vdisk of a cluster.
                VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdGet(clusterId, vdiskId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksVdiskIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.
$vdiskId = 789; // Long | The vdisk id.

try {
    $result = $api_instance->clustersClusterIdVdisksVdiskIdGet($clusterId, $vdiskId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $vdiskId = 789; # Long | The vdisk id.

eval { 
    my $result = $api_instance->clustersClusterIdVdisksVdiskIdGet(clusterId => $clusterId, vdiskId => $vdiskId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdGet: $@\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.VdisksApi()
clusterId = 789 # Long | The cluster id.
vdiskId = 789 # Long | The vdisk id.

try: 
    # Get a vdisk of a cluster.
    api_response = api_instance.clusters_cluster_id_vdisks_vdisk_id_get(clusterId, vdiskId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
vdisk_id*
Long (int64)
The vdisk id.
Required

Responses

Status: 200 - VDisk retrieved succesfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut

Edit a vdisk's name.

The endpoint edits a vdisk's name. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/vdisks/{vdisk_id}/rename/{new_vdisk_name}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/vdisks/{vdisk_id}/rename/{new_vdisk_name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        String newVdiskName = newVdiskName_example; // String | The vdisk name.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut(clusterId, vdiskId, newVdiskName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        String newVdiskName = newVdiskName_example; // String | The vdisk name.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut(clusterId, vdiskId, newVdiskName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *vdiskId = 789; // The vdisk id.
String *newVdiskName = newVdiskName_example; // The vdisk name.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Edit a vdisk's name.
[apiInstance clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePutWith:clusterId
    vdiskId:vdiskId
    newVdiskName:newVdiskName
              completionHandler: ^(VDisk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var vdiskId = 789; // {{Long}} The vdisk id.
var newVdiskName = newVdiskName_example; // {{String}} The vdisk name.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut(clusterId, vdiskId, newVdiskName, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePutExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var vdiskId = 789;  // Long | The vdisk id.
            var newVdiskName = newVdiskName_example;  // String | The vdisk name.

            try
            {
                // Edit a vdisk's name.
                VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut(clusterId, vdiskId, newVdiskName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.
$vdiskId = 789; // Long | The vdisk id.
$newVdiskName = newVdiskName_example; // String | The vdisk name.

try {
    $result = $api_instance->clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut($clusterId, $vdiskId, $newVdiskName);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $vdiskId = 789; # Long | The vdisk id.
my $newVdiskName = newVdiskName_example; # String | The vdisk name.

eval { 
    my $result = $api_instance->clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut(clusterId => $clusterId, vdiskId => $vdiskId, newVdiskName => $newVdiskName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut: $@\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.VdisksApi()
clusterId = 789 # Long | The cluster id.
vdiskId = 789 # Long | The vdisk id.
newVdiskName = newVdiskName_example # String | The vdisk name.

try: 
    # Edit a vdisk's name.
    api_response = api_instance.clusters_cluster_id_vdisks_vdisk_id_rename_new_vdisk_name_put(clusterId, vdiskId, newVdiskName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdRenameNewVdiskNamePut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
vdisk_id*
Long (int64)
The vdisk id.
Required
new_vdisk_name*
String
The vdisk name.
Required

Responses

Status: 200 - VDisk name updated successfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut

Create a snapshot of a vdisk to the specified datastore.

The endpoint edits a vdisk's name. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/vdisks/{vdisk_id}/snapcreate/datastore/{datastore_id}

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
"/api/clusters/{cluster_id}/vdisks/{vdisk_id}/snapcreate/datastore/{datastore_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut(clusterId, vdiskId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        Long datastoreId = 789; // Long | The datastore id.
        try {
            VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut(clusterId, vdiskId, datastoreId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *vdiskId = 789; // The vdisk id.
Long *datastoreId = 789; // The datastore id.

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Create a snapshot of a vdisk to the specified datastore.
[apiInstance clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPutWith:clusterId
    vdiskId:vdiskId
    datastoreId:datastoreId
              completionHandler: ^(VDisk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var vdiskId = 789; // {{Long}} The vdisk id.
var datastoreId = 789; // {{Long}} The datastore id.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut(clusterId, vdiskId, datastoreId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPutExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var vdiskId = 789;  // Long | The vdisk id.
            var datastoreId = 789;  // Long | The datastore id.

            try
            {
                // Create a snapshot of a vdisk to the specified datastore.
                VDisk result = apiInstance.clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut(clusterId, vdiskId, datastoreId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.
$vdiskId = 789; // Long | The vdisk id.
$datastoreId = 789; // Long | The datastore id.

try {
    $result = $api_instance->clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut($clusterId, $vdiskId, $datastoreId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $vdiskId = 789; # Long | The vdisk id.
my $datastoreId = 789; # Long | The datastore id.

eval { 
    my $result = $api_instance->clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut(clusterId => $clusterId, vdiskId => $vdiskId, datastoreId => $datastoreId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut: $@\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.VdisksApi()
clusterId = 789 # Long | The cluster id.
vdiskId = 789 # Long | The vdisk id.
datastoreId = 789 # Long | The datastore id.

try: 
    # Create a snapshot of a vdisk to the specified datastore.
    api_response = api_instance.clusters_cluster_id_vdisks_vdisk_id_snapcreate_datastore_datastore_id_put(clusterId, vdiskId, datastoreId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdSnapcreateDatastoreDatastoreIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
vdisk_id*
Long (int64)
The vdisk id.
Required
datastore_id*
Long (int64)
The datastore id.
Required

Responses

Status: 202 - The VDisk shanpshot initiated succesfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}

clustersClusterIdVdisksVdiskIdTemplatenewPut

Create a template from a vdisk.

The endpoint edits a vdisk's name. Errors with format 11XXXXXX are responds from the clusters. Errors with format 10XXXXXX are generated from the SIM.


/clusters/{cluster_id}/vdisks/{vdisk_id}/templatenew

Usage and SDK Samples

curl -X PUT\
-H "Accept: application/json,text/plain"\
-H "Content-Type: application/json"\
"/api/clusters/{cluster_id}/vdisks/{vdisk_id}/templatenew"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VdisksApi;

import java.io.File;
import java.util.*;

public class VdisksApiExample {

    public static void main(String[] args) {
        
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        NewVDiskTemplate body = ; // NewVDiskTemplate | The template details to create.
        try {
            VDiskTemplate result = apiInstance.clustersClusterIdVdisksVdiskIdTemplatenewPut(clusterId, vdiskId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdTemplatenewPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VdisksApi;

public class VdisksApiExample {

    public static void main(String[] args) {
        VdisksApi apiInstance = new VdisksApi();
        Long clusterId = 789; // Long | The cluster id.
        Long vdiskId = 789; // Long | The vdisk id.
        NewVDiskTemplate body = ; // NewVDiskTemplate | The template details to create.
        try {
            VDiskTemplate result = apiInstance.clustersClusterIdVdisksVdiskIdTemplatenewPut(clusterId, vdiskId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VdisksApi#clustersClusterIdVdisksVdiskIdTemplatenewPut");
            e.printStackTrace();
        }
    }
}
Long *clusterId = 789; // The cluster id.
Long *vdiskId = 789; // The vdisk id.
NewVDiskTemplate *body = ; // The template details to create. (optional)

VdisksApi *apiInstance = [[VdisksApi alloc] init];

// Create a template from a vdisk.
[apiInstance clustersClusterIdVdisksVdiskIdTemplatenewPutWith:clusterId
    vdiskId:vdiskId
    body:body
              completionHandler: ^(VDiskTemplate output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Sim2Api = require('sim2_api');

var api = new Sim2Api.VdisksApi()
var clusterId = 789; // {{Long}} The cluster id.
var vdiskId = 789; // {{Long}} The vdisk id.
var opts = { 
  'body':  // {{NewVDiskTemplate}} The template details to create.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.clustersClusterIdVdisksVdiskIdTemplatenewPut(clusterIdvdiskId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class clustersClusterIdVdisksVdiskIdTemplatenewPutExample
    {
        public void main()
        {

            var apiInstance = new VdisksApi();
            var clusterId = 789;  // Long | The cluster id.
            var vdiskId = 789;  // Long | The vdisk id.
            var body = new NewVDiskTemplate(); // NewVDiskTemplate | The template details to create. (optional) 

            try
            {
                // Create a template from a vdisk.
                VDiskTemplate result = apiInstance.clustersClusterIdVdisksVdiskIdTemplatenewPut(clusterId, vdiskId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VdisksApi.clustersClusterIdVdisksVdiskIdTemplatenewPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiVdisksApi();
$clusterId = 789; // Long | The cluster id.
$vdiskId = 789; // Long | The vdisk id.
$body = ; // NewVDiskTemplate | The template details to create.

try {
    $result = $api_instance->clustersClusterIdVdisksVdiskIdTemplatenewPut($clusterId, $vdiskId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdTemplatenewPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VdisksApi;

my $api_instance = WWW::SwaggerClient::VdisksApi->new();
my $clusterId = 789; # Long | The cluster id.
my $vdiskId = 789; # Long | The vdisk id.
my $body = WWW::SwaggerClient::Object::NewVDiskTemplate->new(); # NewVDiskTemplate | The template details to create.

eval { 
    my $result = $api_instance->clustersClusterIdVdisksVdiskIdTemplatenewPut(clusterId => $clusterId, vdiskId => $vdiskId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdTemplatenewPut: $@\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.VdisksApi()
clusterId = 789 # Long | The cluster id.
vdiskId = 789 # Long | The vdisk id.
body =  # NewVDiskTemplate | The template details to create. (optional)

try: 
    # Create a template from a vdisk.
    api_response = api_instance.clusters_cluster_id_vdisks_vdisk_id_templatenew_put(clusterId, vdiskId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling VdisksApi->clustersClusterIdVdisksVdiskIdTemplatenewPut: %s\n" % e)

Parameters

Path parameters
Name Description
cluster_id*
Long (int64)
The cluster id.
Required
vdisk_id*
Long (int64)
The vdisk id.
Required
Body parameters
Name Description
body

Responses

Status: 202 - VDisk template creation started succesfully.

Status: 400 - One or more validation have failed during a request processing.

{"code":400,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234535}]}

Status: 404 - Resource not found.

{"code":404,"message":"Not found."}

Status: 422 - One or more validation have failed during a request processing.

{"code":422,"message":"Validation failed","errors":[{"field":"description","message":"Description must be up to 50 characters long.","code":234532},{"field":"units","message":"Units cannot be negative.","code":234332}]}

Status: 500 - An unexpected error occurred.

{"code":500,"message":"Operation X did something wrong during processing"}