예제 #1
0
 /// <summary>
 /// Get the metric definitions of the specified plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='plan'>
 /// Name of the plan.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MetricDefinitionList> ListMetricDefinitionsAsync(this IPlansOperations operations, string resourceGroupName, string plan, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, plan, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #2
0
 /// <summary>
 /// Create or update the plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='plan'>
 /// Name of the plan.
 /// </param>
 /// <param name='newPlan'>
 /// New plan.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Plan> CreateOrUpdateAsync(this IPlansOperations operations, string resourceGroupName, string plan, Plan newPlan, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, plan, newPlan, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #3
0
 /// <summary>
 /// Get the specified plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='plan'>
 /// Name of the plan.
 /// </param>
 public static Plan Get(this IPlansOperations operations, string resourceGroupName, string plan)
 {
     return(operations.GetAsync(resourceGroupName, plan).GetAwaiter().GetResult());
 }
예제 #4
0
 /// <summary>
 /// Get the list of plans under a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 public static IPage <Plan> List(this IPlansOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName).GetAwaiter().GetResult());
 }
예제 #5
0
 /// <summary>
 /// Get the list of plans under 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 <Plan> ListNext(this IPlansOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
예제 #6
0
 /// <summary>
 /// List all plans across all subscriptions.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <Plan> ListAll(this IPlansOperations operations)
 {
     return(operations.ListAllAsync().GetAwaiter().GetResult());
 }
예제 #7
0
 /// <summary>
 /// Get the metric definitions of the specified plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='plan'>
 /// Name of the plan.
 /// </param>
 public static MetricDefinitionList ListMetricDefinitions(this IPlansOperations operations, string resourceGroupName, string plan)
 {
     return(operations.ListMetricDefinitionsAsync(resourceGroupName, plan).GetAwaiter().GetResult());
 }
예제 #8
0
 /// <summary>
 /// Delete the specified plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='plan'>
 /// Name of the plan.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IPlansOperations operations, string resourceGroupName, string plan, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, plan, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
예제 #9
0
 /// <summary>
 /// Delete the specified plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='plan'>
 /// Name of the plan.
 /// </param>
 public static void Delete(this IPlansOperations operations, string resourceGroupName, string plan)
 {
     operations.DeleteAsync(resourceGroupName, plan).GetAwaiter().GetResult();
 }
예제 #10
0
 /// <summary>
 /// Create or update the plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='plan'>
 /// Name of the plan.
 /// </param>
 /// <param name='newPlan'>
 /// New plan.
 /// </param>
 public static Plan CreateOrUpdate(this IPlansOperations operations, string resourceGroupName, string plan, Plan newPlan)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, plan, newPlan).GetAwaiter().GetResult());
 }