Beispiel #1
0
 /// <summary>
 /// Gets an instance pool.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='instancePoolName'>
 /// The name of the instance pool to be retrieved.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InstancePool> GetAsync(this IInstancePoolsOperations operations, string resourceGroupName, string instancePoolName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, instancePoolName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Creates or updates an instance pool.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='instancePoolName'>
 /// The name of the instance pool to be created or updated.
 /// </param>
 /// <param name='parameters'>
 /// The requested instance pool resource state.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InstancePoolInner> CreateOrUpdateAsync(this IInstancePoolsOperations operations, string resourceGroupName, string instancePoolName, InstancePoolInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, instancePoolName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Gets a list of all instance pools in the 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 <InstancePool> > ListNextAsync(this IInstancePoolsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Updates an instance pool.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='instancePoolName'>
 /// The name of the instance pool to be updated.
 /// </param>
 /// <param name='tags'>
 /// Resource tags.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InstancePoolInner> BeginUpdateAsync(this IInstancePoolsOperations operations, string resourceGroupName, string instancePoolName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, instancePoolName, tags, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #5
0
 /// <summary>
 /// Creates or updates an instance pool.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='instancePoolName'>
 /// The name of the instance pool to be created or updated.
 /// </param>
 /// <param name='parameters'>
 /// The requested instance pool resource state.
 /// </param>
 public static InstancePool CreateOrUpdate(this IInstancePoolsOperations operations, string resourceGroupName, string instancePoolName, InstancePool parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, instancePoolName, parameters).GetAwaiter().GetResult());
 }
Beispiel #6
0
 /// <summary>
 /// Gets a list of all instance pools in the 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 <InstancePool> ListNext(this IInstancePoolsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Beispiel #7
0
 /// <summary>
 /// Gets an instance pool.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='instancePoolName'>
 /// The name of the instance pool to be retrieved.
 /// </param>
 public static InstancePool Get(this IInstancePoolsOperations operations, string resourceGroupName, string instancePoolName)
 {
     return(operations.GetAsync(resourceGroupName, instancePoolName).GetAwaiter().GetResult());
 }
Beispiel #8
0
 /// <summary>
 /// Deletes an instance pool
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='instancePoolName'>
 /// The name of the instance pool to be deleted
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IInstancePoolsOperations operations, string resourceGroupName, string instancePoolName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, instancePoolName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Beispiel #9
0
 /// <summary>
 /// Deletes an instance pool
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='instancePoolName'>
 /// The name of the instance pool to be deleted
 /// </param>
 public static void BeginDelete(this IInstancePoolsOperations operations, string resourceGroupName, string instancePoolName)
 {
     operations.BeginDeleteAsync(resourceGroupName, instancePoolName).GetAwaiter().GetResult();
 }
Beispiel #10
0
 /// <summary>
 /// Gets a list of all instance pools in the subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <InstancePool> List(this IInstancePoolsOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
Beispiel #11
0
 /// <summary>
 /// Gets a list of instance pools in the resource group
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 public static IPage <InstancePool> ListByResourceGroup(this IInstancePoolsOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }