/// <summary> /// Retrieves information about a gallery. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='galleryName'> /// The name of the gallery. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <GalleryInner> GetAsync(this IGalleriesOperations operations, string resourceGroupName, string galleryName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, galleryName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List galleries under a subscription. /// </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 <GalleryInner> > ListNextAsync(this IGalleriesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Delete a gallery. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='galleryName'> /// The name of the gallery. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IGalleriesOperations operations, string resourceGroupName, string galleryName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, galleryName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Update a Shared Image Gallery. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='galleryName'> /// The name of the Shared Image Gallery. The allowed characters are alphabets /// and numbers with dots and periods allowed in the middle. The maximum length /// is 80 characters. /// </param> /// <param name='gallery'> /// Parameters supplied to the update Shared Image Gallery operation. /// </param> public static Gallery Update(this IGalleriesOperations operations, string resourceGroupName, string galleryName, GalleryUpdate gallery) { return(operations.UpdateAsync(resourceGroupName, galleryName, gallery).GetAwaiter().GetResult()); }
/// <summary> /// Delete a Shared Image Gallery. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='galleryName'> /// The name of the Shared Image Gallery to be deleted. /// </param> public static void BeginDelete(this IGalleriesOperations operations, string resourceGroupName, string galleryName) { operations.BeginDeleteAsync(resourceGroupName, galleryName).GetAwaiter().GetResult(); }
/// <summary> /// List galleries under a subscription. /// </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 <Gallery> ListNext(this IGalleriesOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// List galleries under a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <Gallery> List(this IGalleriesOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// List galleries under a resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> public static IPage <Gallery> ListByResourceGroup(this IGalleriesOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Retrieves information about a Shared Image Gallery. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='galleryName'> /// The name of the Shared Image Gallery. /// </param> public static Gallery Get(this IGalleriesOperations operations, string resourceGroupName, string galleryName) { return(operations.GetAsync(resourceGroupName, galleryName).GetAwaiter().GetResult()); }
/// <summary> /// Retrieves information about a Shared Image Gallery. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='galleryName'> /// The name of the Shared Image Gallery. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Gallery> GetAsync(this IGalleriesOperations operations, string resourceGroupName, string galleryName, CancellationToken cancellationToken) { return(await GetAsync(operations, resourceGroupName, galleryName, default(string), cancellationToken)); }
/// <summary> /// Retrieves information about a Shared Image Gallery. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='galleryName'> /// The name of the Shared Image Gallery. /// </param> /// <param name='select'> /// The select expression to apply on the operation. Possible values include: /// 'Permissions' /// </param> /// <param name='expand'> /// The expand query option to apply on the operation. Possible values include: /// 'SharingProfile/Groups' /// </param> public static Gallery Get(this IGalleriesOperations operations, string resourceGroupName, string galleryName, string select = default(string), string expand = default(string)) { return(operations.GetAsync(resourceGroupName, galleryName, select, expand).GetAwaiter().GetResult()); }