/1.0.0/applicationPortProfiles/{applicationPortProfileId}
33.0
deleteApplicationPortProfile
Usage and SDK Samples
curl -X DELETE -H "Authorization: [[apiKey]]" "https://localhost/cloudapi/1.0.0/applicationPortProfiles/{applicationPortProfileId}"
import javax.ws.rs.WebApplicationException;
import com.vmware.vcloud.api.rest.client.VcdClient;
import com.vmware.vcloud.api.rest.client.VcdClientImpl;
import com.vmware.vcloud.api.rest.client.OpenApiClient;
import com.vmware.vcloud.api.rest.client.CxfClientSecurityContext;
import com.vmware.vcloud.rest.openapi.model.*;
import com.vmware.vcloud.rest.openapi.api.ApplicationPortProfileApi;
import java.io.File;
import java.util.*;
public class ApplicationPortProfileApiExample {
public static void main(String[] args) {
final VcdClient vcdClient = new VcdClientImpl("https://localhost/cloudapi/cloudapi", "33.0", CxfClientSecurityContext.getDefaultCxfClientSecurityContext());
vcdClient.setCredentials(new VcdBasicLoginCredentials(<username>, <orgname>, <password>));
final OpenApiClient openApiClient = vcdClient.getOpenApiClient();
final ApplicationPortProfileApi api = openApiClient.createProxy(ApplicationPortProfileApi.class);
try {
api.deleteApplicationPortProfile(applicationPortProfileId);
// Print response details:
System.out.println("Response code: " + openApiClient.getLastStatus(api));
System.out.println("Rest Links: " + openApiClient.getLastLinks(api));
} catch (WebApplicationException e) {
System.err.println("Exception when calling ApplicationPortProfileApi#deleteApplicationPortProfile");
System.err.println("Error message: " + e.getMessage());
System.err.println("Vcd error code:" + api.getLastVcdError(api).getMinorErrorCode());
System.err.println();
e.printStackTrace();
}
}
}
import com.vmware.vcloud.rest.openapi.api.ApplicationPortProfileApi;
public class ApplicationPortProfileApiExample {
public static void main(String[] args) {
ApplicationPortProfileApi apiInstance = new ApplicationPortProfileApi();
String applicationPortProfileId = applicationPortProfileId_example; // String |
try {
apiInstance.deleteApplicationPortProfile(applicationPortProfileId);
} catch (ApiException e) {
System.err.println("Exception when calling ApplicationPortProfileApi#deleteApplicationPortProfile");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[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 *applicationPortProfileId = applicationPortProfileId_example; //
ApplicationPortProfileApi *apiInstance = [[ApplicationPortProfileApi alloc] init];
// Deletes a specific user-defined Application Port Profile
[apiInstance deleteApplicationPortProfileWith:applicationPortProfileId
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var VCloudDirectorOpenApi = require('v_cloud_director_open_api');
var defaultClient = VCloudDirectorOpenApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['Authorization'] = "Token"
var api = new VCloudDirectorOpenApi.ApplicationPortProfileApi()
var applicationPortProfileId = applicationPortProfileId_example; // {String}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.deleteApplicationPortProfile(applicationPortProfileId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class deleteApplicationPortProfileExample
{
public void main()
{
// Configure API key authorization: ApiKeyAuth
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 ApplicationPortProfileApi();
var applicationPortProfileId = applicationPortProfileId_example; // String |
try
{
// Deletes a specific user-defined Application Port Profile
apiInstance.deleteApplicationPortProfile(applicationPortProfileId);
}
catch (Exception e)
{
Debug.Print("Exception when calling ApplicationPortProfileApi.deleteApplicationPortProfile: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
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\Api\ApplicationPortProfileApi();
$applicationPortProfileId = applicationPortProfileId_example; // String |
try {
$api_instance->deleteApplicationPortProfile($applicationPortProfileId);
} catch (Exception $e) {
echo 'Exception when calling ApplicationPortProfileApi->deleteApplicationPortProfile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationPortProfileApi;
# Configure API key authorization: ApiKeyAuth
$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::ApplicationPortProfileApi->new();
my $applicationPortProfileId = applicationPortProfileId_example; # String |
eval {
$api_instance->deleteApplicationPortProfile(applicationPortProfileId => $applicationPortProfileId);
};
if ($@) {
warn "Exception when calling ApplicationPortProfileApi->deleteApplicationPortProfile: $@\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: ApiKeyAuth
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.ApplicationPortProfileApi()
applicationPortProfileId = applicationPortProfileId_example # String |
try:
# Deletes a specific user-defined Application Port Profile
api_instance.delete_application_port_profile(applicationPortProfileId)
except ApiException as e:
print("Exception when calling ApplicationPortProfileApi->deleteApplicationPortProfile: %s\n" % e)
Parameters
Name | Description |
---|---|
applicationPortProfileId* |
String
Required
|