public void UpdateVMImageProcess() { var parameters = new VirtualMachineImageUpdateParameters { Label = this.Label, Eula = this.Eula, Description = this.Description, ImageFamily = this.ImageFamily, PublishedDate = this.PublishedDate, PrivacyUri = this.PrivacyUri, RecommendedVMSize = this.RecommendedVMSize }; this.ExecuteClientActionNewSM( null, this.CommandRuntime.ToString(), () => this.ComputeClient.VirtualMachineImages.Update(this.ImageName, parameters), (s, response) => this.ContextFactory <VirtualMachineImageUpdateResponse, OSImageContext>(response, s)); }
public void UpdateVMImageProcess() { var parameters = new VirtualMachineImageUpdateParameters { Label = this.Label, Eula = this.Eula, Description = this.Description, ImageFamily = this.ImageFamily, PublishedDate = this.PublishedDate, PrivacyUri = this.PrivacyUri, RecommendedVMSize = this.RecommendedVMSize }; this.ExecuteClientActionNewSM( null, this.CommandRuntime.ToString(), () => this.ComputeClient.VirtualMachineImages.Update(this.ImageName, parameters), (s, response) => this.ContextFactory<VirtualMachineImageUpdateResponse, OSImageContext>(response, s)); }
/// <summary> /// The Update OS Image operation updates an OS image that in your /// image repository. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/jj157198.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineImageOperations. /// </param> /// <param name='imageName'> /// The name of the virtual machine image to be updated. /// </param> /// <param name='parameters'> /// Parameters supplied to the Update Virtual Machine Image operation. /// </param> /// <returns> /// Parameters returned from the Create Virtual Machine Image operation. /// </returns> public static Task<VirtualMachineImageUpdateResponse> UpdateAsync(this IVirtualMachineImageOperations operations, string imageName, VirtualMachineImageUpdateParameters parameters) { return operations.UpdateAsync(imageName, parameters, CancellationToken.None); }
/// <summary> /// The Update OS Image operation updates an OS image that in your /// image repository. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/jj157198.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineImageOperations. /// </param> /// <param name='imageName'> /// The name of the virtual machine image to be updated. /// </param> /// <param name='parameters'> /// Parameters supplied to the Update Virtual Machine Image operation. /// </param> /// <returns> /// Parameters returned from the Create Virtual Machine Image operation. /// </returns> public static VirtualMachineImageUpdateResponse Update(this IVirtualMachineImageOperations operations, string imageName, VirtualMachineImageUpdateParameters parameters) { try { return operations.UpdateAsync(imageName, parameters).Result; } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }