Oracle Cloud Infrastructure v2.27.0 published on Thursday, Mar 20, 2025 by Pulumi
oci.NetworkFirewall.getNetworkFirewallPolicies
Explore with Pulumi AI
This data source provides the list of Network Firewall Policies in Oracle Cloud Infrastructure Network Firewall service.
Returns a list of Network Firewall Policies.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testNetworkFirewallPolicies = oci.NetworkFirewall.getNetworkFirewallPolicies({
    compartmentId: compartmentId,
    displayName: networkFirewallPolicyDisplayName,
    id: networkFirewallPolicyId,
    state: networkFirewallPolicyState,
});
import pulumi
import pulumi_oci as oci
test_network_firewall_policies = oci.NetworkFirewall.get_network_firewall_policies(compartment_id=compartment_id,
    display_name=network_firewall_policy_display_name,
    id=network_firewall_policy_id,
    state=network_firewall_policy_state)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/networkfirewall"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkfirewall.GetNetworkFirewallPolicies(ctx, &networkfirewall.GetNetworkFirewallPoliciesArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(networkFirewallPolicyDisplayName),
			Id:            pulumi.StringRef(networkFirewallPolicyId),
			State:         pulumi.StringRef(networkFirewallPolicyState),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testNetworkFirewallPolicies = Oci.NetworkFirewall.GetNetworkFirewallPolicies.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = networkFirewallPolicyDisplayName,
        Id = networkFirewallPolicyId,
        State = networkFirewallPolicyState,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.NetworkFirewall.NetworkFirewallFunctions;
import com.pulumi.oci.NetworkFirewall.inputs.GetNetworkFirewallPoliciesArgs;
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 testNetworkFirewallPolicies = NetworkFirewallFunctions.getNetworkFirewallPolicies(GetNetworkFirewallPoliciesArgs.builder()
            .compartmentId(compartmentId)
            .displayName(networkFirewallPolicyDisplayName)
            .id(networkFirewallPolicyId)
            .state(networkFirewallPolicyState)
            .build());
    }
}
variables:
  testNetworkFirewallPolicies:
    fn::invoke:
      function: oci:NetworkFirewall:getNetworkFirewallPolicies
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${networkFirewallPolicyDisplayName}
        id: ${networkFirewallPolicyId}
        state: ${networkFirewallPolicyState}
Using getNetworkFirewallPolicies
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 getNetworkFirewallPolicies(args: GetNetworkFirewallPoliciesArgs, opts?: InvokeOptions): Promise<GetNetworkFirewallPoliciesResult>
function getNetworkFirewallPoliciesOutput(args: GetNetworkFirewallPoliciesOutputArgs, opts?: InvokeOptions): Output<GetNetworkFirewallPoliciesResult>def get_network_firewall_policies(compartment_id: Optional[str] = None,
                                  display_name: Optional[str] = None,
                                  filters: Optional[Sequence[_networkfirewall.GetNetworkFirewallPoliciesFilter]] = None,
                                  id: Optional[str] = None,
                                  state: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetNetworkFirewallPoliciesResult
def get_network_firewall_policies_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                  display_name: Optional[pulumi.Input[str]] = None,
                                  filters: Optional[pulumi.Input[Sequence[pulumi.Input[_networkfirewall.GetNetworkFirewallPoliciesFilterArgs]]]] = None,
                                  id: Optional[pulumi.Input[str]] = None,
                                  state: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetNetworkFirewallPoliciesResult]func GetNetworkFirewallPolicies(ctx *Context, args *GetNetworkFirewallPoliciesArgs, opts ...InvokeOption) (*GetNetworkFirewallPoliciesResult, error)
