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. 33
Chapter 4 Lab Manager API Method Reference
GetConfigurationByName
Thiscalltakesthenameofaconfigurationandreturnsanarrayofconfigurationsmatchingthatname.
Workspaceconfigurationnamesareunique.Morethanoneconfigurationwithagivennamecanexist.
If configurationswiththatnamedonotexist,anemptyarrayisreturned.
Syntax
Configuration [] config = GetConfigurationByName(“Config9”);
Arguments
Response
C# Sample Code
try
{
//
//** LabManagerSoap is the name of the Web reference in Visual Studio
//
LabManagerSoap.LabManagerSOAPinterface binding = new
LabManagerSoap.LabManagerSOAPinterface();
//** Create login
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
binding.AuthenticationHeaderValue.organizationname = "MyOrg";
binding.AuthenticationHeaderValue.workspacename = "MyWorkspace";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
//
//** Get Configuration objects
//
LabManagerSoap.Configuration [] Configs =
binding.GetConfigurationByName("Config24Capture");
//
//** Write to the console all configurations and their properties.
//
for (int i=0; i < Configs.Length; i++)
{
Console.WriteLine("Config name = " + Configs[i].name);
Console.WriteLine("id = " + Configs[i].id.ToString());
Console.WriteLine("description = " + Configs[i].description);
Console.WriteLine("isPublic = " +
Configs[i].isPublic.ToString());
Console.WriteLine("isDeployed = " +
Configs[i].isDeployed.ToString());
Console.WriteLine("fenceMode = " +
Configs[i].fenceMode.ToString());
Console.WriteLine("type = " + Configs[i].type.ToString());
Console.WriteLine("owner = " + Configs[i].owner);
Console.WriteLine("dateCreated = " +
Configs[i].dateCreated.ToString());
Field Data Type Description
name string Configurationname.
Field Data Type Description
configuration[] Configuration ArrayofConfigurationobjectswith
thesamename.