/// <summary>
 /// Gets all DDoS protection plans in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <DdosProtectionPlan> > ListAsync(this IDdosProtectionPlansOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates or updates a DDoS protection plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosProtectionPlanName'>
 /// The name of the DDoS protection plan.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create or update operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DdosProtectionPlan> CreateOrUpdateAsync(this IDdosProtectionPlansOperations operations, string resourceGroupName, string ddosProtectionPlanName, DdosProtectionPlan parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, ddosProtectionPlanName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Deletes the specified DDoS protection plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosProtectionPlanName'>
 /// The name of the DDoS protection plan.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IDdosProtectionPlansOperations operations, string resourceGroupName, string ddosProtectionPlanName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, ddosProtectionPlanName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Esempio n. 4
0
 /// <summary>
 /// Gets all the DDoS protection plans 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 <DdosProtectionPlanInner> > ListByResourceGroupNextAsync(this IDdosProtectionPlansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets information about the specified DDoS protection plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosProtectionPlanName'>
 /// The name of the DDoS protection plan.
 /// </param>
 public static DdosProtectionPlan Get(this IDdosProtectionPlansOperations operations, string resourceGroupName, string ddosProtectionPlanName)
 {
     return(operations.GetAsync(resourceGroupName, ddosProtectionPlanName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all the DDoS protection plans 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 <DdosProtectionPlan> ListByResourceGroupNext(this IDdosProtectionPlansOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes the specified DDoS protection plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosProtectionPlanName'>
 /// The name of the DDoS protection plan.
 /// </param>
 public static void Delete(this IDdosProtectionPlansOperations operations, string resourceGroupName, string ddosProtectionPlanName)
 {
     operations.DeleteAsync(resourceGroupName, ddosProtectionPlanName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Creates or updates a DDoS protection plan.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosProtectionPlanName'>
 /// The name of the DDoS protection plan.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create or update operation.
 /// </param>
 public static DdosProtectionPlan BeginCreateOrUpdate(this IDdosProtectionPlansOperations operations, string resourceGroupName, string ddosProtectionPlanName, DdosProtectionPlan parameters)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, ddosProtectionPlanName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all the DDoS protection plans 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 <DdosProtectionPlan> ListByResourceGroup(this IDdosProtectionPlansOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all DDoS protection plans in a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <DdosProtectionPlan> List(this IDdosProtectionPlansOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update a DDoS protection plan tags.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosProtectionPlanName'>
 /// The name of the DDoS protection plan.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the update DDoS protection plan resource tags.
 /// </param>
 public static DdosProtectionPlan UpdateTags(this IDdosProtectionPlansOperations operations, string resourceGroupName, string ddosProtectionPlanName, TagsObject parameters)
 {
     return(operations.UpdateTagsAsync(resourceGroupName, ddosProtectionPlanName, parameters).GetAwaiter().GetResult());
 }