/// <summary> /// Get all lab plans for a subscription and resource group. /// </summary> /// <remarks> /// Returns a list of all lab plans for a subscription and resource group. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <LabPlan> > ListByResourceGroupAsync(this ILabPlansOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates a Lab Plan resource. /// </summary> /// <remarks> /// Operation to update a Lab Plan resource. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The request body. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='labPlanName'> /// The name of the lab plan that uniquely identifies it within containing /// resource group. Used in resource URIs and in UI. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <LabPlan> BeginUpdateAsync(this ILabPlansOperations operations, LabPlanUpdate body, string resourceGroupName, string labPlanName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(body, resourceGroupName, labPlanName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get all lab plans for a subscription. /// </summary> /// <remarks> /// Returns a list of all lab plans within a subscription /// </remarks> /// <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 <LabPlan> > ListBySubscriptionNextAsync(this ILabPlansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get all lab plans for a subscription and resource group. /// </summary> /// <remarks> /// Returns a list of all lab plans for a subscription and resource group. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> public static IPage <LabPlan> ListByResourceGroup(this ILabPlansOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Get all lab plans for a subscription and resource group. /// </summary> /// <remarks> /// Returns a list of all lab plans for a subscription and resource group. /// </remarks> /// <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 <LabPlan> ListByResourceGroupNext(this ILabPlansOperations operations, string nextPageLink) { return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Save an image from a lab VM to the attached shared image gallery. /// </summary> /// <remarks> /// Saves an image from a lab VM to the attached shared image gallery. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The request body. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='labPlanName'> /// The name of the lab plan that uniquely identifies it within containing /// resource group. Used in resource URIs and in UI. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginSaveImageAsync(this ILabPlansOperations operations, SaveImageBody body, string resourceGroupName, string labPlanName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginSaveImageWithHttpMessagesAsync(body, resourceGroupName, labPlanName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Save an image from a lab VM to the attached shared image gallery. /// </summary> /// <remarks> /// Saves an image from a lab VM to the attached shared image gallery. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The request body. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='labPlanName'> /// The name of the lab plan that uniquely identifies it within containing /// resource group. Used in resource URIs and in UI. /// </param> public static void BeginSaveImage(this ILabPlansOperations operations, SaveImageBody body, string resourceGroupName, string labPlanName) { operations.BeginSaveImageAsync(body, resourceGroupName, labPlanName).GetAwaiter().GetResult(); }
/// <summary> /// Deletes a Lab Plan resource. /// </summary> /// <remarks> /// Operation to delete a Lab Plan resource. Deleting a lab plan does not /// delete labs associated with a lab plan, nor does it delete shared images /// added to a gallery via the lab plan permission container. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='labPlanName'> /// The name of the lab plan that uniquely identifies it within containing /// resource group. Used in resource URIs and in UI. /// </param> public static void BeginDelete(this ILabPlansOperations operations, string resourceGroupName, string labPlanName) { operations.BeginDeleteAsync(resourceGroupName, labPlanName).GetAwaiter().GetResult(); }
/// <summary> /// Updates a Lab Plan resource. /// </summary> /// <remarks> /// Operation to update a Lab Plan resource. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The request body. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='labPlanName'> /// The name of the lab plan that uniquely identifies it within containing /// resource group. Used in resource URIs and in UI. /// </param> public static LabPlan BeginUpdate(this ILabPlansOperations operations, LabPlanUpdate body, string resourceGroupName, string labPlanName) { return(operations.BeginUpdateAsync(body, resourceGroupName, labPlanName).GetAwaiter().GetResult()); }
/// <summary> /// Get all lab plans for a subscription. /// </summary> /// <remarks> /// Returns a list of all lab plans within a subscription /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='filter'> /// The filter to apply to the operation. /// </param> public static IPage <LabPlan> ListBySubscription(this ILabPlansOperations operations, string filter = default(string)) { return(operations.ListBySubscriptionAsync(filter).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a Lab Plan resource. /// </summary> /// <remarks> /// Operation to delete a Lab Plan resource. Deleting a lab plan does not /// delete labs associated with a lab plan, nor does it delete shared images /// added to a gallery via the lab plan permission container. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='labPlanName'> /// The name of the lab plan that uniquely identifies it within containing /// resource group. Used in resource URIs and in UI. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ILabPlansOperations operations, string resourceGroupName, string labPlanName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, labPlanName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Retrieves a Lab Plan resource. /// </summary> /// <remarks> /// Retrieves the properties of a Lab Plan. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='labPlanName'> /// The name of the lab plan that uniquely identifies it within containing /// resource group. Used in resource URIs and in UI. /// </param> public static LabPlan Get(this ILabPlansOperations operations, string resourceGroupName, string labPlanName) { return(operations.GetAsync(resourceGroupName, labPlanName).GetAwaiter().GetResult()); }