-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
193df78
commit 7537ab4
Showing
12 changed files
with
1,727 additions
and
3 deletions.
There are no files selected for viewing
927 changes: 927 additions & 0 deletions
927
src/SDKs/Network/Management.Network/Generated/DdosCustomPoliciesOperations.cs
Large diffs are not rendered by default.
Oops, something went wrong.
323 changes: 323 additions & 0 deletions
323
src/SDKs/Network/Management.Network/Generated/DdosCustomPoliciesOperationsExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,323 @@ | ||
// <auto-generated> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.Network | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// Extension methods for DdosCustomPoliciesOperations. | ||
/// </summary> | ||
public static partial class DdosCustomPoliciesOperationsExtensions | ||
{ | ||
/// <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(); | ||
} | ||
|
||
/// <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(); | ||
} | ||
|
||
/// <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(); | ||
} | ||
|
||
/// <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> | ||
/// 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 CreateOrUpdate(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, DdosCustomPolicy parameters) | ||
{ | ||
return operations.CreateOrUpdateAsync(resourceGroupName, ddosCustomPolicyName, parameters).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <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<DdosCustomPolicy> CreateOrUpdateAsync(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, DdosCustomPolicy 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='parameters'> | ||
/// Parameters supplied to the update DDoS custom policy resource tags. | ||
/// </param> | ||
public static DdosCustomPolicy UpdateTags(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, TagsObject parameters) | ||
{ | ||
return operations.UpdateTagsAsync(resourceGroupName, ddosCustomPolicyName, parameters).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <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> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task<DdosCustomPolicy> UpdateTagsAsync(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, TagsObject parameters, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, ddosCustomPolicyName, parameters, 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> | ||
public static void BeginDelete(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName) | ||
{ | ||
operations.BeginDeleteAsync(resourceGroupName, ddosCustomPolicyName).GetAwaiter().GetResult(); | ||
} | ||
|
||
/// <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 BeginDeleteAsync(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
(await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, ddosCustomPolicyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); | ||
} | ||
|
||
/// <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(); | ||
} | ||
|
||
/// <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<DdosCustomPolicy> BeginCreateOrUpdateAsync(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, DdosCustomPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(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='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(); | ||
} | ||
|
||
/// <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> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
public static async Task<DdosCustomPolicy> BeginUpdateTagsAsync(this IDdosCustomPoliciesOperations operations, string resourceGroupName, string ddosCustomPolicyName, TagsObject parameters, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
using (var _result = await operations.BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, ddosCustomPolicyName, parameters, null, cancellationToken).ConfigureAwait(false)) | ||
{ | ||
return _result.Body; | ||
} | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.