示例#1
0
 /// <summary>
 /// Retrieve protection policy with specified name within a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='policyName'>
 /// The name of the Web Application Firewall Policy.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WebApplicationFirewallPolicy> GetAsync(this IPoliciesOperations operations, string resourceGroupName, string policyName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, policyName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Get 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='labName'>
 /// The name of the lab.
 /// </param>
 /// <param name='policySetName'>
 /// The name of the policy set.
 /// </param>
 /// <param name='name'>
 /// The name of the policy.
 /// </param>
 /// <param name='expand'>
 /// Specify the $expand query. Example: 'properties($select=description)'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Policy> GetAsync(this IPoliciesOperations operations, string resourceGroupName, string labName, string policySetName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, policySetName, name, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }