2.5
Table Of Contents
- SOAP API Guide
- Contents
- About This Book
- Introducing VMware 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
- GetMachine
- GetMachineByName
- GetSingleConfigurationByName
- ListConfigurations
- ListMachines
- LiveLink
- MachinePerformAction
- Index
VMware Lab Manager SOAP API Guide
50 VMware, Inc.
GetMachineByName
Thiscalltakesaconfigurationidentifierandamachinenameandreturnsthematching
Machineobject.
Syntax
Machine mach = GetMachineByName(10, “Config9VM1”);
Arguments
Response
Sample Code: C#
try
{
LabManagerSoap.VMwareLabManagerSOAPinterface binding = new
LabManagerSoap.VMwareLabManagerSOAPinterface();
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
LabManagerSoap.Machine machine = binding.GetMachineByName(10,
"Config9VM1");
//** Write to the console all machines fields
Console.WriteLine("Machine = " + machine.name);
Console.WriteLine("id = " + machine.id.ToString());
Console.WriteLine("description = " + machine.description);
Console.WriteLine("internalIP = " + machine.internalIP);
Console.WriteLine("externalIP = " + machine.externalIP);
Console.WriteLine("status = " + machine.status.ToString());
Table 4-19. Arguments
Field Data Type Description
configurationId int Configurationidentifier.
name string Machinename.
Table 4-20. Response
Field Data Type Description
machine Machine MachineObject.