public async Task <IAzureFirewall> GetByResourceGroupAsync(string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) { AzureFirewallInner inner = await Inner.GetAsync( resourceGroupName, name, cancellationToken); return(inner == null ? null : WrapModel(inner)); }
/// <summary> /// Creates or updates the specified Azure Firewall. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='azureFirewallName'> /// The name of the Azure Firewall. /// </param> /// <param name='parameters'> /// Parameters supplied to the create or update Azure Firewall operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AzureFirewallInner> CreateOrUpdateAsync(this IAzureFirewallsOperations operations, string resourceGroupName, string azureFirewallName, AzureFirewallInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, azureFirewallName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
protected AzureFirewallImpl WrapModel(AzureFirewallInner inner) { return(new AzureFirewallImpl(inner.Name, inner, manager)); }