예제 #1
0
 /// <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);
     }
 }
예제 #2
0
 /// <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);
     }
 }
예제 #3
0
 /// <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);
     }
 }
예제 #4
0
 /// <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());
 }
예제 #5
0
 /// <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());
 }
예제 #6
0
 /// <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();
 }
예제 #7
0
 /// <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();
 }
예제 #8
0
 /// <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();
 }
예제 #9
0
 /// <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());
 }
예제 #10
0
 /// <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());
 }
예제 #11
0
 /// <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();
 }
예제 #12
0
 /// <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());
 }