/// <summary>
 /// Lists all availability sets in 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>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <AvailabilitySetInner> > ListAsync(this IAvailabilitySetsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all availability sets in a resource group.
 /// </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 <AvailabilitySetInner> > ListNextAsync(this IAvailabilitySetsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Update an availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Availability Set operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AvailabilitySetInner> UpdateAsync(this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName, AvailabilitySetUpdate parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, availabilitySetName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #4
0
 /// <summary>
 /// Lists all availability sets in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// The expand expression to apply to the operation. Allowed values are
 /// 'instanceView'.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <AvailabilitySet> > ListBySubscriptionAsync(this IAvailabilitySetsOperations operations, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Delete an availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <OperationStatusResponseInner> DeleteAsync(this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, availabilitySetName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #6
0
 /// <summary>
 /// Lists all availability sets in a resource group.
 /// </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 <AvailabilitySet> ListNext(this IAvailabilitySetsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
예제 #7
0
 /// <summary>
 /// Lists all available virtual machine sizes that can be used to create a new
 /// virtual machine in an existing availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 public static IEnumerable <VirtualMachineSize> ListAvailableSizes(this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName)
 {
     return(operations.ListAvailableSizesAsync(resourceGroupName, availabilitySetName).GetAwaiter().GetResult());
 }
예제 #8
0
 /// <summary>
 /// Lists all availability sets in 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 <AvailabilitySet> List(this IAvailabilitySetsOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName).GetAwaiter().GetResult());
 }
예제 #9
0
 /// <summary>
 /// Lists all availability sets in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// The expand expression to apply to the operation. Allowed values are
 /// 'instanceView'.
 /// </param>
 public static IPage <AvailabilitySet> ListBySubscription(this IAvailabilitySetsOperations operations, string expand = default(string))
 {
     return(operations.ListBySubscriptionAsync(expand).GetAwaiter().GetResult());
 }
예제 #10
0
 /// <summary>
 /// Lists all availability sets in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <AvailabilitySet> ListBySubscription(this IAvailabilitySetsOperations operations)
 {
     return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult());
 }
예제 #11
0
 /// <summary>
 /// Lists all available virtual machine sizes that can be used to create a new
 /// virtual machine in an existing availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 public static IPage<VirtualMachineSize> ListAvailableSizes(this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName)
 {
     return Task.Factory.StartNew(s => ((IAvailabilitySetsOperations)s).ListAvailableSizesAsync(resourceGroupName, availabilitySetName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
예제 #12
0
 /// <summary>
 /// The operation to delete the availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 public static void Delete(this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName)
 {
     Task.Factory.StartNew(s => ((IAvailabilitySetsOperations)s).DeleteAsync(resourceGroupName, availabilitySetName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
예제 #13
0
 /// <summary>
 /// The operation to create or update the availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='name'>
 /// Parameters supplied to the Create Availability Set operation.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Availability Set operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task<AvailabilitySet> CreateOrUpdateAsync( this IAvailabilitySetsOperations operations, string resourceGroupName, string name, AvailabilitySet parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, parameters, null, cancellationToken).ConfigureAwait(false);
     return _result.Body;
 }
예제 #14
0
 /// <summary>
 /// The operation to create or update the availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='name'>
 /// Parameters supplied to the Create Availability Set operation.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Availability Set operation.
 /// </param>
 public static AvailabilitySet CreateOrUpdate(this IAvailabilitySetsOperations operations, string resourceGroupName, string name, AvailabilitySet parameters)
 {
     return Task.Factory.StartNew(s => ((IAvailabilitySetsOperations)s).CreateOrUpdateAsync(resourceGroupName, name, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
예제 #15
0
 /// <summary>
 /// Lists all available virtual machine sizes that can be used to create a new
 /// virtual machine in an existing availability set.
 /// </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<VirtualMachineSize>> ListAvailableSizesNextAsync( this IAvailabilitySetsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     var _result = await operations.ListAvailableSizesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false);
     return _result.Body;
 }
예제 #16
0
 /// <summary>
 /// Lists all available virtual machine sizes that can be used to create a new
 /// virtual machine in an existing availability set.
 /// </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<VirtualMachineSize> ListAvailableSizesNext(this IAvailabilitySetsOperations operations, string nextPageLink)
 {
     return Task.Factory.StartNew(s => ((IAvailabilitySetsOperations)s).ListAvailableSizesNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
예제 #17
0
 /// <summary>
 /// Lists all available virtual machine sizes that can be used to create a new
 /// virtual machine in an existing availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task<IPage<VirtualMachineSize>> ListAvailableSizesAsync( this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName, CancellationToken cancellationToken = default(CancellationToken))
 {
     var _result = await operations.ListAvailableSizesWithHttpMessagesAsync(resourceGroupName, availabilitySetName, null, cancellationToken).ConfigureAwait(false);
     return _result.Body;
 }
예제 #18
0
 /// <summary>
 /// Update an availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Update Availability Set operation.
 /// </param>
 public static AvailabilitySet Update(this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName, AvailabilitySetUpdate parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, availabilitySetName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete an availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 public static OperationStatusResponse Delete(this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName)
 {
     return(operations.DeleteAsync(resourceGroupName, availabilitySetName).GetAwaiter().GetResult());
 }
예제 #20
0
 /// <summary>
 /// The operation to get the availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task<AvailabilitySet> GetAsync( this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName, CancellationToken cancellationToken = default(CancellationToken))
 {
     var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, availabilitySetName, null, cancellationToken).ConfigureAwait(false);
     return _result.Body;
 }
예제 #21
0
 /// <summary>
 /// Delete an availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 public static void Delete(this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName)
 {
     operations.DeleteAsync(resourceGroupName, availabilitySetName).GetAwaiter().GetResult();
 }
예제 #22
0
 /// <summary>
 /// Retrieves information about an availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 public static AvailabilitySet Get(this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName)
 {
     return(operations.GetAsync(resourceGroupName, availabilitySetName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete an availability set.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='availabilitySetName'>
 /// The name of the availability set.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IAvailabilitySetsOperations operations, string resourceGroupName, string availabilitySetName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, availabilitySetName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// The operation to list the availability sets.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 public static IEnumerable <AvailabilitySet> List(this IAvailabilitySetsOperations operations, string resourceGroupName)
 {
     return(Task.Factory.StartNew(s => ((IAvailabilitySetsOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }