/// <summary> /// Returns a list of all Virtual Machine Extension Images. /// </summary> /// <remarks> /// List of all Virtual Machine Extension Images for the current location are /// returned. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <VMExtension> > ListAsync(this IVMExtensionsOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns requested Virtual Machine Extension Image. /// </summary> /// <remarks> /// Returns requested Virtual Machine Extension Image matching publisher, type, /// version. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='publisher'> /// Name of the publisher. /// </param> /// <param name='type'> /// Type of extension. /// </param> /// <param name='version'> /// The version of the resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VMExtension> GetAsync(this IVMExtensionsOperations operations, string location, string publisher, string type, string version, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(location, publisher, type, version, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns requested Virtual Machine Extension Image. /// </summary> /// <remarks> /// Returns requested Virtual Machine Extension Image matching publisher, type, /// version. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='publisher'> /// Name of the publisher. /// </param> /// <param name='type'> /// Type of extension. /// </param> /// <param name='version'> /// The version of the resource. /// </param> public static VMExtension Get(this IVMExtensionsOperations operations, string location, string publisher, string type, string version) { return(operations.GetAsync(location, publisher, type, version).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of all Virtual Machine Extension Images. /// </summary> /// <remarks> /// List of all Virtual Machine Extension Images for the current location are /// returned. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location of the resource. /// </param> public static IList <VMExtension> List(this IVMExtensionsOperations operations, string location) { return(operations.ListAsync(location).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a Virtual Machine Extension Image. /// </summary> /// <remarks> /// Deletes specified Virtual Machine Extension Image. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='publisher'> /// Name of the publisher. /// </param> /// <param name='type'> /// Type of extension. /// </param> /// <param name='version'> /// The version of the resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IVMExtensionsOperations operations, string location, string publisher, string type, string version, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(location, publisher, type, version, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a Virtual Machine Extension Image. /// </summary> /// <remarks> /// Deletes specified Virtual Machine Extension Image. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='publisher'> /// Name of the publisher. /// </param> /// <param name='type'> /// Type of extension. /// </param> /// <param name='version'> /// The version of the resource. /// </param> public static void Delete(this IVMExtensionsOperations operations, string location, string publisher, string type, string version) { operations.DeleteAsync(location, publisher, type, version).GetAwaiter().GetResult(); }
/// <summary> /// Create a Virtual Machine Extension Image. /// </summary> /// <remarks> /// Create a Virtual Machine Extension Image with publisher, version. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='publisher'> /// Name of the publisher. /// </param> /// <param name='type'> /// Type of extension. /// </param> /// <param name='version'> /// The version of the resource. /// </param> /// <param name='extension'> /// Virtual Machine Extension Image creation properties. /// </param> public static VMExtension Create(this IVMExtensionsOperations operations, string location, string publisher, string type, string version, VMExtensionParameters extension) { return(operations.CreateAsync(location, publisher, type, version, extension).GetAwaiter().GetResult()); }