Terminate VNF
The POST method terminates a VNF instance.
curl -X POST "https://localhost/vnflcm/v1/vnf_instances/{vnfInstanceId}/terminate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.Sol003VnfLcmApi;
import java.io.File;
import java.util.*;
public class Sol003VnfLcmApiExample {
public static void main(String[] args) {
Sol003VnfLcmApi apiInstance = new Sol003VnfLcmApi();
String vnfInstanceId = vnfInstanceId_example; // String | The identifier of the VNF instance to be terminated. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the "id" attribute in the payload body of that response.
TerminateVnfRequest terminateVnfRequest = ; // TerminateVnfRequest | Parameters for the VNF termination.
String accept = accept_example; // String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
String contentType = contentType_example; // String | The MIME type of the body of the request. Reference: IETF RFC 7231
String authorization = authorization_example; // String | The authorization token for the request. Reference: IETF RFC 7235
try {
inline_response_201 result = apiInstance.vnfInstancesVnfInstanceIdTerminatePost(vnfInstanceId, terminateVnfRequest, accept, contentType, authorization);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling Sol003VnfLcmApi#vnfInstancesVnfInstanceIdTerminatePost");
e.printStackTrace();
}
}
}
import io.swagger.client.api.Sol003VnfLcmApi;
public class Sol003VnfLcmApiExample {
public static void main(String[] args) {
Sol003VnfLcmApi apiInstance = new Sol003VnfLcmApi();
String vnfInstanceId = vnfInstanceId_example; // String | The identifier of the VNF instance to be terminated. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the "id" attribute in the payload body of that response.
TerminateVnfRequest terminateVnfRequest = ; // TerminateVnfRequest | Parameters for the VNF termination.
String accept = accept_example; // String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
String contentType = contentType_example; // String | The MIME type of the body of the request. Reference: IETF RFC 7231
String authorization = authorization_example; // String | The authorization token for the request. Reference: IETF RFC 7235
try {
inline_response_201 result = apiInstance.vnfInstancesVnfInstanceIdTerminatePost(vnfInstanceId, terminateVnfRequest, accept, contentType, authorization);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling Sol003VnfLcmApi#vnfInstancesVnfInstanceIdTerminatePost");
e.printStackTrace();
}
}
}
String *vnfInstanceId = vnfInstanceId_example; // The identifier of the VNF instance to be terminated. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the "id" attribute in the payload body of that response.
TerminateVnfRequest *terminateVnfRequest = ; // Parameters for the VNF termination.
String *accept = accept_example; // Content-Types that are acceptable for the response. Reference: IETF RFC 7231
String *contentType = contentType_example; // The MIME type of the body of the request. Reference: IETF RFC 7231
String *authorization = authorization_example; // The authorization token for the request. Reference: IETF RFC 7235
(optional)
Sol003VnfLcmApi *apiInstance = [[Sol003VnfLcmApi alloc] init];
[apiInstance vnfInstancesVnfInstanceIdTerminatePostWith:vnfInstanceId
terminateVnfRequest:terminateVnfRequest
accept:accept
contentType:contentType
authorization:authorization
completionHandler: ^(inline_response_201 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Sol003VnfLifecycleManagementInterface = require('sol003___vnf_lifecycle_management_interface');
var api = new Sol003VnfLifecycleManagementInterface.Sol003VnfLcmApi()
var vnfInstanceId = vnfInstanceId_example; // {String} The identifier of the VNF instance to be terminated. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the "id" attribute in the payload body of that response.
var terminateVnfRequest = ; // {TerminateVnfRequest} Parameters for the VNF termination.
var accept = accept_example; // {String} Content-Types that are acceptable for the response. Reference: IETF RFC 7231
var contentType = contentType_example; // {String} The MIME type of the body of the request. Reference: IETF RFC 7231
var opts = {
'authorization': authorization_example // {String} The authorization token for the request. Reference: IETF RFC 7235
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.vnfInstancesVnfInstanceIdTerminatePost(vnfInstanceId, terminateVnfRequest, accept, contentType, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class vnfInstancesVnfInstanceIdTerminatePostExample
{
public void main()
{
var apiInstance = new Sol003VnfLcmApi();
var vnfInstanceId = vnfInstanceId_example; // String | The identifier of the VNF instance to be terminated. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the "id" attribute in the payload body of that response.
var terminateVnfRequest = new TerminateVnfRequest(); // TerminateVnfRequest | Parameters for the VNF termination.
var accept = accept_example; // String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
var contentType = contentType_example; // String | The MIME type of the body of the request. Reference: IETF RFC 7231
var authorization = authorization_example; // String | The authorization token for the request. Reference: IETF RFC 7235
(optional)
try
{
inline_response_201 result = apiInstance.vnfInstancesVnfInstanceIdTerminatePost(vnfInstanceId, terminateVnfRequest, accept, contentType, authorization);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling Sol003VnfLcmApi.vnfInstancesVnfInstanceIdTerminatePost: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\Sol003VnfLcmApi();
$vnfInstanceId = vnfInstanceId_example; // String | The identifier of the VNF instance to be terminated. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the "id" attribute in the payload body of that response.
$terminateVnfRequest = ; // TerminateVnfRequest | Parameters for the VNF termination.
$accept = accept_example; // String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
$contentType = contentType_example; // String | The MIME type of the body of the request. Reference: IETF RFC 7231
$authorization = authorization_example; // String | The authorization token for the request. Reference: IETF RFC 7235
try {
$result = $api_instance->vnfInstancesVnfInstanceIdTerminatePost($vnfInstanceId, $terminateVnfRequest, $accept, $contentType, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling Sol003VnfLcmApi->vnfInstancesVnfInstanceIdTerminatePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Sol003VnfLcmApi;
my $api_instance = WWW::SwaggerClient::Sol003VnfLcmApi->new();
my $vnfInstanceId = vnfInstanceId_example; # String | The identifier of the VNF instance to be terminated. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the "id" attribute in the payload body of that response.
my $terminateVnfRequest = WWW::SwaggerClient::Object::TerminateVnfRequest->new(); # TerminateVnfRequest | Parameters for the VNF termination.
my $accept = accept_example; # String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
my $contentType = contentType_example; # String | The MIME type of the body of the request. Reference: IETF RFC 7231
my $authorization = authorization_example; # String | The authorization token for the request. Reference: IETF RFC 7235
eval {
my $result = $api_instance->vnfInstancesVnfInstanceIdTerminatePost(vnfInstanceId => $vnfInstanceId, terminateVnfRequest => $terminateVnfRequest, accept => $accept, contentType => $contentType, authorization => $authorization);
print Dumper($result);
};
if ($@) {
warn "Exception when calling Sol003VnfLcmApi->vnfInstancesVnfInstanceIdTerminatePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.Sol003VnfLcmApi()
vnfInstanceId = vnfInstanceId_example # String | The identifier of the VNF instance to be terminated. This identifier can be retrieved from the resource referenced by the "Location" HTTP header in the response to a POST request creating a new VNF instance resource. It can also be retrieved from the "id" attribute in the payload body of that response.
terminateVnfRequest = # TerminateVnfRequest | Parameters for the VNF termination.
accept = accept_example # String | Content-Types that are acceptable for the response. Reference: IETF RFC 7231
contentType = contentType_example # String | The MIME type of the body of the request. Reference: IETF RFC 7231
authorization = authorization_example # String | The authorization token for the request. Reference: IETF RFC 7235
(optional)
try:
api_response = api_instance.vnf_instances_vnf_instance_id_terminate_post(vnfInstanceId, terminateVnfRequest, accept, contentType, authorization=authorization)
pprint(api_response)
except ApiException as e:
print("Exception when calling Sol003VnfLcmApi->vnfInstancesVnfInstanceIdTerminatePost: %s\n" % e)