Creates a deployment for a virtual machine and allows some preconfigured defaults from the image gallery
Inheritance: Elastacloud.AzureManagement.Fluent.Commands.Services.ServiceCommand
 public void OpenPorts(string cloudServiceName, string virtualMachineName, params InputEndpoint[] endpoints)
 {
     // 1. Get host details
     var host = GetHostDetails(cloudServiceName);
     var vmHost = host.First(hostVm => hostVm.RoleName == virtualMachineName);
     // 2. Update Xml by inserting objects
     var finalEndpoints = vmHost.Endpoints.Concat(endpoints).ToArray();
     // 3. Commit using UpdateRole
     var command = new UpdateVirtualMachinePortsCommand(cloudServiceName, virtualMachineName, finalEndpoints)
     {
         SubscriptionId = SubscriptionId,
         Certificate = ManagementCertificate
     };
     command.Execute();
 }
 public void ClosePorts(string cloudServiceName, string virtualMachineName, params InputEndpoint[] endpoints)
 {
     // 1. Get host details
     var host = GetHostDetails(cloudServiceName);
     var vmHost = host.First(hostVm => hostVm.RoleName == virtualMachineName);
     // 2. Update Xml by inserting objects
     var query = from a in vmHost.Endpoints
                 where !(from b in endpoints
                         select b.Port).Contains(a.Port)
                 select a;
     // 3. Commit using UpdateRole
     var command = new UpdateVirtualMachinePortsCommand(cloudServiceName, virtualMachineName, query.ToArray())
     {
         SubscriptionId = SubscriptionId,
         Certificate = ManagementCertificate
     };
     command.Execute();
 }