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
Name | Description |
---|---|
region* |
String
Region code
Required
|
Name | Description |
---|---|
port_id* |
String
Required
|