If you need to set the Lease settings here is some code that we use:
int deployLease = 7 * 24 * 60 * 60;
int storageLease = 30 * 24 * 60 * 60;
InstantiationParamsType instantiationParamsType = new InstantiationParamsType();
LeaseSettingsSectionType leaseSettingsSectionType = new LeaseSettingsSectionType
{
DeploymentLeaseInSecondsSpecified = true,
DeploymentLeaseInSeconds = deployLease,
DeploymentLeaseExpirationSpecified = true,
StorageLeaseInSecondsSpecified = true,
StorageLeaseInSeconds = storageLease,
StorageLeaseExpirationSpecified = false
};
Msg_Type leaseInfo = new Msg_Type();
leaseSettingsSectionType.Info = leaseInfo;
instantiationParamsType.Items = new Section_Type[]{leaseSettingsSectionType};
InstantiateVAppTemplateParamsType stuff = new InstantiateVAppTemplateParamsType
{
AllEULAsAccepted = true,
name = alias,
Source = template.Reference,
deploy = true,
Description = description,
InstantiationParams = instantiationParamsType,
};
Vapp app = vdc.InstantiateVappTemplate(stuff);