ArvanCloud ECC Service

FloatIPs

regionsRegionFloatIpsDetachPatch

Detach a Float IP from a Server.


/regions/{region}/float-ips/detach

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/float-ips/detach"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FloatIPsApi;

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

public class FloatIPsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        FloatIPsApi apiInstance = new FloatIPsApi();
        String portId = portId_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionFloatIpsDetachPatch(portId, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling FloatIPsApi#regionsRegionFloatIpsDetachPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FloatIPsApi;

public class FloatIPsApiExample {

    public static void main(String[] args) {
        FloatIPsApi apiInstance = new FloatIPsApi();
        String portId = portId_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionFloatIpsDetachPatch(portId, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling FloatIPsApi#regionsRegionFloatIpsDetachPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *portId = portId_example; // 
String *region = region_example; // Region code

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

// Detach a Float IP from a Server.
[apiInstance regionsRegionFloatIpsDetachPatchWith:portId
    region:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.FloatIPsApi()
var portId = portId_example; // {{String}} 
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new FloatIPsApi();
            var portId = portId_example;  // String | 
            var region = region_example;  // String | Region code

            try
            {
                // Detach a Float IP from a Server.
                apiInstance.regionsRegionFloatIpsDetachPatch(portId, region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FloatIPsApi.regionsRegionFloatIpsDetachPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiFloatIPsApi();
$portId = portId_example; // String | 
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FloatIPsApi->new();
my $portId = portId_example; # String | 
my $region = region_example; # String | Region code

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FloatIPsApi()
portId = portId_example # String | 
region = region_example # String | Region code

try: 
    # Detach a Float IP from a Server.
    api_instance.regions_region_float_ips_detach_patch(portId, region)
except ApiException as e:
    print("Exception when calling FloatIPsApi->regionsRegionFloatIpsDetachPatch: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Form parameters
Name Description
port_id*
String
Required

Responses

Status: 200 - float-ip detached successfully


regionsRegionFloatIpsGet

List of all Float IPs.


/regions/{region}/float-ips

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/float-ips"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FloatIPsApi;

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

public class FloatIPsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        FloatIPsApi apiInstance = new FloatIPsApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionFloatIpsGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling FloatIPsApi#regionsRegionFloatIpsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FloatIPsApi;

public class FloatIPsApiExample {

    public static void main(String[] args) {
        FloatIPsApi apiInstance = new FloatIPsApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionFloatIpsGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling FloatIPsApi#regionsRegionFloatIpsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code

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

// List of all Float IPs.
[apiInstance regionsRegionFloatIpsGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.FloatIPsApi()
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new FloatIPsApi();
            var region = region_example;  // String | Region code

            try
            {
                // List of all Float IPs.
                apiInstance.regionsRegionFloatIpsGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FloatIPsApi.regionsRegionFloatIpsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiFloatIPsApi();
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FloatIPsApi->new();
my $region = region_example; # String | Region code

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FloatIPsApi()
region = region_example # String | Region code

try: 
    # List of all Float IPs.
    api_instance.regions_region_float_ips_get(region)
except ApiException as e:
    print("Exception when calling FloatIPsApi->regionsRegionFloatIpsGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - List of all float IPs


regionsRegionFloatIpsIdAttachPatch

Attach a Float IP to a Server.


/regions/{region}/float-ips/{id}/attach

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/float-ips/{id}/attach"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FloatIPsApi;

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

public class FloatIPsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        FloatIPsApi apiInstance = new FloatIPsApi();
        String serverId = serverId_example; // String | 
        String subnetId = subnetId_example; // String | 
        String portId = portId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | Float IP ID.
        try {
            apiInstance.regionsRegionFloatIpsIdAttachPatch(serverId, subnetId, portId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling FloatIPsApi#regionsRegionFloatIpsIdAttachPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FloatIPsApi;

public class FloatIPsApiExample {

    public static void main(String[] args) {
        FloatIPsApi apiInstance = new FloatIPsApi();
        String serverId = serverId_example; // String | 
        String subnetId = subnetId_example; // String | 
        String portId = portId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | Float IP ID.
        try {
            apiInstance.regionsRegionFloatIpsIdAttachPatch(serverId, subnetId, portId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling FloatIPsApi#regionsRegionFloatIpsIdAttachPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *serverId = serverId_example; // 
String *subnetId = subnetId_example; // 
String *portId = portId_example; // 
String *region = region_example; // Region code
String *id = id_example; // Float IP ID.

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

// Attach a Float IP to a Server.
[apiInstance regionsRegionFloatIpsIdAttachPatchWith:serverId
    subnetId:subnetId
    portId:portId
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.FloatIPsApi()
var serverId = serverId_example; // {{String}} 
var subnetId = subnetId_example; // {{String}} 
var portId = portId_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} Float IP ID.

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new FloatIPsApi();
            var serverId = serverId_example;  // String | 
            var subnetId = subnetId_example;  // String | 
            var portId = portId_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | Float IP ID.

            try
            {
                // Attach a Float IP to a Server.
                apiInstance.regionsRegionFloatIpsIdAttachPatch(serverId, subnetId, portId, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FloatIPsApi.regionsRegionFloatIpsIdAttachPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiFloatIPsApi();
$serverId = serverId_example; // String | 
$subnetId = subnetId_example; // String | 
$portId = portId_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | Float IP ID.

try {
    $api_instance->regionsRegionFloatIpsIdAttachPatch($serverId, $subnetId, $portId, $region, $id);
} catch (Exception $e) {
    echo 'Exception when calling FloatIPsApi->regionsRegionFloatIpsIdAttachPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FloatIPsApi;

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FloatIPsApi->new();
my $serverId = serverId_example; # String | 
my $subnetId = subnetId_example; # String | 
my $portId = portId_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | Float IP ID.

eval { 
    $api_instance->regionsRegionFloatIpsIdAttachPatch(serverId => $serverId, subnetId => $subnetId, portId => $portId, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling FloatIPsApi->regionsRegionFloatIpsIdAttachPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FloatIPsApi()
serverId = serverId_example # String | 
subnetId = subnetId_example # String | 
portId = portId_example # String | 
region = region_example # String | Region code
id = id_example # String | Float IP ID.

try: 
    # Attach a Float IP to a Server.
    api_instance.regions_region_float_ips_id_attach_patch(serverId, subnetId, portId, region, id)
except ApiException as e:
    print("Exception when calling FloatIPsApi->regionsRegionFloatIpsIdAttachPatch: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
Float IP ID.
Required
Form parameters
Name Description
server_id*
String
Required
subnet_id*
String
Required
port_id*
String
Required

Responses

Status: 201 - float-ip attached successfully


regionsRegionFloatIpsIdDelete

Delete Float IP.


/regions/{region}/float-ips/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/float-ips/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FloatIPsApi;

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

public class FloatIPsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        FloatIPsApi apiInstance = new FloatIPsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the float-ip
        try {
            apiInstance.regionsRegionFloatIpsIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling FloatIPsApi#regionsRegionFloatIpsIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FloatIPsApi;

public class FloatIPsApiExample {

    public static void main(String[] args) {
        FloatIPsApi apiInstance = new FloatIPsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the float-ip
        try {
            apiInstance.regionsRegionFloatIpsIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling FloatIPsApi#regionsRegionFloatIpsIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the float-ip

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

// Delete Float IP.
[apiInstance regionsRegionFloatIpsIdDeleteWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.FloatIPsApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the float-ip

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new FloatIPsApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the float-ip

            try
            {
                // Delete Float IP.
                apiInstance.regionsRegionFloatIpsIdDelete(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FloatIPsApi.regionsRegionFloatIpsIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiFloatIPsApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the float-ip

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FloatIPsApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the float-ip

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FloatIPsApi()
region = region_example # String | Region code
id = id_example # String | The ID of the float-ip

try: 
    # Delete Float IP.
    api_instance.regions_region_float_ips_id_delete(region, id)
except ApiException as e:
    print("Exception when calling FloatIPsApi->regionsRegionFloatIpsIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the float-ip
Required

Responses

Status: 200 - float-ip deleted successfully


regionsRegionFloatIpsPost

Create new Float IP.


/regions/{region}/float-ips

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/float-ips"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FloatIPsApi;

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

public class FloatIPsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        FloatIPsApi apiInstance = new FloatIPsApi();
        String region = region_example; // String | Region code
        String description = description_example; // String | 
        try {
            apiInstance.regionsRegionFloatIpsPost(region, description);
        } catch (ApiException e) {
            System.err.println("Exception when calling FloatIPsApi#regionsRegionFloatIpsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FloatIPsApi;

public class FloatIPsApiExample {

    public static void main(String[] args) {
        FloatIPsApi apiInstance = new FloatIPsApi();
        String region = region_example; // String | Region code
        String description = description_example; // String | 
        try {
            apiInstance.regionsRegionFloatIpsPost(region, description);
        } catch (ApiException e) {
            System.err.println("Exception when calling FloatIPsApi#regionsRegionFloatIpsPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *description = description_example; //  (optional)

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

// Create new Float IP.
[apiInstance regionsRegionFloatIpsPostWith:region
    description:description
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.FloatIPsApi()
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new FloatIPsApi();
            var region = region_example;  // String | Region code
            var description = description_example;  // String |  (optional) 

            try
            {
                // Create new Float IP.
                apiInstance.regionsRegionFloatIpsPost(region, description);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FloatIPsApi.regionsRegionFloatIpsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiFloatIPsApi();
$region = region_example; // String | Region code
$description = description_example; // String | 

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::FloatIPsApi->new();
my $region = region_example; # String | Region code
my $description = description_example; # String | 

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FloatIPsApi()
region = region_example # String | Region code
description = description_example # String |  (optional)

try: 
    # Create new Float IP.
    api_instance.regions_region_float_ips_post(region, description=description)
except ApiException as e:
    print("Exception when calling FloatIPsApi->regionsRegionFloatIpsPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Form parameters
Name Description
description
String

Responses

Status: 201 - Details of the new float-ip


Images

regionsRegionImagesFileHead

Get upload offset. See https://tus.io/ for more detail.


/regions/{region}/images/{file}

Usage and SDK Samples

curl -X HEAD -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/images/{file}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ImagesApi apiInstance = new ImagesApi();
        String region = region_example; // String | Region code
        String file = file_example; // String | The Id of file
        try {
            apiInstance.regionsRegionImagesFileHead(region, file);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#regionsRegionImagesFileHead");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        String region = region_example; // String | Region code
        String file = file_example; // String | The Id of file
        try {
            apiInstance.regionsRegionImagesFileHead(region, file);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#regionsRegionImagesFileHead");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *file = file_example; // The Id of file

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

// Get upload offset. See https://tus.io/ for more detail.
[apiInstance regionsRegionImagesFileHeadWith:region
    file:file
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ImagesApi()
var region = region_example; // {{String}} Region code
var file = file_example; // {{String}} The Id of file

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ImagesApi();
            var region = region_example;  // String | Region code
            var file = file_example;  // String | The Id of file

            try
            {
                // Get upload offset. See https://tus.io/ for more detail.
                apiInstance.regionsRegionImagesFileHead(region, file);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.regionsRegionImagesFileHead: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiImagesApi();
$region = region_example; // String | Region code
$file = file_example; // String | The Id of file

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $region = region_example; # String | Region code
my $file = file_example; # String | The Id of file

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
region = region_example # String | Region code
file = file_example # String | The Id of file

try: 
    # Get upload offset. See https://tus.io/ for more detail.
    api_instance.regions_region_images_file_head(region, file)
except ApiException as e:
    print("Exception when calling ImagesApi->regionsRegionImagesFileHead: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
file*
String
The Id of file
Required

Responses

Status: 200 - Return image upload offset

Status: 404 - Image not found


regionsRegionImagesFilePatch

Upload and apply bytes to a Image file. See https://tus.io/ for more detail.


/regions/{region}/images/{file}

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/images/{file}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ImagesApi apiInstance = new ImagesApi();
        String region = region_example; // String | Region code
        String file = file_example; // String | The Id of file
        String tusResumable = tusResumable_example; // String | version of tus.io
        Integer uploadOffset = 56; // Integer | request and response header indicates a byte offset within a resource.
     * For uploading entire file in one request, set this to '0'
        String contentType = contentType_example; // String | Request content type
        try {
            apiInstance.regionsRegionImagesFilePatch(region, file, tusResumable, uploadOffset, contentType);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#regionsRegionImagesFilePatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        String region = region_example; // String | Region code
        String file = file_example; // String | The Id of file
        String tusResumable = tusResumable_example; // String | version of tus.io
        Integer uploadOffset = 56; // Integer | request and response header indicates a byte offset within a resource.
     * For uploading entire file in one request, set this to '0'
        String contentType = contentType_example; // String | Request content type
        try {
            apiInstance.regionsRegionImagesFilePatch(region, file, tusResumable, uploadOffset, contentType);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#regionsRegionImagesFilePatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *file = file_example; // The Id of file
String *tusResumable = tusResumable_example; // version of tus.io
Integer *uploadOffset = 56; // request and response header indicates a byte offset within a resource.
     * For uploading entire file in one request, set this to '0'
String *contentType = contentType_example; // Request content type

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

// Upload and apply bytes to a Image file. See https://tus.io/ for more detail.
[apiInstance regionsRegionImagesFilePatchWith:region
    file:file
    tusResumable:tusResumable
    uploadOffset:uploadOffset
    contentType:contentType
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ImagesApi()
var region = region_example; // {{String}} Region code
var file = file_example; // {{String}} The Id of file
var tusResumable = tusResumable_example; // {{String}} version of tus.io
var uploadOffset = 56; // {{Integer}} request and response header indicates a byte offset within a resource.
     * For uploading entire file in one request, set this to '0'
var contentType = contentType_example; // {{String}} Request content type

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.regionsRegionImagesFilePatch(region, file, tusResumable, uploadOffset, contentType, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ImagesApi();
            var region = region_example;  // String | Region code
            var file = file_example;  // String | The Id of file
            var tusResumable = tusResumable_example;  // String | version of tus.io
            var uploadOffset = 56;  // Integer | request and response header indicates a byte offset within a resource.
     * For uploading entire file in one request, set this to '0'
            var contentType = contentType_example;  // String | Request content type

            try
            {
                // Upload and apply bytes to a Image file. See https://tus.io/ for more detail.
                apiInstance.regionsRegionImagesFilePatch(region, file, tusResumable, uploadOffset, contentType);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.regionsRegionImagesFilePatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiImagesApi();
$region = region_example; // String | Region code
$file = file_example; // String | The Id of file
$tusResumable = tusResumable_example; // String | version of tus.io
$uploadOffset = 56; // Integer | request and response header indicates a byte offset within a resource.
     * For uploading entire file in one request, set this to '0'
$contentType = contentType_example; // String | Request content type

try {
    $api_instance->regionsRegionImagesFilePatch($region, $file, $tusResumable, $uploadOffset, $contentType);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->regionsRegionImagesFilePatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ImagesApi;

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $region = region_example; # String | Region code
my $file = file_example; # String | The Id of file
my $tusResumable = tusResumable_example; # String | version of tus.io
my $uploadOffset = 56; # Integer | request and response header indicates a byte offset within a resource.
     * For uploading entire file in one request, set this to '0'
my $contentType = contentType_example; # String | Request content type

eval { 
    $api_instance->regionsRegionImagesFilePatch(region => $region, file => $file, tusResumable => $tusResumable, uploadOffset => $uploadOffset, contentType => $contentType);
};
if ($@) {
    warn "Exception when calling ImagesApi->regionsRegionImagesFilePatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
region = region_example # String | Region code
file = file_example # String | The Id of file
tusResumable = tusResumable_example # String | version of tus.io
uploadOffset = 56 # Integer | request and response header indicates a byte offset within a resource.
     * For uploading entire file in one request, set this to '0'
contentType = contentType_example # String | Request content type

try: 
    # Upload and apply bytes to a Image file. See https://tus.io/ for more detail.
    api_instance.regions_region_images_file_patch(region, file, tusResumable, uploadOffset, contentType)
except ApiException as e:
    print("Exception when calling ImagesApi->regionsRegionImagesFilePatch: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
file*
String
The Id of file
Required
Header parameters
Name Description
tus-resumable*
String
version of tus.io
Required
upload-offset*
Integer
request and response header indicates a byte offset within a resource. * For uploading entire file in one request, set this to '0'
Required
Content-Type*
String
Request content type
Required

Responses

Status: 204 - Acknowledge successful upload and apply bytes to image

Status: 404 - Image not found


regionsRegionImagesGet

List of all Images.


/regions/{region}/images

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/images?type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ImagesApi apiInstance = new ImagesApi();
        String region = region_example; // String | Region code
        String type = type_example; // String | Image type; server, snapshot or distributions
        try {
            apiInstance.regionsRegionImagesGet(region, type);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#regionsRegionImagesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        String region = region_example; // String | Region code
        String type = type_example; // String | Image type; server, snapshot or distributions
        try {
            apiInstance.regionsRegionImagesGet(region, type);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#regionsRegionImagesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *type = type_example; // Image type; server, snapshot or distributions (optional)

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

// List of all Images.
[apiInstance regionsRegionImagesGetWith:region
    type:type
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ImagesApi()
var region = region_example; // {{String}} Region code
var opts = { 
  'type': type_example // {{String}} Image type; server, snapshot or distributions
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.regionsRegionImagesGet(region, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ImagesApi();
            var region = region_example;  // String | Region code
            var type = type_example;  // String | Image type; server, snapshot or distributions (optional) 

            try
            {
                // List of all Images.
                apiInstance.regionsRegionImagesGet(region, type);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.regionsRegionImagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiImagesApi();
$region = region_example; // String | Region code
$type = type_example; // String | Image type; server, snapshot or distributions

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $region = region_example; # String | Region code
my $type = type_example; # String | Image type; server, snapshot or distributions

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
region = region_example # String | Region code
type = type_example # String | Image type; server, snapshot or distributions (optional)

try: 
    # List of all Images.
    api_instance.regions_region_images_get(region, type=type)
except ApiException as e:
    print("Exception when calling ImagesApi->regionsRegionImagesGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Query parameters
Name Description
type
String
Image type; server, snapshot or distributions

Responses

Status: 200 - List of all images accessible for user


regionsRegionImagesIdDelete

Delete an Image.


/regions/{region}/images/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/images/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ImagesApi apiInstance = new ImagesApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the image
        try {
            apiInstance.regionsRegionImagesIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#regionsRegionImagesIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the image
        try {
            apiInstance.regionsRegionImagesIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#regionsRegionImagesIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the image

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

// Delete an Image.
[apiInstance regionsRegionImagesIdDeleteWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ImagesApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the image

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ImagesApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the image

            try
            {
                // Delete an Image.
                apiInstance.regionsRegionImagesIdDelete(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.regionsRegionImagesIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiImagesApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the image

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the image

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
region = region_example # String | Region code
id = id_example # String | The ID of the image

try: 
    # Delete an Image.
    api_instance.regions_region_images_id_delete(region, id)
except ApiException as e:
    print("Exception when calling ImagesApi->regionsRegionImagesIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the image
Required

Responses

Status: 200 - Delete an image


regionsRegionImagesPost

Request a new upload Image. See https://tus.io/ for more detail.


/regions/{region}/images

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/images"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ImagesApi;

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

public class ImagesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ImagesApi apiInstance = new ImagesApi();
        String region = region_example; // String | Region code
        String tusResumable = tusResumable_example; // String | version of tus.io
        Integer uploadLength = 56; // Integer | To indicate the size of entire upload in bytes
        String uploadMetadata = uploadMetadata_example; // String | To add additional metadata to the upload creation request.
     * MUST contain 'filename', 'filetype' and 'data'. From all available fields only these two fields will be used.
     * MUST consist of one or more comma-separated key-value pairs.
     * The key and value MUST be separated by a space.
     * The key MUST NOT contain spaces and commas and MUST NOT be empty.
     * The key SHOULD be ASCII encoded and the value MUST be Base64 encoded.
     * Data key SHOULD base64 encoded of a json variables from 'name', 'disk_format', 'min_disk' and 'min_ram'
        try {
            apiInstance.regionsRegionImagesPost(region, tusResumable, uploadLength, uploadMetadata);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#regionsRegionImagesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ImagesApi;

public class ImagesApiExample {

    public static void main(String[] args) {
        ImagesApi apiInstance = new ImagesApi();
        String region = region_example; // String | Region code
        String tusResumable = tusResumable_example; // String | version of tus.io
        Integer uploadLength = 56; // Integer | To indicate the size of entire upload in bytes
        String uploadMetadata = uploadMetadata_example; // String | To add additional metadata to the upload creation request.
     * MUST contain 'filename', 'filetype' and 'data'. From all available fields only these two fields will be used.
     * MUST consist of one or more comma-separated key-value pairs.
     * The key and value MUST be separated by a space.
     * The key MUST NOT contain spaces and commas and MUST NOT be empty.
     * The key SHOULD be ASCII encoded and the value MUST be Base64 encoded.
     * Data key SHOULD base64 encoded of a json variables from 'name', 'disk_format', 'min_disk' and 'min_ram'
        try {
            apiInstance.regionsRegionImagesPost(region, tusResumable, uploadLength, uploadMetadata);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImagesApi#regionsRegionImagesPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *tusResumable = tusResumable_example; // version of tus.io
Integer *uploadLength = 56; // To indicate the size of entire upload in bytes
String *uploadMetadata = uploadMetadata_example; // To add additional metadata to the upload creation request.
     * MUST contain 'filename', 'filetype' and 'data'. From all available fields only these two fields will be used.
     * MUST consist of one or more comma-separated key-value pairs.
     * The key and value MUST be separated by a space.
     * The key MUST NOT contain spaces and commas and MUST NOT be empty.
     * The key SHOULD be ASCII encoded and the value MUST be Base64 encoded.
     * Data key SHOULD base64 encoded of a json variables from 'name', 'disk_format', 'min_disk' and 'min_ram'

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

// Request a new upload Image. See https://tus.io/ for more detail.
[apiInstance regionsRegionImagesPostWith:region
    tusResumable:tusResumable
    uploadLength:uploadLength
    uploadMetadata:uploadMetadata
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ImagesApi()
var region = region_example; // {{String}} Region code
var tusResumable = tusResumable_example; // {{String}} version of tus.io
var uploadLength = 56; // {{Integer}} To indicate the size of entire upload in bytes
var uploadMetadata = uploadMetadata_example; // {{String}} To add additional metadata to the upload creation request.
     * MUST contain 'filename', 'filetype' and 'data'. From all available fields only these two fields will be used.
     * MUST consist of one or more comma-separated key-value pairs.
     * The key and value MUST be separated by a space.
     * The key MUST NOT contain spaces and commas and MUST NOT be empty.
     * The key SHOULD be ASCII encoded and the value MUST be Base64 encoded.
     * Data key SHOULD base64 encoded of a json variables from 'name', 'disk_format', 'min_disk' and 'min_ram'

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ImagesApi();
            var region = region_example;  // String | Region code
            var tusResumable = tusResumable_example;  // String | version of tus.io
            var uploadLength = 56;  // Integer | To indicate the size of entire upload in bytes
            var uploadMetadata = uploadMetadata_example;  // String | To add additional metadata to the upload creation request.
     * MUST contain 'filename', 'filetype' and 'data'. From all available fields only these two fields will be used.
     * MUST consist of one or more comma-separated key-value pairs.
     * The key and value MUST be separated by a space.
     * The key MUST NOT contain spaces and commas and MUST NOT be empty.
     * The key SHOULD be ASCII encoded and the value MUST be Base64 encoded.
     * Data key SHOULD base64 encoded of a json variables from 'name', 'disk_format', 'min_disk' and 'min_ram'

            try
            {
                // Request a new upload Image. See https://tus.io/ for more detail.
                apiInstance.regionsRegionImagesPost(region, tusResumable, uploadLength, uploadMetadata);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ImagesApi.regionsRegionImagesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiImagesApi();
$region = region_example; // String | Region code
$tusResumable = tusResumable_example; // String | version of tus.io
$uploadLength = 56; // Integer | To indicate the size of entire upload in bytes
$uploadMetadata = uploadMetadata_example; // String | To add additional metadata to the upload creation request.
     * MUST contain 'filename', 'filetype' and 'data'. From all available fields only these two fields will be used.
     * MUST consist of one or more comma-separated key-value pairs.
     * The key and value MUST be separated by a space.
     * The key MUST NOT contain spaces and commas and MUST NOT be empty.
     * The key SHOULD be ASCII encoded and the value MUST be Base64 encoded.
     * Data key SHOULD base64 encoded of a json variables from 'name', 'disk_format', 'min_disk' and 'min_ram'

try {
    $api_instance->regionsRegionImagesPost($region, $tusResumable, $uploadLength, $uploadMetadata);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->regionsRegionImagesPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ImagesApi;

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ImagesApi->new();
my $region = region_example; # String | Region code
my $tusResumable = tusResumable_example; # String | version of tus.io
my $uploadLength = 56; # Integer | To indicate the size of entire upload in bytes
my $uploadMetadata = uploadMetadata_example; # String | To add additional metadata to the upload creation request.
     * MUST contain 'filename', 'filetype' and 'data'. From all available fields only these two fields will be used.
     * MUST consist of one or more comma-separated key-value pairs.
     * The key and value MUST be separated by a space.
     * The key MUST NOT contain spaces and commas and MUST NOT be empty.
     * The key SHOULD be ASCII encoded and the value MUST be Base64 encoded.
     * Data key SHOULD base64 encoded of a json variables from 'name', 'disk_format', 'min_disk' and 'min_ram'

eval { 
    $api_instance->regionsRegionImagesPost(region => $region, tusResumable => $tusResumable, uploadLength => $uploadLength, uploadMetadata => $uploadMetadata);
};
if ($@) {
    warn "Exception when calling ImagesApi->regionsRegionImagesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ImagesApi()
region = region_example # String | Region code
tusResumable = tusResumable_example # String | version of tus.io
uploadLength = 56 # Integer | To indicate the size of entire upload in bytes
uploadMetadata = uploadMetadata_example # String | To add additional metadata to the upload creation request.
     * MUST contain 'filename', 'filetype' and 'data'. From all available fields only these two fields will be used.
     * MUST consist of one or more comma-separated key-value pairs.
     * The key and value MUST be separated by a space.
     * The key MUST NOT contain spaces and commas and MUST NOT be empty.
     * The key SHOULD be ASCII encoded and the value MUST be Base64 encoded.
     * Data key SHOULD base64 encoded of a json variables from 'name', 'disk_format', 'min_disk' and 'min_ram'

try: 
    # Request a new upload Image. See https://tus.io/ for more detail.
    api_instance.regions_region_images_post(region, tusResumable, uploadLength, uploadMetadata)
except ApiException as e:
    print("Exception when calling ImagesApi->regionsRegionImagesPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Header parameters
Name Description
tus-resumable*
String
version of tus.io
Required
upload-length*
Integer
To indicate the size of entire upload in bytes
Required
upload-metadata*
String
To add additional metadata to the upload creation request. * MUST contain 'filename', 'filetype' and 'data'. From all available fields only these two fields will be used. * MUST consist of one or more comma-separated key-value pairs. * The key and value MUST be separated by a space. * The key MUST NOT contain spaces and commas and MUST NOT be empty. * The key SHOULD be ASCII encoded and the value MUST be Base64 encoded. * Data key SHOULD base64 encoded of a json variables from 'name', 'disk_format', 'min_disk' and 'min_ram'
Required

Responses

Status: 201 - Image created successfully


Networks

regionsRegionNetworksGet

List of Networks and details.


/regions/{region}/networks

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/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) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        NetworksApi apiInstance = new NetworksApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionNetworksGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionNetworksGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionNetworksGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionNetworksGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code

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

// List of Networks and details.
[apiInstance regionsRegionNetworksGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.NetworksApi()
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new NetworksApi();
            var region = region_example;  // String | Region code

            try
            {
                // List of Networks and details.
                apiInstance.regionsRegionNetworksGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.regionsRegionNetworksGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiNetworksApi();
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $region = region_example; # String | Region code

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
region = region_example # String | Region code

try: 
    # List of Networks and details.
    api_instance.regions_region_networks_get(region)
except ApiException as e:
    print("Exception when calling NetworksApi->regionsRegionNetworksGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - List of all networks


regionsRegionNetworksIdAttachPatch

Attach a Network to a Server.


/regions/{region}/networks/{id}/attach

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/networks/{id}/attach"
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) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        NetworksApi apiInstance = new NetworksApi();
        String serverId = serverId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | Network ID
        try {
            apiInstance.regionsRegionNetworksIdAttachPatch(serverId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionNetworksIdAttachPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        String serverId = serverId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | Network ID
        try {
            apiInstance.regionsRegionNetworksIdAttachPatch(serverId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionNetworksIdAttachPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *serverId = serverId_example; // 
String *region = region_example; // Region code
String *id = id_example; // Network ID

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

// Attach a Network to a Server.
[apiInstance regionsRegionNetworksIdAttachPatchWith:serverId
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.NetworksApi()
var serverId = serverId_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} Network ID

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new NetworksApi();
            var serverId = serverId_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | Network ID

            try
            {
                // Attach a Network to a Server.
                apiInstance.regionsRegionNetworksIdAttachPatch(serverId, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.regionsRegionNetworksIdAttachPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiNetworksApi();
$serverId = serverId_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | Network ID

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $serverId = serverId_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | Network ID

eval { 
    $api_instance->regionsRegionNetworksIdAttachPatch(serverId => $serverId, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling NetworksApi->regionsRegionNetworksIdAttachPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
serverId = serverId_example # String | 
region = region_example # String | Region code
id = id_example # String | Network ID

try: 
    # Attach a Network to a Server.
    api_instance.regions_region_networks_id_attach_patch(serverId, region, id)
except ApiException as e:
    print("Exception when calling NetworksApi->regionsRegionNetworksIdAttachPatch: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
Network ID
Required
Form parameters
Name Description
server_id*
String
Required

Responses

Status: 200 - Network attached successfully


regionsRegionNetworksIdDetachPatch

Detach a Network from a Server.


/regions/{region}/networks/{id}/detach

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/networks/{id}/detach"
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) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        NetworksApi apiInstance = new NetworksApi();
        String serverId = serverId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | Network ID
        try {
            apiInstance.regionsRegionNetworksIdDetachPatch(serverId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionNetworksIdDetachPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        String serverId = serverId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | Network ID
        try {
            apiInstance.regionsRegionNetworksIdDetachPatch(serverId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionNetworksIdDetachPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *serverId = serverId_example; // 
String *region = region_example; // Region code
String *id = id_example; // Network ID

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

// Detach a Network from a Server.
[apiInstance regionsRegionNetworksIdDetachPatchWith:serverId
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.NetworksApi()
var serverId = serverId_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} Network ID

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new NetworksApi();
            var serverId = serverId_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | Network ID

            try
            {
                // Detach a Network from a Server.
                apiInstance.regionsRegionNetworksIdDetachPatch(serverId, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.regionsRegionNetworksIdDetachPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiNetworksApi();
$serverId = serverId_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | Network ID

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $serverId = serverId_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | Network ID

eval { 
    $api_instance->regionsRegionNetworksIdDetachPatch(serverId => $serverId, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling NetworksApi->regionsRegionNetworksIdDetachPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
serverId = serverId_example # String | 
region = region_example # String | Region code
id = id_example # String | Network ID

try: 
    # Detach a Network from a Server.
    api_instance.regions_region_networks_id_detach_patch(serverId, region, id)
except ApiException as e:
    print("Exception when calling NetworksApi->regionsRegionNetworksIdDetachPatch: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
Network ID
Required
Form parameters
Name Description
server_id*
String
Required

Responses

Status: 200 - Network detached successfully


regionsRegionSubnetsIdDelete

Delete Subnet.


/regions/{region}/subnets/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/subnets/{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) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        NetworksApi apiInstance = new NetworksApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | ID of subnet
        try {
            apiInstance.regionsRegionSubnetsIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionSubnetsIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | ID of subnet
        try {
            apiInstance.regionsRegionSubnetsIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionSubnetsIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // ID of subnet

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

// Delete Subnet.
[apiInstance regionsRegionSubnetsIdDeleteWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.NetworksApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} ID of subnet

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new NetworksApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | ID of subnet

            try
            {
                // Delete Subnet.
                apiInstance.regionsRegionSubnetsIdDelete(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.regionsRegionSubnetsIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiNetworksApi();
$region = region_example; // String | Region code
$id = id_example; // String | ID of subnet

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | ID of subnet

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
region = region_example # String | Region code
id = id_example # String | ID of subnet

try: 
    # Delete Subnet.
    api_instance.regions_region_subnets_id_delete(region, id)
except ApiException as e:
    print("Exception when calling NetworksApi->regionsRegionSubnetsIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
ID of subnet
Required

Responses

Status: 200 - Subnet deleted successfully


regionsRegionSubnetsIdGet

Get Subnet details.


/regions/{region}/subnets/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/subnets/{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) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        NetworksApi apiInstance = new NetworksApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | ID of subnet
        try {
            apiInstance.regionsRegionSubnetsIdGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionSubnetsIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | ID of subnet
        try {
            apiInstance.regionsRegionSubnetsIdGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionSubnetsIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // ID of subnet

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

// Get Subnet details.
[apiInstance regionsRegionSubnetsIdGetWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.NetworksApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} ID of subnet

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new NetworksApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | ID of subnet

            try
            {
                // Get Subnet details.
                apiInstance.regionsRegionSubnetsIdGet(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.regionsRegionSubnetsIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiNetworksApi();
$region = region_example; // String | Region code
$id = id_example; // String | ID of subnet

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | ID of subnet

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
region = region_example # String | Region code
id = id_example # String | ID of subnet

try: 
    # Get Subnet details.
    api_instance.regions_region_subnets_id_get(region, id)
except ApiException as e:
    print("Exception when calling NetworksApi->regionsRegionSubnetsIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
ID of subnet
Required

Responses

Status: 200 - List of all subnet details


regionsRegionSubnetsIdPatch

Update the Subnet.


/regions/{region}/subnets/{id}

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/subnets/{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) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        NetworksApi apiInstance = new NetworksApi();
        String name = name_example; // String | 
        String subnetIp = subnetIp_example; // String | 
        Boolean enableGateway = true; // Boolean | 
        String subnetGateway = subnetGateway_example; // String | 
        String dhcp = dhcp_example; // String | 
        String dnsServers = dnsServers_example; // String | 
        String dnsRoutes = dnsRoutes_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | ID of subnet
        try {
            apiInstance.regionsRegionSubnetsIdPatch(name, subnetIp, enableGateway, subnetGateway, dhcp, dnsServers, dnsRoutes, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionSubnetsIdPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        String name = name_example; // String | 
        String subnetIp = subnetIp_example; // String | 
        Boolean enableGateway = true; // Boolean | 
        String subnetGateway = subnetGateway_example; // String | 
        String dhcp = dhcp_example; // String | 
        String dnsServers = dnsServers_example; // String | 
        String dnsRoutes = dnsRoutes_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | ID of subnet
        try {
            apiInstance.regionsRegionSubnetsIdPatch(name, subnetIp, enableGateway, subnetGateway, dhcp, dnsServers, dnsRoutes, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionSubnetsIdPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *name = name_example; // 
String *subnetIp = subnetIp_example; // 
Boolean *enableGateway = true; // 
String *subnetGateway = subnetGateway_example; // 
String *dhcp = dhcp_example; // 
String *dnsServers = dnsServers_example; // 
String *dnsRoutes = dnsRoutes_example; // 
String *region = region_example; // Region code
String *id = id_example; // ID of subnet

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

// Update the Subnet.
[apiInstance regionsRegionSubnetsIdPatchWith:name
    subnetIp:subnetIp
    enableGateway:enableGateway
    subnetGateway:subnetGateway
    dhcp:dhcp
    dnsServers:dnsServers
    dnsRoutes:dnsRoutes
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.NetworksApi()
var name = name_example; // {{String}} 
var subnetIp = subnetIp_example; // {{String}} 
var enableGateway = true; // {{Boolean}} 
var subnetGateway = subnetGateway_example; // {{String}} 
var dhcp = dhcp_example; // {{String}} 
var dnsServers = dnsServers_example; // {{String}} 
var dnsRoutes = dnsRoutes_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} ID of subnet

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new NetworksApi();
            var name = name_example;  // String | 
            var subnetIp = subnetIp_example;  // String | 
            var enableGateway = true;  // Boolean | 
            var subnetGateway = subnetGateway_example;  // String | 
            var dhcp = dhcp_example;  // String | 
            var dnsServers = dnsServers_example;  // String | 
            var dnsRoutes = dnsRoutes_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | ID of subnet

            try
            {
                // Update the Subnet.
                apiInstance.regionsRegionSubnetsIdPatch(name, subnetIp, enableGateway, subnetGateway, dhcp, dnsServers, dnsRoutes, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.regionsRegionSubnetsIdPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiNetworksApi();
$name = name_example; // String | 
$subnetIp = subnetIp_example; // String | 
$enableGateway = true; // Boolean | 
$subnetGateway = subnetGateway_example; // String | 
$dhcp = dhcp_example; // String | 
$dnsServers = dnsServers_example; // String | 
$dnsRoutes = dnsRoutes_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | ID of subnet

try {
    $api_instance->regionsRegionSubnetsIdPatch($name, $subnetIp, $enableGateway, $subnetGateway, $dhcp, $dnsServers, $dnsRoutes, $region, $id);
} catch (Exception $e) {
    echo 'Exception when calling NetworksApi->regionsRegionSubnetsIdPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NetworksApi;

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $name = name_example; # String | 
my $subnetIp = subnetIp_example; # String | 
my $enableGateway = true; # Boolean | 
my $subnetGateway = subnetGateway_example; # String | 
my $dhcp = dhcp_example; # String | 
my $dnsServers = dnsServers_example; # String | 
my $dnsRoutes = dnsRoutes_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | ID of subnet

eval { 
    $api_instance->regionsRegionSubnetsIdPatch(name => $name, subnetIp => $subnetIp, enableGateway => $enableGateway, subnetGateway => $subnetGateway, dhcp => $dhcp, dnsServers => $dnsServers, dnsRoutes => $dnsRoutes, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling NetworksApi->regionsRegionSubnetsIdPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
name = name_example # String | 
subnetIp = subnetIp_example # String | 
enableGateway = true # Boolean | 
subnetGateway = subnetGateway_example # String | 
dhcp = dhcp_example # String | 
dnsServers = dnsServers_example # String | 
dnsRoutes = dnsRoutes_example # String | 
region = region_example # String | Region code
id = id_example # String | ID of subnet

try: 
    # Update the Subnet.
    api_instance.regions_region_subnets_id_patch(name, subnetIp, enableGateway, subnetGateway, dhcp, dnsServers, dnsRoutes, region, id)
except ApiException as e:
    print("Exception when calling NetworksApi->regionsRegionSubnetsIdPatch: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
ID of subnet
Required
Form parameters
Name Description
name*
String
Required
subnet_ip*
String
Required
enable_gateway*
Boolean
Required
subnet_gateway*
String
Required
dhcp*
String
Required
dns_servers*
String
Required
dns_routes*
String
Required

Responses

Status: 200 - Subnet updated successfully


regionsRegionSubnetsPost

Create new Subnet.


/regions/{region}/subnets

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/subnets"
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) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        NetworksApi apiInstance = new NetworksApi();
        String name = name_example; // String | 
        String subnetIp = subnetIp_example; // String | 
        Boolean enableGateway = true; // Boolean | 
        String subnetGateway = subnetGateway_example; // String | 
        String dhcp = dhcp_example; // String | 
        String dnsServers = dnsServers_example; // String | 
        String dnsRoutes = dnsRoutes_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSubnetsPost(name, subnetIp, enableGateway, subnetGateway, dhcp, dnsServers, dnsRoutes, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionSubnetsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NetworksApi;

public class NetworksApiExample {

    public static void main(String[] args) {
        NetworksApi apiInstance = new NetworksApi();
        String name = name_example; // String | 
        String subnetIp = subnetIp_example; // String | 
        Boolean enableGateway = true; // Boolean | 
        String subnetGateway = subnetGateway_example; // String | 
        String dhcp = dhcp_example; // String | 
        String dnsServers = dnsServers_example; // String | 
        String dnsRoutes = dnsRoutes_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSubnetsPost(name, subnetIp, enableGateway, subnetGateway, dhcp, dnsServers, dnsRoutes, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling NetworksApi#regionsRegionSubnetsPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *name = name_example; // 
String *subnetIp = subnetIp_example; // 
Boolean *enableGateway = true; // 
String *subnetGateway = subnetGateway_example; // 
String *dhcp = dhcp_example; // 
String *dnsServers = dnsServers_example; // 
String *dnsRoutes = dnsRoutes_example; // 
String *region = region_example; // Region code

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

// Create new Subnet.
[apiInstance regionsRegionSubnetsPostWith:name
    subnetIp:subnetIp
    enableGateway:enableGateway
    subnetGateway:subnetGateway
    dhcp:dhcp
    dnsServers:dnsServers
    dnsRoutes:dnsRoutes
    region:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.NetworksApi()
var name = name_example; // {{String}} 
var subnetIp = subnetIp_example; // {{String}} 
var enableGateway = true; // {{Boolean}} 
var subnetGateway = subnetGateway_example; // {{String}} 
var dhcp = dhcp_example; // {{String}} 
var dnsServers = dnsServers_example; // {{String}} 
var dnsRoutes = dnsRoutes_example; // {{String}} 
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new NetworksApi();
            var name = name_example;  // String | 
            var subnetIp = subnetIp_example;  // String | 
            var enableGateway = true;  // Boolean | 
            var subnetGateway = subnetGateway_example;  // String | 
            var dhcp = dhcp_example;  // String | 
            var dnsServers = dnsServers_example;  // String | 
            var dnsRoutes = dnsRoutes_example;  // String | 
            var region = region_example;  // String | Region code

            try
            {
                // Create new Subnet.
                apiInstance.regionsRegionSubnetsPost(name, subnetIp, enableGateway, subnetGateway, dhcp, dnsServers, dnsRoutes, region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NetworksApi.regionsRegionSubnetsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiNetworksApi();
$name = name_example; // String | 
$subnetIp = subnetIp_example; // String | 
$enableGateway = true; // Boolean | 
$subnetGateway = subnetGateway_example; // String | 
$dhcp = dhcp_example; // String | 
$dnsServers = dnsServers_example; // String | 
$dnsRoutes = dnsRoutes_example; // String | 
$region = region_example; // String | Region code

try {
    $api_instance->regionsRegionSubnetsPost($name, $subnetIp, $enableGateway, $subnetGateway, $dhcp, $dnsServers, $dnsRoutes, $region);
} catch (Exception $e) {
    echo 'Exception when calling NetworksApi->regionsRegionSubnetsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NetworksApi;

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::NetworksApi->new();
my $name = name_example; # String | 
my $subnetIp = subnetIp_example; # String | 
my $enableGateway = true; # Boolean | 
my $subnetGateway = subnetGateway_example; # String | 
my $dhcp = dhcp_example; # String | 
my $dnsServers = dnsServers_example; # String | 
my $dnsRoutes = dnsRoutes_example; # String | 
my $region = region_example; # String | Region code

eval { 
    $api_instance->regionsRegionSubnetsPost(name => $name, subnetIp => $subnetIp, enableGateway => $enableGateway, subnetGateway => $subnetGateway, dhcp => $dhcp, dnsServers => $dnsServers, dnsRoutes => $dnsRoutes, region => $region);
};
if ($@) {
    warn "Exception when calling NetworksApi->regionsRegionSubnetsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.NetworksApi()
name = name_example # String | 
subnetIp = subnetIp_example # String | 
enableGateway = true # Boolean | 
subnetGateway = subnetGateway_example # String | 
dhcp = dhcp_example # String | 
dnsServers = dnsServers_example # String | 
dnsRoutes = dnsRoutes_example # String | 
region = region_example # String | Region code

try: 
    # Create new Subnet.
    api_instance.regions_region_subnets_post(name, subnetIp, enableGateway, subnetGateway, dhcp, dnsServers, dnsRoutes, region)
except ApiException as e:
    print("Exception when calling NetworksApi->regionsRegionSubnetsPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Form parameters
Name Description
name*
String
Required
subnet_ip*
String
Required
enable_gateway*
Boolean
Required
subnet_gateway*
String
Required
dhcp*
String
Required
dns_servers*
String
Required
dns_routes*
String
Required

Responses

Status: 201 - Details of the new subnet


Quota

regionsRegionQuotaGet

List of quota for the account.


/regions/{region}/quota

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/quota"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QuotaApi;

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

public class QuotaApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        QuotaApi apiInstance = new QuotaApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionQuotaGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotaApi#regionsRegionQuotaGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QuotaApi;

public class QuotaApiExample {

    public static void main(String[] args) {
        QuotaApi apiInstance = new QuotaApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionQuotaGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling QuotaApi#regionsRegionQuotaGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code

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

// List of quota for the account.
[apiInstance regionsRegionQuotaGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.QuotaApi()
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new QuotaApi();
            var region = region_example;  // String | Region code

            try
            {
                // List of quota for the account.
                apiInstance.regionsRegionQuotaGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QuotaApi.regionsRegionQuotaGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiQuotaApi();
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::QuotaApi->new();
my $region = region_example; # String | Region code

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.QuotaApi()
region = region_example # String | Region code

try: 
    # List of quota for the account.
    api_instance.regions_region_quota_get(region)
except ApiException as e:
    print("Exception when calling QuotaApi->regionsRegionQuotaGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - List of all limits for the account


Regions

regionsGet

List of all regions.


/regions

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RegionsApi;

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

public class RegionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        RegionsApi apiInstance = new RegionsApi();
        try {
            apiInstance.regionsGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RegionsApi#regionsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RegionsApi;

public class RegionsApiExample {

    public static void main(String[] args) {
        RegionsApi apiInstance = new RegionsApi();
        try {
            apiInstance.regionsGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RegionsApi#regionsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

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

// List of all regions.
[apiInstance regionsGetWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new RegionsApi();

            try
            {
                // List of all regions.
                apiInstance.regionsGet();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RegionsApi.regionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

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

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

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

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

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

try: 
    # List of all regions.
    api_instance.regions_get()
except ApiException as e:
    print("Exception when calling RegionsApi->regionsGet: %s\n" % e)

Parameters

Responses

Status: 200 - List of all regions


Reports

regionsRegionReportsGet

List of all resource reports.


/regions/{region}/reports

Usage and SDK Samples

curl -X GET "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/reports"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReportsApi;

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

public class ReportsApiExample {

    public static void main(String[] args) {
        
        ReportsApi apiInstance = new ReportsApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionReportsGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportsApi#regionsRegionReportsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReportsApi;

public class ReportsApiExample {

    public static void main(String[] args) {
        ReportsApi apiInstance = new ReportsApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionReportsGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportsApi#regionsRegionReportsGet");
            e.printStackTrace();
        }
    }
}
String *region = region_example; // Region code

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

// List of all resource reports.
[apiInstance regionsRegionReportsGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');

var api = new ArvanCloudEccService.ReportsApi()
var region = region_example; // {{String}} Region code

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

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

            var apiInstance = new ReportsApi();
            var region = region_example;  // String | Region code

            try
            {
                // List of all resource reports.
                apiInstance.regionsRegionReportsGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReportsApi.regionsRegionReportsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiReportsApi();
$region = region_example; // String | Region code

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

my $api_instance = WWW::SwaggerClient::ReportsApi->new();
my $region = region_example; # String | Region code

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

# create an instance of the API class
api_instance = swagger_client.ReportsApi()
region = region_example # String | Region code

try: 
    # List of all resource reports.
    api_instance.regions_region_reports_get(region)
except ApiException as e:
    print("Exception when calling ReportsApi->regionsRegionReportsGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - List of all type resources


SSHKeys

regionsRegionSshKeysGet

List of all SSH Keys.


/regions/{region}/ssh-keys/

Usage and SDK Samples

curl -X GET "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/ssh-keys/"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SSHKeysApi;

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

public class SSHKeysApiExample {

    public static void main(String[] args) {
        
        SSHKeysApi apiInstance = new SSHKeysApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSshKeysGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSHKeysApi#regionsRegionSshKeysGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SSHKeysApi;

public class SSHKeysApiExample {

    public static void main(String[] args) {
        SSHKeysApi apiInstance = new SSHKeysApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSshKeysGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSHKeysApi#regionsRegionSshKeysGet");
            e.printStackTrace();
        }
    }
}
String *region = region_example; // Region code

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

// List of all SSH Keys.
[apiInstance regionsRegionSshKeysGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');

var api = new ArvanCloudEccService.SSHKeysApi()
var region = region_example; // {{String}} Region code

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

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

            var apiInstance = new SSHKeysApi();
            var region = region_example;  // String | Region code

            try
            {
                // List of all SSH Keys.
                apiInstance.regionsRegionSshKeysGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SSHKeysApi.regionsRegionSshKeysGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSSHKeysApi();
$region = region_example; // String | Region code

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

my $api_instance = WWW::SwaggerClient::SSHKeysApi->new();
my $region = region_example; # String | Region code

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

# create an instance of the API class
api_instance = swagger_client.SSHKeysApi()
region = region_example # String | Region code

try: 
    # List of all SSH Keys.
    api_instance.regions_region_ssh_keys_get(region)
except ApiException as e:
    print("Exception when calling SSHKeysApi->regionsRegionSshKeysGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - List of all SSH Keys


regionsRegionSshKeysNameDelete

Delete SSH Key.


/regions/{region}/ssh-keys/{name}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/ssh-keys/{name}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SSHKeysApi;

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

public class SSHKeysApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        SSHKeysApi apiInstance = new SSHKeysApi();
        String region = region_example; // String | Region code
        String name = name_example; // String | The name of the SSH Key
        try {
            apiInstance.regionsRegionSshKeysNameDelete(region, name);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSHKeysApi#regionsRegionSshKeysNameDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SSHKeysApi;

public class SSHKeysApiExample {

    public static void main(String[] args) {
        SSHKeysApi apiInstance = new SSHKeysApi();
        String region = region_example; // String | Region code
        String name = name_example; // String | The name of the SSH Key
        try {
            apiInstance.regionsRegionSshKeysNameDelete(region, name);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSHKeysApi#regionsRegionSshKeysNameDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *name = name_example; // The name of the SSH Key

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

// Delete SSH Key.
[apiInstance regionsRegionSshKeysNameDeleteWith:region
    name:name
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.SSHKeysApi()
var region = region_example; // {{String}} Region code
var name = name_example; // {{String}} The name of the SSH Key

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new SSHKeysApi();
            var region = region_example;  // String | Region code
            var name = name_example;  // String | The name of the SSH Key

            try
            {
                // Delete SSH Key.
                apiInstance.regionsRegionSshKeysNameDelete(region, name);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SSHKeysApi.regionsRegionSshKeysNameDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiSSHKeysApi();
$region = region_example; // String | Region code
$name = name_example; // String | The name of the SSH Key

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SSHKeysApi->new();
my $region = region_example; # String | Region code
my $name = name_example; # String | The name of the SSH Key

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SSHKeysApi()
region = region_example # String | Region code
name = name_example # String | The name of the SSH Key

try: 
    # Delete SSH Key.
    api_instance.regions_region_ssh_keys_name_delete(region, name)
except ApiException as e:
    print("Exception when calling SSHKeysApi->regionsRegionSshKeysNameDelete: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
name*
String
The name of the SSH Key
Required

Responses

Status: 200 - SSH Key deleted successfully


regionsRegionSshKeysPost

Create new SSH Key.


/regions/{region}/ssh-keys

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/ssh-keys"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SSHKeysApi;

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

public class SSHKeysApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        SSHKeysApi apiInstance = new SSHKeysApi();
        String name = name_example; // String | 
        String publicKey = publicKey_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSshKeysPost(name, publicKey, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSHKeysApi#regionsRegionSshKeysPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SSHKeysApi;

public class SSHKeysApiExample {

    public static void main(String[] args) {
        SSHKeysApi apiInstance = new SSHKeysApi();
        String name = name_example; // String | 
        String publicKey = publicKey_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSshKeysPost(name, publicKey, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSHKeysApi#regionsRegionSshKeysPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *name = name_example; // 
String *publicKey = publicKey_example; // 
String *region = region_example; // Region code

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

// Create new SSH Key.
[apiInstance regionsRegionSshKeysPostWith:name
    publicKey:publicKey
    region:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.SSHKeysApi()
var name = name_example; // {{String}} 
var publicKey = publicKey_example; // {{String}} 
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new SSHKeysApi();
            var name = name_example;  // String | 
            var publicKey = publicKey_example;  // String | 
            var region = region_example;  // String | Region code

            try
            {
                // Create new SSH Key.
                apiInstance.regionsRegionSshKeysPost(name, publicKey, region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SSHKeysApi.regionsRegionSshKeysPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiSSHKeysApi();
$name = name_example; // String | 
$publicKey = publicKey_example; // String | 
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SSHKeysApi->new();
my $name = name_example; # String | 
my $publicKey = publicKey_example; # String | 
my $region = region_example; # String | Region code

eval { 
    $api_instance->regionsRegionSshKeysPost(name => $name, publicKey => $publicKey, region => $region);
};
if ($@) {
    warn "Exception when calling SSHKeysApi->regionsRegionSshKeysPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SSHKeysApi()
name = name_example # String | 
publicKey = publicKey_example # String | 
region = region_example # String | Region code

try: 
    # Create new SSH Key.
    api_instance.regions_region_ssh_keys_post(name, publicKey, region)
except ApiException as e:
    print("Exception when calling SSHKeysApi->regionsRegionSshKeysPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Form parameters
Name Description
name*
String
Required
public_key*
String
Required

Responses

Status: 201 - SSH Key created successfully


SecurityGroup

regionsRegionSecuritiesGet

List of Security Group and Rules.


/regions/{region}/securities

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/securities"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SecurityGroupApi;

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

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSecuritiesGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SecurityGroupApi;

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSecuritiesGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code

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

// List of Security Group and Rules.
[apiInstance regionsRegionSecuritiesGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.SecurityGroupApi()
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new SecurityGroupApi();
            var region = region_example;  // String | Region code

            try
            {
                // List of Security Group and Rules.
                apiInstance.regionsRegionSecuritiesGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SecurityGroupApi.regionsRegionSecuritiesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiSecurityGroupApi();
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SecurityGroupApi->new();
my $region = region_example; # String | Region code

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SecurityGroupApi()
region = region_example # String | Region code

try: 
    # List of Security Group and Rules.
    api_instance.regions_region_securities_get(region)
except ApiException as e:
    print("Exception when calling SecurityGroupApi->regionsRegionSecuritiesGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - List of all security groups


regionsRegionSecuritiesIdDelete

Delete the Security Group.


/regions/{region}/securities/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/securities/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SecurityGroupApi;

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

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the Security Group
        try {
            apiInstance.regionsRegionSecuritiesIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SecurityGroupApi;

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the Security Group
        try {
            apiInstance.regionsRegionSecuritiesIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the Security Group

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

// Delete the Security Group.
[apiInstance regionsRegionSecuritiesIdDeleteWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.SecurityGroupApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the Security Group

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new SecurityGroupApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the Security Group

            try
            {
                // Delete the Security Group.
                apiInstance.regionsRegionSecuritiesIdDelete(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SecurityGroupApi.regionsRegionSecuritiesIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiSecurityGroupApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the Security Group

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SecurityGroupApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the Security Group

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SecurityGroupApi()
region = region_example # String | Region code
id = id_example # String | The ID of the Security Group

try: 
    # Delete the Security Group.
    api_instance.regions_region_securities_id_delete(region, id)
except ApiException as e:
    print("Exception when calling SecurityGroupApi->regionsRegionSecuritiesIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the Security Group
Required

Responses

Status: 200 - Security group deleted successfully


regionsRegionSecuritiesPost

Create new Security Group.


/regions/{region}/securities

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/securities"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SecurityGroupApi;

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

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String name = name_example; // String | 
        String description = description_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSecuritiesPost(name, description, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SecurityGroupApi;

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String name = name_example; // String | 
        String description = description_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSecuritiesPost(name, description, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *name = name_example; // 
String *description = description_example; // 
String *region = region_example; // Region code

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

// Create new Security Group.
[apiInstance regionsRegionSecuritiesPostWith:name
    description:description
    region:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.SecurityGroupApi()
var name = name_example; // {{String}} 
var description = description_example; // {{String}} 
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new SecurityGroupApi();
            var name = name_example;  // String | 
            var description = description_example;  // String | 
            var region = region_example;  // String | Region code

            try
            {
                // Create new Security Group.
                apiInstance.regionsRegionSecuritiesPost(name, description, region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SecurityGroupApi.regionsRegionSecuritiesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiSecurityGroupApi();
$name = name_example; // String | 
$description = description_example; // String | 
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SecurityGroupApi->new();
my $name = name_example; # String | 
my $description = description_example; # String | 
my $region = region_example; # String | Region code

eval { 
    $api_instance->regionsRegionSecuritiesPost(name => $name, description => $description, region => $region);
};
if ($@) {
    warn "Exception when calling SecurityGroupApi->regionsRegionSecuritiesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SecurityGroupApi()
name = name_example # String | 
description = description_example # String | 
region = region_example # String | Region code

try: 
    # Create new Security Group.
    api_instance.regions_region_securities_post(name, description, region)
except ApiException as e:
    print("Exception when calling SecurityGroupApi->regionsRegionSecuritiesPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Form parameters
Name Description
name*
String
Required
description*
String
Required

Responses

Status: 201 - Details of the new Security Group


regionsRegionSecuritiesSecurityRulesIdDelete

Delete Security Group Rule.


/regions/{region}/securities/security-rules/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/securities/security-rules/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SecurityGroupApi;

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

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the Security Group Rule
        try {
            apiInstance.regionsRegionSecuritiesSecurityRulesIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesSecurityRulesIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SecurityGroupApi;

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the Security Group Rule
        try {
            apiInstance.regionsRegionSecuritiesSecurityRulesIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesSecurityRulesIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the Security Group Rule

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

// Delete Security Group Rule.
[apiInstance regionsRegionSecuritiesSecurityRulesIdDeleteWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.SecurityGroupApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the Security Group Rule

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new SecurityGroupApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the Security Group Rule

            try
            {
                // Delete Security Group Rule.
                apiInstance.regionsRegionSecuritiesSecurityRulesIdDelete(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SecurityGroupApi.regionsRegionSecuritiesSecurityRulesIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiSecurityGroupApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the Security Group Rule

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SecurityGroupApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the Security Group Rule

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SecurityGroupApi()
region = region_example # String | Region code
id = id_example # String | The ID of the Security Group Rule

try: 
    # Delete Security Group Rule.
    api_instance.regions_region_securities_security_rules_id_delete(region, id)
except ApiException as e:
    print("Exception when calling SecurityGroupApi->regionsRegionSecuritiesSecurityRulesIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the Security Group Rule
Required

Responses

Status: 200 - Security group rule deleted successfully


regionsRegionSecuritiesSecurityRulesIdGet

List of all Rules for a Security Groups.


/regions/{region}/securities/security-rules/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/securities/security-rules/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SecurityGroupApi;

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

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the Security Group
        try {
            apiInstance.regionsRegionSecuritiesSecurityRulesIdGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesSecurityRulesIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SecurityGroupApi;

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the Security Group
        try {
            apiInstance.regionsRegionSecuritiesSecurityRulesIdGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesSecurityRulesIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the Security Group

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

// List of all Rules for a Security Groups.
[apiInstance regionsRegionSecuritiesSecurityRulesIdGetWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.SecurityGroupApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the Security Group

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new SecurityGroupApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the Security Group

            try
            {
                // List of all Rules for a Security Groups.
                apiInstance.regionsRegionSecuritiesSecurityRulesIdGet(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SecurityGroupApi.regionsRegionSecuritiesSecurityRulesIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiSecurityGroupApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the Security Group

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SecurityGroupApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the Security Group

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SecurityGroupApi()
region = region_example # String | Region code
id = id_example # String | The ID of the Security Group

try: 
    # List of all Rules for a Security Groups.
    api_instance.regions_region_securities_security_rules_id_get(region, id)
except ApiException as e:
    print("Exception when calling SecurityGroupApi->regionsRegionSecuritiesSecurityRulesIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the Security Group
Required

Responses

Status: 200 - List of all rules for the security group


regionsRegionSecuritiesSecurityRulesIdPost

Create new Rule for a Security Group.


/regions/{region}/securities/security-rules/{id}

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/securities/security-rules/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SecurityGroupApi;

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

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String direction = direction_example; // String | 
        String portFrom = portFrom_example; // String | 
        String portTo = portTo_example; // String | 
        String protocol = protocol_example; // String | 
        String description = description_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the Security Group
        try {
            apiInstance.regionsRegionSecuritiesSecurityRulesIdPost(direction, portFrom, portTo, protocol, description, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesSecurityRulesIdPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SecurityGroupApi;

public class SecurityGroupApiExample {

    public static void main(String[] args) {
        SecurityGroupApi apiInstance = new SecurityGroupApi();
        String direction = direction_example; // String | 
        String portFrom = portFrom_example; // String | 
        String portTo = portTo_example; // String | 
        String protocol = protocol_example; // String | 
        String description = description_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the Security Group
        try {
            apiInstance.regionsRegionSecuritiesSecurityRulesIdPost(direction, portFrom, portTo, protocol, description, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling SecurityGroupApi#regionsRegionSecuritiesSecurityRulesIdPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *direction = direction_example; // 
String *portFrom = portFrom_example; // 
String *portTo = portTo_example; // 
String *protocol = protocol_example; // 
String *description = description_example; // 
String *region = region_example; // Region code
String *id = id_example; // The ID of the Security Group

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

// Create new Rule for a Security Group.
[apiInstance regionsRegionSecuritiesSecurityRulesIdPostWith:direction
    portFrom:portFrom
    portTo:portTo
    protocol:protocol
    description:description
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.SecurityGroupApi()
var direction = direction_example; // {{String}} 
var portFrom = portFrom_example; // {{String}} 
var portTo = portTo_example; // {{String}} 
var protocol = protocol_example; // {{String}} 
var description = description_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the Security Group

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new SecurityGroupApi();
            var direction = direction_example;  // String | 
            var portFrom = portFrom_example;  // String | 
            var portTo = portTo_example;  // String | 
            var protocol = protocol_example;  // String | 
            var description = description_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the Security Group

            try
            {
                // Create new Rule for a Security Group.
                apiInstance.regionsRegionSecuritiesSecurityRulesIdPost(direction, portFrom, portTo, protocol, description, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SecurityGroupApi.regionsRegionSecuritiesSecurityRulesIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiSecurityGroupApi();
$direction = direction_example; // String | 
$portFrom = portFrom_example; // String | 
$portTo = portTo_example; // String | 
$protocol = protocol_example; // String | 
$description = description_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the Security Group

try {
    $api_instance->regionsRegionSecuritiesSecurityRulesIdPost($direction, $portFrom, $portTo, $protocol, $description, $region, $id);
} catch (Exception $e) {
    echo 'Exception when calling SecurityGroupApi->regionsRegionSecuritiesSecurityRulesIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SecurityGroupApi;

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SecurityGroupApi->new();
my $direction = direction_example; # String | 
my $portFrom = portFrom_example; # String | 
my $portTo = portTo_example; # String | 
my $protocol = protocol_example; # String | 
my $description = description_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the Security Group

eval { 
    $api_instance->regionsRegionSecuritiesSecurityRulesIdPost(direction => $direction, portFrom => $portFrom, portTo => $portTo, protocol => $protocol, description => $description, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling SecurityGroupApi->regionsRegionSecuritiesSecurityRulesIdPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SecurityGroupApi()
direction = direction_example # String | 
portFrom = portFrom_example # String | 
portTo = portTo_example # String | 
protocol = protocol_example # String | 
description = description_example # String | 
region = region_example # String | Region code
id = id_example # String | The ID of the Security Group

try: 
    # Create new Rule for a Security Group.
    api_instance.regions_region_securities_security_rules_id_post(direction, portFrom, portTo, protocol, description, region, id)
except ApiException as e:
    print("Exception when calling SecurityGroupApi->regionsRegionSecuritiesSecurityRulesIdPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the Security Group
Required
Form parameters
Name Description
direction*
String
Enum: ingress, egress
Required
port-from*
String
Required
portTo*
String
Required
protocol*
String
Required
description*
String
Required

Responses

Status: 200 - Details of the new Security Group


ServerActions

regionsRegionServersIdActionsGet

Actions list of server.


/regions/{region}/servers/{id}/actions

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/actions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdActionsGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdActionsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdActionsGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdActionsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Actions list of server.
[apiInstance regionsRegionServersIdActionsGetWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Actions list of server.
                apiInstance.regionsRegionServersIdActionsGet(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdActionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Actions list of server.
    api_instance.regions_region_servers_id_actions_get(region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdActionsGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required

Responses

Status: 200 - list of actions for a server


regionsRegionServersIdAddSecurityGroupPost

Assign Server to Security Group.


/regions/{region}/servers/{id}/add-security-group

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/add-security-group"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String securityGroupId = securityGroupId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdAddSecurityGroupPost(securityGroupId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdAddSecurityGroupPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String securityGroupId = securityGroupId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdAddSecurityGroupPost(securityGroupId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdAddSecurityGroupPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *securityGroupId = securityGroupId_example; // 
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Assign Server to Security Group.
[apiInstance regionsRegionServersIdAddSecurityGroupPostWith:securityGroupId
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var securityGroupId = securityGroupId_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var securityGroupId = securityGroupId_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Assign Server to Security Group.
                apiInstance.regionsRegionServersIdAddSecurityGroupPost(securityGroupId, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdAddSecurityGroupPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$securityGroupId = securityGroupId_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $securityGroupId = securityGroupId_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

eval { 
    $api_instance->regionsRegionServersIdAddSecurityGroupPost(securityGroupId => $securityGroupId, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling ServerActionsApi->regionsRegionServersIdAddSecurityGroupPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
securityGroupId = securityGroupId_example # String | 
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Assign Server to Security Group.
    api_instance.regions_region_servers_id_add_security_group_post(securityGroupId, region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdAddSecurityGroupPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required
Form parameters
Name Description
security_group_id*
String
Required

Responses

Status: 200 - Assign server to security group


regionsRegionServersIdHardRebootPost

Apply hard reboot action for the Server.


/regions/{region}/servers/{id}/hard-reboot

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/hard-reboot"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdHardRebootPost(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdHardRebootPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdHardRebootPost(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdHardRebootPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Apply hard reboot action for the Server.
[apiInstance regionsRegionServersIdHardRebootPostWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Apply hard reboot action for the Server.
                apiInstance.regionsRegionServersIdHardRebootPost(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdHardRebootPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Apply hard reboot action for the Server.
    api_instance.regions_region_servers_id_hard_reboot_post(region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdHardRebootPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required

Responses

Status: 202 - Hard reboot server


regionsRegionServersIdPowerOffPost

Apply shutdown action for the Server.


/regions/{region}/servers/{id}/power-off

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/power-off"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdPowerOffPost(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdPowerOffPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdPowerOffPost(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdPowerOffPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Apply shutdown action for the Server.
[apiInstance regionsRegionServersIdPowerOffPostWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Apply shutdown action for the Server.
                apiInstance.regionsRegionServersIdPowerOffPost(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdPowerOffPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Apply shutdown action for the Server.
    api_instance.regions_region_servers_id_power_off_post(region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdPowerOffPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required

Responses

Status: 202 - Shutdown server


regionsRegionServersIdPowerOnPost

Apply turn on action for the Server.


/regions/{region}/servers/{id}/power-on

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/power-on"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdPowerOnPost(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdPowerOnPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdPowerOnPost(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdPowerOnPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Apply turn on action for the Server.
[apiInstance regionsRegionServersIdPowerOnPostWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Apply turn on action for the Server.
                apiInstance.regionsRegionServersIdPowerOnPost(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdPowerOnPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Apply turn on action for the Server.
    api_instance.regions_region_servers_id_power_on_post(region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdPowerOnPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required

Responses

Status: 202 - Turn on server


regionsRegionServersIdRebootPost

Apply soft reboot action for the Server.


/regions/{region}/servers/{id}/reboot

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/reboot"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdRebootPost(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdRebootPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdRebootPost(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdRebootPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Apply soft reboot action for the Server.
[apiInstance regionsRegionServersIdRebootPostWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Apply soft reboot action for the Server.
                apiInstance.regionsRegionServersIdRebootPost(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdRebootPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Apply soft reboot action for the Server.
    api_instance.regions_region_servers_id_reboot_post(region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdRebootPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required

Responses

Status: 202 - Soft reboot server


regionsRegionServersIdRebuildPost

Apply rebuild action for the Server.


/regions/{region}/servers/{id}/rebuild

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/rebuild"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String imageId = imageId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdRebuildPost(imageId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdRebuildPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String imageId = imageId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdRebuildPost(imageId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdRebuildPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *imageId = imageId_example; // 
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Apply rebuild action for the Server.
[apiInstance regionsRegionServersIdRebuildPostWith:imageId
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var imageId = imageId_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var imageId = imageId_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Apply rebuild action for the Server.
                apiInstance.regionsRegionServersIdRebuildPost(imageId, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdRebuildPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$imageId = imageId_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $imageId = imageId_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
imageId = imageId_example # String | 
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Apply rebuild action for the Server.
    api_instance.regions_region_servers_id_rebuild_post(imageId, region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdRebuildPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required
Form parameters
Name Description
image_id*
String
Required

Responses

Status: 202 - Rebuild server


regionsRegionServersIdRemoveSecurityGroupPost

Remove the Server from the Security Group.


/regions/{region}/servers/{id}/remove-security-group

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/remove-security-group"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String securityGroupId = securityGroupId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdRemoveSecurityGroupPost(securityGroupId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdRemoveSecurityGroupPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String securityGroupId = securityGroupId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdRemoveSecurityGroupPost(securityGroupId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdRemoveSecurityGroupPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *securityGroupId = securityGroupId_example; // 
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Remove the Server from the Security Group.
[apiInstance regionsRegionServersIdRemoveSecurityGroupPostWith:securityGroupId
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var securityGroupId = securityGroupId_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var securityGroupId = securityGroupId_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Remove the Server from the Security Group.
                apiInstance.regionsRegionServersIdRemoveSecurityGroupPost(securityGroupId, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdRemoveSecurityGroupPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$securityGroupId = securityGroupId_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $securityGroupId = securityGroupId_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

eval { 
    $api_instance->regionsRegionServersIdRemoveSecurityGroupPost(securityGroupId => $securityGroupId, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling ServerActionsApi->regionsRegionServersIdRemoveSecurityGroupPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
securityGroupId = securityGroupId_example # String | 
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Remove the Server from the Security Group.
    api_instance.regions_region_servers_id_remove_security_group_post(securityGroupId, region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdRemoveSecurityGroupPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required
Form parameters
Name Description
security_group_id*
String
Required

Responses

Status: 200 - Remove server to security group


regionsRegionServersIdRenamePost

Rename the Server.


/regions/{region}/servers/{id}/rename

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/rename"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String name = name_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdRenamePost(name, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdRenamePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String name = name_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdRenamePost(name, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdRenamePost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *name = name_example; // 
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Rename the Server.
[apiInstance regionsRegionServersIdRenamePostWith:name
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var name = name_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var name = name_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Rename the Server.
                apiInstance.regionsRegionServersIdRenamePost(name, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdRenamePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$name = name_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $name = name_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

eval { 
    $api_instance->regionsRegionServersIdRenamePost(name => $name, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling ServerActionsApi->regionsRegionServersIdRenamePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
name = name_example # String | 
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Rename the Server.
    api_instance.regions_region_servers_id_rename_post(name, region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdRenamePost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required
Form parameters
Name Description
name*
String
Required

Responses

Status: 200 - Rename server


regionsRegionServersIdResizePost

Apply new size plan for the Server.


/regions/{region}/servers/{id}/resize

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/resize"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String flavorId = flavorId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdResizePost(flavorId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdResizePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String flavorId = flavorId_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdResizePost(flavorId, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdResizePost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *flavorId = flavorId_example; // 
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Apply new size plan for the Server.
[apiInstance regionsRegionServersIdResizePostWith:flavorId
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var flavorId = flavorId_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var flavorId = flavorId_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Apply new size plan for the Server.
                apiInstance.regionsRegionServersIdResizePost(flavorId, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdResizePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$flavorId = flavorId_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $flavorId = flavorId_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

eval { 
    $api_instance->regionsRegionServersIdResizePost(flavorId => $flavorId, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling ServerActionsApi->regionsRegionServersIdResizePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
flavorId = flavorId_example # String | 
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Apply new size plan for the Server.
    api_instance.regions_region_servers_id_resize_post(flavorId, region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdResizePost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required
Form parameters
Name Description
flavor_id*
String
Required

Responses

Status: 202 - Resize server


regionsRegionServersIdSnapshotPost

Create snapshot of the Server.


/regions/{region}/servers/{id}/snapshot

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/snapshot"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String name = name_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdSnapshotPost(name, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdSnapshotPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String name = name_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdSnapshotPost(name, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdSnapshotPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *name = name_example; // 
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Create snapshot of the Server.
[apiInstance regionsRegionServersIdSnapshotPostWith:name
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var name = name_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var name = name_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Create snapshot of the Server.
                apiInstance.regionsRegionServersIdSnapshotPost(name, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdSnapshotPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$name = name_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $name = name_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

eval { 
    $api_instance->regionsRegionServersIdSnapshotPost(name => $name, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling ServerActionsApi->regionsRegionServersIdSnapshotPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
name = name_example # String | 
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Create snapshot of the Server.
    api_instance.regions_region_servers_id_snapshot_post(name, region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdSnapshotPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required
Form parameters
Name Description
name*
String
Required

Responses

Status: 202 - Create snapshot of server


regionsRegionServersIdVncGet

Gets a VNC console for a Server.


/regions/{region}/servers/{id}/vnc

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}/vnc"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServerActionsApi;

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

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdVncGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdVncGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServerActionsApi;

public class ServerActionsApiExample {

    public static void main(String[] args) {
        ServerActionsApi apiInstance = new ServerActionsApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdVncGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServerActionsApi#regionsRegionServersIdVncGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Gets a VNC console for a Server.
[apiInstance regionsRegionServersIdVncGetWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServerActionsApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServerActionsApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Gets a VNC console for a Server.
                apiInstance.regionsRegionServersIdVncGet(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServerActionsApi.regionsRegionServersIdVncGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServerActionsApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServerActionsApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServerActionsApi()
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Gets a VNC console for a Server.
    api_instance.regions_region_servers_id_vnc_get(region, id)
except ApiException as e:
    print("Exception when calling ServerActionsApi->regionsRegionServersIdVncGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required

Responses

Status: 200 - VNC link for connection to the server


Servers

regionsRegionOptionsGet

Return all region options.


/regions/{region}/options

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/options"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServersApi;

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

public class ServersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServersApi apiInstance = new ServersApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionOptionsGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#regionsRegionOptionsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServersApi;

public class ServersApiExample {

    public static void main(String[] args) {
        ServersApi apiInstance = new ServersApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionOptionsGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#regionsRegionOptionsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code

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

// Return all region options.
[apiInstance regionsRegionOptionsGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServersApi()
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServersApi();
            var region = region_example;  // String | Region code

            try
            {
                // Return all region options.
                apiInstance.regionsRegionOptionsGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServersApi.regionsRegionOptionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServersApi();
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServersApi->new();
my $region = region_example; # String | Region code

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServersApi()
region = region_example # String | Region code

try: 
    # Return all region options.
    api_instance.regions_region_options_get(region)
except ApiException as e:
    print("Exception when calling ServersApi->regionsRegionOptionsGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - Return list images, security groups, plans, networks of region


regionsRegionServersGet

Return all Servers.


/regions/{region}/servers

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServersApi;

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

public class ServersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServersApi apiInstance = new ServersApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionServersGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#regionsRegionServersGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServersApi;

public class ServersApiExample {

    public static void main(String[] args) {
        ServersApi apiInstance = new ServersApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionServersGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#regionsRegionServersGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code

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

// Return all Servers.
[apiInstance regionsRegionServersGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServersApi()
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServersApi();
            var region = region_example;  // String | Region code

            try
            {
                // Return all Servers.
                apiInstance.regionsRegionServersGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServersApi.regionsRegionServersGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServersApi();
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServersApi->new();
my $region = region_example; # String | Region code

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServersApi()
region = region_example # String | Region code

try: 
    # Return all Servers.
    api_instance.regions_region_servers_get(region)
except ApiException as e:
    print("Exception when calling ServersApi->regionsRegionServersGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - Return list servers in region


regionsRegionServersIdDelete

Delete a Server.


/regions/{region}/servers/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServersApi;

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

public class ServersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServersApi apiInstance = new ServersApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#regionsRegionServersIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServersApi;

public class ServersApiExample {

    public static void main(String[] args) {
        ServersApi apiInstance = new ServersApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#regionsRegionServersIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Delete a Server.
[apiInstance regionsRegionServersIdDeleteWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServersApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServersApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Delete a Server.
                apiInstance.regionsRegionServersIdDelete(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServersApi.regionsRegionServersIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServersApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServersApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServersApi()
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Delete a Server.
    api_instance.regions_region_servers_id_delete(region, id)
except ApiException as e:
    print("Exception when calling ServersApi->regionsRegionServersIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required

Responses

Status: 200 - Server deleted successfully


regionsRegionServersIdGet

Shows details for a Server.


/regions/{region}/servers/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServersApi;

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

public class ServersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServersApi apiInstance = new ServersApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#regionsRegionServersIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServersApi;

public class ServersApiExample {

    public static void main(String[] args) {
        ServersApi apiInstance = new ServersApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the server
        try {
            apiInstance.regionsRegionServersIdGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#regionsRegionServersIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the server

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

// Shows details for a Server.
[apiInstance regionsRegionServersIdGetWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServersApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the server

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServersApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the server

            try
            {
                // Shows details for a Server.
                apiInstance.regionsRegionServersIdGet(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServersApi.regionsRegionServersIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServersApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the server

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServersApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the server

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServersApi()
region = region_example # String | Region code
id = id_example # String | The ID of the server

try: 
    # Shows details for a Server.
    api_instance.regions_region_servers_id_get(region, id)
except ApiException as e:
    print("Exception when calling ServersApi->regionsRegionServersIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the server
Required

Responses

Status: 200 - Shows details for a server


regionsRegionServersPost

Create new Server.


/regions/{region}/servers

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/servers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ServersApi;

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

public class ServersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        ServersApi apiInstance = new ServersApi();
        String name = name_example; // String | 
        String keyName = keyName_example; // String | 
        String networkId = networkId_example; // String | 
        String flavorId = flavorId_example; // String | 
        String imageId = imageId_example; // String | 
        Boolean sshKey = true; // Boolean | 
        Integer count = 56; // Integer | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionServersPost(name, keyName, networkId, flavorId, imageId, sshKey, count, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#regionsRegionServersPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ServersApi;

public class ServersApiExample {

    public static void main(String[] args) {
        ServersApi apiInstance = new ServersApi();
        String name = name_example; // String | 
        String keyName = keyName_example; // String | 
        String networkId = networkId_example; // String | 
        String flavorId = flavorId_example; // String | 
        String imageId = imageId_example; // String | 
        Boolean sshKey = true; // Boolean | 
        Integer count = 56; // Integer | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionServersPost(name, keyName, networkId, flavorId, imageId, sshKey, count, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling ServersApi#regionsRegionServersPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *name = name_example; // 
String *keyName = keyName_example; // 
String *networkId = networkId_example; // 
String *flavorId = flavorId_example; // 
String *imageId = imageId_example; // 
Boolean *sshKey = true; // 
Integer *count = 56; // 
String *region = region_example; // Region code

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

// Create new Server.
[apiInstance regionsRegionServersPostWith:name
    keyName:keyName
    networkId:networkId
    flavorId:flavorId
    imageId:imageId
    sshKey:sshKey
    count:count
    region:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.ServersApi()
var name = name_example; // {{String}} 
var keyName = keyName_example; // {{String}} 
var networkId = networkId_example; // {{String}} 
var flavorId = flavorId_example; // {{String}} 
var imageId = imageId_example; // {{String}} 
var sshKey = true; // {{Boolean}} 
var count = 56; // {{Integer}} 
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new ServersApi();
            var name = name_example;  // String | 
            var keyName = keyName_example;  // String | 
            var networkId = networkId_example;  // String | 
            var flavorId = flavorId_example;  // String | 
            var imageId = imageId_example;  // String | 
            var sshKey = true;  // Boolean | 
            var count = 56;  // Integer | 
            var region = region_example;  // String | Region code

            try
            {
                // Create new Server.
                apiInstance.regionsRegionServersPost(name, keyName, networkId, flavorId, imageId, sshKey, count, region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ServersApi.regionsRegionServersPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiServersApi();
$name = name_example; // String | 
$keyName = keyName_example; // String | 
$networkId = networkId_example; // String | 
$flavorId = flavorId_example; // String | 
$imageId = imageId_example; // String | 
$sshKey = true; // Boolean | 
$count = 56; // Integer | 
$region = region_example; // String | Region code

try {
    $api_instance->regionsRegionServersPost($name, $keyName, $networkId, $flavorId, $imageId, $sshKey, $count, $region);
} catch (Exception $e) {
    echo 'Exception when calling ServersApi->regionsRegionServersPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ServersApi;

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ServersApi->new();
my $name = name_example; # String | 
my $keyName = keyName_example; # String | 
my $networkId = networkId_example; # String | 
my $flavorId = flavorId_example; # String | 
my $imageId = imageId_example; # String | 
my $sshKey = true; # Boolean | 
my $count = 56; # Integer | 
my $region = region_example; # String | Region code

eval { 
    $api_instance->regionsRegionServersPost(name => $name, keyName => $keyName, networkId => $networkId, flavorId => $flavorId, imageId => $imageId, sshKey => $sshKey, count => $count, region => $region);
};
if ($@) {
    warn "Exception when calling ServersApi->regionsRegionServersPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ServersApi()
name = name_example # String | 
keyName = keyName_example # String | 
networkId = networkId_example # String | 
flavorId = flavorId_example # String | 
imageId = imageId_example # String | 
sshKey = true # Boolean | 
count = 56 # Integer | 
region = region_example # String | Region code

try: 
    # Create new Server.
    api_instance.regions_region_servers_post(name, keyName, networkId, flavorId, imageId, sshKey, count, region)
except ApiException as e:
    print("Exception when calling ServersApi->regionsRegionServersPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Form parameters
Name Description
name*
String
Required
key_name*
String
Required
network_id*
String
Required
flavor_id*
String
Required
image_id*
String
Required
ssh_key*
Boolean
Required
count*
Integer
Required

Responses

Status: 201 - Create server


Sizes

regionsRegionSizesGet

List of general plans.


/regions/{region}/sizes

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/sizes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SizesApi;

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

public class SizesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        SizesApi apiInstance = new SizesApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSizesGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling SizesApi#regionsRegionSizesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SizesApi;

public class SizesApiExample {

    public static void main(String[] args) {
        SizesApi apiInstance = new SizesApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionSizesGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling SizesApi#regionsRegionSizesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code

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

// List of general plans.
[apiInstance regionsRegionSizesGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.SizesApi()
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new SizesApi();
            var region = region_example;  // String | Region code

            try
            {
                // List of general plans.
                apiInstance.regionsRegionSizesGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SizesApi.regionsRegionSizesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiSizesApi();
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SizesApi->new();
my $region = region_example; # String | Region code

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SizesApi()
region = region_example # String | Region code

try: 
    # List of general plans.
    api_instance.regions_region_sizes_get(region)
except ApiException as e:
    print("Exception when calling SizesApi->regionsRegionSizesGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - List of general plans


Volumes

regionsRegionVolumesAttachPatch

Attach a Volume to a Server.


/regions/{region}/volumes/attach

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/volumes/attach"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VolumesApi;

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

public class VolumesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        VolumesApi apiInstance = new VolumesApi();
        String serverId = serverId_example; // String | 
        String volumeId = volumeId_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionVolumesAttachPatch(serverId, volumeId, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesAttachPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VolumesApi;

public class VolumesApiExample {

    public static void main(String[] args) {
        VolumesApi apiInstance = new VolumesApi();
        String serverId = serverId_example; // String | 
        String volumeId = volumeId_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionVolumesAttachPatch(serverId, volumeId, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesAttachPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *serverId = serverId_example; // 
String *volumeId = volumeId_example; // 
String *region = region_example; // Region code

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

// Attach a Volume to a Server.
[apiInstance regionsRegionVolumesAttachPatchWith:serverId
    volumeId:volumeId
    region:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.VolumesApi()
var serverId = serverId_example; // {{String}} 
var volumeId = volumeId_example; // {{String}} 
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new VolumesApi();
            var serverId = serverId_example;  // String | 
            var volumeId = volumeId_example;  // String | 
            var region = region_example;  // String | Region code

            try
            {
                // Attach a Volume to a Server.
                apiInstance.regionsRegionVolumesAttachPatch(serverId, volumeId, region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VolumesApi.regionsRegionVolumesAttachPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiVolumesApi();
$serverId = serverId_example; // String | 
$volumeId = volumeId_example; // String | 
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::VolumesApi->new();
my $serverId = serverId_example; # String | 
my $volumeId = volumeId_example; # String | 
my $region = region_example; # String | Region code

eval { 
    $api_instance->regionsRegionVolumesAttachPatch(serverId => $serverId, volumeId => $volumeId, region => $region);
};
if ($@) {
    warn "Exception when calling VolumesApi->regionsRegionVolumesAttachPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.VolumesApi()
serverId = serverId_example # String | 
volumeId = volumeId_example # String | 
region = region_example # String | Region code

try: 
    # Attach a Volume to a Server.
    api_instance.regions_region_volumes_attach_patch(serverId, volumeId, region)
except ApiException as e:
    print("Exception when calling VolumesApi->regionsRegionVolumesAttachPatch: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Form parameters
Name Description
server_id*
String
Required
volume_id*
String
Required

Responses

Status: 200 - Volume attached successfully


regionsRegionVolumesDetachPatch

Detach a Volume from a Server.


/regions/{region}/volumes/detach

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/volumes/detach"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VolumesApi;

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

public class VolumesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        VolumesApi apiInstance = new VolumesApi();
        String serverId = serverId_example; // String | 
        String volumeId = volumeId_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionVolumesDetachPatch(serverId, volumeId, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesDetachPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VolumesApi;

public class VolumesApiExample {

    public static void main(String[] args) {
        VolumesApi apiInstance = new VolumesApi();
        String serverId = serverId_example; // String | 
        String volumeId = volumeId_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionVolumesDetachPatch(serverId, volumeId, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesDetachPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *serverId = serverId_example; // 
String *volumeId = volumeId_example; // 
String *region = region_example; // Region code

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

// Detach a Volume from a Server.
[apiInstance regionsRegionVolumesDetachPatchWith:serverId
    volumeId:volumeId
    region:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.VolumesApi()
var serverId = serverId_example; // {{String}} 
var volumeId = volumeId_example; // {{String}} 
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new VolumesApi();
            var serverId = serverId_example;  // String | 
            var volumeId = volumeId_example;  // String | 
            var region = region_example;  // String | Region code

            try
            {
                // Detach a Volume from a Server.
                apiInstance.regionsRegionVolumesDetachPatch(serverId, volumeId, region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VolumesApi.regionsRegionVolumesDetachPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiVolumesApi();
$serverId = serverId_example; // String | 
$volumeId = volumeId_example; // String | 
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::VolumesApi->new();
my $serverId = serverId_example; # String | 
my $volumeId = volumeId_example; # String | 
my $region = region_example; # String | Region code

eval { 
    $api_instance->regionsRegionVolumesDetachPatch(serverId => $serverId, volumeId => $volumeId, region => $region);
};
if ($@) {
    warn "Exception when calling VolumesApi->regionsRegionVolumesDetachPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.VolumesApi()
serverId = serverId_example # String | 
volumeId = volumeId_example # String | 
region = region_example # String | Region code

try: 
    # Detach a Volume from a Server.
    api_instance.regions_region_volumes_detach_patch(serverId, volumeId, region)
except ApiException as e:
    print("Exception when calling VolumesApi->regionsRegionVolumesDetachPatch: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Form parameters
Name Description
server_id*
String
Required
volume_id*
String
Required

Responses

Status: 200 - Volume detached successfully


regionsRegionVolumesGet

List of Volumes.


/regions/{region}/volumes

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/volumes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VolumesApi;

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

public class VolumesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        VolumesApi apiInstance = new VolumesApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionVolumesGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VolumesApi;

public class VolumesApiExample {

    public static void main(String[] args) {
        VolumesApi apiInstance = new VolumesApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionVolumesGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code

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

// List of Volumes.
[apiInstance regionsRegionVolumesGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.VolumesApi()
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new VolumesApi();
            var region = region_example;  // String | Region code

            try
            {
                // List of Volumes.
                apiInstance.regionsRegionVolumesGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VolumesApi.regionsRegionVolumesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiVolumesApi();
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::VolumesApi->new();
my $region = region_example; # String | Region code

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.VolumesApi()
region = region_example # String | Region code

try: 
    # List of Volumes.
    api_instance.regions_region_volumes_get(region)
except ApiException as e:
    print("Exception when calling VolumesApi->regionsRegionVolumesGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - List of volumes


regionsRegionVolumesIdDelete

Delete the Volume.


/regions/{region}/volumes/{id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/volumes/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VolumesApi;

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

public class VolumesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        VolumesApi apiInstance = new VolumesApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the volume
        try {
            apiInstance.regionsRegionVolumesIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VolumesApi;

public class VolumesApiExample {

    public static void main(String[] args) {
        VolumesApi apiInstance = new VolumesApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the volume
        try {
            apiInstance.regionsRegionVolumesIdDelete(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the volume

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

// Delete the Volume.
[apiInstance regionsRegionVolumesIdDeleteWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.VolumesApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the volume

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new VolumesApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the volume

            try
            {
                // Delete the Volume.
                apiInstance.regionsRegionVolumesIdDelete(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VolumesApi.regionsRegionVolumesIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiVolumesApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the volume

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::VolumesApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the volume

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.VolumesApi()
region = region_example # String | Region code
id = id_example # String | The ID of the volume

try: 
    # Delete the Volume.
    api_instance.regions_region_volumes_id_delete(region, id)
except ApiException as e:
    print("Exception when calling VolumesApi->regionsRegionVolumesIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the volume
Required

Responses

Status: 200 - Volume deleted successfully


regionsRegionVolumesIdGet

Show details of a Volume.


/regions/{region}/volumes/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/volumes/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VolumesApi;

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

public class VolumesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        VolumesApi apiInstance = new VolumesApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the volume
        try {
            apiInstance.regionsRegionVolumesIdGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VolumesApi;

public class VolumesApiExample {

    public static void main(String[] args) {
        VolumesApi apiInstance = new VolumesApi();
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the volume
        try {
            apiInstance.regionsRegionVolumesIdGet(region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code
String *id = id_example; // The ID of the volume

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

// Show details of a Volume.
[apiInstance regionsRegionVolumesIdGetWith:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.VolumesApi()
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the volume

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new VolumesApi();
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the volume

            try
            {
                // Show details of a Volume.
                apiInstance.regionsRegionVolumesIdGet(region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VolumesApi.regionsRegionVolumesIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiVolumesApi();
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the volume

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::VolumesApi->new();
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the volume

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.VolumesApi()
region = region_example # String | Region code
id = id_example # String | The ID of the volume

try: 
    # Show details of a Volume.
    api_instance.regions_region_volumes_id_get(region, id)
except ApiException as e:
    print("Exception when calling VolumesApi->regionsRegionVolumesIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the volume
Required

Responses

Status: 200 - Volume details


regionsRegionVolumesIdPatch

Update a Volume.


/regions/{region}/volumes/{id}

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/volumes/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VolumesApi;

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

public class VolumesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        VolumesApi apiInstance = new VolumesApi();
        String name = name_example; // String | 
        String description = description_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the volume
        try {
            apiInstance.regionsRegionVolumesIdPatch(name, description, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesIdPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VolumesApi;

public class VolumesApiExample {

    public static void main(String[] args) {
        VolumesApi apiInstance = new VolumesApi();
        String name = name_example; // String | 
        String description = description_example; // String | 
        String region = region_example; // String | Region code
        String id = id_example; // String | The ID of the volume
        try {
            apiInstance.regionsRegionVolumesIdPatch(name, description, region, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesIdPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *name = name_example; // 
String *description = description_example; // 
String *region = region_example; // Region code
String *id = id_example; // The ID of the volume

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

// Update a Volume.
[apiInstance regionsRegionVolumesIdPatchWith:name
    description:description
    region:region
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.VolumesApi()
var name = name_example; // {{String}} 
var description = description_example; // {{String}} 
var region = region_example; // {{String}} Region code
var id = id_example; // {{String}} The ID of the volume

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new VolumesApi();
            var name = name_example;  // String | 
            var description = description_example;  // String | 
            var region = region_example;  // String | Region code
            var id = id_example;  // String | The ID of the volume

            try
            {
                // Update a Volume.
                apiInstance.regionsRegionVolumesIdPatch(name, description, region, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VolumesApi.regionsRegionVolumesIdPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiVolumesApi();
$name = name_example; // String | 
$description = description_example; // String | 
$region = region_example; // String | Region code
$id = id_example; // String | The ID of the volume

try {
    $api_instance->regionsRegionVolumesIdPatch($name, $description, $region, $id);
} catch (Exception $e) {
    echo 'Exception when calling VolumesApi->regionsRegionVolumesIdPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VolumesApi;

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::VolumesApi->new();
my $name = name_example; # String | 
my $description = description_example; # String | 
my $region = region_example; # String | Region code
my $id = id_example; # String | The ID of the volume

eval { 
    $api_instance->regionsRegionVolumesIdPatch(name => $name, description => $description, region => $region, id => $id);
};
if ($@) {
    warn "Exception when calling VolumesApi->regionsRegionVolumesIdPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.VolumesApi()
name = name_example # String | 
description = description_example # String | 
region = region_example # String | Region code
id = id_example # String | The ID of the volume

try: 
    # Update a Volume.
    api_instance.regions_region_volumes_id_patch(name, description, region, id)
except ApiException as e:
    print("Exception when calling VolumesApi->regionsRegionVolumesIdPatch: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
id*
String
The ID of the volume
Required
Form parameters
Name Description
name*
String
Required
description*
String
Required

Responses

Status: 200 - Volume updated successfully


regionsRegionVolumesLimitsGet

Show general limits of Volumes.


/regions/{region}/volumes/limits

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/volumes/limits"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VolumesApi;

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

public class VolumesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        VolumesApi apiInstance = new VolumesApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionVolumesLimitsGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesLimitsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VolumesApi;

public class VolumesApiExample {

    public static void main(String[] args) {
        VolumesApi apiInstance = new VolumesApi();
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionVolumesLimitsGet(region);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesLimitsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *region = region_example; // Region code

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

// Show general limits of Volumes.
[apiInstance regionsRegionVolumesLimitsGetWith:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.VolumesApi()
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new VolumesApi();
            var region = region_example;  // String | Region code

            try
            {
                // Show general limits of Volumes.
                apiInstance.regionsRegionVolumesLimitsGet(region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VolumesApi.regionsRegionVolumesLimitsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiVolumesApi();
$region = region_example; // String | Region code

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

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::VolumesApi->new();
my $region = region_example; # String | Region code

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

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.VolumesApi()
region = region_example # String | Region code

try: 
    # Show general limits of Volumes.
    api_instance.regions_region_volumes_limits_get(region)
except ApiException as e:
    print("Exception when calling VolumesApi->regionsRegionVolumesLimitsGet: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required

Responses

Status: 200 - List of limits


regionsRegionVolumesPost

Create new Volume.


/regions/{region}/volumes

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "api.apieco.ir/arvancloud/ecc/v1/regions/{region}/volumes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VolumesApi;

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

public class VolumesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: api_key
        ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
        api_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //api_key.setApiKeyPrefix("Token");

        VolumesApi apiInstance = new VolumesApi();
        String name = name_example; // String | 
        Integer size = 56; // Integer | 
        String description = description_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionVolumesPost(name, size, description, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.VolumesApi;

public class VolumesApiExample {

    public static void main(String[] args) {
        VolumesApi apiInstance = new VolumesApi();
        String name = name_example; // String | 
        Integer size = 56; // Integer | 
        String description = description_example; // String | 
        String region = region_example; // String | Region code
        try {
            apiInstance.regionsRegionVolumesPost(name, size, description, region);
        } catch (ApiException e) {
            System.err.println("Exception when calling VolumesApi#regionsRegionVolumesPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: api_key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *name = name_example; // 
Integer *size = 56; // 
String *description = description_example; // 
String *region = region_example; // Region code

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

// Create new Volume.
[apiInstance regionsRegionVolumesPostWith:name
    size:size
    description:description
    region:region
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var ArvanCloudEccService = require('arvan_cloud_ecc_service');
var defaultClient = ArvanCloudEccService.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['Authorization'] = "Token"

var api = new ArvanCloudEccService.VolumesApi()
var name = name_example; // {{String}} 
var size = 56; // {{Integer}} 
var description = description_example; // {{String}} 
var region = region_example; // {{String}} Region code

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

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

            // Configure API key authorization: api_key
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new VolumesApi();
            var name = name_example;  // String | 
            var size = 56;  // Integer | 
            var description = description_example;  // String | 
            var region = region_example;  // String | Region code

            try
            {
                // Create new Volume.
                apiInstance.regionsRegionVolumesPost(name, size, description, region);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VolumesApi.regionsRegionVolumesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\ApiVolumesApi();
$name = name_example; // String | 
$size = 56; // Integer | 
$description = description_example; // String | 
$region = region_example; // String | Region code

try {
    $api_instance->regionsRegionVolumesPost($name, $size, $description, $region);
} catch (Exception $e) {
    echo 'Exception when calling VolumesApi->regionsRegionVolumesPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VolumesApi;

# Configure API key authorization: api_key
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";

my $api_instance = WWW::SwaggerClient::VolumesApi->new();
my $name = name_example; # String | 
my $size = 56; # Integer | 
my $description = description_example; # String | 
my $region = region_example; # String | Region code

eval { 
    $api_instance->regionsRegionVolumesPost(name => $name, size => $size, description => $description, region => $region);
};
if ($@) {
    warn "Exception when calling VolumesApi->regionsRegionVolumesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.VolumesApi()
name = name_example # String | 
size = 56 # Integer | 
description = description_example # String | 
region = region_example # String | Region code

try: 
    # Create new Volume.
    api_instance.regions_region_volumes_post(name, size, description, region)
except ApiException as e:
    print("Exception when calling VolumesApi->regionsRegionVolumesPost: %s\n" % e)

Parameters

Path parameters
Name Description
region*
String
Region code
Required
Form parameters
Name Description
name*
String
Required
size*
Integer
Required
description*
String
Required

Responses

Status: 201 - Details of the new volume