// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.network;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.network.FirewallArgs;
import com.pulumi.azure.network.inputs.FirewallState;
import com.pulumi.azure.network.outputs.FirewallIpConfiguration;
import com.pulumi.azure.network.outputs.FirewallManagementIpConfiguration;
import com.pulumi.azure.network.outputs.FirewallVirtualHub;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages an Azure Firewall.
 * 
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.network.PublicIp;
 * import com.pulumi.azure.network.PublicIpArgs;
 * import com.pulumi.azure.network.Firewall;
 * import com.pulumi.azure.network.FirewallArgs;
 * import com.pulumi.azure.network.inputs.FirewallIpConfigurationArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleVirtualNetwork = new VirtualNetwork(&#34;exampleVirtualNetwork&#34;, VirtualNetworkArgs.builder()        
 *             .addressSpaces(&#34;10.0.0.0/16&#34;)
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .build());
 * 
 *         var exampleSubnet = new Subnet(&#34;exampleSubnet&#34;, SubnetArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes(&#34;10.0.1.0/24&#34;)
 *             .build());
 * 
 *         var examplePublicIp = new PublicIp(&#34;examplePublicIp&#34;, PublicIpArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .allocationMethod(&#34;Static&#34;)
 *             .sku(&#34;Standard&#34;)
 *             .build());
 * 
 *         var exampleFirewall = new Firewall(&#34;exampleFirewall&#34;, FirewallArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .skuName(&#34;AZFW_VNet&#34;)
 *             .skuTier(&#34;Standard&#34;)
 *             .ipConfigurations(FirewallIpConfigurationArgs.builder()
 *                 .name(&#34;configuration&#34;)
 *                 .subnetId(exampleSubnet.id())
 *                 .publicIpAddressId(examplePublicIp.id())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Azure Firewalls can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:network/firewall:Firewall example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/azureFirewalls/testfirewall
 * ```
 * 
 */
@ResourceType(type="azure:network/firewall:Firewall")
public class Firewall extends com.pulumi.resources.CustomResource {
    /**
     * A list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution.
     * 
     */
    @Export(name="dnsServers", refs={List.class,String.class}, tree="[0,1]")
    private Output</* @Nullable */ List<String>> dnsServers;

    /**
     * @return A list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution.
     * 
     */
    public Output<Optional<List<String>>> dnsServers() {
        return Codegen.optional(this.dnsServers);
    }
    /**
     * The ID of the Firewall Policy applied to this Firewall.
     * 
     */
    @Export(name="firewallPolicyId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> firewallPolicyId;

    /**
     * @return The ID of the Firewall Policy applied to this Firewall.
     * 
     */
    public Output<Optional<String>> firewallPolicyId() {
        return Codegen.optional(this.firewallPolicyId);
    }
    /**
     * An `ip_configuration` block as documented below.
     * 
     */
    @Export(name="ipConfigurations", refs={List.class,FirewallIpConfiguration.class}, tree="[0,1]")
    private Output</* @Nullable */ List<FirewallIpConfiguration>> ipConfigurations;

    /**
     * @return An `ip_configuration` block as documented below.
     * 
     */
    public Output<Optional<List<FirewallIpConfiguration>>> ipConfigurations() {
        return Codegen.optional(this.ipConfigurations);
    }
    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output<String> location;

    /**
     * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * A `management_ip_configuration` block as documented below, which allows force-tunnelling of traffic to be performed by the firewall. Adding or removing this block or changing the `subnet_id` in an existing block forces a new resource to be created. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="managementIpConfiguration", refs={FirewallManagementIpConfiguration.class}, tree="[0]")
    private Output</* @Nullable */ FirewallManagementIpConfiguration> managementIpConfiguration;

    /**
     * @return A `management_ip_configuration` block as documented below, which allows force-tunnelling of traffic to be performed by the firewall. Adding or removing this block or changing the `subnet_id` in an existing block forces a new resource to be created. Changing this forces a new resource to be created.
     * 
     */
    public Output<Optional<FirewallManagementIpConfiguration>> managementIpConfiguration() {
        return Codegen.optional(this.managementIpConfiguration);
    }
    /**
     * Specifies the name of the Firewall. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return Specifies the name of the Firewall. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * A list of SNAT private CIDR IP ranges, or the special string `IANAPrivateRanges`, which indicates Azure Firewall does not SNAT when the destination IP address is a private range per IANA RFC 1918.
     * 
     */
    @Export(name="privateIpRanges", refs={List.class,String.class}, tree="[0,1]")
    private Output</* @Nullable */ List<String>> privateIpRanges;

    /**
     * @return A list of SNAT private CIDR IP ranges, or the special string `IANAPrivateRanges`, which indicates Azure Firewall does not SNAT when the destination IP address is a private range per IANA RFC 1918.
     * 
     */
    public Output<Optional<List<String>>> privateIpRanges() {
        return Codegen.optional(this.privateIpRanges);
    }
    /**
     * The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * SKU name of the Firewall. Possible values are `AZFW_Hub` and `AZFW_VNet`. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="skuName", refs={String.class}, tree="[0]")
    private Output<String> skuName;

    /**
     * @return SKU name of the Firewall. Possible values are `AZFW_Hub` and `AZFW_VNet`. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> skuName() {
        return this.skuName;
    }
    /**
     * SKU tier of the Firewall. Possible values are `Premium`, `Standard` and `Basic`.
     * 
     */
    @Export(name="skuTier", refs={String.class}, tree="[0]")
    private Output<String> skuTier;

    /**
     * @return SKU tier of the Firewall. Possible values are `Premium`, `Standard` and `Basic`.
     * 
     */
    public Output<String> skuTier() {
        return this.skuTier;
    }
    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output</* @Nullable */ Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }
    /**
     * The operation mode for threat intelligence-based filtering. Possible values are: `Off`, `Alert` and `Deny`. Defaults to `Alert`.
     * 
     */
    @Export(name="threatIntelMode", refs={String.class}, tree="[0]")
    private Output<String> threatIntelMode;

    /**
     * @return The operation mode for threat intelligence-based filtering. Possible values are: `Off`, `Alert` and `Deny`. Defaults to `Alert`.
     * 
     */
    public Output<String> threatIntelMode() {
        return this.threatIntelMode;
    }
    /**
     * A `virtual_hub` block as documented below.
     * 
     */
    @Export(name="virtualHub", refs={FirewallVirtualHub.class}, tree="[0]")
    private Output</* @Nullable */ FirewallVirtualHub> virtualHub;

    /**
     * @return A `virtual_hub` block as documented below.
     * 
     */
    public Output<Optional<FirewallVirtualHub>> virtualHub() {
        return Codegen.optional(this.virtualHub);
    }
    /**
     * Specifies a list of Availability Zones in which this Azure Firewall should be located. Changing this forces a new Azure Firewall to be created.
     * 
     * &gt; **Please Note**: Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
     * 
     */
    @Export(name="zones", refs={List.class,String.class}, tree="[0,1]")
    private Output</* @Nullable */ List<String>> zones;

    /**
     * @return Specifies a list of Availability Zones in which this Azure Firewall should be located. Changing this forces a new Azure Firewall to be created.
     * 
     * &gt; **Please Note**: Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
     * 
     */
    public Output<Optional<List<String>>> zones() {
        return Codegen.optional(this.zones);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public Firewall(String name) {
        this(name, FirewallArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public Firewall(String name, FirewallArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public Firewall(String name, FirewallArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:network/firewall:Firewall", name, args == null ? FirewallArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private Firewall(String name, Output<String> id, @Nullable FirewallState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:network/firewall:Firewall", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static Firewall get(String name, Output<String> id, @Nullable FirewallState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new Firewall(name, id, state, options);
    }
}
