/// <summary> /// Get custom image. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the custom image. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($select=vm)' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CustomImageInner> GetAsync(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, name, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List custom images in a given lab. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <CustomImageInner> > ListNextAsync(this ICustomImagesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List custom images in a given lab. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <CustomImageInner> > ListAsync(this ICustomImagesOperations operations, string resourceGroupName, string labName, ODataQuery <CustomImageInner> odataQuery = default(ODataQuery <CustomImageInner>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create or replace an existing custom image. This operation can take a while /// to complete. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the custom image. /// </param> /// <param name='customImage'> /// A custom image. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CustomImageInner> BeginCreateOrUpdateAsync(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name, CustomImageInner customImage, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, name, customImage, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Delete custom image. This operation can take a while to complete. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the custom image. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, labName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Get custom image. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the custom image. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($select=vm)' /// </param> public static CustomImage Get(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, labName, name, expand).GetAwaiter().GetResult()); }
/// <summary> /// List custom images in a given lab. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <CustomImage> List(this ICustomImagesOperations operations, string resourceGroupName, string labName, ODataQuery <CustomImage> odataQuery = default(ODataQuery <CustomImage>)) { return(operations.ListAsync(resourceGroupName, labName, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// List custom images in a given lab. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <CustomImage> ListNext(this ICustomImagesOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Delete custom image. This operation can take a while to complete. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the custom image. /// </param> public static void BeginDelete(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name) { operations.BeginDeleteAsync(resourceGroupName, labName, name).GetAwaiter().GetResult(); }
/// <summary> /// Create or replace an existing custom image. This operation can take a while /// to complete. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='name'> /// The name of the custom image. /// </param> /// <param name='customImage'> /// A custom image. /// </param> public static CustomImage BeginCreateOrUpdate(this ICustomImagesOperations operations, string resourceGroupName, string labName, string name, CustomImage customImage) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, labName, name, customImage).GetAwaiter().GetResult()); }