Azure Classic v5.43.0, May 6 23
Azure Classic v5.43.0, May 6 23
azure.network.getFirewallPolicy
Explore with Pulumi AI
Use this data source to access information about an existing Firewall Policy.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Network.GetFirewallPolicy.Invoke(new()
{
Name = "existing",
ResourceGroupName = "existing",
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getFirewallPolicyResult => getFirewallPolicyResult.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := network.LookupFirewallPolicy(ctx, &network.LookupFirewallPolicyArgs{
Name: "existing",
ResourceGroupName: "existing",
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetFirewallPolicyArgs;
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) {
final var example = NetworkFunctions.getFirewallPolicy(GetFirewallPolicyArgs.builder()
.name("existing")
.resourceGroupName("existing")
.build());
ctx.export("id", example.applyValue(getFirewallPolicyResult -> getFirewallPolicyResult.id()));
}
}
import pulumi
import pulumi_azure as azure
example = azure.network.get_firewall_policy(name="existing",
resource_group_name="existing")
pulumi.export("id", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getFirewallPolicy({
name: "existing",
resourceGroupName: "existing",
});
export const id = example.then(example => example.id);
variables:
example:
fn::invoke:
Function: azure:network:getFirewallPolicy
Arguments:
name: existing
resourceGroupName: existing
outputs:
id: ${example.id}
Using getFirewallPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFirewallPolicy(args: GetFirewallPolicyArgs, opts?: InvokeOptions): Promise<GetFirewallPolicyResult>
function getFirewallPolicyOutput(args: GetFirewallPolicyOutputArgs, opts?: InvokeOptions): Output<GetFirewallPolicyResult>
def get_firewall_policy(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFirewallPolicyResult
def get_firewall_policy_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFirewallPolicyResult]
func LookupFirewallPolicy(ctx *Context, args *LookupFirewallPolicyArgs, opts ...InvokeOption) (*LookupFirewallPolicyResult, error)
func LookupFirewallPolicyOutput(ctx *Context, args *LookupFirewallPolicyOutputArgs, opts ...InvokeOption) LookupFirewallPolicyResultOutput
> Note: This function is named LookupFirewallPolicy
in the Go SDK.
public static class GetFirewallPolicy
{
public static Task<GetFirewallPolicyResult> InvokeAsync(GetFirewallPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetFirewallPolicyResult> Invoke(GetFirewallPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFirewallPolicyResult> getFirewallPolicy(GetFirewallPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:network/getFirewallPolicy:getFirewallPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
The name of this Firewall Policy.
- Resource
Group stringName The name of the Resource Group where the Firewall Policy exists.
- Name string
The name of this Firewall Policy.
- Resource
Group stringName The name of the Resource Group where the Firewall Policy exists.
- name String
The name of this Firewall Policy.
- resource
Group StringName The name of the Resource Group where the Firewall Policy exists.
- name string
The name of this Firewall Policy.
- resource
Group stringName The name of the Resource Group where the Firewall Policy exists.
- name str
The name of this Firewall Policy.
- resource_
group_ strname The name of the Resource Group where the Firewall Policy exists.
- name String
The name of this Firewall Policy.
- resource
Group StringName The name of the Resource Group where the Firewall Policy exists.
getFirewallPolicy Result
The following output properties are available:
- Base
Policy stringId - Child
Policies List<string> - Dns
List<Get
Firewall Policy Dn> - Firewalls List<string>
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Resource
Group stringName - Rule
Collection List<string>Groups - Dictionary<string, string>
A mapping of tags assigned to the Firewall Policy.
- Threat
Intelligence List<GetAllowlists Firewall Policy Threat Intelligence Allowlist> - Threat
Intelligence stringMode
- Base
Policy stringId - Child
Policies []string - Dns
[]Get
Firewall Policy Dn - Firewalls []string
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Resource
Group stringName - Rule
Collection []stringGroups - map[string]string
A mapping of tags assigned to the Firewall Policy.
- Threat
Intelligence []GetAllowlists Firewall Policy Threat Intelligence Allowlist - Threat
Intelligence stringMode
- base
Policy StringId - child
Policies List<String> - dns
List<Get
Firewall Policy Dn> - firewalls List<String>
- id String
The provider-assigned unique ID for this managed resource.
- location String
- name String
- resource
Group StringName - rule
Collection List<String>Groups - Map<String,String>
A mapping of tags assigned to the Firewall Policy.
- threat
Intelligence List<GetAllowlists Firewall Policy Threat Intelligence Allowlist> - threat
Intelligence StringMode
- base
Policy stringId - child
Policies string[] - dns
Get
Firewall Policy Dn[] - firewalls string[]
- id string
The provider-assigned unique ID for this managed resource.
- location string
- name string
- resource
Group stringName - rule
Collection string[]Groups - {[key: string]: string}
A mapping of tags assigned to the Firewall Policy.
- threat
Intelligence GetAllowlists Firewall Policy Threat Intelligence Allowlist[] - threat
Intelligence stringMode
- base_
policy_ strid - child_
policies Sequence[str] - dns
Sequence[Get
Firewall Policy Dn] - firewalls Sequence[str]
- id str
The provider-assigned unique ID for this managed resource.
- location str
- name str
- resource_
group_ strname - rule_
collection_ Sequence[str]groups - Mapping[str, str]
A mapping of tags assigned to the Firewall Policy.
- threat_
intelligence_ Sequence[Getallowlists Firewall Policy Threat Intelligence Allowlist] - threat_
intelligence_ strmode
- base
Policy StringId - child
Policies List<String> - dns List<Property Map>
- firewalls List<String>
- id String
The provider-assigned unique ID for this managed resource.
- location String
- name String
- resource
Group StringName - rule
Collection List<String>Groups - Map<String>
A mapping of tags assigned to the Firewall Policy.
- threat
Intelligence List<Property Map>Allowlists - threat
Intelligence StringMode
Supporting Types
GetFirewallPolicyDn
- Network
Rule boolFqdn Enabled - Proxy
Enabled bool - Servers List<string>
- Network
Rule boolFqdn Enabled - Proxy
Enabled bool - Servers []string
- network
Rule BooleanFqdn Enabled - proxy
Enabled Boolean - servers List<String>
- network
Rule booleanFqdn Enabled - proxy
Enabled boolean - servers string[]
- network_
rule_ boolfqdn_ enabled - proxy_
enabled bool - servers Sequence[str]
- network
Rule BooleanFqdn Enabled - proxy
Enabled Boolean - servers List<String>
GetFirewallPolicyThreatIntelligenceAllowlist
- Fqdns List<string>
- Ip
Addresses List<string>
- Fqdns []string
- Ip
Addresses []string
- fqdns List<String>
- ip
Addresses List<String>
- fqdns string[]
- ip
Addresses string[]
- fqdns Sequence[str]
- ip_
addresses Sequence[str]
- fqdns List<String>
- ip
Addresses List<String>
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.