func GetNetworkFirewallPoliciesOutput(ctx *Context, args *GetNetworkFirewallPoliciesOutputArgs, opts ...InvokeOption) GetNetworkFirewallPoliciesResultOutput> Note: This function is named GetNetworkFirewallPolicies in the Go SDK.
public static class GetNetworkFirewallPolicies 
{
    public static Task<GetNetworkFirewallPoliciesResult> InvokeAsync(GetNetworkFirewallPoliciesArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkFirewallPoliciesResult> Invoke(GetNetworkFirewallPoliciesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNetworkFirewallPoliciesResult> getNetworkFirewallPolicies(GetNetworkFirewallPoliciesArgs args, InvokeOptions options)
public static Output<GetNetworkFirewallPoliciesResult> getNetworkFirewallPolicies(GetNetworkFirewallPoliciesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:NetworkFirewall/getNetworkFirewallPolicies:getNetworkFirewallPolicies
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The ID of the compartment in which to list resources.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Filters
List<GetNetwork Firewall Policies Filter> 
- Id string
- Unique Network Firewall Policy identifier
- State string
- A filter to return only resources with a lifecycleState matching the given value.
- CompartmentId string
- The ID of the compartment in which to list resources.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Filters
[]GetNetwork Firewall Policies Filter 
- Id string
- Unique Network Firewall Policy identifier
- State string
- A filter to return only resources with a lifecycleState matching the given value.
- compartmentId String
- The ID of the compartment in which to list resources.
- displayName String
- A filter to return only resources that match the entire display name given.
- filters
List<GetPolicies Filter> 
- id String
- Unique Network Firewall Policy identifier
- state String
- A filter to return only resources with a lifecycleState matching the given value.
- compartmentId string
- The ID of the compartment in which to list resources.
- displayName string
- A filter to return only resources that match the entire display name given.
- filters
GetNetwork Firewall Policies Filter[] 
- id string
- Unique Network Firewall Policy identifier
- state string
- A filter to return only resources with a lifecycleState matching the given value.
- compartment_id str
- The ID of the compartment in which to list resources.
- display_name str
- A filter to return only resources that match the entire display name given.
- filters
Sequence[networkfirewall.Get Network Firewall Policies Filter] 
- id str
- Unique Network Firewall Policy identifier
- state str
- A filter to return only resources with a lifecycleState matching the given value.
- compartmentId String
- The ID of the compartment in which to list resources.
- displayName String
- A filter to return only resources that match the entire display name given.
- filters List<Property Map>
- id String
- Unique Network Firewall Policy identifier
- state String
- A filter to return only resources with a lifecycleState matching the given value.
getNetworkFirewallPolicies Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment containing the NetworkFirewall Policy.
- NetworkFirewall List<GetPolicy Summary Collections Network Firewall Policies Network Firewall Policy Summary Collection> 
- The list of network_firewall_policy_summary_collection.
- DisplayName string
- A user-friendly optional name for the firewall policy. Avoid entering confidential information.
- Filters
List<GetNetwork Firewall Policies Filter> 
- Id string
- The OCID of the resource - Network Firewall Policy.
- State string
- The current state of the Network Firewall Policy.
- CompartmentId string
- The OCID of the compartment containing the NetworkFirewall Policy.
- NetworkFirewall []GetPolicy Summary Collections Network Firewall Policies Network Firewall Policy Summary Collection 
- The list of network_firewall_policy_summary_collection.
- DisplayName string
- A user-friendly optional name for the firewall policy. Avoid entering confidential information.
- Filters
[]GetNetwork Firewall Policies Filter 
- Id string
- The OCID of the resource - Network Firewall Policy.
- State string
- The current state of the Network Firewall Policy.
- compartmentId String
- The OCID of the compartment containing the NetworkFirewall Policy.
- networkFirewall List<GetPolicy Summary Collections Policies Policy Summary Collection> 
- The list of network_firewall_policy_summary_collection.
- displayName String
- A user-friendly optional name for the firewall policy. Avoid entering confidential information.
- filters
List<GetPolicies Filter> 
- id String
- The OCID of the resource - Network Firewall Policy.
- state String
- The current state of the Network Firewall Policy.
- compartmentId string
- The OCID of the compartment containing the NetworkFirewall Policy.
- networkFirewall GetPolicy Summary Collections Network Firewall Policies Network Firewall Policy Summary Collection[] 
- The list of network_firewall_policy_summary_collection.
- displayName string
- A user-friendly optional name for the firewall policy. Avoid entering confidential information.
- filters
GetNetwork Firewall Policies Filter[] 
- id string
- The OCID of the resource - Network Firewall Policy.
- state string
- The current state of the Network Firewall Policy.
- compartment_id str
- The OCID of the compartment containing the NetworkFirewall Policy.
- network_firewall_ Sequence[networkfirewall.policy_ summary_ collections Get Network Firewall Policies Network Firewall Policy Summary Collection] 
- The list of network_firewall_policy_summary_collection.
- display_name str
- A user-friendly optional name for the firewall policy. Avoid entering confidential information.
- filters
Sequence[networkfirewall.Get Network Firewall Policies Filter] 
- id str
- The OCID of the resource - Network Firewall Policy.
- state str
- The current state of the Network Firewall Policy.
- compartmentId String
- The OCID of the compartment containing the NetworkFirewall Policy.
- networkFirewall List<Property Map>Policy Summary Collections 
- The list of network_firewall_policy_summary_collection.
- displayName String
- A user-friendly optional name for the firewall policy. Avoid entering confidential information.
- filters List<Property Map>
- id String
- The OCID of the resource - Network Firewall Policy.
- state String
- The current state of the Network Firewall Policy.
Supporting Types
GetNetworkFirewallPoliciesFilter    
GetNetworkFirewallPoliciesNetworkFirewallPolicySummaryCollection        
GetNetworkFirewallPoliciesNetworkFirewallPolicySummaryCollectionItem         
- AttachedNetwork intFirewall Count 
- Count of number of Network Firewall attached to the Policy.
- CompartmentId string
- The ID of the compartment in which to list resources.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- Unique Network Firewall Policy identifier
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- State string
- A filter to return only resources with a lifecycleState matching the given value.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- TimeUpdated string
- The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- AttachedNetwork intFirewall Count 
- Count of number of Network Firewall attached to the Policy.
- CompartmentId string
- The ID of the compartment in which to list resources.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- DisplayName string
- A filter to return only resources that match the entire display name given.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- Unique Network Firewall Policy identifier
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- State string
- A filter to return only resources with a lifecycleState matching the given value.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- TimeUpdated string
- The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- attachedNetwork IntegerFirewall Count 
- Count of number of Network Firewall attached to the Policy.
- compartmentId String
- The ID of the compartment in which to list resources.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName String
- A filter to return only resources that match the entire display name given.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- Unique Network Firewall Policy identifier
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- state String
- A filter to return only resources with a lifecycleState matching the given value.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- timeUpdated String
- The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- attachedNetwork numberFirewall Count 
- Count of number of Network Firewall attached to the Policy.
- compartmentId string
- The ID of the compartment in which to list resources.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName string
- A filter to return only resources that match the entire display name given.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id string
- Unique Network Firewall Policy identifier
- lifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- state string
- A filter to return only resources with a lifecycleState matching the given value.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated string
- The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- timeUpdated string
- The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- attached_network_ intfirewall_ count 
- Count of number of Network Firewall attached to the Policy.
- compartment_id str
- The ID of the compartment in which to list resources.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- display_name str
- A filter to return only resources that match the entire display name given.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id str
- Unique Network Firewall Policy identifier
- lifecycle_details str
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- state str
- A filter to return only resources with a lifecycleState matching the given value.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- time_created str
- The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- time_updated str
- The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- attachedNetwork NumberFirewall Count 
- Count of number of Network Firewall attached to the Policy.
- compartmentId String
- The ID of the compartment in which to list resources.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName String
- A filter to return only resources that match the entire display name given.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- Unique Network Firewall Policy identifier
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- state String
- A filter to return only resources with a lifecycleState matching the given value.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- timeUpdated String
- The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.