/// <summary>
 /// Creates or updates a DDoS custom policy.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosCustomPolicyName'>
 /// The name of the DDoS custom policy.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create or update operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DdosCustomPolicyInner> CreateOrUpdateAsync(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, DdosCustomPolicyInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, ddosCustomPolicyName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Update a DDoS custom policy 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='ddosCustomPolicyName'>
 /// The name of the DDoS custom policy.
 /// </param>
 /// <param name='tags'>
 /// Resource tags.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DdosCustomPolicyInner> BeginUpdateTagsAsync(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, ddosCustomPolicyName, tags, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Gets information about the specified DDoS custom policy.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosCustomPolicyName'>
 /// The name of the DDoS custom policy.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DdosCustomPolicy> GetAsync(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, ddosCustomPolicyName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Deletes the specified DDoS custom policy.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosCustomPolicyName'>
 /// The name of the DDoS custom policy.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, ddosCustomPolicyName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Beispiel #5
0
 /// <summary>
 /// Gets information about the specified DDoS custom policy.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosCustomPolicyName'>
 /// The name of the DDoS custom policy.
 /// </param>
 public static DdosCustomPolicy Get(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName)
 {
     return(operations.GetAsync(resourceGroupName, ddosCustomPolicyName).GetAwaiter().GetResult());
 }
Beispiel #6
0
 /// <summary>
 /// Deletes the specified DDoS custom policy.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosCustomPolicyName'>
 /// The name of the DDoS custom policy.
 /// </param>
 public static void Delete(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName)
 {
     operations.DeleteAsync(resourceGroupName, ddosCustomPolicyName).GetAwaiter().GetResult();
 }
Beispiel #7
0
 /// <summary>
 /// Update a DDoS custom policy 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='ddosCustomPolicyName'>
 /// The name of the DDoS custom policy.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the update DDoS custom policy resource tags.
 /// </param>
 public static DdosCustomPolicy BeginUpdateTags(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, TagsObject parameters)
 {
     return(operations.BeginUpdateTagsAsync(resourceGroupName, ddosCustomPolicyName, parameters).GetAwaiter().GetResult());
 }
Beispiel #8
0
 /// <summary>
 /// Creates or updates a DDoS custom policy.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='ddosCustomPolicyName'>
 /// The name of the DDoS custom policy.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the create or update operation.
 /// </param>
 public static DdosCustomPolicy BeginCreateOrUpdate(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, DdosCustomPolicy parameters)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, ddosCustomPolicyName, parameters).GetAwaiter().GetResult());
 }