4.0
Table Of Contents
- Lab Manager SOAP API Reference
- Contents
- About This Book
- Introducing VMware vCenter Lab Manager SOAP API
- Getting Started with the Lab Manager SOAP API
- Lab Manager API Data Types
- Lab Manager API Method Reference
- ConfigurationCapture
- ConfigurationCheckout
- ConfigurationClone
- ConfigurationDelete
- ConfigurationDeploy
- ConfigurationPerformAction
- ConfigurationSetPublicPrivate
- ConfigurationUndeploy
- GetConfiguration
- GetConfigurationByName
- GetCurrentOrganizationName
- GetCurrentWorkspaceName
- GetMachine
- GetMachineByName
- GetSingleConfigurationByName
- ListConfigurations
- ListMachines
- LiveLink
- MachinePerformAction
- SetCurrentOrganizationByName
- SetCurrentWorkspaceByName
- Index
VMware, Inc. 31
Chapter 4 Lab Manager API Method Reference
ConfigurationUndeploy
Undeploysaconfigurationintheworkspaceanddiscardsitsstate.
Syntax
ConfigurationUndeploy(10);
Arguments
Response
Noresponse.
C# Sample Code
try
{
LabManagerSoap.LabManagerSOAPinterface binding = new
LabManagerSoap.LabManagerSOAPinterface();
binding.Url =
"https://demo18.LabManager.com/LabManager/SOAP/LabManager.asmx";
binding.Timeout = 10 * 60 * 1000; // 10 minutes
ServicePointManager.CertificatePolicy = new CertificateAccepter();
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
binding.AuthenticationHeaderValue.organizationname = "MyOrg";
binding.AuthenticationHeaderValue.workspacename = "MyWorkspace";
//
//* Get configurations in Workspace, not Library
//
int configurationType= 1;
LabManagerSoap.Configuration[] configurations =
binding.ListConfigurations(configurationType);
//
//** Undeploy all deployed configurations I own
//
for (int i=0; i < configurations.Length; i++)
{
if (configurations[i].owner.Equals("jaya"))
{
binding.ConfigurationUndeploy(configurations[i].id);
}
}
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}
Field Data Type Description
configurationID int Configurationnumericidentifier.